summaryrefslogtreecommitdiff
path: root/app/views/nodes
diff options
context:
space:
mode:
Diffstat (limited to 'app/views/nodes')
-rw-r--r--app/views/nodes/_node_list.html.erb39
-rw-r--r--app/views/nodes/chapters.html.erb9
-rw-r--r--app/views/nodes/drafts.html.erb3
-rw-r--r--app/views/nodes/mine.html.erb3
-rw-r--r--app/views/nodes/recent.html.erb3
-rw-r--r--app/views/nodes/tags.html.erb3
6 files changed, 60 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 00000000..03f38b4c
--- /dev/null
+++ b/app/views/nodes/_node_list.html.erb
@@ -0,0 +1,39 @@
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 <%= submit_tag "Search", class: "action_button" %>
8 <% if params[:q].present? || params[:kinds].present? || params[:tags].present? %>
9 <%= link_to "Reset", url_for(controller: params[:controller], action: params[:action]) %>
10 <% end %>
11<% end %>
12
13<%= will_paginate @nodes %>
14<table class="node_table">
15 <tr class="header">
16 <th class="node_id">ID</th>
17 <th class="title">Title</th>
18 <th class="actions">Actions</th>
19 <th class="editor">Locked by</th>
20 <th class="revision">Rev.</th>
21 </tr>
22 <% @nodes.each do |node| %>
23 <tr class="<%= cycle("even", "odd") %>">
24 <td class="node_id"><%= node.id %></td>
25 <td class="title">
26 <h4><%= link_to title_for_node(node), node_path(node) %></h4>
27 <p><%= link_to_path(node.unique_name, node.unique_name) %></p>
28 </td>
29 <td class="actions">
30 <%= link_to 'show', node_path(node) %>
31 <%= link_to 'edit', edit_node_path(node) %>
32 <%= link_to 'revisions', node_revisions_path(node) %>
33 </td>
34 <td><%= node.lock_owner.login if node.lock_owner %></td>
35 <td><%= node.draft ? node.draft.revision : (node.head ? node.head.revision : "EMPTY") %></td>
36 </tr>
37 <% end %>
38</table>
39<%= will_paginate @nodes %>
diff --git a/app/views/nodes/chapters.html.erb b/app/views/nodes/chapters.html.erb
new file mode 100644
index 00000000..939f19cd
--- /dev/null
+++ b/app/views/nodes/chapters.html.erb
@@ -0,0 +1,9 @@
1<h1>Chapters</h1>
2
3<%= form_tag chapters_nodes_path, method: :get do %>
4 <label><%= check_box_tag 'kinds[]', 'erfa', @kind_keys.include?('erfa') %> Erfa</label>
5 <label><%= check_box_tag 'kinds[]', 'chaostreff', @kind_keys.include?('chaostreff') %> Chaostreff</label>
6 <%= submit_tag "Filter", class: "action_button" %>
7<% end %>
8
9<%= render 'node_list' %>
diff --git a/app/views/nodes/drafts.html.erb b/app/views/nodes/drafts.html.erb
new file mode 100644
index 00000000..6d0830c9
--- /dev/null
+++ b/app/views/nodes/drafts.html.erb
@@ -0,0 +1,3 @@
1<h1>Nodes with drafts or autosaves</h1>
2
3<%= render 'node_list' %>
diff --git a/app/views/nodes/mine.html.erb b/app/views/nodes/mine.html.erb
new file mode 100644
index 00000000..fc5680a9
--- /dev/null
+++ b/app/views/nodes/mine.html.erb
@@ -0,0 +1,3 @@
1<h1>My work</h1>
2
3<%= render 'node_list' %>
diff --git a/app/views/nodes/recent.html.erb b/app/views/nodes/recent.html.erb
new file mode 100644
index 00000000..36027750
--- /dev/null
+++ b/app/views/nodes/recent.html.erb
@@ -0,0 +1,3 @@
1<h1>Recently changed</h1>
2
3<%= render 'node_list' %>
diff --git a/app/views/nodes/tags.html.erb b/app/views/nodes/tags.html.erb
new file mode 100644
index 00000000..0ebc6ce6
--- /dev/null
+++ b/app/views/nodes/tags.html.erb
@@ -0,0 +1,3 @@
1<h1>Nodes tagged: <%= params[:tags] %></h1>
2
3<%= render 'node_list' %>