|
<!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>
<%= yield %>
</div>
<script>
var agentPaths = {};
<% if current_user -%>
var myAgents = <%= Utils.jsonify(current_user.agents.select([:name, :id, :schedule]).inject({}) {|m, a| m[a.name] = agent_path(a); m }) %>;
$.extend(agentPaths, myAgents);
<% end -%>
agentPaths["All Agents Index"] = <%= Utils.jsonify agents_path %>;
agentPaths["New Agent"] = <%= Utils.jsonify new_agent_path %>;
agentPaths["Account"] = <%= Utils.jsonify edit_user_registration_path %>;
agentPaths["Events Index"] = <%= Utils.jsonify events_path %>;
agentPaths["View Agent Diagram"] = <%= Utils.jsonify diagram_agents_path %>;
agentPaths["Run Event Propagation"] = { url: <%= Utils.jsonify propagate_agents_path %>, method: 'POST' };
var agentNames = [];
$.each(agentPaths, function(name, v) { agentNames.push(name); });
</script>
</body>
</html>
|