Permalink
Find file
Fetching contributors…
Cannot retrieve contributors at this time
38 lines (37 sloc) 1.29 KB
<% unless edgy_related(options).empty? -%>
<table class="edgy-related">
<tr>
<td colspan="<%= orientation == :horizontal ? edgy_related.size : 2 %>">
<h3 class="edgy-label"><%= options[:message] || edgy_message %></h3>
</td>
</tr>
<% if orientation == :horizontal %>
<tr>
<% edgy_related.each do |related_product| %>
<td class="edgy-image" style="width: <%= (100 / edgy_related.size) %>%">
<%= link_to small_image(related_product), related_product %></td>
<% end %>
</tr>
<tr>
<% edgy_related.each do |related_product| %>
<td class="edgy-label">
<%=h link_to related_product.name, related_product %><br />
<span class="price"><%=h product_price(related_product) %></span>
</td>
<% end %>
</tr>
<% else %>
<% edgy_related.each do |related_product| -%>
<tr>
<td class="edgy-image">
<%= link_to small_image(related_product), related_product %>
</td>
<td class="edgy-label">
<%=h link_to related_product.name, related_product %><br />
<span class="price"><%=h product_price(related_product) %></span>
</td>
</tr>
<% end %>
<% end %>
</table>
<% end %>