Skip to content

Instantly share code, notes, and snippets.

@rbrancher
Created March 14, 2013 22:06
Show Gist options
  • Save rbrancher/5165693 to your computer and use it in GitHub Desktop.
Save rbrancher/5165693 to your computer and use it in GitHub Desktop.
<article class="store-product-show">
<section class="gallery-block">
<div class="gallery">
<%- product.catalog_product.images.each do |image| -%>
<%= image_tag image.grid_6.url, alt: product.name %>
<%- end -%>
</div>
<div class="text-block">
<%= simple_format product.catalog_product.tech_description %>
</div>
</section>
<section class="info-block">
<hgroup>
<h1><%= product.name %></h1>
</hgroup>
<dl>
<dt>design</dt>
<dd><%= product.catalog_product.lights_family.designers.map(&:name).join(', ') %></dd>
<dt class="top_marged"><%= t('attributes.application') %></dt>
<dd><%= product.catalog_product.application.map{|application| t(application, scope: 'attributes.application_types')}.join(', ') %></dd>
</dl>
<%- if product.in_stock? -%>
<%= render 'add_to_cart', product: product %>
<%- else -%>
<%= t 'product_unavailable', scope: 'store' %>
<%- end -%>
</section>
</article>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment