summaryrefslogtreecommitdiff
path: root/app/views/admin
diff options
context:
space:
mode:
authorerdgeist <erdgeist@erdgeist.org>2026-07-25 15:39:17 +0200
committererdgeist <erdgeist@erdgeist.org>2026-07-25 15:39:17 +0200
commitb7dee77cd1dd6f70e3bfa55df8b61681e9db321e (patch)
treec621c76a1e4bc96f16473d26ca239fbf83a0caff /app/views/admin
parent78cd4957c4ca5bd05d93af6061487db095d04ee5 (diff)
Extract admin strings to i18n: dashboard, layout chrome, and the JS bridge
Diffstat (limited to 'app/views/admin')
-rw-r--r--app/views/admin/_drafts.html.erb16
-rw-r--r--app/views/admin/_menu.html.erb6
-rw-r--r--app/views/admin/conventions.html.erb4
-rw-r--r--app/views/admin/index.html.erb36
-rw-r--r--app/views/admin/search_results.html.erb2
5 files changed, 32 insertions, 32 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| %>