diff options
Diffstat (limited to 'app/views/layouts/admin.html.erb')
| -rw-r--r-- | app/views/layouts/admin.html.erb | 40 |
1 files changed, 23 insertions, 17 deletions
diff --git a/app/views/layouts/admin.html.erb b/app/views/layouts/admin.html.erb index 4536693..0856a0f 100644 --- a/app/views/layouts/admin.html.erb +++ b/app/views/layouts/admin.html.erb | |||
| @@ -10,12 +10,15 @@ | |||
| 10 | <%= javascript_tag "var AUTH_TOKEN = #{form_authenticity_token.inspect};" if protect_against_forgery? %> | 10 | <%= javascript_tag "var AUTH_TOKEN = #{form_authenticity_token.inspect};" if protect_against_forgery? %> |
| 11 | <%= javascript_include_tag 'admin_bundle' %> | 11 | <%= javascript_include_tag 'admin_bundle' %> |
| 12 | <%= tinymce_assets %> | 12 | <%= tinymce_assets %> |
| 13 | <link rel="stylesheet" href="/stylesheets/admin.css"> | 13 | <link rel="stylesheet" href="<%= mtime_busted_path('/stylesheets/admin.css') %>"> |
| 14 | <script src="/javascripts/admin_search.js"></script> | 14 | <script src="<%= mtime_busted_path('/javascripts/admin_search.js') %>"></script> |
| 15 | <script src="/javascripts/admin_interface.js"></script> | 15 | <script src="<%= mtime_busted_path('/javascripts/admin_interface.js') %>"></script> |
| 16 | <script src="<%= mtime_busted_path('/javascripts/related_assets.js') %>"></script> | ||
| 16 | <script> | 17 | <script> |
| 17 | var ADMIN_SEARCH_URL = "<%= admin_search_path %>"; | 18 | var ADMIN_SEARCH_URL = "<%= admin_search_path %>"; |
| 18 | var ADMIN_MENU_SEARCH_URL = "<%= admin_menu_search_path %>"; | 19 | var ADMIN_MENU_SEARCH_URL = "<%= admin_menu_search_path %>"; |
| 20 | var PARAMETERIZE_PREVIEW_URL = "<%= parameterize_preview_nodes_path %>"; | ||
| 21 | var DASHBOARD_SEARCH_URL = "<%= admin_dashboard_search_path %>"; | ||
| 19 | </script> | 22 | </script> |
| 20 | </head> | 23 | </head> |
| 21 | 24 | ||
| @@ -25,33 +28,36 @@ | |||
| 25 | <div id="main_navigation"> | 28 | <div id="main_navigation"> |
| 26 | <%= render :partial => 'admin/menu' if current_user %> | 29 | <%= render :partial => 'admin/menu' if current_user %> |
| 27 | </div> | 30 | </div> |
| 28 | <div id="sub_navigation"> | 31 | <div id="search_widget" style="display: none;"> |
| 29 | <%= yield :subnavigation %> | 32 | <div> |
| 33 | <%= form_tag admin_search_path, method: :get do %> | ||
| 34 | <%= text_field_tag :search_term, nil, placeholder: "Search nodes…", autocomplete: "off" %> | ||
| 35 | <% end %> | ||
| 36 | </div> | ||
| 37 | <div id="menu_search_results" class="search_results" style="display: none"></div> | ||
| 30 | </div> | 38 | </div> |
| 31 | </div> | 39 | </div> |
| 32 | <div style="clear: both;"></div> | 40 | <div class="admin_content_spacer"></div> |
| 41 | <% if flash[:notice].present? || flash[:error].present? %> | ||
| 33 | <div id="flash"> | 42 | <div id="flash"> |
| 34 | <%= flash[:notice] %> | 43 | <%= flash[:notice] %> |
| 44 | <% if flash[:status_path] %> | ||
| 45 | <%= link_to 'Go to Status', flash[:status_path] %> | ||
| 46 | <% end %> | ||
| 47 | <% if flash[:stale_locale_path] %> | ||
| 48 | The <%= flash[:stale_locale] %> translation may be out of date — | ||
| 49 | <%= link_to 'review it', flash[:stale_locale_path] %> too. | ||
| 50 | <% end %> | ||
| 35 | <% if flash[:error] %> | 51 | <% if flash[:error] %> |
| 36 | <span id="flash_error"><%= flash[:error] %></span> | 52 | <span id="flash_error"><%= flash[:error] %></span> |
| 37 | <% end %> | 53 | <% end %> |
| 38 | </div> | 54 | </div> |
| 55 | <% end %> | ||
| 39 | <div id="content"> | 56 | <div id="content"> |
| 40 | <%= yield %> | 57 | <%= yield %> |
| 41 | </div> | 58 | </div> |
| 42 | 59 | ||
| 43 | <div id="results"></div> | 60 | <div id="results"></div> |
| 44 | </div> | 61 | </div> |
| 45 | |||
| 46 | <div id="search_widget" style="display: none;"> | ||
| 47 | <div> | ||
| 48 | <%= form_tag admin_search_path, method: :get do %> | ||
| 49 | <span>Search: </span><%= text_field_tag :search_term, nil, autocomplete: "off" %> | ||
| 50 | <% end %> | ||
| 51 | </div> | ||
| 52 | <div id="search_results" style="display: none"> | ||
| 53 | |||
| 54 | </div> | ||
| 55 | </div> | ||
| 56 | </body> | 62 | </body> |
| 57 | </html> | 63 | </html> |
