1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 |
- <!doctype html>
- <html lang="en">
- <head>
- <meta charset="utf-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <title><%= content_for?(:title) ? yield(:title) : "Huginn" %></title>
- <meta name="description" content="">
- <meta name="author" content="">
- <%= stylesheet_link_tag "application", :media => "all" %>
- <%= javascript_include_tag "application" %>
- <%= csrf_meta_tags %>
- <%= yield(:head) %>
- </head>
- <body>
- <nav class="navbar navbar-default navbar-fixed-top" role="navigation">
- <div class="container">
- <%= render 'layouts/navigation' %>
- </div>
- </nav>
- <div id="main" role="main">
- <div class="container">
- <div class="row">
- <%= render 'layouts/messages' %>
- </div>
- </div>
- <% if user_signed_in? %>
- <%= render "upgrade_warning" %>
- <% end %>
- <div id="main-content">
- <%= yield %>
- </div>
-
- </div>
- <script>
- window.agentPaths = {};
- window.agentNames = [];
- <% if current_user.present? -%>
- var myAgents = <%= Utils.jsonify(current_user.agents.pluck(:name, :id).inject({}) {|m, a| m[a.first] = agent_path(a.last); m }) %>;
- var myScenarios = <%= Utils.jsonify(current_user.scenarios.pluck(:name, :id).inject({}) {|m, s| m[s.first + " Scenario"] = scenario_path(s.last); m }) %>;
- $.extend(window.agentPaths, myAgents);
- $.extend(window.agentPaths, myScenarios);
- window.agentPaths["All Agents Index"] = <%= Utils.jsonify agents_path %>;
- window.agentPaths["New Agent"] = <%= Utils.jsonify new_agent_path %>;
- window.agentPaths["Account"] = <%= Utils.jsonify edit_user_registration_path %>;
- window.agentPaths["Events Index"] = <%= Utils.jsonify events_path %>;
- window.agentPaths["View Agent Diagram"] = <%= Utils.jsonify diagram_path %>;
- window.agentPaths["Run Event Propagation"] = { url: <%= Utils.jsonify propagate_agents_path %>, method: 'POST' };
- $.each(window.agentPaths, function(name, v) { window.agentNames.push(name); });
- <% end -%>
- </script>
- </body>
- </html>
|