summaryrefslogtreecommitdiff
path: root/app/views/nodes/_node_list.html.erb
blob: 1a0c4797e2524478748f7f12e864c9397a48031d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
<%= render "shared/search_form",
      :placeholder => t(".search_placeholder"),
      :hidden => Array(params[:kinds]).map { |k| ["kinds[]", k] } +
                 (params[:tags].present? ? [["tags", params[:tags]]] : []) %>

<%= will_paginate @nodes %>
<table class="admin_table node_table">
  <tbody>
    <% @nodes.each do |node| %>
    <tr class="<%= cycle("even", "odd") %>">
      <td class="title">
        <div class="title_with_flags">
          <span class="flag_stack">
            <%= flag("lock", t(".flag_locked", :login => node.lock_owner.login),
                     :tier => :attention) if node.lock_owner %>
            <%= flag("calendar-clock",
                     t(".flag_embargo", :date => admin_datetime(node.head.published_at)),
                     :tier => :attention) if node.embargoed? %>
            <%= flag("file-pencil", t(".flag_draft")) if node.draft %>
            <%= flag("world-off", t(".flag_no_head")) unless node.head %>
          </span>
          <div class="title_body">
            <div class="row_primary node_title"><%= link_to title_for_node(node), node_path(node) %></div>
            <div class="row_secondary node_path"><%= link_to_path(node.unique_name, node.unique_name) %></div>
          </div>
        </div>
      </td>
      <td class="actions">
        <div class="action_grid">
          <span class="action_item">
            <%= link_to node_path(node), "aria-label" => t("admin.common.show"),
                  title: t("admin.common.show") do %>
              <%= icon("eye", library: "tabler", "aria-hidden": true) %>
            <% end %>
          </span>
          <span class="action_item">
            <%= link_to node_revisions_path(node), "aria-label" => t("admin.common.revisions"),
                  title: t("admin.common.revisions") do %>
              <%= icon("history", library: "tabler", "aria-hidden": true) %>
            <% end %>
          </span>
        </div>
      </td>
    </tr>
    <% end %>
  </tbody>
</table>
<%= will_paginate @nodes %>