<% @product = (@template if type.eql?('templates')) || (@extension if type.eql?('extensions')) %>
<% if @product.thumbnail.present? %> <%= image_tag(type == "templates" ? @product.thumbnail.thumb_template.url : (type == "extensions" ? @product.thumbnail.thumb_extension.url : ""))%> <% else %> <%= placeholdit_image_tag (type == "templates" ? "480x300" : (type == "extensions" ? "300x300" : "")), background_color: "#3f3f3f" %> <% end %>

<%= @product.title %>

<%= link_to(@product.author, "developer/?devid=2rqw9efjq923", :class => "developer") %> <%= content_tag(:p, (link_to("Education", "/" + type + "?category=Education")), :class => "category") %>


Report Problem
<%= render :partial => "shared/stars_rank" %>
<%cache [ 'screenshots', expires_in: 30.minutes ] do%>
    <% if @product.previews.present? %> <% @product.previews.each do |p|%>
  • <%=image_tag p.image.url, width: "1024", height: "768" %>
  • <% end %> <% else%> <% 5.times do%>
  • <%= placeholdit_image_tag ("1024x768"), background_color: "#3f3f3f" %>
  • <% end %> <% end %>
<% end %>
<%= headingTitle("Description", nil) %>

<%= @product.description %>

<%= headingTitle("Whats New", nil) %>
<% (1+rand(3)).times do |n| %>
3.4<%= n %>
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
<% end %>
<%= headingTitle("Metadata", nil) %>
<%= helper_metadata(type).html_safe %>
<%= headingTitle("Recommendation", "#") %>
<%= render :partial => "shared/item_card", :locals => {:type => type, :frequency => 6} %>
<%= headingTitle("Other items the same " + (type == "templates" ? "design" : (type == "extensions" ? "developer" : "")), "#") %>
<%= render :partial => "shared/item_card", :locals => {:type => type, :frequency => 6} %>