people forms

git-svn-id: http://svn.barleysodas.com/barleysodas/trunk@54 0f7b21a7-9e3a-4941-bbeb-ce5c7c368fa7
master
andrew 2007-12-04 06:03:13 +00:00
parent 3cba3153b0
commit 30e65c50d8
4 changed files with 11 additions and 8 deletions

View File

@ -0,0 +1,4 @@
<p>
<label for="people_title">Name</label> <%= text_field 'people', 'title' %>
</p>
<%= render :partial => 'pages/page_form' %>

View File

@ -1,10 +1,12 @@
<%= error_messages_for :people %> <%= 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' %>
<p> <p>
<%= submit_tag "Update" %> <%= submit_tag "Update" %>
</p> </p>
<% end %> <% end %>
<%= link_to 'Show', people_path(@people) %> | <% content_for :sidebar do -%>
<%= link_to 'Back', peoples_path %> <%= show_people_link(@people) %><br />
<% end -%>

View File

@ -9,6 +9,6 @@
<%= render :partial => 'shared/pagination_links' %> <%= render :partial => 'shared/pagination_links' %>
<% content_for :sidebar do -%> <% content_for :sidebar do -%>
<%= link_to 'Create a new person', new_people_path %><br /> <%= new_people_link %><br />
<%= render :partial => 'shared/tag_cloud' %> <%= render :partial => 'shared/tag_cloud' %>
<% end -%> <% end -%>

View File

@ -1,11 +1,8 @@
<h1>New people</h1>
<%= error_messages_for :people %> <%= error_messages_for :people %>
<% form_for(:people, :url => peoples_path) do |f| %> <% form_for(:people, :url => peoples_path) do |f| %>
<%= render :partial => 'people_form' %>
<p> <p>
<%= submit_tag "Create" %> <%= submit_tag "Create" %>
</p> </p>
<% end %> <% end %>
<%= link_to 'Back', peoples_path %>