summaryrefslogtreecommitdiff
path: root/app/views/assets
diff options
context:
space:
mode:
Diffstat (limited to 'app/views/assets')
-rw-r--r--app/views/assets/index.html.erb21
-rw-r--r--app/views/assets/show.html.erb52
2 files changed, 45 insertions, 28 deletions
diff --git a/app/views/assets/index.html.erb b/app/views/assets/index.html.erb
index 51fc486..8c35561 100644
--- a/app/views/assets/index.html.erb
+++ b/app/views/assets/index.html.erb
@@ -1,12 +1,19 @@
1<% content_for :subnavigation do %> 1<h1>Assets</h1>
2 <%= link_to 'New asset', new_asset_path %>
3<% end %>
4 2
3<%= link_to new_asset_path, class: 'action_button' do %>
4 <%= icon("plus", library: "tabler", "aria-hidden": true) %> Create asset
5<% end %>
5 6
6<%= will_paginate @assets %> 7<%= will_paginate @assets %>
7 8
8<table> 9<table class="assets_table">
9 <tr> 10 <tr class="header">
11 <th>Preview</th>
12 <th>Name</th>
13 <th>Type</th>
14 <th></th>
15 <th></th>
16 <th></th>
10 </tr> 17 </tr>
11<% @assets.each do |asset| %> 18<% @assets.each do |asset| %>
12 <tr> 19 <tr>
@@ -15,7 +22,9 @@
15 <td><%= asset.upload.content_type %></td> 22 <td><%= asset.upload.content_type %></td>
16 <td><%= link_to 'Show', asset %></td> 23 <td><%= link_to 'Show', asset %></td>
17 <td><%= link_to 'Edit', edit_asset_path(asset) %></td> 24 <td><%= link_to 'Edit', edit_asset_path(asset) %></td>
18 <td><%= button_to 'Destroy', asset, method: :delete, form: { data: { confirm: 'Are you sure?' } } %></td> 25 <td><%= button_to asset, method: :delete, form: { data: { confirm: 'Are you sure?' }, class: 'button_to destructive' } do %>
26 <%= icon("trash", library: "tabler", "aria-hidden": true) %> Destroy
27 <% end %></td>
19 </tr> 28 </tr>
20<% end %> 29<% end %>
21</table> 30</table>
diff --git a/app/views/assets/show.html.erb b/app/views/assets/show.html.erb
index 694be5a..5717dd9 100644
--- a/app/views/assets/show.html.erb
+++ b/app/views/assets/show.html.erb
@@ -1,23 +1,31 @@
1<% content_for :subnavigation do %> 1<div id="page_editor">
2 <%= link_to 'Edit', edit_asset_path(@asset) %> 2 <h1><%= @asset.name %></h1>
3 <%= link_to 'Back', assets_path %>
4<% end %>
5 3
6<table> 4 <div id="content">
7 <tr> 5 <div class="node_description">Actions</div>
8 <td>Thumbnail</td> 6 <div class="node_content node_info_group">
9 <td><%= image_tag @asset.upload.url(:medium), style: "max-width: 300px; max-height: 300px;" %></td> 7 <div class="node_info_group_items">
10 </tr> 8 <div class="node_info_item">
11 <tr> 9 <%= link_to edit_asset_path(@asset), class: 'action_button' do %>
12 <td>Public Path</td> 10 <%= icon("edit", library: "tabler", "aria-hidden": true) %> Edit
13 <td><%= @asset.upload.url.sub(/\?\d+$/, "") %></td> 11 <% end %>
14 </tr> 12 </div>
15 <tr> 13 <div class="node_info_item">
16 <td>Content Type</td> 14 <%= link_to 'Back', assets_path %>
17 <td><%= @asset.upload.content_type %></td> 15 </div>
18 </tr> 16 </div>
19 <tr> 17 </div>
20 <td>Size</td> 18
21 <td><%= "#{@asset.upload.size/1024} KB" %></td> 19 <div class="node_description">Thumbnail</div>
22 </tr> 20 <div class="node_content"><%= image_tag @asset.upload.url(:medium), style: "max-width: 300px; max-height: 300px;" %></div>
23</table> 21
22 <div class="node_description">Public Path</div>
23 <div class="node_content"><%= @asset.upload.url.sub(/\?\d+$/, "") %></div>
24
25 <div class="node_description">Content Type</div>
26 <div class="node_content"><%= @asset.upload.content_type %></div>
27
28 <div class="node_description">Size</div>
29 <div class="node_content"><%= "#{@asset.upload.size/1024} KB" %></div>
30 </div>
31</div>