app/views/smithy/assets/_asset.html.erb in smithycms-0.5.1 vs app/views/smithy/assets/_asset.html.erb in smithycms-0.5.2
- old
+ new
@@ -1,16 +1,19 @@
-<li>
+<div class="col-xs-6 col-md-3">
<div class="thumbnail clearfix">
- <%= link_to asset.file.remote_url do %>
+ <%= link_to [:edit, asset] do %>
<% if asset.file_type == :image %>
- <%= image_tag asset.file.thumb("170x114#").url, width: 170, height: 114, alt: '' %>
+ <%= image_tag asset.file.thumb("340x226#").url, width: 170, height: 114, alt: '' %>
+ <% elsif asset.file_type == :direct_image %>
+ <%= image_tag asset.file.remote_url, width: 170, alt: '' %>
<% else %>
<div style="width:170px;height:78px;padding-top:36px;text-align:center;"><%= image_tag file_type_icon(asset), alt: '' %></div>
<% end %>
<% end %>
<p class="name"><strong><%= asset.name %></strong></p>
<div class="pull-right">
- <%= link_to "Edit", [:edit, asset], class: "btn btn-xs" %>
+ <%= link_to "Copy URL", image_url(asset.file.url), class: "btn btn-primary btn-xs copy-to-clipboard", data: { 'clipboard-text' => image_url(asset.file.url) } %>
+ <%= link_to "Edit", [:edit, asset], class: "btn btn-primary btn-xs" %>
<%= link_to "Delete", asset, class: "btn btn-danger btn-xs", method: :delete, data: { confirm: "Are you sure?" } %>
</div>
</div>
-</li>
+</div>