22 lines
1.0 KiB
Plaintext
22 lines
1.0 KiB
Plaintext
<% @products = (@templates if type.eql?('templates')) || (@extensions if type.eql?('extensions')) %>
|
|
|
|
<% cache [ 'product list', expires_in: 60.seconds ] do %>
|
|
<% @products.each do |product| %>
|
|
<div class="card-content <%= type == 'templates' ? type : 'apps' %>">
|
|
<div class="card-inner">
|
|
<div class="cover">
|
|
<%= link_to "", product, :class=> "details-link" %>
|
|
<div class="cover-image">
|
|
<%= placeholdit_image_tag (type == 'templates' ? "256x180" : '100x100'), background_color: "#3f3f3f" %>
|
|
</div>
|
|
</div>
|
|
<div class="details">
|
|
<%= content_tag(:h2, (link_to product.title, product), :class => "item-title") %>
|
|
<%= content_tag(:p, (link_to "Developer: #{product.author}"), :class => "developer-title") %>
|
|
<%= render :partial => "shared/stars_rank" if type != 'templates' %>
|
|
<%= content_tag(:p, product.price.nil?.eql?(true) ? 'Free' : product.price, :class => "price-container") %>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<% end %>
|
|
<% end %> |