Sha256: 18725585b90a137e534228be3ab36fe36a423523430c06110f813c21399332b8

Contents?: true

Size: 1.62 KB

Versions: 6

Compression:

Stored size: 1.62 KB

Contents

<%= render 'backend/breadcrumbs' %>
<%= render 'filter' %>

<p class="text-right">
  <%= link_to icon(:plus, t('b.add')), new_backend_asset_path, class: 'btn btn-primary btn-sm' %>
</p>

<% if @assets.any? %>
  <table class="table table-striped table-hover">
    <thead class="thead-inverse">
      <tr>
        <th><%= t 'b.file' %></th>
        <th><%= t 'b.type' %></th>
        <th><%= t 'b.size' %></th>
        <th><%= t 'b.description' %></th>
        <th><%= t 'b.used' %></th>
        <th><%= t 'b.last_changed_at' %></th>
        <th>&nbsp;</th>
      </tr>
    </thead>

    <tbody>
      <% @assets.each do |a| %>
        <tr>
          <td>
            <% if a.image? %>
              <%= link_to image_tag(a.image.url(150, 150), alt: '', class: 'img-fluid'), backend_asset_path(a) %>
            <% else %>
              <%= link_to icon(:download, t('b.download')), backend_asset_path(a) %>
            <% end %>
          </td>
          <td><%= a.extension.upcase %></td>
          <td><%= number_to_human_size a.filesize %></td>
          <td><%= simple_format a.description %></td>
          <td>
            <% if a.deletable? %>
              <%= t false.to_s %>
            <% else %>
              <%= render 'asset_usages', asset: a %>
            <% end %>
          </td>
          <td><%= l a.updated_at, format: :short %></td>
          <td class="text-right">
            <%= link_to_edit [:backend, a] %>
            <%= link_to_delete [:backend, a] if a.deletable? %>
          </td>
        </tr>
      <% end %>
    </tbody>
  </table>

  <%= udongo_paginate @assets %>

<% else %>
  <p><%= t 'b.msg.no_items' %></p>
<% end %>

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
udongo-7.9.0 app/views/backend/assets/index.html.erb
udongo-7.8.1 app/views/backend/assets/index.html.erb
udongo-7.8.0 app/views/backend/assets/index.html.erb
udongo-7.7.2 app/views/backend/assets/index.html.erb
udongo-7.7.1 app/views/backend/assets/index.html.erb
udongo-7.7.0 app/views/backend/assets/index.html.erb