Sha256: c2d9569de3e3219ddb2944cc8cc3f291b96e374e145bac65c30443afe728e760
Contents?: true
Size: 2 KB
Versions: 9
Compression:
Stored size: 2 KB
Contents
<% content_for :page_heading do %> <h2> <i class="glyphicon glyphicon-large glyphicon-picture"></i> <%= t(".media_library") %> </h2> <% end %> <%= form_tag({action: 'upload'}, {enctype: "multipart/form-data", class: 'form-inline'}) do %> <div class='well well-small'> <h3><%= t('.upload_a_file_to_your_site') %></h3> <div class="form-group"> <%= file_field_tag(:upload, class: 'input-file') %> </div> <div class="form-group"> <%= submit_tag(t('.upload'), {class: 'btn btn-success'}) %> </div> </div> <% end %> <table class="table table-hover"> <thead> <tr> <th><%= t(".filename")%> <small>(<%= t('.right_click_for_link') %>)</small></th> <th><%= t(".content_type")%></th> <th><%= t(".file_size")%></th> <th><%= t(".date")%></th> </tr> </thead> <% if @resources.empty? %> <tr> <td colspan="6"> <%= t(".no_resources") %> </td> </tr> <% end %> <% for upload in @resources %> <tr> <td> <% if upload.mime =~ /image/ %> <a href="<%= upload.upload.medium.url %>" data-toggle="lightbox"> <%= image_tag(upload.upload.thumb.url) %> </a> <% else %> <%= link_to(upload.upload_url, upload.upload_url) %> <% end %> <p> <small> <% if upload.mime =~ /image/ %> <%= link_to(t(".thumbnail"), upload.upload.thumb.url) %> | <%= link_to(t(".medium_size"), upload.upload.medium.url) %> | <%= link_to(t(".original_size"), upload.upload.url) %> | <% end %> <%= link_to(t(".delete"), { action: 'destroy', id: upload.id, search: params[:search], page: params[:page] }, confirm: t(".are_you_sure"), method: :delete) %> </small> </p> </td> <td> <%= upload.mime %> </td> <td><%=h upload.size rescue 0 %> bytes</td> <td><%= l(upload.created_at, format: :short) %></td> </tr> <% end %> <%= display_pagination(@resources, 6)%> </table>
Version data entries
9 entries across 9 versions & 1 rubygems