Grosse MàJ
This commit is contained in:
		
							
								
								
									
										22
									
								
								P5B/ruby/mon_projet/app/views/admin/customers/edit.rhtml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										22
									
								
								P5B/ruby/mon_projet/app/views/admin/customers/edit.rhtml
									
									
									
									
									
										Normal 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 %>
 | 
			
		||||
							
								
								
									
										22
									
								
								P5B/ruby/mon_projet/app/views/admin/customers/index.rhtml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										22
									
								
								P5B/ruby/mon_projet/app/views/admin/customers/index.rhtml
									
									
									
									
									
										Normal 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 %>
 | 
			
		||||
							
								
								
									
										21
									
								
								P5B/ruby/mon_projet/app/views/admin/customers/new.rhtml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										21
									
								
								P5B/ruby/mon_projet/app/views/admin/customers/new.rhtml
									
									
									
									
									
										Normal 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 %>
 | 
			
		||||
							
								
								
									
										13
									
								
								P5B/ruby/mon_projet/app/views/admin/customers/show.rhtml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										13
									
								
								P5B/ruby/mon_projet/app/views/admin/customers/show.rhtml
									
									
									
									
									
										Normal 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 %>
 | 
			
		||||
		Reference in New Issue
	
	Block a user