Move foodcoop/ordergroups into nwe namespace foodcoop. Made it more restful.

This commit is contained in:
Benjamin Meichsner 2009-08-02 18:12:13 +02:00
parent 709425855e
commit 1a8026c5a7
8 changed files with 175 additions and 29 deletions

View file

@ -0,0 +1,88 @@
<% title "Edit Ordergroup" %>
<% form_for @ordergroup do |f| %>
<%= f.error_messages %>
<p>
<%= f.label :type %><br />
<%= f.text_field :type %>
</p>
<p>
<%= f.label :name %><br />
<%= f.text_field :name %>
</p>
<p>
<%= f.label :description %><br />
<%= f.text_field :description %>
</p>
<p>
<%= f.label :account_balance %><br />
<%= f.text_field :account_balance %>
</p>
<p>
<%= f.label :account_updated %><br />
<%= f.datetime_select :account_updated %>
</p>
<p>
<%= f.label :created_on %><br />
<%= f.datetime_select :created_on %>
</p>
<p>
<%= f.label :role_admin %><br />
<%= f.check_box :role_admin %>
</p>
<p>
<%= f.label :role_suppliers %><br />
<%= f.check_box :role_suppliers %>
</p>
<p>
<%= f.label :role_article_meta %><br />
<%= f.check_box :role_article_meta %>
</p>
<p>
<%= f.label :role_finance %><br />
<%= f.check_box :role_finance %>
</p>
<p>
<%= f.label :role_orders %><br />
<%= f.check_box :role_orders %>
</p>
<p>
<%= f.label :weekly_task %><br />
<%= f.check_box :weekly_task %>
</p>
<p>
<%= f.label :weekday %><br />
<%= f.text_field :weekday %>
</p>
<p>
<%= f.label :task_name %><br />
<%= f.text_field :task_name %>
</p>
<p>
<%= f.label :task_description %><br />
<%= f.text_field :task_description %>
</p>
<p>
<%= f.label :task_required_users %><br />
<%= f.text_field :task_required_users %>
</p>
<p>
<%= f.label :deleted_at %><br />
<%= f.datetime_select :deleted_at %>
</p>
<p>
<%= f.label :contact_person %><br />
<%= f.text_field :contact_person %>
</p>
<p>
<%= f.label :contact_phone %><br />
<%= f.text_field :contact_phone %>
</p>
<p>
<%= f.label :contact_address %><br />
<%= f.text_field :contact_address %>
</p>
<p><%= f.submit "Submit" %></p>
<% end %>

View file

@ -0,0 +1,52 @@
<% title "Ordergroups" %>
<table>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
<th>Account Balance</th>
<th>Account Updated</th>
<th>Created On</th>
<th>Role Admin</th>
<th>Role Suppliers</th>
<th>Role Article Meta</th>
<th>Role Finance</th>
<th>Role Orders</th>
<th>Weekly Task</th>
<th>Weekday</th>
<th>Task Name</th>
<th>Task Description</th>
<th>Task Required Users</th>
<th>Deleted At</th>
<th>Contact Person</th>
<th>Contact Phone</th>
<th>Contact Address</th>
</tr>
<% for ordergroup in @ordergroups %>
<tr>
<td><%=h ordergroup.type %></td>
<td><%=h ordergroup.name %></td>
<td><%=h ordergroup.description %></td>
<td><%=h ordergroup.account_balance %></td>
<td><%=h ordergroup.account_updated %></td>
<td><%=h ordergroup.created_on %></td>
<td><%=h ordergroup.role_admin %></td>
<td><%=h ordergroup.role_suppliers %></td>
<td><%=h ordergroup.role_article_meta %></td>
<td><%=h ordergroup.role_finance %></td>
<td><%=h ordergroup.role_orders %></td>
<td><%=h ordergroup.weekly_task %></td>
<td><%=h ordergroup.weekday %></td>
<td><%=h ordergroup.task_name %></td>
<td><%=h ordergroup.task_description %></td>
<td><%=h ordergroup.task_required_users %></td>
<td><%=h ordergroup.deleted_at %></td>
<td><%=h ordergroup.contact_person %></td>
<td><%=h ordergroup.contact_phone %></td>
<td><%=h ordergroup.contact_address %></td>
<td><%= link_to "Edit", edit_ordergroup_path(ordergroup) %></td>
</tr>
<% end %>
</table>