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,32 @@
<h1>Editing address</h1>
<%= error_messages_for :address %>
<% form_for(:address, :url => address_path(@address), :html => { :method => :put }) do |f| %>
<p>
<b>Street</b><br />
<%= f.text_area :street %>
</p>
<p>
<b>Postal code</b><br />
<%= f.text_field :postal_code %>
</p>
<p>
<b>City</b><br />
<%= f.text_field :city %>
</p>
<p>
<b>Country</b><br />
<%= f.text_field :country %>
</p>
<p>
<%= submit_tag "Update" %>
</p>
<% end %>
<%= link_to 'Show', address_path(@address) %> |
<%= link_to 'Back', addresses_path %>

View File

@ -0,0 +1,26 @@
<h1>Listing addresses</h1>
<table>
<tr>
<th>Street</th>
<th>Postal code</th>
<th>City</th>
<th>Country</th>
</tr>
<% for address in @addresses %>
<tr>
<td><%=h address.street %></td>
<td><%=h address.postal_code %></td>
<td><%=h address.city %></td>
<td><%=h address.country %></td>
<td><%= link_to 'Show', address_path(address) %></td>
<td><%= link_to 'Edit', edit_address_path(address) %></td>
<td><%= link_to 'Destroy', address_path(address), :confirm => 'Are you sure?', :method => :delete %></td>
</tr>
<% end %>
</table>
<br />
<%= link_to 'New address', new_address_path %>

View File

@ -0,0 +1,31 @@
<h1>New address</h1>
<%= error_messages_for :address %>
<% form_for(:address, :url => addresses_path) do |f| %>
<p>
<b>Street</b><br />
<%= f.text_area :street %>
</p>
<p>
<b>Postal code</b><br />
<%= f.text_field :postal_code %>
</p>
<p>
<b>City</b><br />
<%= f.text_field :city %>
</p>
<p>
<b>Country</b><br />
<%= f.text_field :country %>
</p>
<p>
<%= submit_tag "Create" %>
</p>
<% end %>
<%= link_to 'Back', addresses_path %>

View File

@ -0,0 +1,23 @@
<p>
<b>Street:</b>
<%=h @address.street %>
</p>
<p>
<b>Postal code:</b>
<%=h @address.postal_code %>
</p>
<p>
<b>City:</b>
<%=h @address.city %>
</p>
<p>
<b>Country:</b>
<%=h @address.country %>
</p>
<%= link_to 'Edit', edit_address_path(@address) %> |
<%= link_to 'Back', addresses_path %>

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 %>

View File

@ -0,0 +1,29 @@
<p>
<b>Designation</b><br />
<%= f.text_field :designation %>
</p>
<p>
<b>Description</b><br />
<%= f.text_area :description %>
</p>
<p>
<b>Crée le</b><br />
<%= f.datetime_select :created_at %>
</p>
<p>
<b>Mis à jour le</b><br />
<%= f.datetime_select :updated_at %>
</p>
<p>
<b>Fournisseur</b><br />
<%= f.select("supplier_id", Supplier.find(:all).collect {|p| [ p.code, p.id ] }, { :include_blank => true }) %>
</p>
<p>
<b>Type de produit</b><br />
<%= select_tag "type", options_for_select([["Voiture", "Voiture"], ["Vélo", "Velo"]]) %>
</p>

View File

@ -0,0 +1,15 @@
<h1>Edition d'un produit</h1>
<%= error_messages_for :product %>
<% form_for(:product, :url => admin_product_path(@product), :html => { :method => :put }) do |f| %>
<%= render :partial => "form", :locals => { :f => f } %>
<p>
<%= submit_tag "Mise à jour" %>
</p>
<% end %>
<%= link_to 'Voir', admin_product_path(@product) %> |
<%= link_to 'Retour', admin_products_path %>

View File

@ -0,0 +1,34 @@
<h1>Liste des produits</h1>
<table>
<tr>
<th>Désignation</th>
<th>Description</th>
<th>Crée le</th>
<th>Mis à jour le</th>
<th>Fournisseur</th>
<th>Type</th>
</tr>
<% for product in @products %>
<tr>
<td><%=h product.designation %></td>
<td><%=h product.description %></td>
<td><%=h product.created_at.strftime("le %d/%m/%Y") %></td>
<td><%=h product.updated_at.strftime("%d/%m/%Y") %></td>
<td><%= link_to product.supplier_id, supplier_path(product.supplier_id) %></td>
<td><%=h product.type%></td>
<td><%= link_to 'Voir', admin_product_path(product) %></td>
<td><%= link_to 'Editer', edit_admin_product_path(product) %></td>
<td><%= link_to 'Supprimer', admin_product_path(product), :confirm => 'Etes vous sûr ?', :method => :delete %></td>
</tr>
<% end %>
</table>
<br />
<%= link_to 'Nouveau produit', new_admin_product_path %>
<br />
<p><b>Utilisateur connecté : </b><%= current_utilisateur.login if current_utilisateur %>
</p>

View File

@ -0,0 +1,13 @@
<h1>Nouvel élément</h1>
<%= error_messages_for :product %>
<% form_for(:product, :url => admin_products_path) do |f| %>
<%= render :partial => "form", :locals => { :f => f} %>
<p>
<%= submit_tag "Créer" %>
</p>
<% end %>
<%= link_to 'Retour', admin_products_path %>

View File

@ -0,0 +1,23 @@
<p>
<b>Désignation:</b>
<%=h @product.designation %>
</p>
<p>
<b>Description:</b>
<%=h @product.description %>
</p>
<p>
<b>Crée le:</b>
<%=h @product.created_at %>
</p>
<p>
<b>Mis à jour le :</b>
<%=h @product.updated_at %>
</p>
<%= link_to 'Editer', admin_edit_product_path(@product) %> |
<%= link_to 'Retour', admin_products_path %>

View 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 %>

View 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 %>

View 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 %>

View 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 %>