summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/controllers/nodes_controller.rb5
-rw-r--r--app/views/admin/index.html.erb2
-rw-r--r--app/views/content/_article.html.erb2
-rw-r--r--app/views/content/render_page.html.erb2
-rw-r--r--app/views/layouts/admin.html.erb7
-rw-r--r--app/views/nodes/edit.html.erb16
-rw-r--r--app/views/nodes/index.html.erb12
-rw-r--r--app/views/nodes/new.html.erb14
-rw-r--r--public/stylesheets/admin.css19
9 files changed, 56 insertions, 23 deletions
diff --git a/app/controllers/nodes_controller.rb b/app/controllers/nodes_controller.rb
index 7e2b733..baf023f 100644
--- a/app/controllers/nodes_controller.rb
+++ b/app/controllers/nodes_controller.rb
@@ -15,12 +15,13 @@ class NodesController < ApplicationController
15 @nodes = Node.root.descendants.paginate( 15 @nodes = Node.root.descendants.paginate(
16 :include => :head, 16 :include => :head,
17 :page => params[:page], 17 :page => params[:page],
18 :per_page => 30 18 :per_page => 25,
19 :order => 'id DESC'
19 ) 20 )
20 end 21 end
21 22
22 def new 23 def new
23 24 @node = Node.new
24 end 25 end
25 26
26 def create 27 def create
diff --git a/app/views/admin/index.html.erb b/app/views/admin/index.html.erb
index e23e69b..e69de29 100644
--- a/app/views/admin/index.html.erb
+++ b/app/views/admin/index.html.erb
@@ -1,2 +0,0 @@
1<h1>Admin#index</h1>
2<p>Find me in app/views/admin/index.html.erb</p> \ No newline at end of file
diff --git a/app/views/content/_article.html.erb b/app/views/content/_article.html.erb
index 1e06787..009d639 100644
--- a/app/views/content/_article.html.erb
+++ b/app/views/content/_article.html.erb
@@ -2,5 +2,5 @@
2 <hr/> 2 <hr/>
3</div> 3</div>
4<h2><%= article.title %></h2> 4<h2><%= article.title %></h2>
5<h3><%= date_for_page article %>, gregoa</h3> 5<h3><%= date_for_page article %>, <%= @page.user.login %></h3>
6<p><%= article.abstract %></p> \ No newline at end of file 6<p><%= article.abstract %></p> \ No newline at end of file
diff --git a/app/views/content/render_page.html.erb b/app/views/content/render_page.html.erb
index b70f90e..f499c9c 100644
--- a/app/views/content/render_page.html.erb
+++ b/app/views/content/render_page.html.erb
@@ -10,7 +10,7 @@
10 <hr/> 10 <hr/>
11 </div> 11 </div>
12 <h2><a href="a_barriere.html"><%= @page.title %></a></h2> 12 <h2><a href="a_barriere.html"><%= @page.title %></a></h2>
13 <h3><%= date_for_page @page %>, gregoa</h3> 13 <h3><%= date_for_page @page %>, <%= @page.user.try(:login) %></h3>
14 <hr class="subtitle" /> 14 <hr class="subtitle" />
15 <p><em><%= @page.abstract %></em></p> 15 <p><em><%= @page.abstract %></em></p>
16 <%= aggregate?(@page.body) %> 16 <%= aggregate?(@page.body) %>
diff --git a/app/views/layouts/admin.html.erb b/app/views/layouts/admin.html.erb
index 2bde5dd..73e3b02 100644
--- a/app/views/layouts/admin.html.erb
+++ b/app/views/layouts/admin.html.erb
@@ -25,9 +25,12 @@
25 25
26 <body> 26 <body>
27 <div id="navigation"> 27 <div id="navigation">
28 <%= I18n.locale %> <%= language_selector %> | 28 <%= language_selector %> |
29 29
30 <%= link_to 'Nodes', nodes_path %> 30 <%= link_to 'Overview', :controller => :admin, :action => 'index' %> |
31 <%= link_to 'Nodes', nodes_path %> |
32 <%= link_to 'User', users_path %> | Actions:
33 <%= yield :menu %>
31 </div> 34 </div>
32 <div id="flash"> 35 <div id="flash">
33 <%= flash[:notice] %> 36 <%= flash[:notice] %>
diff --git a/app/views/nodes/edit.html.erb b/app/views/nodes/edit.html.erb
index f457bc7..f6513a7 100644
--- a/app/views/nodes/edit.html.erb
+++ b/app/views/nodes/edit.html.erb
@@ -1,12 +1,6 @@
1<h1>Nodes#edit</h1>
2
3<%= link_to 'Publish', publish_node_path, :method => :put %>
4
5<h1>Editing page</h1> 1<h1>Editing page</h1>
6 2
7<%= I18n.locale %> 3<strong>Sprache:</strong> <%= I18n.locale %> <strong>Pfad:</strong> <%= @node.unique_name %>
8
9<%= @node.unique_name %>
10 4
11<div class="page_editor"> 5<div class="page_editor">
12 <% form_for(@node) do |f| %> 6 <% form_for(@node) do |f| %>
@@ -33,7 +27,9 @@
33 <%= f.submit "Update" %> 27 <%= f.submit "Update" %>
34 </p> 28 </p>
35 <% end %> 29 <% end %>
36 30
31
37 <%= link_to 'Show', @node %> | 32 <%= link_to 'Show', @node %> |
38 <%= link_to 'Back', nodes_path %> 33 <%= link_to 'Back', nodes_path %> |
39</div> \ No newline at end of file 34 <%= link_to 'Publish', publish_node_path, :method => :put %>
35</div>
diff --git a/app/views/nodes/index.html.erb b/app/views/nodes/index.html.erb
index 5f913e9..533204d 100644
--- a/app/views/nodes/index.html.erb
+++ b/app/views/nodes/index.html.erb
@@ -10,7 +10,11 @@
10 </tr> 10 </tr>
11 <% @nodes.each do |node| %> 11 <% @nodes.each do |node| %>
12 <tr class="<%= cycle("even", "odd") %>"> 12 <tr class="<%= cycle("even", "odd") %>">
13 <td><%= node.head.title if node.head %></td> 13 <td>
14 <strong>
15 <%= truncate(node.head.title, 50) if node.head %>
16 </strong>
17 </td>
14 <td><%= node.unique_name %></td> 18 <td><%= node.unique_name %></td>
15 <td> 19 <td>
16 <%= link_to 'Show', node_path(node) %> 20 <%= link_to 'Show', node_path(node) %>
@@ -21,4 +25,8 @@
21 <% end %> 25 <% end %>
22 </table> 26 </table>
23</p> 27</p>
24<%= will_paginate @nodes %> \ No newline at end of file 28<%= will_paginate @nodes %>
29
30<% content_for :menu do %>
31 <%= link_to 'Create', new_node_path %>
32<% end %> \ No newline at end of file
diff --git a/app/views/nodes/new.html.erb b/app/views/nodes/new.html.erb
index 4258377..1207413 100644
--- a/app/views/nodes/new.html.erb
+++ b/app/views/nodes/new.html.erb
@@ -1,2 +1,12 @@
1<h1>Nodes#new</h1> 1<h1>Create new node</h1>
2<p>Find me in app/views/nodes/new.html.erb</p> 2
3<% form_for @node do |f| %>
4 <p>
5 <%= f.label 'Parent node' %><br />
6 <%= text_field_tag :parent_unique_name %>
7 </p>
8 <p>
9 <%= f.label :slug %><br />
10 <%= f.text_field :slug %>
11 </p>
12<% end %> \ No newline at end of file
diff --git a/public/stylesheets/admin.css b/public/stylesheets/admin.css
index e475f4c..242806f 100644
--- a/public/stylesheets/admin.css
+++ b/public/stylesheets/admin.css
@@ -33,7 +33,13 @@ th.actions {
33 width: 150px; 33 width: 150px;
34} 34}
35 35
36td {} 36td {
37 padding: 3px;
38}
39
40input[type=text] {
41 width: 300px;
42}
37 43
38.page_editor input[type=text] { 44.page_editor input[type=text] {
39 width: 600px; 45 width: 600px;
@@ -41,4 +47,15 @@ td {}
41 47
42.page_editor textarea { 48.page_editor textarea {
43 width: 600px; 49 width: 600px;
50}
51
52#navigation {
53 height: 40px;
54 border-bottom: 1px solid #f1f1f1;
55 font-size: 20px;
56 line-height: 30px;
57}
58
59#navigation a {
60 text-decoration: none;
44} \ No newline at end of file 61} \ No newline at end of file