A website template with lots of features, built with ruby on rails.

files.html.erb 961B

123456789101112131415161718192021222324252627
  1. <div class="row">
  2. <%= render 'admin_panel/sidebar_nav' %>
  3. <div class="span9">
  4. <div class="page-header">
  5. <h1><i class="fa fa-file-image-o"></i> <%= t "admin_panel.files" %> <%= link_to (t "admin_panel.upload_file"), new_upload_path, :class => 'btn btn-primary btn-mini' %></h1>
  6. </div>
  7. <%= bootstrap_flash %>
  8. <% if @uploads != nil %>
  9. <ul class="thumbnails">
  10. <% @uploads.each do |upload| %>
  11. <li class="span3" style="">
  12. <div class="thumbnail" style="height: 250px;">
  13. <% if upload.file.content_type.to_s.start_with?('image') && upload.file.thumb.to_s != nil %>
  14. <%= image_tag upload.file.thumb.to_s %>
  15. <% else %>
  16. <img src="http://placehold.it/300x200" alt="">
  17. <% end %>
  18. <h5 style="height: 40px"><%= link_to upload.title, upload_path(upload) %></h5>
  19. <p><%= upload.description %></p>
  20. </div>
  21. </li>
  22. <% end %>
  23. </ul>
  24. <% end %>
  25. </div>
  26. </div>