ref: master
plugins/products/views/products_plugin/page/show.html.erb
<% show_supplier = false unless defined? show_supplier %> <%= content_for :product_page do %><%= add_zoom_to_images %> <%= button_bar do %> <%= button_to_function :back, _('Back to the product listing'), "catalog.product.back(#{params[:rank]})" %> <% if user and (@user_is_admin or user.is_admin? profile) %> <%= button :add, _('Add product or service'), controller: "products_plugin/page", action: :new, profile: profile.identifier %> <%= button :delete, _('Remove product or service'), {action: :destroy, id: @product, profile: profile.identifier}, class: 'requires-permission-products_plugin/page', confirm: _('Are you sure you want to remove this product?') %> <% end %> <% end %> <% end %> <%= render 'products_plugin/catalog/form' %> <%= render 'products_plugin/catalog/search' %> <%= render 'products_plugin/catalog/javascripts' %><%= render :partial => 'products_plugin/page/display_category' %><%= render 'products_plugin/page/display_name' %><% if show_supplier %><%= _('Offered by') %>: <%= link_to @product.profile.short_name(nil), @product.profile.url %><% end %> <% if NOOSFERO_CONF['addthis_enabled'] %> <%= render :partial => 'content_viewer/addthis' %> <% end %><%= render 'products_plugin/page/display_image' %><%= render :partial => 'products_plugin/page/display_info' %><% extra_content = @plugins.dispatch(:product_info_extras, @product).collect { |content| instance_exec(&content) } %> <%= safe_join(extra_content, "\n") %>
<% plugins_tabs = plugins_product_tabs %><% if !@product.description.blank? || @allowed_user %>
- <%= _('Description') %>
<% end %> <% if !@product.inputs.empty? || @allowed_user %>- <%= _('Inputs and raw material') %>
<% end %> <% if @product.price_described? || @allowed_user %>- <%= _('Price composition') %>
<% end %> <% plugins_tabs.each do |tab| %>- <%= tab[:title] %>
<% end %><%= render :partial => 'products_plugin/page/display_description' %><% plugins_tabs.each do |tab| %><%= render 'products_plugin/page/display_inputs' %><% if @product.price_described? || @allowed_user %><%= render 'products_plugin/page/display_price_details' %> <%= render 'products_plugin/page/price_details_button' %><% end %><%= raw tab[:content] %><% end %>