module-and-template-store/app/views/home/index.html.erb

26 lines
1.0 KiB
Plaintext
Raw Normal View History

<h2>Top Templates</h2>
<div class="row">
<% @templates.each do |template| %>
<div class="col-lg-4">
<h3><%=link_to template.title, template %></h3>
<p><b>Author:</b> <%= template.author %></p>
<p><%=image_tag template.preview.thumb.url%></p>
<p><%= link_to 'View details &raquo;'.html_safe ,template, :class=>"btn btn-primary"%></p>
</div>
<%end%>
</div>
<%= link_to 'More &raquo;'.html_safe,templates_path, :class=>"btn btn-danger"%>
<h2>Top Modules</h2>
<div class="row">
<% @extensions.each do |extension| %>
<div class="col-lg-4">
<h3><%=link_to extension.title, extension %></h3>
<p><b>Author:</b> <%= extension.author %></p>
<p><%=image_tag extension.preview.thumb.url%></p>
<p><%= link_to 'View details &raquo;'.html_safe ,extension, :class=>"btn btn-primary"%></p>
</div>
<%end%>
</div>
<%= link_to 'More &raquo;'.html_safe,extensions_path, :class=>"btn btn-danger"%>