Grosse MàJ

This commit is contained in:
olivier
2008-11-25 22:11:16 +01:00
parent 53195fdfcd
commit 3e719157ea
2980 changed files with 343846 additions and 0 deletions

View File

@ -0,0 +1,22 @@
<h1>Editing customer</h1>
<%= error_messages_for :customer %>
<% form_for(:customer, :url => customer_path(@customer), :html => { :method => :put }) do |f| %>
<p>
<b>Firstname</b><br />
<%= f.text_field :firstname %>
</p>
<p>
<b>Name</b><br />
<%= f.text_field :name %>
</p>
<p>
<%= submit_tag "Update" %>
</p>
<% end %>
<%= link_to 'Show', customer_path(@customer) %> |
<%= link_to 'Back', customers_path %>

View File

@ -0,0 +1,22 @@
<h1>Listing customers</h1>
<table>
<tr>
<th>Firstname</th>
<th>Name</th>
</tr>
<% for customer in @customers %>
<tr>
<td><%=h customer.firstname %></td>
<td><%=h customer.name %></td>
<td><%= link_to 'Show', customer_path(customer) %></td>
<td><%= link_to 'Edit', edit_customer_path(customer) %></td>
<td><%= link_to 'Destroy', customer_path(customer), :confirm => 'Are you sure?', :method => :delete %></td>
</tr>
<% end %>
</table>
<br />
<%= link_to 'New customer', new_customer_path %>

View File

@ -0,0 +1,21 @@
<h1>New customer</h1>
<%= error_messages_for :customer %>
<% form_for(:customer, :url => customers_path) do |f| %>
<p>
<b>Firstname</b><br />
<%= f.text_field :firstname %>
</p>
<p>
<b>Name</b><br />
<%= f.text_field :name %>
</p>
<p>
<%= submit_tag "Create" %>
</p>
<% end %>
<%= link_to 'Back', customers_path %>

View File

@ -0,0 +1,13 @@
<p>
<b>Firstname:</b>
<%=h @customer.firstname %>
</p>
<p>
<b>Name:</b>
<%=h @customer.name %>
</p>
<%= link_to 'Edit', edit_customer_path(@customer) %> |
<%= link_to 'Back', customers_path %>