Grosse MàJ
This commit is contained in:
		
							
								
								
									
										37
									
								
								P5B/ruby/mon_projet/app/views/admin/suppliers/edit.rhtml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										37
									
								
								P5B/ruby/mon_projet/app/views/admin/suppliers/edit.rhtml
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,37 @@
 | 
			
		||||
<h1>Editing supplier</h1>
 | 
			
		||||
 | 
			
		||||
<%= error_messages_for :supplier %>
 | 
			
		||||
 | 
			
		||||
<% form_for(:supplier, :url => supplier_path(@supplier), :html => { :method => :put }) do |f| %>
 | 
			
		||||
  <p>
 | 
			
		||||
    <b>Name</b><br />
 | 
			
		||||
    <%= f.text_field :name %>
 | 
			
		||||
  </p>
 | 
			
		||||
 | 
			
		||||
  <p>
 | 
			
		||||
    <b>Description</b><br />
 | 
			
		||||
    <%= f.text_area :description %>
 | 
			
		||||
  </p>
 | 
			
		||||
 | 
			
		||||
  <p>
 | 
			
		||||
    <b>Code</b><br />
 | 
			
		||||
    <%= f.text_field :code %>
 | 
			
		||||
  </p>
 | 
			
		||||
 | 
			
		||||
  <p>
 | 
			
		||||
    <b>Created at</b><br />
 | 
			
		||||
    <%= f.datetime_select :created_at %>
 | 
			
		||||
  </p>
 | 
			
		||||
 | 
			
		||||
  <p>
 | 
			
		||||
    <b>Updated at</b><br />
 | 
			
		||||
    <%= f.datetime_select :updated_at %>
 | 
			
		||||
  </p>
 | 
			
		||||
 | 
			
		||||
  <p>
 | 
			
		||||
    <%= submit_tag "Update" %>
 | 
			
		||||
  </p>
 | 
			
		||||
<% end %>
 | 
			
		||||
 | 
			
		||||
<%= link_to 'Show', supplier_path(@supplier) %> |
 | 
			
		||||
<%= link_to 'Back', suppliers_path %>
 | 
			
		||||
							
								
								
									
										28
									
								
								P5B/ruby/mon_projet/app/views/admin/suppliers/index.rhtml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										28
									
								
								P5B/ruby/mon_projet/app/views/admin/suppliers/index.rhtml
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,28 @@
 | 
			
		||||
<h1>Listing suppliers</h1>
 | 
			
		||||
 | 
			
		||||
<table>
 | 
			
		||||
  <tr>
 | 
			
		||||
    <th>Name</th>
 | 
			
		||||
    <th>Description</th>
 | 
			
		||||
    <th>Code</th>
 | 
			
		||||
    <th>Created at</th>
 | 
			
		||||
    <th>Updated at</th>
 | 
			
		||||
  </tr>
 | 
			
		||||
  
 | 
			
		||||
<% for supplier in @suppliers %>
 | 
			
		||||
  <tr>
 | 
			
		||||
    <td><%=h supplier.name %></td>
 | 
			
		||||
    <td><%=h supplier.description %></td>
 | 
			
		||||
    <td><%=h supplier.code %></td>
 | 
			
		||||
    <td><%=h supplier.created_at %></td>
 | 
			
		||||
    <td><%=h supplier.updated_at %></td>
 | 
			
		||||
    <td><%= link_to 'Show', supplier_path(supplier) %></td>
 | 
			
		||||
    <td><%= link_to 'Edit', edit_supplier_path(supplier) %></td>
 | 
			
		||||
    <td><%= link_to 'Destroy', supplier_path(supplier), :confirm => 'Are you sure?', :method => :delete %></td>
 | 
			
		||||
  </tr>
 | 
			
		||||
<% end %>
 | 
			
		||||
</table>
 | 
			
		||||
 | 
			
		||||
<br />
 | 
			
		||||
 | 
			
		||||
<%= link_to 'New supplier', new_supplier_path %>
 | 
			
		||||
							
								
								
									
										36
									
								
								P5B/ruby/mon_projet/app/views/admin/suppliers/new.rhtml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										36
									
								
								P5B/ruby/mon_projet/app/views/admin/suppliers/new.rhtml
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,36 @@
 | 
			
		||||
<h1>New supplier</h1>
 | 
			
		||||
 | 
			
		||||
<%= error_messages_for :supplier %>
 | 
			
		||||
 | 
			
		||||
<% form_for(:supplier, :url => suppliers_path) do |f| %>
 | 
			
		||||
  <p>
 | 
			
		||||
    <b>Name</b><br />
 | 
			
		||||
    <%= f.text_field :name %>
 | 
			
		||||
  </p>
 | 
			
		||||
 | 
			
		||||
  <p>
 | 
			
		||||
    <b>Description</b><br />
 | 
			
		||||
    <%= f.text_area :description %>
 | 
			
		||||
  </p>
 | 
			
		||||
 | 
			
		||||
  <p>
 | 
			
		||||
    <b>Code</b><br />
 | 
			
		||||
    <%= f.text_field :code %>
 | 
			
		||||
  </p>
 | 
			
		||||
 | 
			
		||||
  <p>
 | 
			
		||||
    <b>Created at</b><br />
 | 
			
		||||
    <%= f.datetime_select :created_at %>
 | 
			
		||||
  </p>
 | 
			
		||||
 | 
			
		||||
  <p>
 | 
			
		||||
    <b>Updated at</b><br />
 | 
			
		||||
    <%= f.datetime_select :updated_at %>
 | 
			
		||||
  </p>
 | 
			
		||||
 | 
			
		||||
  <p>
 | 
			
		||||
    <%= submit_tag "Create" %>
 | 
			
		||||
  </p>
 | 
			
		||||
<% end %>
 | 
			
		||||
 | 
			
		||||
<%= link_to 'Back', suppliers_path %>
 | 
			
		||||
							
								
								
									
										28
									
								
								P5B/ruby/mon_projet/app/views/admin/suppliers/show.rhtml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										28
									
								
								P5B/ruby/mon_projet/app/views/admin/suppliers/show.rhtml
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,28 @@
 | 
			
		||||
<p>
 | 
			
		||||
  <b>Name:</b>
 | 
			
		||||
  <%=h @supplier.name %>
 | 
			
		||||
</p>
 | 
			
		||||
 | 
			
		||||
<p>
 | 
			
		||||
  <b>Description:</b>
 | 
			
		||||
  <%=h @supplier.description %>
 | 
			
		||||
</p>
 | 
			
		||||
 | 
			
		||||
<p>
 | 
			
		||||
  <b>Code:</b>
 | 
			
		||||
  <%=h @supplier.code %>
 | 
			
		||||
</p>
 | 
			
		||||
 | 
			
		||||
<p>
 | 
			
		||||
  <b>Created at:</b>
 | 
			
		||||
  <%=h @supplier.created_at %>
 | 
			
		||||
</p>
 | 
			
		||||
 | 
			
		||||
<p>
 | 
			
		||||
  <b>Updated at:</b>
 | 
			
		||||
  <%=h @supplier.updated_at %>
 | 
			
		||||
</p>
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
<%= link_to 'Edit', edit_supplier_path(@supplier) %> |
 | 
			
		||||
<%= link_to 'Back', suppliers_path %>
 | 
			
		||||
		Reference in New Issue
	
	Block a user