Sha256: a6c447aa9fceb304fe5890dac3aa30693116b9cdb37ce1d88f9ae57bef41e059

Contents?: true

Size: 1.99 KB

Versions: 21

Compression:

Stored size: 1.99 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><%= alchemy.show_attachment_url(@attachment) %></p>
    <a data-clipboard-text="<%= alchemy.show_attachment_url(@attachment) %>" class="icon_button--right">
      <%= render_icon('clipboard full') %>
    </a>
  </div>
  <div class="value with-icon">
    <label><%= Alchemy::Attachment.human_attribute_name(:download_url) %></label>
    <p><%= alchemy.download_attachment_url(@attachment) %></p>
    <a data-clipboard-text="<%= alchemy.download_attachment_url(@attachment) %>" class="icon_button--right">
      <%= render_icon('clipboard full') %>
    </a>
  </div>
</div>

<% case @attachment.icon_css_class %>
<% when "image" %>
<div class="attachment_preview_container image-preview">
  <%= image_tag(alchemy.show_attachment_path(@attachment), class: "full_width") %>
</div>
<% when "audio" %>
<div class="attachment_preview_container player-preview">
  <%= audio_tag(alchemy.show_attachment_path(@attachment), preload: "none", controls: true, class: "full_width") %>
</div>
<% when "video" %>
<div class="attachment_preview_container player-preview">
  <%= video_tag(alchemy.show_attachment_path(@attachment), preload: "metadata", controls: true, class: "full_width") %>
</div>
<% when "archive", "file" %>
<% else %>
<iframe src="<%= alchemy.show_attachment_path(@attachment) %>" 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

21 entries across 21 versions & 1 rubygems

Version Path
alchemy_cms-4.0.6 app/views/alchemy/admin/attachments/show.html.erb
alchemy_cms-3.6.7 app/views/alchemy/admin/attachments/show.html.erb
alchemy_cms-3.6.6 app/views/alchemy/admin/attachments/show.html.erb
alchemy_cms-4.0.5 app/views/alchemy/admin/attachments/show.html.erb
alchemy_cms-4.0.4 app/views/alchemy/admin/attachments/show.html.erb
alchemy_cms-4.0.3 app/views/alchemy/admin/attachments/show.html.erb
alchemy_cms-3.6.5 app/views/alchemy/admin/attachments/show.html.erb
alchemy_cms-4.0.2 app/views/alchemy/admin/attachments/show.html.erb
alchemy_cms-4.0.1 app/views/alchemy/admin/attachments/show.html.erb
alchemy_cms-3.6.4 app/views/alchemy/admin/attachments/show.html.erb
alchemy_cms-4.0.0 app/views/alchemy/admin/attachments/show.html.erb
alchemy_cms-3.6.3 app/views/alchemy/admin/attachments/show.html.erb
alchemy_cms-3.6.2 app/views/alchemy/admin/attachments/show.html.erb
alchemy_cms-4.0.0.rc2 app/views/alchemy/admin/attachments/show.html.erb
alchemy_cms-4.0.0.rc1 app/views/alchemy/admin/attachments/show.html.erb
alchemy_cms-3.6.1 app/views/alchemy/admin/attachments/show.html.erb
alchemy_cms-4.0.0.beta app/views/alchemy/admin/attachments/show.html.erb
alchemy_cms-3.6.0 app/views/alchemy/admin/attachments/show.html.erb
alchemy_cms-3.5.0 app/views/alchemy/admin/attachments/show.html.erb
alchemy_cms-3.5.0.rc2 app/views/alchemy/admin/attachments/show.html.erb