show.rhtml
1.75 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
<div id="product-category">
<%= render :partial => 'manage_products/display_category' %>
</div>
<div id="show_product">
<div id='product-name'>
<%= render :partial => 'manage_products/display_name' %>
</div>
<div id='product-details'>
<div id='product-image'>
<%= render :partial => 'manage_products/display_image' %>
</div>
<div id='product-extra-content'>
<% extra_content = @plugins.map(:product_info_extras, @product).collect { |content| instance_eval(&content) } %>
<%= extra_content.join("\n") %>
</div>
<div id='product-info'>
<%= render :partial => 'manage_products/display_info' %>
</div>
</div>
<br style='clear: both'/>
<% unless !@allowed_user && (@product.description.blank? && @product.inputs.empty?) %>
<div class='ui-tabs' id='product-<%= @product.id %>-tabs'>
<ul>
<% if !@product.description.blank? || @allowed_user %>
<li class='tab'><a href='#product-description'><%= _('Description') %></a></li>
<% end %>
<% if !@product.inputs.empty? || @allowed_user %>
<li class='tab'><a href='#product-inputs'><%= _('Inputs and raw material') %></a></li>
<% end %>
</ul>
<div id='product-description'>
<%= render :partial => 'manage_products/display_description' %>
</div>
<div id='product-inputs'>
<%= render :partial => 'manage_products/display_inputs' %>
</div>
</div>
<% end %>
</div>
<% button_bar do %>
<%= button :back, _('Back to the product listing'), :controller => 'catalog', :action => 'index' %>
<%= button :delete, _('Remove product or service'), {:action => 'destroy', :id => @product}, :class => 'requires-permission-manage_products', :style => 'display:none;' %>
<% end %>