index.rhtml
1.57 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
<h2> <%=_('Listing products and services') %> </h2>
<table>
<tr>
<th><%= _('Product') %></th>
<th><%= _('Price') %></th>
<th><%= _('Actions') %></th>
</tr>
<% @products.each do |product| %>
<tr>
<td><strong><%= link_to product.name, :action => 'show', :id => product %></strong></td>
<td><%= product.price %></td>
<td>
<%= button :edit, _('Edit'), :action => 'edit', :id => product %>
<%= button :delete, _('Destroy'), :action => 'destroy', :id => product %>
</td>
</tr>
<% end %>
</table>
<%= button :add, _('New product or service'), :action => 'new' %>
<br />
<h3> <%=_('Listing raw materials') %> </h3>
<table>
<tr>
<th><%= _('Raw material') %></th>
<th><%= _('Actions') %></th>
</tr>
<% @consumptions.each do |consumption| %>
<tr>
<td>
<strong><%= link_to_category(consumption.product_category) %></strong>
<br/>
<em><%= consumption.aditional_specifications %></em>
</td>
<td>
<%= button :edit, _('Edit'), :action => 'edit_consumption', :id => consumption %>
<%= button :delete, _('Remove'), { :action => 'destroy_consumption', :id => consumption }, :confirm => _('Are you sure, you want to remove this raw material from your list') %>
</td>
</tr>
<% end %>
</table>
<%= button :add, _('Add raw material'), :action => 'new_consumption' %>
<p>
<%= link_to( '<span>'+ _('Back') +'</span>', { :controller => 'profile_editor', :profile => @profile.identifier, :action => 'index' }, :class => 'button with-text icon-back' ) %>
</p>