Sha256: 522b25b34e4ff1c2b8d88a019b91b5822e21f338e0d922b2539353b46df3f766

Contents?: true

Size: 806 Bytes

Versions: 2

Compression:

Stored size: 806 Bytes

Contents

<% title "Images" %>

<% content_for :heading do %>
  <h1>Images</h1>
<% end %>

<table class="table space-4">
  <thead>
    <tr>
      <th>Image</th>
      <th>Name</th>
      <th>Size</th>
      <th>Created at</th>
      <th colspan="2"></th>
    </tr>
  </thead>

  <tbody>
    <% @images.each do |image| %>
      <tr>
        <td>
          <%= link_to plotline.image_path(image) do %>
            <%= image_tag image.image, width: 100 %>
          <% end %>
        </td>
        <td><%= image.image %></td>
        <td><%= number_to_human_size image.file_size %></td>
        <td><%= time_ago_in_words image.created_at %> ago</td>
        <td><%= link_to 'Destroy', plotline.image_path(image), method: :delete, data: { confirm: 'Are you sure?' } %></td>
      </tr>
    <% end %>
  </tbody>
</table>

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
plotline-0.1.1 app/views/plotline/images/index.html.erb
plotline-0.1.0 app/views/plotline/images/index.html.erb