diff options
| author | erdgeist <erdgeist@erdgeist.org> | 2026-07-13 23:33:11 +0200 |
|---|---|---|
| committer | erdgeist <erdgeist@erdgeist.org> | 2026-07-13 23:33:11 +0200 |
| commit | 8eab68f2c5a3c126e2fec2ecdfa7ace87ce0937b (patch) | |
| tree | f446ebc26a7707c7b64a937aa51a155df146c80a /app/views/nodes/_node_list.html.erb | |
| parent | 42714c697273a7117c6b355fab26c8c35e336ad1 (diff) | |
| parent | cdf5d9941ca866d437612d2f863eac6eb0b3db12 (diff) | |
Merge branch 'erdgeist-revive-events'
Diffstat (limited to 'app/views/nodes/_node_list.html.erb')
| -rw-r--r-- | app/views/nodes/_node_list.html.erb | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/app/views/nodes/_node_list.html.erb b/app/views/nodes/_node_list.html.erb new file mode 100644 index 0000000..f7210f1 --- /dev/null +++ b/app/views/nodes/_node_list.html.erb | |||
| @@ -0,0 +1,41 @@ | |||
| 1 | <%= form_tag url_for(controller: params[:controller], action: params[:action]), method: :get, class: "node_search_form" do %> | ||
| 2 | <% Array(params[:kinds]).each do |kind| %> | ||
| 3 | <%= hidden_field_tag "kinds[]", kind %> | ||
| 4 | <% end %> | ||
| 5 | <%= hidden_field_tag :tags, params[:tags] if params[:tags].present? %> | ||
| 6 | <%= text_field_tag :q, params[:q], placeholder: "Search title, abstract, body…" %> | ||
| 7 | <%= button_tag type: "submit", class: "action_button" do %> | ||
| 8 | <%= icon("search", library: "tabler", "aria-hidden": true) %> Search | ||
| 9 | <% end %> | ||
| 10 | <% if params[:q].present? || params[:kinds].present? || params[:tags].present? %> | ||
| 11 | <%= link_to "Reset", url_for(controller: params[:controller], action: params[:action]) %> | ||
| 12 | <% end %> | ||
| 13 | <% end %> | ||
| 14 | |||
| 15 | <%= will_paginate @nodes %> | ||
| 16 | <table class="node_table"> | ||
| 17 | <tr class="header"> | ||
| 18 | <th class="node_id">ID</th> | ||
| 19 | <th class="title">Title</th> | ||
| 20 | <th class="actions">Actions</th> | ||
| 21 | <th class="editor">Locked by</th> | ||
| 22 | <th class="revision">Rev.</th> | ||
| 23 | </tr> | ||
| 24 | <% @nodes.each do |node| %> | ||
| 25 | <tr class="<%= cycle("even", "odd") %>"> | ||
| 26 | <td class="node_id"><%= node.id %></td> | ||
| 27 | <td class="title"> | ||
| 28 | <h4><%= link_to title_for_node(node), node_path(node) %></h4> | ||
| 29 | <p><%= link_to_path(node.unique_name, node.unique_name) %></p> | ||
| 30 | </td> | ||
| 31 | <td class="actions"> | ||
| 32 | <%= link_to 'show', node_path(node) %> | ||
| 33 | <%= link_to 'edit', edit_node_path(node) %> | ||
| 34 | <%= link_to 'revisions', node_revisions_path(node) %> | ||
| 35 | </td> | ||
| 36 | <td><%= node.lock_owner.login if node.lock_owner %></td> | ||
| 37 | <td><%= node.draft ? node.draft.revision : (node.head ? node.head.revision : "EMPTY") %></td> | ||
| 38 | </tr> | ||
| 39 | <% end %> | ||
| 40 | </table> | ||
| 41 | <%= will_paginate @nodes %> | ||
