diff --git a/app/views/peoples/_people_form.rhtml b/app/views/peoples/_people_form.rhtml new file mode 100644 index 0000000..9651bda --- /dev/null +++ b/app/views/peoples/_people_form.rhtml @@ -0,0 +1,4 @@ +

+ <%= text_field 'people', 'title' %> +

+<%= render :partial => 'pages/page_form' %> diff --git a/app/views/peoples/edit.rhtml b/app/views/peoples/edit.rhtml index e7af0a6..004541c 100644 --- a/app/views/peoples/edit.rhtml +++ b/app/views/peoples/edit.rhtml @@ -1,10 +1,12 @@ <%= error_messages_for :people %> -<% form_for(:people, :url => people_path(@people), :html => { :method => :put }) do |f| %> +<% form_for(:people, :url => people_path(@people.page.title_for_url), :html => { :method => :put }) do |f| %> + <%= render :partial => 'people_form' %>

<%= submit_tag "Update" %>

<% end %> -<%= link_to 'Show', people_path(@people) %> | -<%= link_to 'Back', peoples_path %> \ No newline at end of file +<% content_for :sidebar do -%> + <%= show_people_link(@people) %>
+<% end -%> \ No newline at end of file diff --git a/app/views/peoples/index.rhtml b/app/views/peoples/index.rhtml index d1c5b9f..4de464e 100644 --- a/app/views/peoples/index.rhtml +++ b/app/views/peoples/index.rhtml @@ -9,6 +9,6 @@ <%= render :partial => 'shared/pagination_links' %> <% content_for :sidebar do -%> - <%= link_to 'Create a new person', new_people_path %>
+ <%= new_people_link %>
<%= render :partial => 'shared/tag_cloud' %> <% end -%> \ No newline at end of file diff --git a/app/views/peoples/new.rhtml b/app/views/peoples/new.rhtml index 0b2b07b..edb8f69 100644 --- a/app/views/peoples/new.rhtml +++ b/app/views/peoples/new.rhtml @@ -1,11 +1,8 @@ -

New people

- <%= error_messages_for :people %> <% form_for(:people, :url => peoples_path) do |f| %> + <%= render :partial => 'people_form' %>

<%= submit_tag "Create" %>

<% end %> - -<%= link_to 'Back', peoples_path %> \ No newline at end of file