<% @templates.each do |template| %>

<%=link_to template.title, template %>

Author: <%= template.author %>

<%=image_tag template.preview.thumb.url%>

<%=link_to 'Download', template.template.url, :class=> 'btn btn-success'%>

<%= link_to 'View details »'.html_safe ,template, :class=>"btn btn-primary"%>

<%end%>