diff options
| author | erdgeist <erdgeist@erdgeist.org> | 2026-07-25 14:24:03 +0200 |
|---|---|---|
| committer | erdgeist <erdgeist@erdgeist.org> | 2026-07-25 14:24:03 +0200 |
| commit | de9a3a5591d4b17c0e0f17abc0ee8ffe85de50e6 (patch) | |
| tree | a66f5f798399a72a1a351c72ff1f4c864d2d5514 /app/views/events | |
| parent | baace1fa5df46694ddd515dc3bbca59b22df8692 (diff) | |
Extract admin strings to i18n: assets and events clusters
Diffstat (limited to 'app/views/events')
| -rw-r--r-- | app/views/events/_rrule_builder.html.erb | 22 | ||||
| -rw-r--r-- | app/views/events/edit.html.erb | 38 | ||||
| -rw-r--r-- | app/views/events/index.html.erb | 24 | ||||
| -rw-r--r-- | app/views/events/new.html.erb | 30 | ||||
| -rw-r--r-- | app/views/events/show.html.erb | 32 | ||||
| -rw-r--r-- | app/views/events/without_node.html.erb | 20 |
6 files changed, 83 insertions, 83 deletions
diff --git a/app/views/events/_rrule_builder.html.erb b/app/views/events/_rrule_builder.html.erb index 1ffec0a2..3cffb782 100644 --- a/app/views/events/_rrule_builder.html.erb +++ b/app/views/events/_rrule_builder.html.erb | |||
| @@ -1,33 +1,33 @@ | |||
| 1 | <div id="rrule_builder"> | 1 | <div id="rrule_builder"> |
| 2 | <p> | 2 | <p> |
| 3 | <label><%= radio_button_tag "rrule_freq", "weekly", true %> Weekly</label> | 3 | <label><%= radio_button_tag "rrule_freq", "weekly", true %> <%= t(".weekly") %></label> |
| 4 | <label><%= radio_button_tag "rrule_freq", "monthly" %> Monthly</label> | 4 | <label><%= radio_button_tag "rrule_freq", "monthly" %> <%= t(".monthly") %></label> |
| 5 | </p> | 5 | </p> |
| 6 | <div id="rrule_weekly_options"> | 6 | <div id="rrule_weekly_options"> |
| 7 | <p><label><%= check_box_tag "rrule_biweekly" %> Every 2 weeks</label></p> | 7 | <p><label><%= check_box_tag "rrule_biweekly" %> <%= t(".biweekly") %></label></p> |
| 8 | <p> | 8 | <p> |
| 9 | <% %w[MO TU WE TH FR SA SU].each do |code| %> | 9 | <% %w[MO TU WE TH FR SA SU].each do |code| %> |
| 10 | <label><%= check_box_tag "rrule_byday_#{code}" %> <%= RruleHumanizer::WEEKDAY_NAMES_ABBR[:de][code] %></label> | 10 | <label><%= check_box_tag "rrule_byday_#{code}" %> <%= RruleHumanizer::WEEKDAY_NAMES_ABBR[I18n.locale][code] %></label> |
| 11 | <% end %> | 11 | <% end %> |
| 12 | </p> | 12 | </p> |
| 13 | </div> | 13 | </div> |
| 14 | <div id="rrule_monthly_options" style="display: none;"> | 14 | <div id="rrule_monthly_options" style="display: none;"> |
| 15 | <p><label><%= check_box_tag "rrule_monthly_ordinal" %> On a specific weekday each month</label></p> | 15 | <p><label><%= check_box_tag "rrule_monthly_ordinal" %> <%= t(".monthly_ordinal") %></label></p> |
| 16 | <p id="rrule_ordinal_fields" style="display: none;"> | 16 | <p id="rrule_ordinal_fields" style="display: none;"> |
| 17 | <%= select_tag "rrule_ordinal", options_for_select([["1.", 1], ["2.", 2], ["3.", 3], ["4.", 4], ["letzter", -1], ["vorletzter", -2], ["Selected weeks", "custom"]]) %> | 17 | <%= select_tag "rrule_ordinal", options_for_select([[t(".ordinal_1"), 1], [t(".ordinal_2"), 2], [t(".ordinal_3"), 3], [t(".ordinal_4"), 4], [t(".ordinal_last"), -1], [t(".ordinal_second_last"), -2], [t(".ordinal_custom"), "custom"]]) %> |
| 18 | <%= select_tag "rrule_ordinal_day", options_for_select(%w[MO TU WE TH FR SA SU].map { |c| [RruleHumanizer::WEEKDAY_NAMES[:de][c], c] }) %> | 18 | <%= select_tag "rrule_ordinal_day", options_for_select(%w[MO TU WE TH FR SA SU].map { |c| [RruleHumanizer::WEEKDAY_NAMES[I18n.locale][c], c] }) %> |
| 19 | </p> | 19 | </p> |
| 20 | <p id="rrule_custom_ordinal_fields" style="display: none;"> | 20 | <p id="rrule_custom_ordinal_fields" style="display: none;"> |
| 21 | Weeks of the month: | 21 | <%= t(".weeks_of_month") %> |
| 22 | <% (1..5).each do |ordinal| %> | 22 | <% (1..5).each do |ordinal| %> |
| 23 | <label><%= check_box_tag "rrule_custom_ordinal_#{ordinal}" %> <%= ordinal %>.</label> | 23 | <label><%= check_box_tag "rrule_custom_ordinal_#{ordinal}" %> <%= ordinal %>.</label> |
| 24 | <% end %> | 24 | <% end %> |
| 25 | </p> | 25 | </p> |
| 26 | </div> | 26 | </div> |
| 27 | <p> | 27 | <p> |
| 28 | <label><%= check_box_tag "rrule_exclude_month" %> Except in one month</label> | 28 | <label><%= check_box_tag "rrule_exclude_month" %> <%= t(".exclude_month") %></label> |
| 29 | <%= select_tag "rrule_excluded_month", options_for_select((1..12).map { |m| [RruleHumanizer::MONTH_NAMES[:de][m-1], m] }), style: "display: none;" %> | 29 | <%= select_tag "rrule_excluded_month", options_for_select((1..12).map { |m| [RruleHumanizer::MONTH_NAMES[I18n.locale][m-1], m] }), style: "display: none;" %> |
| 30 | </p> | 30 | </p> |
| 31 | <span class="field_hint">Builds the field below automatically. If your pattern is more complex than this covers, just edit it directly below - these controls won't touch it unless you use them.</span> | 31 | <span class="field_hint"><%= t(".hint") %></span> |
| 32 | </div> | 32 | </div> |
| 33 | <%= f.text_field :rrule, id: "event_rrule" %> | 33 | <%= f.text_field :rrule, id: "event_rrule" %> |
diff --git a/app/views/events/edit.html.erb b/app/views/events/edit.html.erb index 5d7f613e..f3bf5339 100644 --- a/app/views/events/edit.html.erb +++ b/app/views/events/edit.html.erb | |||
| @@ -1,10 +1,10 @@ | |||
| 1 | <h1>Editing event</h1> | 1 | <h1><%= t(".title") %></h1> |
| 2 | 2 | ||
| 3 | <div class="node_action_bar standalone_action_bar"> | 3 | <div class="node_action_bar standalone_action_bar"> |
| 4 | <%= link_to 'Back', safe_return_to(params[:return_to] || events_path) %> | 4 | <%= link_to t("admin.common.back"), safe_return_to(params[:return_to] || events_path) %> |
| 5 | <%= button_to event_path(@event), method: :delete, | 5 | <%= button_to event_path(@event), method: :delete, |
| 6 | form: { data: { confirm: 'Delete this event?' }, class: 'button_to destructive' } do %> | 6 | form: { data: { confirm: t("events.confirm_delete") }, class: 'button_to destructive' } do %> |
| 7 | <%= icon("trash", library: "tabler", "aria-hidden": true) %> Destroy | 7 | <%= icon("trash", library: "tabler", "aria-hidden": true) %> <%= t("admin.common.destroy") %> |
| 8 | <% end %> | 8 | <% end %> |
| 9 | </div> | 9 | </div> |
| 10 | 10 | ||
| @@ -14,58 +14,58 @@ | |||
| 14 | 14 | ||
| 15 | <div id="admin_layout"> | 15 | <div id="admin_layout"> |
| 16 | <div id="content"> | 16 | <div id="content"> |
| 17 | <div class="layout_row_label">Node</div> | 17 | <div class="layout_row_label"><%= Event.human_attribute_name(:node) %> </div> |
| 18 | <div class="layout_row_content"> | 18 | <div class="layout_row_content"> |
| 19 | <% if @event.node %> | 19 | <% if @event.node %> |
| 20 | <%= link_to @event.node.title, node_path(@event.node) %> | 20 | <%= link_to @event.node.title, node_path(@event.node) %> |
| 21 | <details> | 21 | <details> |
| 22 | <summary>Change node</summary> | 22 | <summary><%= t(".change_node") %></summary> |
| 23 | <%= text_field_tag :event_node_search_term %> | 23 | <%= text_field_tag :event_node_search_term %> |
| 24 | <div id="event_search_results" class="search_results"></div> | 24 | <div id="event_search_results" class="search_results"></div> |
| 25 | <span class="field_hint">This will re-link the event to a different node — rarely needed.</span> | 25 | <span class="field_hint"><%= t(".change_node_hint") %></span> |
| 26 | </details> | 26 | </details> |
| 27 | <% else %> | 27 | <% else %> |
| 28 | <%= text_field_tag :event_node_search_term %> | 28 | <%= text_field_tag :event_node_search_term %> |
| 29 | <div id="event_search_results" class="search_results"></div> | 29 | <div id="event_search_results" class="search_results"></div> |
| 30 | <span class="field_hint">Optional — search and pick a node to associate this event with a page.</span> | 30 | <span class="field_hint"><%= t("events.form.node_hint") %></span> |
| 31 | <% end %> | 31 | <% end %> |
| 32 | <%= f.hidden_field :node_id %> | 32 | <%= f.hidden_field :node_id %> |
| 33 | </div> | 33 | </div> |
| 34 | 34 | ||
| 35 | <div class="layout_row_label">Start time</div> | 35 | <div class="layout_row_label"><%= Event.human_attribute_name(:start_time) %></div> |
| 36 | <div class="layout_row_content"><%= f.datetime_select :start_time %></div> | 36 | <div class="layout_row_content"><%= f.datetime_select :start_time %></div> |
| 37 | 37 | ||
| 38 | <div class="layout_row_label">End time</div> | 38 | <div class="layout_row_label"><%= Event.human_attribute_name(:end_time) %></div> |
| 39 | <div class="layout_row_content"><%= f.datetime_select :end_time %></div> | 39 | <div class="layout_row_content"><%= f.datetime_select :end_time %></div> |
| 40 | 40 | ||
| 41 | <div class="layout_row_label">Recurrence</div> | 41 | <div class="layout_row_label"><%= t("events.form.recurrence") %></div> |
| 42 | <div class="layout_row_content"> | 42 | <div class="layout_row_content"> |
| 43 | <%= render "rrule_builder", f: f %> | 43 | <%= render "rrule_builder", f: f %> |
| 44 | </div> | 44 | </div> |
| 45 | 45 | ||
| 46 | <div class="layout_row_label">Title</div> | 46 | <div class="layout_row_label"><%= Event.human_attribute_name(:title) %></div> |
| 47 | <div class="layout_row_content"> | 47 | <div class="layout_row_content"> |
| 48 | <%= f.text_field :title %> | 48 | <%= f.text_field :title %> |
| 49 | <span id="event_title_hint" class="field_hint">Optional — if left blank, the associated node's title is used.</span> | 49 | <span id="event_title_hint" class="field_hint"><%= t("events.form.title_hint") %></span> |
| 50 | </div> | 50 | </div> |
| 51 | 51 | ||
| 52 | <div class="layout_row_label">Tags</div> | 52 | <div class="layout_row_label"><%= Event.human_attribute_name(:tags) %></div> |
| 53 | <div class="layout_row_content"><%= f.text_field :tag_list %></div> | 53 | <div class="layout_row_content"><%= f.text_field :tag_list %></div> |
| 54 | 54 | ||
| 55 | <div class="layout_row_label">Allday</div> | 55 | <div class="layout_row_label"><%= Event.human_attribute_name(:allday) %></div> |
| 56 | <div class="layout_row_content"><%= f.check_box :allday %></div> | 56 | <div class="layout_row_content"><%= f.check_box :allday %></div> |
| 57 | 57 | ||
| 58 | <div class="layout_row_label">Url</div> | 58 | <div class="layout_row_label"><%= Event.human_attribute_name(:url) %></div> |
| 59 | <div class="layout_row_content"><%= f.text_field :url %></div> | 59 | <div class="layout_row_content"><%= f.text_field :url %></div> |
| 60 | 60 | ||
| 61 | <div class="layout_row_label">Latitude</div> | 61 | <div class="layout_row_label"><%= Event.human_attribute_name(:latitude) %></div> |
| 62 | <div class="layout_row_content"><%= f.text_field :latitude %></div> | 62 | <div class="layout_row_content"><%= f.text_field :latitude %></div> |
| 63 | 63 | ||
| 64 | <div class="layout_row_label">Longitude</div> | 64 | <div class="layout_row_label"><%= Event.human_attribute_name(:longitude) %></div> |
| 65 | <div class="layout_row_content"><%= f.text_field :longitude %></div> | 65 | <div class="layout_row_content"><%= f.text_field :longitude %></div> |
| 66 | 66 | ||
| 67 | <div class="layout_row_label"></div> | 67 | <div class="layout_row_label"></div> |
| 68 | <div class="layout_row_content"><%= f.submit 'Update' %></div> | 68 | <div class="layout_row_content"><%= f.submit t("admin.common.update") %></div> |
| 69 | </div> | 69 | </div> |
| 70 | </div> | 70 | </div> |
| 71 | <% end %> | 71 | <% end %> |
diff --git a/app/views/events/index.html.erb b/app/views/events/index.html.erb index dde897ee..138a02ec 100644 --- a/app/views/events/index.html.erb +++ b/app/views/events/index.html.erb | |||
| @@ -1,23 +1,23 @@ | |||
| 1 | <h1>Events</h1> | 1 | <h1><%= t(".title") %></h1> |
| 2 | 2 | ||
| 3 | <div class="button_row"> | 3 | <div class="button_row"> |
| 4 | <%= link_to new_event_path, class: 'action_button' do %> | 4 | <%= link_to new_event_path, class: 'action_button' do %> |
| 5 | <%= icon("plus", library: "tabler", "aria-hidden": true) %> Create event | 5 | <%= icon("plus", library: "tabler", "aria-hidden": true) %> <%= t(".create_event") %> |
| 6 | <% end %> | 6 | <% end %> |
| 7 | <%= link_to 'View events without a page →', without_node_events_path %> | 7 | <%= link_to t(".without_page_link"), without_node_events_path %> |
| 8 | </div> | 8 | </div> |
| 9 | 9 | ||
| 10 | <%= will_paginate @events %> | 10 | <%= will_paginate @events %> |
| 11 | 11 | ||
| 12 | <table class="events_table"> | 12 | <table class="events_table"> |
| 13 | <tr class="header"> | 13 | <tr class="header"> |
| 14 | <th>Title</th> | 14 | <th><%= t("admin.columns.title") %></th> |
| 15 | <th>Start time</th> | 15 | <th><%= Event.human_attribute_name(:start_time) %></th> |
| 16 | <th>End time</th> | 16 | <th><%= Event.human_attribute_name(:end_time) %></th> |
| 17 | <th>Rrule</th> | 17 | <th><%= Event.human_attribute_name(:rrule) %></th> |
| 18 | <th>Allday</th> | 18 | <th><%= Event.human_attribute_name(:allday) %></th> |
| 19 | <th>Url</th> | 19 | <th><%= Event.human_attribute_name(:url) %></th> |
| 20 | <th>Node</th> | 20 | <th><%= Event.human_attribute_name(:start_node) %></th> |
| 21 | <th></th> | 21 | <th></th> |
| 22 | </tr> | 22 | </tr> |
| 23 | 23 | ||
| @@ -27,14 +27,14 @@ | |||
| 27 | <td><%=h event.start_time %></td> | 27 | <td><%=h event.start_time %></td> |
| 28 | <td><%=h event.end_time %></td> | 28 | <td><%=h event.end_time %></td> |
| 29 | <td class="rrule_cell"><span class="rrule_text"><%= rrule_with_break_opportunities(event.rrule) %></span></td> | 29 | <td class="rrule_cell"><span class="rrule_text"><%= rrule_with_break_opportunities(event.rrule) %></span></td> |
| 30 | <td><%=h event.allday %></td> | 30 | <td><%=h event.allday %> → <%= event.allday ? t("admin.common.yes") : t("admin.common.no") %></td> |
| 31 | <td class="url_cell"> | 31 | <td class="url_cell"> |
| 32 | <% if event.url.present? %> | 32 | <% if event.url.present? %> |
| 33 | <span class="truncate"><%= link_to event.url, event.url %></span> | 33 | <span class="truncate"><%= link_to event.url, event.url %></span> |
| 34 | <% end %> | 34 | <% end %> |
| 35 | </td> | 35 | </td> |
| 36 | <td><%= event.node ? link_to(event.node_id, node_path(event.node)) : '' %></td> | 36 | <td><%= event.node ? link_to(event.node_id, node_path(event.node)) : '' %></td> |
| 37 | <td><%= link_to 'edit', edit_event_path(event) %></td> | 37 | <td><%= link_to t(".edit_link"), edit_event_path(event) %></td> |
| 38 | </tr> | 38 | </tr> |
| 39 | <% end %> | 39 | <% end %> |
| 40 | </table> | 40 | </table> |
diff --git a/app/views/events/new.html.erb b/app/views/events/new.html.erb index 6472f207..3eaf7e7d 100644 --- a/app/views/events/new.html.erb +++ b/app/views/events/new.html.erb | |||
| @@ -1,55 +1,55 @@ | |||
| 1 | <h1>New event</h1> | 1 | <h1><%= t(".title") %></h1> |
| 2 | 2 | ||
| 3 | <%= link_to 'Back', safe_return_to(params[:return_to] || events_path) %> | 3 | <%= link_to t("admin.common.back"), safe_return_to(params[:return_to] || events_path) %> |
| 4 | 4 | ||
| 5 | <%= form_for(@event) do |f| %> | 5 | <%= form_for(@event) do |f| %> |
| 6 | <%= form_error_messages(f) %> | 6 | <%= form_error_messages(f) %> |
| 7 | 7 | ||
| 8 | <div id="admin_layout"> | 8 | <div id="admin_layout"> |
| 9 | <div id="content"> | 9 | <div id="content"> |
| 10 | <div class="layout_row_label">Node</div> | 10 | <div class="layout_row_label"><%= Event.human_attribute_name(:node) %></div> |
| 11 | <div class="layout_row_content"> | 11 | <div class="layout_row_content"> |
| 12 | <%= text_field_tag :event_node_search_term %> | 12 | <%= text_field_tag :event_node_search_term %> |
| 13 | <div id="event_search_results" class="search_results"></div> | 13 | <div id="event_search_results" class="search_results"></div> |
| 14 | <%= f.hidden_field :node_id %> | 14 | <%= f.hidden_field :node_id %> |
| 15 | <span class="field_hint">Optional — search and pick a node to associate this event with a page.</span> | 15 | <span class="field_hint"><%= t("events.form.node_hint") %></span> |
| 16 | </div> | 16 | </div> |
| 17 | 17 | ||
| 18 | <div class="layout_row_label">Start time</div> | 18 | <div class="layout_row_label"><%= Event.human_attribute_name(:start_time) %></div> |
| 19 | <div class="layout_row_content"><%= f.datetime_select :start_time %></div> | 19 | <div class="layout_row_content"><%= f.datetime_select :start_time %></div> |
| 20 | 20 | ||
| 21 | <div class="layout_row_label">End time</div> | 21 | <div class="layout_row_label"><%= Event.human_attribute_name(:end_time) %></div> |
| 22 | <div class="layout_row_content"><%= f.datetime_select :end_time %></div> | 22 | <div class="layout_row_content"><%= f.datetime_select :end_time %></div> |
| 23 | 23 | ||
| 24 | <div class="layout_row_label">Recurrence</div> | 24 | <div class="layout_row_label"><%= t("events.form.recurrence") %></div> |
| 25 | <div class="layout_row_content"><%= render "rrule_builder", f: f %></div> | 25 | <div class="layout_row_content"><%= render "rrule_builder", f: f %></div> |
| 26 | 26 | ||
| 27 | <div class="layout_row_label">Title</div> | 27 | <div class="layout_row_label"><%= Event.human_attribute_name(:title) %></div> |
| 28 | <div class="layout_row_content"> | 28 | <div class="layout_row_content"> |
| 29 | <%= f.text_field :title %> | 29 | <%= f.text_field :title %> |
| 30 | <span id="event_title_hint" class="field_hint">Optional — if left blank, the associated node's title is used.</span> | 30 | <span id="event_title_hint" class="field_hint"><%= t("events.form.title_hint") %></span> |
| 31 | </div> | 31 | </div> |
| 32 | 32 | ||
| 33 | <div class="layout_row_label">Tags</div> | 33 | <div class="layout_row_label"><%= Event.human_attribute_name(:tag_list) %></div> |
| 34 | <div class="layout_row_content"><%= f.text_field :tag_list %></div> | 34 | <div class="layout_row_content"><%= f.text_field :tag_list %></div> |
| 35 | 35 | ||
| 36 | <div class="layout_row_label">Allday</div> | 36 | <div class="layout_row_label"><%= Event.human_attribute_name(:allday) %></div> |
| 37 | <div class="layout_row_content"><%= f.check_box :allday %></div> | 37 | <div class="layout_row_content"><%= f.check_box :allday %></div> |
| 38 | 38 | ||
| 39 | <div class="layout_row_label">Url</div> | 39 | <div class="layout_row_label"><%= Event.human_attribute_name(:url) %></div> |
| 40 | <div class="layout_row_content"><%= f.text_field :url %></div> | 40 | <div class="layout_row_content"><%= f.text_field :url %></div> |
| 41 | 41 | ||
| 42 | <div class="layout_row_label">Latitude</div> | 42 | <div class="layout_row_label"><%= Event.human_attribute_name(:latitude) %></div> |
| 43 | <div class="layout_row_content"><%= f.text_field :latitude %></div> | 43 | <div class="layout_row_content"><%= f.text_field :latitude %></div> |
| 44 | 44 | ||
| 45 | <div class="layout_row_label">Longitude</div> | 45 | <div class="layout_row_label"><%= Event.human_attribute_name(:longitude) %></div> |
| 46 | <div class="layout_row_content"><%= f.text_field :longitude %></div> | 46 | <div class="layout_row_content"><%= f.text_field :longitude %></div> |
| 47 | 47 | ||
| 48 | <div class="layout_row_label"></div> | 48 | <div class="layout_row_label"></div> |
| 49 | <div class="layout_row_content"><%= hidden_field_tag :return_to, params[:return_to] %></div> | 49 | <div class="layout_row_content"><%= hidden_field_tag :return_to, params[:return_to] %></div> |
| 50 | 50 | ||
| 51 | <div class="layout_row_label"></div> | 51 | <div class="layout_row_label"></div> |
| 52 | <div class="layout_row_content"><%= f.submit 'Create' %></div> | 52 | <div class="layout_row_content"><%= f.submit t("admin.common.create") %></div> |
| 53 | </div> | 53 | </div> |
| 54 | </div> | 54 | </div> |
| 55 | <% end %> | 55 | <% end %> |
diff --git a/app/views/events/show.html.erb b/app/views/events/show.html.erb index 0bf14e8b..98e972c6 100644 --- a/app/views/events/show.html.erb +++ b/app/views/events/show.html.erb | |||
| @@ -1,55 +1,55 @@ | |||
| 1 | <div id="admin_layout" class="show_node"> | 1 | <div id="admin_layout" class="show_node"> |
| 2 | <h1><%= @event.node ? "Event for node #{@event.node.unique_name}" : "Event" %></h1> | 2 | <h1><%= @event.node ? t(".title_for_node", :path => @event.node.unique_name) : t(".title") %></h1> |
| 3 | 3 | ||
| 4 | <div id="content"> | 4 | <div id="content"> |
| 5 | <div class="layout_row_label">Actions</div> | 5 | <div class="layout_row_label"><%= t("admin.columns.actions") %></div> |
| 6 | <div class="layout_row_content info_group"> | 6 | <div class="layout_row_content info_group"> |
| 7 | <div class="info_group_items"> | 7 | <div class="info_group_items"> |
| 8 | <% if @event.node %> | 8 | <% if @event.node %> |
| 9 | <div class="info_item"> | 9 | <div class="info_item"> |
| 10 | <%= link_to 'Node', node_path(@event.node) %> | 10 | <%= link_to t(".node_link"), node_path(@event.node) %> |
| 11 | </div> | 11 | </div> |
| 12 | <% end %> | 12 | <% end %> |
| 13 | <div class="info_item"> | 13 | <div class="info_item"> |
| 14 | <%= link_to edit_event_path(@event, return_to: request.path), class: 'action_button' do %> | 14 | <%= link_to edit_event_path(@event, return_to: request.path), class: 'action_button' do %> |
| 15 | <%= icon("edit", library: "tabler", "aria-hidden": true) %> Edit | 15 | <%= icon("edit", library: "tabler", "aria-hidden": true) %> <%= t("admin.common.edit") %> |
| 16 | <% end %> | 16 | <% end %> |
| 17 | </div> | 17 | </div> |
| 18 | <div class="info_item"> | 18 | <div class="info_item"> |
| 19 | <%= button_to event_path(@event), method: :delete, form: { data: { confirm: 'Delete this event?' }, class: 'button_to destructive' } do %> | 19 | <%= button_to event_path(@event), method: :delete, form: { data: { confirm: t("events.confirm_delete") }, class: 'button_to destructive' } do %> |
| 20 | <%= icon("trash", library: "tabler", "aria-hidden": true) %> Destroy | 20 | <%= icon("trash", library: "tabler", "aria-hidden": true) %> <%= t("admin.common.destroy") %> |
| 21 | <% end %> | 21 | <% end %> |
| 22 | </div> | 22 | </div> |
| 23 | </div> | 23 | </div> |
| 24 | </div> | 24 | </div> |
| 25 | 25 | ||
| 26 | <div class="layout_row_label">Start time</div> | 26 | <div class="layout_row_label"><%= Event.human_attribute_name(:start_time) %></div> |
| 27 | <div class="layout_row_content"><%=h @event.start_time %></div> | 27 | <div class="layout_row_content"><%=h @event.start_time %></div> |
| 28 | 28 | ||
| 29 | <div class="layout_row_label">End time</div> | 29 | <div class="layout_row_label"><%= Event.human_attribute_name(:end_time) %></div> |
| 30 | <div class="layout_row_content"><%=h @event.end_time %></div> | 30 | <div class="layout_row_content"><%=h @event.end_time %></div> |
| 31 | 31 | ||
| 32 | <div class="layout_row_label">Rrule</div> | 32 | <div class="layout_row_label"><%= Event.human_attribute_name(:rrule) %></div> |
| 33 | <div class="layout_row_content"><%=h @event.rrule %></div> | 33 | <div class="layout_row_content"><%=h @event.rrule %></div> |
| 34 | 34 | ||
| 35 | <% if (human = @event.humanize_rrule(I18n.locale)) %> | 35 | <% if (human = @event.humanize_rrule(I18n.locale)) %> |
| 36 | <div class="layout_row_label">Recurrence</div> | 36 | <div class="layout_row_label"><%= t(".recurrence") %></div> |
| 37 | <div class="layout_row_content"><em><%= human %></em></div> | 37 | <div class="layout_row_content"><em><%= human %></em></div> |
| 38 | <% end %> | 38 | <% end %> |
| 39 | 39 | ||
| 40 | <div class="layout_row_label">Tags</div> | 40 | <div class="layout_row_label"><%= Event.human_attribute_name(:tag_list) %></div> |
| 41 | <div class="layout_row_content"><%=h @event.tag_list %></div> | 41 | <div class="layout_row_content"><%=h @event.tag_list %></div> |
| 42 | 42 | ||
| 43 | <div class="layout_row_label">Allday</div> | 43 | <div class="layout_row_label"><%= Event.human_attribute_name(:allday) %></div> |
| 44 | <div class="layout_row_content"><%=h @event.allday %></div> | 44 | <div class="layout_row_content"><%= @event.allday ? t("admin.common.yes") : t("admin.common.no") %></div> |
| 45 | 45 | ||
| 46 | <div class="layout_row_label">Url</div> | 46 | <div class="layout_row_label"><%= Event.human_attribute_name(:url) %></div> |
| 47 | <div class="layout_row_content"><%=h @event.url %></div> | 47 | <div class="layout_row_content"><%=h @event.url %></div> |
| 48 | 48 | ||
| 49 | <div class="layout_row_label">Latitude</div> | 49 | <div class="layout_row_label"><%= Event.human_attribute_name(:latitude) %></div> |
| 50 | <div class="layout_row_content"><%=h @event.latitude %></div> | 50 | <div class="layout_row_content"><%=h @event.latitude %></div> |
| 51 | 51 | ||
| 52 | <div class="layout_row_label">Longitude</div> | 52 | <div class="layout_row_label"><%= Event.human_attribute_name(:longitude) %></div> |
| 53 | <div class="layout_row_content"><%=h @event.longitude %></div> | 53 | <div class="layout_row_content"><%=h @event.longitude %></div> |
| 54 | </div> | 54 | </div> |
| 55 | </div> | 55 | </div> |
diff --git a/app/views/events/without_node.html.erb b/app/views/events/without_node.html.erb index bb27173b..c610b560 100644 --- a/app/views/events/without_node.html.erb +++ b/app/views/events/without_node.html.erb | |||
| @@ -1,19 +1,19 @@ | |||
| 1 | <h1>Events without a node</h1> | 1 | <h1><%= t(".title") %></h1> |
| 2 | 2 | ||
| 3 | <%= link_to '← All events', events_path %> | 3 | <%= link_to t(".all_events_link"), events_path %> |
| 4 | <%= link_to new_event_path, class: 'action_button' do %> | 4 | <%= link_to new_event_path, class: 'action_button' do %> |
| 5 | <%= icon("plus", library: "tabler", "aria-hidden": true) %> Create event | 5 | <%= icon("plus", library: "tabler", "aria-hidden": true) %> <%= t("events.index.create_event") %> |
| 6 | <% end %> | 6 | <% end %> |
| 7 | 7 | ||
| 8 | <%= will_paginate @events %> | 8 | <%= will_paginate @events %> |
| 9 | 9 | ||
| 10 | <table class="events_table"> | 10 | <table class="events_table"> |
| 11 | <tr class="header"> | 11 | <tr class="header"> |
| 12 | <th>Title</th> | 12 | <th><%= t("admin.columns.title") %></th> |
| 13 | <th>Start time</th> | 13 | <th><%= Event.human_attribute_name(:start_time) %></th> |
| 14 | <th>End time</th> | 14 | <th><%= Event.human_attribute_name(:end_time) %></th> |
| 15 | <th>Allday</th> | 15 | <th><%= Event.human_attribute_name(:allday) %></th> |
| 16 | <th>Url</th> | 16 | <th><%= Event.human_attribute_name(:url) %></th> |
| 17 | <th></th> | 17 | <th></th> |
| 18 | </tr> | 18 | </tr> |
| 19 | 19 | ||
| @@ -22,9 +22,9 @@ | |||
| 22 | <td><%= link_to event.display_title, event %></td> | 22 | <td><%= link_to event.display_title, event %></td> |
| 23 | <td><%=h event.start_time %></td> | 23 | <td><%=h event.start_time %></td> |
| 24 | <td><%=h event.end_time %></td> | 24 | <td><%=h event.end_time %></td> |
| 25 | <td><%=h event.allday %></td> | 25 | <td><%=h event.allday %> → <%= event.allday ? t("admin.common.yes") : t("admin.common.no") %></td> |
| 26 | <td><%=h event.url %></td> | 26 | <td><%=h event.url %></td> |
| 27 | <td><%= link_to 'edit', edit_event_path(event) %></td> | 27 | <td><%= link_to t("events.index.edit_link"), edit_event_path(event) %></td> |
| 28 | </tr> | 28 | </tr> |
| 29 | <% end %> | 29 | <% end %> |
| 30 | </table> | 30 | </table> |
