diff options
| author | hukl <contact@smyck.org> | 2009-02-22 11:27:51 +0100 |
|---|---|---|
| committer | hukl <contact@smyck.org> | 2009-02-22 11:27:51 +0100 |
| commit | e0d5557a9e7f88050da2ccb42e02397952cded0d (patch) | |
| tree | a2870b9ebab8081ab725d3ee6bbb851527f50067 /app/views/nodes | |
| parent | ea36234c990336cfa4a3ee1b6b80d5c9863c0676 (diff) | |
lots of view improvements - not ready though
Diffstat (limited to 'app/views/nodes')
| -rw-r--r-- | app/views/nodes/edit.html.erb | 16 | ||||
| -rw-r--r-- | app/views/nodes/index.html.erb | 12 | ||||
| -rw-r--r-- | app/views/nodes/new.html.erb | 14 |
3 files changed, 28 insertions, 14 deletions
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 | ||
