Skip to content

Commit

Permalink
Assets#show - polish
Browse files Browse the repository at this point in the history
  • Loading branch information
ewlarson committed Jun 27, 2024
1 parent 47a4ab5 commit 863b02e
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions app/views/admin/assets/show.html.erb
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
<%- @page_title = "GBL♦Admin - Asset - #{@asset.title}" %>
<h1>Asset</h1>
<%= link_to 'Back to Assets', admin_assets_path, {class: "mb-2"} %>

<h1 class="mt-1">Asset</h1>

<div class="row">
<div class="col-12">
Expand All @@ -11,7 +13,8 @@
<% else %>
<%= @asset.title %>
<% end %>
<%= link_to '~ Edit Asset', edit_admin_asset_path(@asset.id), { class: 'btn btn-primary float-right' } %>
<%= link_to '- Delete Asset', admin_asset_path, { class: 'btn btn-danger float-right ml-2', method: :delete, data: { confirm: 'Are you sure?' } } %>
<%= link_to '~ Edit Asset', edit_admin_asset_path(@asset.id), { class: 'btn btn-primary float-right'} %>
</h2>

<table class="table table-bordered">
Expand All @@ -25,6 +28,10 @@
<th>Title</th>
<td><%= @asset.title %></td>
</tr>
<tr>
<th>Asset Link</th>
<td><%= link_to "Asset Link", @asset.file.url %></td>
</tr>
<% if @asset.respond_to?(:thumbnail) && @asset.file_derivatives(:thumb_standard_2X)&.exists? %>
<tr>
<th>Thumbnail</th>
Expand Down

0 comments on commit 863b02e

Please sign in to comment.