summaryrefslogtreecommitdiff
path: root/app/views/layouts/admin.html.erb
blob: 0856a0f66987ab154a8be12634e6b83c447ef434 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <%= csrf_meta_tags %>
  
    <title><%= "#{params[:controller]} | #{params[:action]}" %></title>
    <%= javascript_tag "var AUTH_TOKEN = #{form_authenticity_token.inspect};" if protect_against_forgery? %>
    <%= javascript_include_tag 'admin_bundle' %>
    <%= tinymce_assets %>
    <link rel="stylesheet" href="<%= mtime_busted_path('/stylesheets/admin.css') %>">
    <script src="<%= mtime_busted_path('/javascripts/admin_search.js') %>"></script>
    <script src="<%= mtime_busted_path('/javascripts/admin_interface.js') %>"></script>
    <script src="<%= mtime_busted_path('/javascripts/related_assets.js') %>"></script>
    <script>
      var ADMIN_SEARCH_URL = "<%= admin_search_path %>";
      var ADMIN_MENU_SEARCH_URL = "<%= admin_menu_search_path %>";
      var PARAMETERIZE_PREVIEW_URL = "<%= parameterize_preview_nodes_path %>";
      var DASHBOARD_SEARCH_URL = "<%= admin_dashboard_search_path %>";
    </script>
  </head>
  
  <body>
    <div id="wrapper">
      <div id="navigation">
        <div id="main_navigation">
          <%= render :partial => 'admin/menu' if current_user %>
        </div>
        <div id="search_widget" style="display: none;">
          <div>
            <%= form_tag admin_search_path, method: :get do %>
              <%= text_field_tag :search_term, nil, placeholder: "Search nodes…", autocomplete: "off" %>
            <% end %>
          </div>
          <div id="menu_search_results" class="search_results" style="display: none"></div>
        </div>
      </div>
      <div class="admin_content_spacer"></div>
      <% if flash[:notice].present? || flash[:error].present? %>
      <div id="flash">
        <%= flash[:notice] %>
        <% if flash[:status_path] %>
          <%= link_to 'Go to Status', flash[:status_path] %>
        <% end %>
        <% if flash[:stale_locale_path] %>
          The <%= flash[:stale_locale] %> translation may be out of date —
          <%= link_to 'review it', flash[:stale_locale_path] %> too.
        <% end %>
        <% if flash[:error] %>
          <span id="flash_error"><%= flash[:error] %></span>
        <% end %>
      </div>
      <% end %>
      <div id="content">
        <%= yield %>
      </div>
      
      <div id="results"></div>
    </div>
  </body>
</html>