diff options
Diffstat (limited to 'app/views')
| -rw-r--r-- | app/views/admin/_drafts.html.erb | 16 | ||||
| -rw-r--r-- | app/views/admin/_menu.html.erb | 6 | ||||
| -rw-r--r-- | app/views/admin/conventions.html.erb | 4 | ||||
| -rw-r--r-- | app/views/admin/index.html.erb | 36 | ||||
| -rw-r--r-- | app/views/admin/search_results.html.erb | 2 | ||||
| -rw-r--r-- | app/views/layouts/_flash.html.erb | 17 | ||||
| -rw-r--r-- | app/views/layouts/admin.html.erb | 9 |
7 files changed, 46 insertions, 44 deletions
diff --git a/app/views/admin/_drafts.html.erb b/app/views/admin/_drafts.html.erb index 4ef568f8..bfdc00a4 100644 --- a/app/views/admin/_drafts.html.erb +++ b/app/views/admin/_drafts.html.erb | |||
| @@ -1,11 +1,11 @@ | |||
| 1 | <h2>Drafts (<%= @drafts.size %>)</h2> | 1 | <h2><%= t(".title", :size => @drafts.size) %></h2> |
| 2 | <div id="draft_list"> | 2 | <div id="draft_list"> |
| 3 | <table> | 3 | <table> |
| 4 | <tr class="header"> | 4 | <tr class="header"> |
| 5 | <th>ID</th> | 5 | <th><%= t("admin.columns.id") %></th> |
| 6 | <th>Title</th> | 6 | <th><%= t("admin.columns.title") %></th> |
| 7 | <th>Path</th> | 7 | <th><%= t("admin.columns.path") %></th> |
| 8 | <th>author</th> | 8 | <th><%= t("admin.columns.author") %></th> |
| 9 | <th></th> | 9 | <th></th> |
| 10 | </tr> | 10 | </tr> |
| 11 | <% @drafts.each do |draft| %> | 11 | <% @drafts.each do |draft| %> |
| @@ -15,9 +15,9 @@ | |||
| 15 | <td><%= draft.node.unique_name %></td> | 15 | <td><%= draft.node.unique_name %></td> |
| 16 | <td><%= draft.user.login rescue "" %></td> | 16 | <td><%= draft.user.login rescue "" %></td> |
| 17 | <td class="actions"> | 17 | <td class="actions"> |
| 18 | <%= link_to 'Show', node_path(draft.node) %> | 18 | <%= link_to t("admin.common.show"), node_path(draft.node) %> |
| 19 | <%= link_to "Revisions", revision_path(draft.node.id) %> | 19 | <%= link_to t(".revisions"), revision_path(draft.node.id) %> |
| 20 | <%= button_to "Publish", publish_node_path(draft.node), method: :put, form: { data: { confirm: "Do you really want to publish?" }, class: 'button_to state_changing' } %> | 20 | <%= button_to t("nodes.show.publish"), publish_node_path(draft.node), method: :put, form: { data: { confirm: t("nodes.show.confirm_publish") }, class: 'button_to state_changing' } %> |
| 21 | </td> | 21 | </td> |
| 22 | </tr> | 22 | </tr> |
| 23 | <% end %> | 23 | <% end %> |
diff --git a/app/views/admin/_menu.html.erb b/app/views/admin/_menu.html.erb index 7270df49..b0e310e9 100644 --- a/app/views/admin/_menu.html.erb +++ b/app/views/admin/_menu.html.erb | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | <%= link_to icon("home", library: "tabler", "aria-hidden": true), admin_path, "aria-label": "Dashboard", title: "Dashboard" %> | 1 | <%= link_to icon("home", library: "tabler", "aria-hidden": true), admin_path, "aria-label": t(".dashboard"), title: t(".dashboard") %> |
| 2 | <a href="#" onclick="admin_search.display_toggle(); return false;" aria-label="Search" title="Search"><%= icon("search", library: "tabler", "aria-hidden": true) %></a> | 2 | <a href="#" onclick="admin_search.display_toggle(); return false;" aria-label="<%= t(".search") %>" title="<%= t(".search") %>"><%= icon("search", library: "tabler", "aria-hidden": true) %></a> |
| 3 | <%= button_to logout_path, method: :delete, aria: { label: "Log out" }, title: "Log out" do %> | 3 | <%= button_to logout_path, method: :delete, aria: { label: t(".log_out") }, title: t(".log_out") do %> |
| 4 | <%= icon("logout", library: "tabler", "aria-hidden": true) %> | 4 | <%= icon("logout", library: "tabler", "aria-hidden": true) %> |
| 5 | <% end %> | 5 | <% end %> |
diff --git a/app/views/admin/conventions.html.erb b/app/views/admin/conventions.html.erb index 72f6214a..434c2e9c 100644 --- a/app/views/admin/conventions.html.erb +++ b/app/views/admin/conventions.html.erb | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | <h1>Node creation conventions</h1> | 1 | <h1><%= t(".title") %></h1> |
| 2 | 2 | ||
| 3 | <table id="conventions"> | 3 | <table id="conventions"> |
| 4 | <tr><th>Kind</th><th>What happens</th></tr> | 4 | <tr><th><%= t(".kind") %></th><th><%= t(".what_happens") %></th></tr> |
| 5 | <% @node_kinds.each do |kind, config| %> | 5 | <% @node_kinds.each do |kind, config| %> |
| 6 | <tr> | 6 | <tr> |
| 7 | <td><%= kind %></td> | 7 | <td><%= kind %></td> |
diff --git a/app/views/admin/index.html.erb b/app/views/admin/index.html.erb index 4d67dd77..25bdbdc6 100644 --- a/app/views/admin/index.html.erb +++ b/app/views/admin/index.html.erb | |||
| @@ -1,29 +1,29 @@ | |||
| 1 | <h1>cccms dashboard</h1> | 1 | <h1><%= t(".title") %></h1> |
| 2 | <div id="dashboard_search"> | 2 | <div id="dashboard_search"> |
| 3 | <%= form_tag admin_search_path, method: :get do %> | 3 | <%= form_tag admin_search_path, method: :get do %> |
| 4 | <%= text_field_tag :search_term, nil, id: "dashboard_search_term", placeholder: "Search nodes and tags…", autocomplete: "off" %> | 4 | <%= text_field_tag :search_term, nil, id: "dashboard_search_term", placeholder: t(".search_placeholder"), autocomplete: "off" %> |
| 5 | <% end %> | 5 | <% end %> |
| 6 | <div id="dashboard_search_results" class="search_results"></div> | 6 | <div id="dashboard_search_results" class="search_results"></div> |
| 7 | </div> | 7 | </div> |
| 8 | 8 | ||
| 9 | <div id="dashboard_signposts" class="button_row"> | 9 | <div id="dashboard_signposts" class="button_row"> |
| 10 | <%= link_to new_node_path, class: "action_button" do %> | 10 | <%= link_to new_node_path, class: "action_button" do %> |
| 11 | <%= icon("plus", library: "tabler", "aria-hidden": true) %> Create post | 11 | <%= icon("plus", library: "tabler", "aria-hidden": true) %> <%= t(".create_post") %> |
| 12 | <% end %> | 12 | <% end %> |
| 13 | <%= link_to chapters_nodes_path, class: "action_button" do %> | 13 | <%= link_to chapters_nodes_path, class: "action_button" do %> |
| 14 | <%= icon("map-pin", library: "tabler", "aria-hidden": true) %> Find a chapter | 14 | <%= icon("map-pin", library: "tabler", "aria-hidden": true) %> <%= t(".find_chapter") %> |
| 15 | <% end %> | 15 | <% end %> |
| 16 | <%= link_to new_asset_path, class: "action_button" do %> | 16 | <%= link_to new_asset_path, class: "action_button" do %> |
| 17 | <%= icon("upload", library: "tabler", "aria-hidden": true) %> Upload asset | 17 | <%= icon("upload", library: "tabler", "aria-hidden": true) %> <%= t(".upload_asset") %> |
| 18 | <% end %> | 18 | <% end %> |
| 19 | <%= link_to sitemap_nodes_path, class: "action_button" do %> | 19 | <%= link_to sitemap_nodes_path, class: "action_button" do %> |
| 20 | <%= icon("list-tree", library: "tabler", "aria-hidden": true) %> Add a page in the page tree | 20 | <%= icon("list-tree", library: "tabler", "aria-hidden": true) %> <%= t(".add_in_tree") %> |
| 21 | <% end %> | 21 | <% end %> |
| 22 | </div> | 22 | </div> |
| 23 | 23 | ||
| 24 | <div id="dashboard_widgets"> | 24 | <div id="dashboard_widgets"> |
| 25 | <div class="dashboard_widget"> | 25 | <div class="dashboard_widget"> |
| 26 | <h3>Drafts and autosaves</h3> | 26 | <h3><%= t(".drafts_widget") %></h3> |
| 27 | <ul> | 27 | <ul> |
| 28 | <% @drafts.each do |node| %> | 28 | <% @drafts.each do |node| %> |
| 29 | <li> | 29 | <li> |
| @@ -37,43 +37,43 @@ | |||
| 37 | </li> | 37 | </li> |
| 38 | <% end %> | 38 | <% end %> |
| 39 | </ul> | 39 | </ul> |
| 40 | <%= link_to "See all drafts →", drafts_nodes_path %> | 40 | <%= link_to t(".see_all_drafts"), drafts_nodes_path %> |
| 41 | </div> | 41 | </div> |
| 42 | 42 | ||
| 43 | <div class="dashboard_widget"> | 43 | <div class="dashboard_widget"> |
| 44 | <h3>Recent changes</h3> | 44 | <h3><%= t("node_actions.heading") %></h3> |
| 45 | <table id="node_action_list"> | 45 | <table id="node_action_list"> |
| 46 | <%= render partial: "node_actions/action_row", collection: @actions, as: :action %> | 46 | <%= render partial: "node_actions/action_row", collection: @actions, as: :action %> |
| 47 | </table> | 47 | </table> |
| 48 | <%= link_to "See all recent changes →", admin_log_path %> | 48 | <%= link_to t(".see_all_changes"), admin_log_path %> |
| 49 | </div> | 49 | </div> |
| 50 | 50 | ||
| 51 | </div> | 51 | </div> |
| 52 | 52 | ||
| 53 | <div id="dashboard_housekeeping"> | 53 | <div id="dashboard_housekeeping"> |
| 54 | <h3>Housekeeping</h3> | 54 | <h3><%= t(".housekeeping") %></h3> |
| 55 | <div class="button_row"> | 55 | <div class="button_row"> |
| 56 | <%= link_to edit_user_path(current_user), class: "action_button" do %> | 56 | <%= link_to edit_user_path(current_user), class: "action_button" do %> |
| 57 | <%= icon("user-cog", library: "tabler", "aria-hidden": true) %> My account | 57 | <%= icon("user-cog", library: "tabler", "aria-hidden": true) %> <%= t(".my_account") %> |
| 58 | <% end %> | 58 | <% end %> |
| 59 | <%= link_to nodes_path, class: "action_button" do %> | 59 | <%= link_to nodes_path, class: "action_button" do %> |
| 60 | <%= icon("list", library: "tabler", "aria-hidden": true) %> Nodes | 60 | <%= icon("list", library: "tabler", "aria-hidden": true) %> <%= t("nodes.index.title") %> |
| 61 | <% end %> | 61 | <% end %> |
| 62 | <%= link_to events_path, class: "action_button" do %> | 62 | <%= link_to events_path, class: "action_button" do %> |
| 63 | <%= icon("calendar", library: "tabler", "aria-hidden": true) %> Events | 63 | <%= icon("calendar", library: "tabler", "aria-hidden": true) %> <%= t("events.index.title") %> |
| 64 | <% end %> | 64 | <% end %> |
| 65 | <%= link_to assets_path, class: "action_button" do %> | 65 | <%= link_to assets_path, class: "action_button" do %> |
| 66 | <%= icon("folder", library: "tabler", "aria-hidden": true) %> Assets | 66 | <%= icon("folder", library: "tabler", "aria-hidden": true) %> <%= t("assets.index.title") %> |
| 67 | <% end %> | 67 | <% end %> |
| 68 | <%= link_to users_path, class: "action_button" do %> | 68 | <%= link_to users_path, class: "action_button" do %> |
| 69 | <%= icon("users", library: "tabler", "aria-hidden": true) %> Users | 69 | <%= icon("users", library: "tabler", "aria-hidden": true) %> <%= t("users.index.users") %> |
| 70 | <% end %> | 70 | <% end %> |
| 71 | <%= link_to menu_items_path, class: "action_button" do %> | 71 | <%= link_to menu_items_path, class: "action_button" do %> |
| 72 | <%= icon("menu-2", library: "tabler", "aria-hidden": true) %> Navigation | 72 | <%= icon("menu-2", library: "tabler", "aria-hidden": true) %> <%= t(".navigation") %> |
| 73 | <% end %> | 73 | <% end %> |
| 74 | <% trash_count = Node.trash.children.count %> | 74 | <% trash_count = Node.trash.children.count %> |
| 75 | <%= link_to trashed_nodes_path, class: "action_button" do %> | 75 | <%= link_to trashed_nodes_path, class: "action_button" do %> |
| 76 | <%= icon("trash", library: "tabler", "aria-hidden": true) %> Trash<%= " (#{trash_count})" if trash_count > 0 %> | 76 | <%= icon("trash", library: "tabler", "aria-hidden": true) %> <%= t("nodes.trashed.title") %><%= " (#{trash_count})" if trash_count > 0 %> |
| 77 | <% end %> | 77 | <% end %> |
| 78 | </div> | 78 | </div> |
| 79 | </div> | 79 | </div> |
diff --git a/app/views/admin/search_results.html.erb b/app/views/admin/search_results.html.erb index a7571977..e3802a03 100644 --- a/app/views/admin/search_results.html.erb +++ b/app/views/admin/search_results.html.erb | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | <h1>Search Results</h1> | 1 | <h1><%= t(".title") %></h1> |
| 2 | 2 | ||
| 3 | <ul class="search_results_list"> | 3 | <ul class="search_results_list"> |
| 4 | <% @results.each do |result| %> | 4 | <% @results.each do |result| %> |
diff --git a/app/views/layouts/_flash.html.erb b/app/views/layouts/_flash.html.erb index a67fc866..b72c377f 100644 --- a/app/views/layouts/_flash.html.erb +++ b/app/views/layouts/_flash.html.erb | |||
| @@ -2,20 +2,21 @@ | |||
| 2 | <div id="flash"> | 2 | <div id="flash"> |
| 3 | <%= flash[:notice] %> | 3 | <%= flash[:notice] %> |
| 4 | <% if flash[:status_path] %> | 4 | <% if flash[:status_path] %> |
| 5 | <%= link_to 'Go to Status', flash[:status_path] %> | 5 | <%= link_to t(".go_to_status"), flash[:status_path] %> |
| 6 | <% end %> | 6 | <% end %> |
| 7 | <% if flash[:stale_locale_path] %> | 7 | <% if flash[:stale_locale_path] %> |
| 8 | The <%= flash[:stale_locale] %> translation may be out of date — | 8 | <%= t(".stale_prefix", :lang => flash[:stale_locale]) %> |
| 9 | <%= link_to 'review it', flash[:stale_locale_path] %> too. | 9 | <%= link_to t(".stale_link"), flash[:stale_locale_path] %><%= t(".stale_suffix") %> |
| 10 | <% end %> | 10 | <% end %> |
| 11 | <% if flash[:locked_node_path] %> | 11 | <% if flash[:locked_node_path] %> |
| 12 | <span class="warning">The page is locked by <%= flash[:locked_by] %> — | 12 | <span class="warning"><%= t(".locked_prefix", :login => flash[:locked_by]) %> |
| 13 | <%= link_to 'unlock it there', flash[:locked_node_path] %> first, | 13 | <%= link_to t(".locked_link"), flash[:locked_node_path] %><%= t(".locked_suffix") %> |
| 14 | then attach from this asset's page.</span> | 14 | </span> |
| 15 | <% end %> | 15 | <% end %> |
| 16 | <% if flash[:headline_kept_path] %> | 16 | <% if flash[:headline_kept_path] %> |
| 17 | <span class="warning">The page's existing headline was kept — | 17 | <span class="warning"><%= t(".headline_prefix") %> |
| 18 | <%= link_to 'change it there', flash[:headline_kept_path] %> if needed.</span> | 18 | <%= link_to t(".headline_link"), flash[:headline_kept_path] %><%= t(".headline_suffix") %> |
| 19 | </span> | ||
| 19 | <% end %> | 20 | <% end %> |
| 20 | <% if flash[:error] %> | 21 | <% if flash[:error] %> |
| 21 | <span id="flash_error"><%= flash[:error] %></span> | 22 | <span id="flash_error"><%= flash[:error] %></span> |
diff --git a/app/views/layouts/admin.html.erb b/app/views/layouts/admin.html.erb index 89c9b550..e056489f 100644 --- a/app/views/layouts/admin.html.erb +++ b/app/views/layouts/admin.html.erb | |||
| @@ -10,15 +10,16 @@ | |||
| 10 | <%= javascript_include_tag 'admin_bundle' %> | 10 | <%= javascript_include_tag 'admin_bundle' %> |
| 11 | <%= tinymce_assets %> | 11 | <%= tinymce_assets %> |
| 12 | <link rel="stylesheet" href="<%= mtime_busted_path('/stylesheets/admin.css') %>"> | 12 | <link rel="stylesheet" href="<%= mtime_busted_path('/stylesheets/admin.css') %>"> |
| 13 | <script src="<%= mtime_busted_path('/javascripts/admin_search.js') %>"></script> | ||
| 14 | <script src="<%= mtime_busted_path('/javascripts/admin_interface.js') %>"></script> | ||
| 15 | <script src="<%= mtime_busted_path('/javascripts/related_assets.js') %>"></script> | ||
| 16 | <%= javascript_tag nonce: true do %> | 13 | <%= javascript_tag nonce: true do %> |
| 17 | var ADMIN_SEARCH_URL = "<%= admin_search_path %>"; | 14 | var ADMIN_SEARCH_URL = "<%= admin_search_path %>"; |
| 18 | var ADMIN_MENU_SEARCH_URL = "<%= admin_menu_search_path %>"; | 15 | var ADMIN_MENU_SEARCH_URL = "<%= admin_menu_search_path %>"; |
| 16 | var ADMIN_STRINGS = <%= raw({ :lock_lost_prefix => t(".lock_lost_prefix"), :lock_lost_link => t(".lock_lost_link"), :insert_image => t(".insert_image"), :insert_image_tooltip => t(".insert_image_tooltip") }.to_json) %>; | ||
| 19 | var PARAMETERIZE_PREVIEW_URL = "<%= parameterize_preview_nodes_path %>"; | 17 | var PARAMETERIZE_PREVIEW_URL = "<%= parameterize_preview_nodes_path %>"; |
| 20 | var DASHBOARD_SEARCH_URL = "<%= admin_dashboard_search_path %>"; | 18 | var DASHBOARD_SEARCH_URL = "<%= admin_dashboard_search_path %>"; |
| 21 | <% end %> | 19 | <% end %> |
| 20 | <script src="<%= mtime_busted_path('/javascripts/admin_search.js') %>"></script> | ||
| 21 | <script src="<%= mtime_busted_path('/javascripts/admin_interface.js') %>"></script> | ||
| 22 | <script src="<%= mtime_busted_path('/javascripts/related_assets.js') %>"></script> | ||
| 22 | </head> | 23 | </head> |
| 23 | 24 | ||
| 24 | <body> | 25 | <body> |
| @@ -30,7 +31,7 @@ | |||
| 30 | <div id="search_widget" style="display: none;"> | 31 | <div id="search_widget" style="display: none;"> |
| 31 | <div> | 32 | <div> |
| 32 | <%= form_tag admin_search_path, method: :get do %> | 33 | <%= form_tag admin_search_path, method: :get do %> |
| 33 | <%= text_field_tag :search_term, nil, placeholder: "Search nodes…", autocomplete: "off" %> | 34 | <%= text_field_tag :search_term, nil, placeholder: t(".search_placeholder"), autocomplete: "off" %> |
| 34 | <% end %> | 35 | <% end %> |
| 35 | </div> | 36 | </div> |
| 36 | <div id="menu_search_results" class="search_results" style="display: none"></div> | 37 | <div id="menu_search_results" class="search_results" style="display: none"></div> |
