From e0d5557a9e7f88050da2ccb42e02397952cded0d Mon Sep 17 00:00:00 2001 From: hukl Date: Sun, 22 Feb 2009 11:27:51 +0100 Subject: lots of view improvements - not ready though --- app/views/nodes/edit.html.erb | 16 ++++++---------- app/views/nodes/index.html.erb | 12 ++++++++++-- app/views/nodes/new.html.erb | 14 ++++++++++++-- 3 files changed, 28 insertions(+), 14 deletions(-) (limited to 'app/views/nodes') 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 @@ -

Nodes#edit

- -<%= link_to 'Publish', publish_node_path, :method => :put %> -

Editing page

-<%= I18n.locale %> - -<%= @node.unique_name %> +Sprache: <%= I18n.locale %> Pfad: <%= @node.unique_name %>
<% form_for(@node) do |f| %> @@ -33,7 +27,9 @@ <%= f.submit "Update" %>

<% end %> - + + <%= link_to 'Show', @node %> | - <%= link_to 'Back', nodes_path %> -
\ No newline at end of file + <%= link_to 'Back', nodes_path %> | + <%= link_to 'Publish', publish_node_path, :method => :put %> + 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 @@ <% @nodes.each do |node| %> "> - <%= node.head.title if node.head %> + + + <%= truncate(node.head.title, 50) if node.head %> + + <%= node.unique_name %> <%= link_to 'Show', node_path(node) %> @@ -21,4 +25,8 @@ <% end %>

-<%= will_paginate @nodes %> \ No newline at end of file +<%= will_paginate @nodes %> + +<% content_for :menu do %> + <%= link_to 'Create', new_node_path %> +<% 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 @@ -

Nodes#new

-

Find me in app/views/nodes/new.html.erb

+

Create new node

+ +<% form_for @node do |f| %> +

+ <%= f.label 'Parent node' %>
+ <%= text_field_tag :parent_unique_name %> +

+

+ <%= f.label :slug %>
+ <%= f.text_field :slug %> +

+<% end %> \ No newline at end of file -- cgit v1.3