diff options
| author | erdgeist <erdgeist@erdgeist.org> | 2026-07-25 15:39:17 +0200 |
|---|---|---|
| committer | erdgeist <erdgeist@erdgeist.org> | 2026-07-25 15:39:17 +0200 |
| commit | b7dee77cd1dd6f70e3bfa55df8b61681e9db321e (patch) | |
| tree | c621c76a1e4bc96f16473d26ca239fbf83a0caff /app/views/admin/index.html.erb | |
| parent | 78cd4957c4ca5bd05d93af6061487db095d04ee5 (diff) | |
Extract admin strings to i18n: dashboard, layout chrome, and the JS bridge
Diffstat (limited to 'app/views/admin/index.html.erb')
| -rw-r--r-- | app/views/admin/index.html.erb | 36 |
1 files changed, 18 insertions, 18 deletions
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> |
