debshots/app/views/packages/xx_packages_search_results_grid.html.erb
Christoph Haas 87f545414f Getting the project working again
Replace Twitter Bootstrap by Zurb Foundation
Used @import in SCSS instad of require_tree for proper order and use of variables like $debian_color
Moved old files out of the way (renamed them to xx*)
Welcome controller (/) works
Moved templates from ERB to SLIM format
Fixed database settings
Reduced routes to working ones
Tidied up Gemfile
Checked in experimental lab files

Tried to find a good description for this massive commit :)
2014-11-16 18:26:03 +01:00

33 lines
1.3 KiB
Text

<% # Show search results - grid style %>
<% if @packages.length>0 %>
<% @packages.each do |package| %>
<div class="col-xs-4">
<div class="thumbnail">
<% if package.screenshots.length>0 %>
<% screenshot = package.screenshots.first %>
<div style="text-align: center">
<%= link_to image_tag(screenshot.image_url('small')),
screenshot.image_url('large'),
:class => 'fancybox',
:style => 'height: 120px',
:title => (
"#{package.description}" +
(screenshot.description.blank? ? '' : " (#{screenshot.description})")
)
%>
</div>
<h3><%= package.name %></h3>
<p class="pkgdescr"><%= package.description %></p>
<% else %>
<div style="text-align: center; height: 120px">
<%= link_to image_tag("/thumbnail-404.png"),
"/path/to/upload/package" %>
</div>
<h3><%= package.name %></h3>
<p><%= package.description %></p>
<% end %>
</div>
</div>
<% end %>
<% end %>