diff options
Diffstat (limited to 'app')
| -rw-r--r-- | app/views/assets/index.html.erb | 114 | ||||
| -rw-r--r-- | app/views/events/index.html.erb | 132 | ||||
| -rw-r--r-- | app/views/nodes/_node_list.html.erb | 76 | ||||
| -rw-r--r-- | app/views/nodes/sitemap.html.erb | 4 | ||||
| -rw-r--r-- | app/views/revisions/index.html.erb | 8 | ||||
| -rw-r--r-- | app/views/users/index.html.erb | 20 |
6 files changed, 183 insertions, 171 deletions
diff --git a/app/views/assets/index.html.erb b/app/views/assets/index.html.erb index 84f096c2..c71607cf 100644 --- a/app/views/assets/index.html.erb +++ b/app/views/assets/index.html.erb | |||
| @@ -8,59 +8,63 @@ | |||
| 8 | 8 | ||
| 9 | <%= will_paginate @assets %> | 9 | <%= will_paginate @assets %> |
| 10 | 10 | ||
| 11 | <table class="assets_table"> | 11 | <table class="admin_table assets_table"> |
| 12 | <tr class="header"> | 12 | <thead> |
| 13 | <th><%= t("admin.columns.preview") %></th> | 13 | <tr class="header"> |
| 14 | <th><%= t("admin.columns.name") %></th> | 14 | <th><%= t("admin.columns.preview") %></th> |
| 15 | <th></th> | 15 | <th><%= t("admin.columns.name") %></th> |
| 16 | </tr> | 16 | <th></th> |
| 17 | <% @assets.each do |asset| %> | 17 | </tr> |
| 18 | <tr> | 18 | </thead> |
| 19 | <td class="asset_thumb"> | 19 | <tbody> |
| 20 | <% if asset.has_variant?(:thumb) %> | 20 | <% @assets.each do |asset| %> |
| 21 | <%= link_to image_tag(asset.upload.url(:thumb), :alt => ""), asset, | 21 | <tr> |
| 22 | :class => "asset_thumb_link" %> | 22 | <td class="asset_thumb"> |
| 23 | <% end %> | 23 | <% if asset.has_variant?(:thumb) %> |
| 24 | </td> | 24 | <%= link_to image_tag(asset.upload.url(:thumb), :alt => ""), asset, |
| 25 | <td> | 25 | :class => "asset_thumb_link" %> |
| 26 | <div class="asset_name"> | 26 | <% end %> |
| 27 | <%= link_to asset.name.presence || asset.upload_file_name, asset %> | 27 | </td> |
| 28 | </div> | 28 | <td> |
| 29 | <div class="asset_meta asset_file"> | 29 | <div class="row_primary asset_name"> |
| 30 | <%= icon("external-link", library: "tabler", "aria-hidden": true) %> | 30 | <%= link_to asset.name.presence || asset.upload_file_name, asset %> |
| 31 | <%= link_to asset.upload_file_name, asset.upload.url, | 31 | </div> |
| 32 | :target => "_blank", :rel => "noopener" %> | 32 | <div class="row_secondary asset_meta asset_file"> |
| 33 | </div> | 33 | <%= icon("external-link", library: "tabler", "aria-hidden": true) %> |
| 34 | <div class="asset_meta asset_type"> | 34 | <%= link_to asset.upload_file_name, asset.upload.url, |
| 35 | <%= asset.upload.content_type %> · | 35 | :target => "_blank", :rel => "noopener" %> |
| 36 | <%= number_to_human_size(asset.upload.size) %> | 36 | </div> |
| 37 | </div> | 37 | <div class="row_secondary asset_meta asset_type"> |
| 38 | </td> | 38 | <%= asset.upload.content_type %> · |
| 39 | <td class="actions"> | 39 | <%= number_to_human_size(asset.upload.size) %> |
| 40 | <div class="action_grid"> | 40 | </div> |
| 41 | <span class="action_item"> | 41 | </td> |
| 42 | <%= link_to asset, "aria-label" => t("admin.common.show"), | 42 | <td class="actions"> |
| 43 | title: t("admin.common.show") do %> | 43 | <div class="action_grid"> |
| 44 | <%= icon("eye", library: "tabler", "aria-hidden": true) %> | 44 | <span class="action_item"> |
| 45 | <% end %> | 45 | <%= link_to asset, "aria-label" => t("admin.common.show"), |
| 46 | </span> | 46 | title: t("admin.common.show") do %> |
| 47 | <span class="action_item"> | 47 | <%= icon("eye", library: "tabler", "aria-hidden": true) %> |
| 48 | <%= link_to edit_asset_path(asset), "aria-label" => t("admin.common.edit"), | 48 | <% end %> |
| 49 | title: t("admin.common.edit") do %> | 49 | </span> |
| 50 | <%= icon("edit", library: "tabler", "aria-hidden": true) %> | 50 | <span class="action_item"> |
| 51 | <% end %> | 51 | <%= link_to edit_asset_path(asset), "aria-label" => t("admin.common.edit"), |
| 52 | </span> | 52 | title: t("admin.common.edit") do %> |
| 53 | <span class="action_item"> | 53 | <%= icon("edit", library: "tabler", "aria-hidden": true) %> |
| 54 | <%= button_to asset, method: :delete, | 54 | <% end %> |
| 55 | form: { data: { confirm: t("admin.common.confirm_sure") }, | 55 | </span> |
| 56 | class: 'button_to destructive' }, | 56 | <span class="action_item"> |
| 57 | "aria-label" => t("admin.common.destroy"), | 57 | <%= button_to asset, method: :delete, |
| 58 | title: t("admin.common.destroy") do %> | 58 | form: { data: { confirm: t("admin.common.confirm_sure") }, |
| 59 | <%= icon("trash", library: "tabler", "aria-hidden": true) %> | 59 | class: 'button_to destructive' }, |
| 60 | <% end %> | 60 | "aria-label" => t("admin.common.destroy"), |
| 61 | </span> | 61 | title: t("admin.common.destroy") do %> |
| 62 | </div> | 62 | <%= icon("trash", library: "tabler", "aria-hidden": true) %> |
| 63 | </td> | 63 | <% end %> |
| 64 | </tr> | 64 | </span> |
| 65 | <% end %> | 65 | </div> |
| 66 | </td> | ||
| 67 | </tr> | ||
| 68 | <% end %> | ||
| 69 | </tbody> | ||
| 66 | </table> | 70 | </table> |
diff --git a/app/views/events/index.html.erb b/app/views/events/index.html.erb index 2497a577..3116dfc1 100644 --- a/app/views/events/index.html.erb +++ b/app/views/events/index.html.erb | |||
| @@ -8,72 +8,76 @@ | |||
| 8 | 8 | ||
| 9 | <%= will_paginate @events %> | 9 | <%= will_paginate @events %> |
| 10 | 10 | ||
| 11 | <table class="events_table"> | 11 | <table class="admin_table events_table"> |
| 12 | <tr class="header"> | 12 | <thead> |
| 13 | <th><%= t("admin.columns.title") %></th> | 13 | <tr class="header"> |
| 14 | <th><%= t(".when") %></th> | 14 | <th><%= t("admin.columns.title") %></th> |
| 15 | <th></th> | 15 | <th><%= t(".when") %></th> |
| 16 | </tr> | 16 | <th></th> |
| 17 | </tr> | ||
| 18 | </thead> | ||
| 17 | 19 | ||
| 18 | <% @events.each do |event| %> | 20 | <tbody> |
| 19 | <tr> | 21 | <% @events.each do |event| %> |
| 20 | <td class="title"> | 22 | <tr> |
| 21 | <div class="title_with_flags"> | 23 | <td class="title"> |
| 22 | <span class="flag_stack"> | 24 | <div class="title_with_flags"> |
| 23 | <%= flag("hours-24", Event.human_attribute_name(:allday)) if event.allday %> | 25 | <span class="flag_stack"> |
| 24 | <%= flag("sticker", t(".flag_own_title")) if event.title.present? %> | 26 | <%= flag("hours-24", Event.human_attribute_name(:allday)) if event.allday %> |
| 25 | </span> | 27 | <%= flag("sticker", t(".flag_own_title")) if event.title.present? %> |
| 26 | <div class="title_body"> | 28 | </span> |
| 27 | <div class="event_title"><%= link_to event.display_title, event %></div> | 29 | <div class="title_body"> |
| 28 | <% if event.node %> | 30 | <div class="row_primary event_title"><%= link_to event.display_title, event %></div> |
| 29 | <div class="event_meta"> | 31 | <% if event.node %> |
| 30 | <%= icon("file", library: "tabler", "aria-hidden": true) %> | 32 | <div class="row_secondary event_meta"> |
| 31 | <%= link_to event.node.unique_name, node_path(event.node) %> | 33 | <%= icon("file", library: "tabler", "aria-hidden": true) %> |
| 32 | </div> | 34 | <%= link_to event.node.unique_name, node_path(event.node) %> |
| 33 | <% end %> | 35 | </div> |
| 34 | <% if event.url.present? %> | 36 | <% end %> |
| 35 | <div class="event_meta"> | 37 | <% if event.url.present? %> |
| 36 | <%= icon("external-link", library: "tabler", "aria-hidden": true) %> | 38 | <div class="row_secondary event_meta"> |
| 37 | <%= external_url_link(event.url) %> | 39 | <%= icon("external-link", library: "tabler", "aria-hidden": true) %> |
| 38 | </div> | 40 | <%= external_url_link(event.url) %> |
| 39 | <% end %> | 41 | </div> |
| 42 | <% end %> | ||
| 43 | </div> | ||
| 40 | </div> | 44 | </div> |
| 41 | </div> | 45 | </td> |
| 42 | </td> | 46 | <td class="event_when"> |
| 43 | <td class="event_when"> | 47 | <div class="when_body"> |
| 44 | <div class="when_body"> | 48 | <% if event.rrule.present? %> |
| 45 | <% if event.rrule.present? %> | 49 | <% if event.humanize_rrule %> |
| 46 | <% if event.humanize_rrule %> | 50 | <span title="<%= event.rrule %>"><%= event_schedule_text(event) %></span> |
| 47 | <span title="<%= event.rrule %>"><%= event_schedule_text(event) %></span> | 51 | <% else %> |
| 48 | <% else %> | 52 | <span class="rrule_raw" title="<%= event.rrule %>"> |
| 49 | <span class="rrule_raw" title="<%= event.rrule %>"> | 53 | <%= t("events.schedule.unreadable") %> |
| 50 | <%= t("events.schedule.unreadable") %> | 54 | </span> |
| 51 | </span> | 55 | <% if event.start_time %> |
| 52 | <% if event.start_time %> | 56 | <div class="row_secondary event_meta"><%= admin_date(event.start_time) %></div> |
| 53 | <div class="event_meta"><%= admin_date(event.start_time) %></div> | 57 | <% end %> |
| 54 | <% end %> | 58 | <% end %> |
| 59 | <% else %> | ||
| 60 | <%= event_date_range(event) %> | ||
| 55 | <% end %> | 61 | <% end %> |
| 56 | <% else %> | 62 | </div> |
| 57 | <%= event_date_range(event) %> | 63 | </td> |
| 58 | <% end %> | 64 | <td class="actions"> |
| 59 | </div> | 65 | <div class="action_grid"> |
| 60 | </td> | 66 | <span class="action_item"> |
| 61 | <td class="actions"> | 67 | <%= link_to event_path(event), "aria-label" => t("admin.common.show"), |
| 62 | <div class="action_grid"> | 68 | title: t("admin.common.show") do %> |
| 63 | <span class="action_item"> | 69 | <%= icon("eye", library: "tabler", "aria-hidden": true) %> |
| 64 | <%= link_to event_path(event), "aria-label" => t("admin.common.show"), | 70 | <% end %> |
| 65 | title: t("admin.common.show") do %> | 71 | </span> |
| 66 | <%= icon("eye", library: "tabler", "aria-hidden": true) %> | 72 | <span class="action_item"> |
| 67 | <% end %> | 73 | <%= link_to edit_event_path(event), "aria-label" => t("admin.common.edit"), |
| 68 | </span> | 74 | title: t("admin.common.edit") do %> |
| 69 | <span class="action_item"> | 75 | <%= icon("edit", library: "tabler", "aria-hidden": true) %> |
| 70 | <%= link_to edit_event_path(event), "aria-label" => t("admin.common.edit"), | 76 | <% end %> |
| 71 | title: t("admin.common.edit") do %> | 77 | </span> |
| 72 | <%= icon("edit", library: "tabler", "aria-hidden": true) %> | 78 | </div> |
| 73 | <% end %> | 79 | </td> |
| 74 | </span> | 80 | </tr> |
| 75 | </div> | 81 | <% end %> |
| 76 | </td> | 82 | </tbody> |
| 77 | </tr> | ||
| 78 | <% end %> | ||
| 79 | </table> | 83 | </table> |
diff --git a/app/views/nodes/_node_list.html.erb b/app/views/nodes/_node_list.html.erb index 55f396b7..1a0c4797 100644 --- a/app/views/nodes/_node_list.html.erb +++ b/app/views/nodes/_node_list.html.erb | |||
| @@ -4,43 +4,45 @@ | |||
| 4 | (params[:tags].present? ? [["tags", params[:tags]]] : []) %> | 4 | (params[:tags].present? ? [["tags", params[:tags]]] : []) %> |
| 5 | 5 | ||
| 6 | <%= will_paginate @nodes %> | 6 | <%= will_paginate @nodes %> |
| 7 | <table class="node_table"> | 7 | <table class="admin_table node_table"> |
| 8 | <% @nodes.each do |node| %> | 8 | <tbody> |
| 9 | <tr class="<%= cycle("even", "odd") %>"> | 9 | <% @nodes.each do |node| %> |
| 10 | <td class="title"> | 10 | <tr class="<%= cycle("even", "odd") %>"> |
| 11 | <div class="title_with_flags"> | 11 | <td class="title"> |
| 12 | <span class="flag_stack"> | 12 | <div class="title_with_flags"> |
| 13 | <%= flag("lock", t(".flag_locked", :login => node.lock_owner.login), | 13 | <span class="flag_stack"> |
| 14 | :tier => :attention) if node.lock_owner %> | 14 | <%= flag("lock", t(".flag_locked", :login => node.lock_owner.login), |
| 15 | <%= flag("calendar-clock", | 15 | :tier => :attention) if node.lock_owner %> |
| 16 | t(".flag_embargo", :date => admin_datetime(node.head.published_at)), | 16 | <%= flag("calendar-clock", |
| 17 | :tier => :attention) if node.embargoed? %> | 17 | t(".flag_embargo", :date => admin_datetime(node.head.published_at)), |
| 18 | <%= flag("file-pencil", t(".flag_draft")) if node.draft %> | 18 | :tier => :attention) if node.embargoed? %> |
| 19 | <%= flag("world-off", t(".flag_no_head")) unless node.head %> | 19 | <%= flag("file-pencil", t(".flag_draft")) if node.draft %> |
| 20 | </span> | 20 | <%= flag("world-off", t(".flag_no_head")) unless node.head %> |
| 21 | <div class="title_body"> | 21 | </span> |
| 22 | <div class="node_title"><%= link_to title_for_node(node), node_path(node) %></div> | 22 | <div class="title_body"> |
| 23 | <div class="node_path"><%= link_to_path(node.unique_name, node.unique_name) %></div> | 23 | <div class="row_primary node_title"><%= link_to title_for_node(node), node_path(node) %></div> |
| 24 | <div class="row_secondary node_path"><%= link_to_path(node.unique_name, node.unique_name) %></div> | ||
| 25 | </div> | ||
| 24 | </div> | 26 | </div> |
| 25 | </div> | 27 | </td> |
| 26 | </td> | 28 | <td class="actions"> |
| 27 | <td class="actions"> | 29 | <div class="action_grid"> |
| 28 | <div class="action_grid"> | 30 | <span class="action_item"> |
| 29 | <span class="action_item"> | 31 | <%= link_to node_path(node), "aria-label" => t("admin.common.show"), |
| 30 | <%= link_to node_path(node), "aria-label" => t("admin.common.show"), | 32 | title: t("admin.common.show") do %> |
| 31 | title: t("admin.common.show") do %> | 33 | <%= icon("eye", library: "tabler", "aria-hidden": true) %> |
| 32 | <%= icon("eye", library: "tabler", "aria-hidden": true) %> | 34 | <% end %> |
| 33 | <% end %> | 35 | </span> |
| 34 | </span> | 36 | <span class="action_item"> |
| 35 | <span class="action_item"> | 37 | <%= link_to node_revisions_path(node), "aria-label" => t("admin.common.revisions"), |
| 36 | <%= link_to node_revisions_path(node), "aria-label" => t("admin.common.revisions"), | 38 | title: t("admin.common.revisions") do %> |
| 37 | title: t("admin.common.revisions") do %> | 39 | <%= icon("history", library: "tabler", "aria-hidden": true) %> |
| 38 | <%= icon("history", library: "tabler", "aria-hidden": true) %> | 40 | <% end %> |
| 39 | <% end %> | 41 | </span> |
| 40 | </span> | 42 | </div> |
| 41 | </div> | 43 | </td> |
| 42 | </td> | 44 | </tr> |
| 43 | </tr> | 45 | <% end %> |
| 44 | <% end %> | 46 | </tbody> |
| 45 | </table> | 47 | </table> |
| 46 | <%= will_paginate @nodes %> | 48 | <%= will_paginate @nodes %> |
diff --git a/app/views/nodes/sitemap.html.erb b/app/views/nodes/sitemap.html.erb index 3b9328da..95ed544f 100644 --- a/app/views/nodes/sitemap.html.erb +++ b/app/views/nodes/sitemap.html.erb | |||
| @@ -26,8 +26,8 @@ | |||
| 26 | <%= flag("file-text-shield", t(".flag_restricted"), :tier => :attention) if node.restricted? %> | 26 | <%= flag("file-text-shield", t(".flag_restricted"), :tier => :attention) if node.restricted? %> |
| 27 | </span> | 27 | </span> |
| 28 | <div class="title_body"> | 28 | <div class="title_body"> |
| 29 | <div class="node_title"><%= link_to title_for_node(node), node_path(node) %></div> | 29 | <div class="row_primary node_title"><%= link_to title_for_node(node), node_path(node) %></div> |
| 30 | <div class="node_path"> | 30 | <div class="row_secondary node_path"> |
| 31 | <%= world_icon %> | 31 | <%= world_icon %> |
| 32 | <%= link_to_path(node.unique_name, node.unique_name) %> | 32 | <%= link_to_path(node.unique_name, node.unique_name) %> |
| 33 | </div> | 33 | </div> |
diff --git a/app/views/revisions/index.html.erb b/app/views/revisions/index.html.erb index 3fb33b90..09eac565 100644 --- a/app/views/revisions/index.html.erb +++ b/app/views/revisions/index.html.erb | |||
| @@ -18,7 +18,7 @@ | |||
| 18 | </p> | 18 | </p> |
| 19 | <% end %> | 19 | <% end %> |
| 20 | 20 | ||
| 21 | <table id="revisions" class="revisions_table"> | 21 | <table id="revisions" class="admin_table revisions_table"> |
| 22 | <thead> | 22 | <thead> |
| 23 | <tr class="header"> | 23 | <tr class="header"> |
| 24 | <th><%= t(".first") %></th> | 24 | <th><%= t(".first") %></th> |
| @@ -30,7 +30,7 @@ | |||
| 30 | <th></th> | 30 | <th></th> |
| 31 | <th></th> | 31 | <th></th> |
| 32 | </tr> | 32 | </tr> |
| 33 | <tr class="no_hover diff_sticky_bar"> | 33 | <tr class="diff_sticky_bar"> |
| 34 | <td colspan="8"> | 34 | <td colspan="8"> |
| 35 | <%= button_to t(".diff_revisions"), diff_node_revisions_path(@node), | 35 | <%= button_to t(".diff_revisions"), diff_node_revisions_path(@node), |
| 36 | method: :post, | 36 | method: :post, |
| @@ -64,7 +64,7 @@ | |||
| 64 | </tbody> | 64 | </tbody> |
| 65 | </table> | 65 | </table> |
| 66 | 66 | ||
| 67 | <script> | 67 | <%= javascript_tag nonce: true do %> |
| 68 | function update_diff_button_state() { | 68 | function update_diff_button_state() { |
| 69 | var start = document.querySelector('input[name="start_revision"]:checked'); | 69 | var start = document.querySelector('input[name="start_revision"]:checked'); |
| 70 | var end = document.querySelector('input[name="end_revision"]:checked'); | 70 | var end = document.querySelector('input[name="end_revision"]:checked'); |
| @@ -106,4 +106,4 @@ | |||
| 106 | this.appendChild(v); | 106 | this.appendChild(v); |
| 107 | } | 107 | } |
| 108 | }); | 108 | }); |
| 109 | </script> | 109 | <% end %> |
diff --git a/app/views/users/index.html.erb b/app/views/users/index.html.erb index 71102c2c..e6c1fbda 100644 --- a/app/views/users/index.html.erb +++ b/app/views/users/index.html.erb | |||
| @@ -13,15 +13,17 @@ | |||
| 13 | <span class="dashboard_widget_meta"><%= members.size %></span> | 13 | <span class="dashboard_widget_meta"><%= members.size %></span> |
| 14 | </h2> | 14 | </h2> |
| 15 | <% if members.any? %> | 15 | <% if members.any? %> |
| 16 | <table class="user_table <%= "user_table_alumni" if group == :alumni %>"> | 16 | <table class="admin_table user_table <%= "user_table_alumni" if group == :alumni %>"> |
| 17 | <tr class="header"> | 17 | <thead> |
| 18 | <th><%= t("users.labels.login") %></th> | 18 | <tr class="header"> |
| 19 | <th><%= t("users.labels.roles") %></th> | 19 | <th><%= t("users.labels.login") %></th> |
| 20 | <th></th> | 20 | <th><%= t("users.labels.roles") %></th> |
| 21 | <th></th> | 21 | <th></th> |
| 22 | <th></th> | 22 | </tr> |
| 23 | </tr> | 23 | </thead> |
| 24 | <%= render :partial => "user", :locals => { :users => members } %> | 24 | <tbody> |
| 25 | <%= render :partial => "user", :locals => { :users => members } %> | ||
| 26 | </tbody> | ||
| 25 | </table> | 27 | </table> |
| 26 | <% else %> | 28 | <% else %> |
| 27 | <p class="field_hint"><%= t(".group_empty") %></p> | 29 | <p class="field_hint"><%= t(".group_empty") %></p> |
