Sha256: 2bfc234883e4b7347a0530e8ad115cf64784d6a29b9e62ec137a911b5dfa564f

Contents?: true

Size: 1.83 KB

Versions: 4

Compression:

Stored size: 1.83 KB

Contents

<div class="resource_info">
  <div class="value">
    <label>
      <%= render_icon @attachment.icon_css_class, style: 'regular', size: 'lg' %>
    </label>
    <p><%= @attachment.file_name %></p>
  </div>
  <div class="value with-icon">
    <label><%= Alchemy::Attachment.human_attribute_name(:url) %></label>
    <p><%= @attachment.url %></p>
    <a data-clipboard-text="<%= @attachment.url %>" class="icon_button--right">
      <%= render_icon(:clipboard, style: 'regular') %>
    </a>
  </div>
  <div class="value with-icon">
    <label><%= Alchemy::Attachment.human_attribute_name(:download_url) %></label>
    <p><%= @attachment.url %></p>
    <a data-clipboard-text="<%= @attachment.url %>" class="icon_button--right">
      <%= render_icon(:clipboard, style: 'regular') %>
    </a>
  </div>
</div>

<% case @attachment.icon_css_class %>
<% when "file-image" %>
<div class="attachment_preview_container image-preview">
  <%= image_tag(@attachment.url, class: "full_width") %>
</div>
<% when "file-audio" %>
<div class="attachment_preview_container player-preview">
  <%= audio_tag(@attachment.url, preload: "none", controls: true, class: "full_width") %>
</div>
<% when "file-video" %>
<div class="attachment_preview_container player-preview">
  <%= video_tag(@attachment.url, preload: "metadata", controls: true, class: "full_width") %>
</div>
<% when "file-pdf" %>
<iframe src="<%= @attachment.url %>" frameborder=0 class="full-iframe">
  Your browser does not support frames.
</iframe>
<% end %>

<script type="text/javascript">
  $(function() {
    var clipboard = new Clipboard('.icon_button--right');
    clipboard.on('success', function(e) {
      Alchemy.growl('<%= Alchemy.t("Copied to clipboard") %>');
      e.clearSelection();
    });
    Alchemy.currentDialog().dialog.on('DialogClose.Alchemy', function() {
      clipboard.destroy();
    });
  });
</script>

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
alchemy-dragonfly-s3-4.0.5 app/views/alchemy/admin/attachments/show.html.erb
alchemy-dragonfly-s3-5.0.6 app/views/alchemy/admin/attachments/show.html.erb
alchemy-dragonfly-s3-5.0.5 app/views/alchemy/admin/attachments/show.html.erb
alchemy-dragonfly-s3-4.0.4 app/views/alchemy/admin/attachments/show.html.erb