Sha256: ea07236151bb49862d04db4b2d2ef802218b0553bd07799a59a540386470898b
Contents?: true
Size: 1.42 KB
Versions: 1
Compression:
Stored size: 1.42 KB
Contents
<div id="downloads"> <div id="select-downloads" class="left"> <%- @printers.each do |printer| %> <%= link_to printer.name, "#", :class => "printer-#{printer.id}", :style => ("background-image:url('#{printer.images.first.attachment.url(:mini)}')" if printer.images.any?) %><br /> <%- end %> </div> <div class="right" id="show-downloads"> <%- @download_categories.each do |category| %> <div class="show-category-<%= category.id %>" style="display:none;"> <h2><%= category.name %></h2> <br /> <%- category.downloads.each do |download| %> <%= link_to download.name, download.url %><br /> <%- end %> </div> <%- end %> <%- @printers.each do |printer| %> <div class="show-printer-<%= printer.id %>" style="display:none;"> <h2><%= printer.name %></h2> <br /> <%- @download_categories.each do |category| %> <h3 style="background-image:url('<%= category.icon.url(:mini) %>')"><%= category.name %></h3> <% category.downloads.each do |download| %> <%= link_to download.name, download.url if printer.downloads.map(&:id).include? download.id %><br /> <% end %> <% end %> </div> <%- end %> </div> </div> <script type="text/javascript"> $('#select-downloads a').click(function() { $('#show-downloads').children().hide(); $('.show-' + $(this).attr('class')).show(); }); </script>
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
spree_downloads-1.0.1 | app/views/spree/downloads/index.html.erb |