Sha256: 2f6ba58c253496c1a40033830581d4570629302f6718002b539258fc2da29eec

Contents?: true

Size: 1.28 KB

Versions: 38

Compression:

Stored size: 1.28 KB

Contents

<%= turbo_frame_tag @attachment do %>
  <li class="col-span-1 flex rounded-md shadow-sm">
    <div class="flex-shrink-0 flex items-center justify-center w-16 bg-gray-100 text-gray-500 text-sm font-medium rounded-l-md  border-t border-r border-b border-gray-200 ">

      <% if @attachment.image? %>
        <%= image_tag @attachment %>
      <% else %>
        <%= @attachment.blob.filename.extension.upcase %>
      <% end %>

    </div>

    <div class="flex flex-1 items-center justify-between truncate rounded-r-md border-t border-r border-b border-gray-200 bg-white">
      <div class="flex-1 truncate px-4 py-2 text-sm">
        <span href="#" class="font-medium text-gray-900 hover:text-gray-600" title="<%= @attachment.blob.filename %>"><%= @attachment.blob.filename %></span>
        <p class="text-gray-500"><%= (@attachment.blob.byte_size.to_f / 1000000).round(2) %> Mb</p>
      </div>

      <div class="flex-shrink-0 pr-2">
        <%= button_tag type: :button, data: { controller: "attachments", attachments_method_value: 'delete', attachments_url_value: @url, attachments_attachment_id_value: @attachment.id, action: "click->attachments#toggle" } do %>
        <span class="sr-only">Delete</span>
        <%= render(Icons::TrashComponent.new) %>
        <% end %>
    </div>
  </li>
<% end %>

Version data entries

38 entries across 38 versions & 1 rubygems

Version Path
tybo-0.4.1 app/components/attachment_card_component.html.erb
tybo-0.4.0 app/components/attachment_card_component.html.erb
tybo-0.3.26 app/components/attachment_card_component.html.erb
tybo-0.3.24 app/components/attachment_card_component.html.erb
tybo-0.3.23 app/components/attachment_card_component.html.erb
tybo-0.3.22 app/components/attachment_card_component.html.erb
tybo-0.3.21 app/components/attachment_card_component.html.erb
tybo-0.3.20 app/components/attachment_card_component.html.erb
tybo-0.3.19 app/components/attachment_card_component.html.erb
tybo-0.3.18 app/components/attachment_card_component.html.erb
tybo-0.3.17 app/components/attachment_card_component.html.erb
tybo-0.3.16 app/components/attachment_card_component.html.erb
tybo-0.3.15 app/components/attachment_card_component.html.erb
tybo-0.3.14 app/components/attachment_card_component.html.erb
tybo-0.3.13 app/components/attachment_card_component.html.erb
tybo-0.3.12 app/components/attachment_card_component.html.erb
tybo-0.3.11 app/components/attachment_card_component.html.erb
tybo-0.3.10 app/components/attachment_card_component.html.erb
tybo-0.3.9 app/components/attachment_card_component.html.erb
tybo-0.3.8 app/components/attachment_card_component.html.erb