Sha256: b82e2bf56fb6354ed9dbdcadb623ba4c09545c51f44cddc9db34db167bcfc172

Contents?: true

Size: 1.65 KB

Versions: 30

Compression:

Stored size: 1.65 KB

Contents

<div class="resource_info">
  <div class="value">
    <label>
      <%= render_icon @attachment.icon_css_class %>
    </label>
    <p><%= @attachment.file_name %></p>
  </div>
  <div class="value with-icon">
    <label><%= Alchemy::Attachment.human_attribute_name(:url) %></label>
    <p><%= @attachment.url %></p>
    <alchemy-clipboard-button
      content="<%= @attachment.url %>"
      success-text="<%= Alchemy.t("Copied to clipboard") %>"
      class="icon_button--right"
    ></alchemy-clipboard-button>
  </div>
  <div class="value with-icon">
    <label><%= Alchemy::Attachment.human_attribute_name(:download_url) %></label>
    <p><%= @attachment.url(download: true) %></p>
    <alchemy-clipboard-button
      content="<%= @attachment.url(download: true) %>"
      success-text="<%= Alchemy.t("Copied to clipboard") %>"
      class="icon_button--right"
    ></alchemy-clipboard-button>
  </div>
</div>

<% case @attachment.file_mime_type %>
<% when *Alchemy::Filetypes::IMAGE_FILE_TYPES %>
<div class="attachment_preview_container image-preview">
  <%= image_tag(@attachment.url, class: "full_width") %>
</div>
<% when *Alchemy::Filetypes::AUDIO_FILE_TYPES %>
<div class="attachment_preview_container player-preview">
  <%= audio_tag(@attachment.url, preload: "none", controls: true, class: "full_width") %>
</div>
<% when *Alchemy::Filetypes::VIDEO_FILE_TYPES %>
<div class="attachment_preview_container player-preview">
  <%= video_tag(@attachment.url, preload: "metadata", controls: true, class: "full_width") %>
</div>
<% when "application/pdf" %>
<iframe src="<%= @attachment.url %>" frameborder=0 class="full-iframe">
  Your browser does not support frames.
</iframe>
<% end %>

Version data entries

30 entries across 30 versions & 1 rubygems

Version Path
alchemy_cms-7.4.0 app/views/alchemy/admin/attachments/show.html.erb
alchemy_cms-7.3.5 app/views/alchemy/admin/attachments/show.html.erb
alchemy_cms-7.2.8 app/views/alchemy/admin/attachments/show.html.erb
alchemy_cms-7.1.13 app/views/alchemy/admin/attachments/show.html.erb
alchemy_cms-7.3.4 app/views/alchemy/admin/attachments/show.html.erb
alchemy_cms-7.3.3 app/views/alchemy/admin/attachments/show.html.erb
alchemy_cms-7.3.2 app/views/alchemy/admin/attachments/show.html.erb
alchemy_cms-7.2.7 app/views/alchemy/admin/attachments/show.html.erb
alchemy_cms-7.3.1 app/views/alchemy/admin/attachments/show.html.erb
alchemy_cms-7.3.0 app/views/alchemy/admin/attachments/show.html.erb
alchemy_cms-7.2.6 app/views/alchemy/admin/attachments/show.html.erb
alchemy_cms-7.2.5 app/views/alchemy/admin/attachments/show.html.erb
alchemy_cms-7.1.12 app/views/alchemy/admin/attachments/show.html.erb
alchemy_cms-7.2.4 app/views/alchemy/admin/attachments/show.html.erb
alchemy_cms-7.1.11 app/views/alchemy/admin/attachments/show.html.erb
alchemy_cms-7.2.3 app/views/alchemy/admin/attachments/show.html.erb
alchemy_cms-7.1.10 app/views/alchemy/admin/attachments/show.html.erb
alchemy_cms-7.2.2 app/views/alchemy/admin/attachments/show.html.erb
alchemy_cms-7.1.9 app/views/alchemy/admin/attachments/show.html.erb
alchemy_cms-7.2.1 app/views/alchemy/admin/attachments/show.html.erb