diff options
| author | erdgeist <erdgeist@erdgeist.org> | 2026-07-09 14:19:36 +0200 |
|---|---|---|
| committer | erdgeist <erdgeist@erdgeist.org> | 2026-07-09 14:19:36 +0200 |
| commit | 8310751d4db2854597d6379b24e346c65622972d (patch) | |
| tree | dd00ae2f671ab81cf292caf41b09c6da90fbc383 /app/views/assets | |
| parent | 3ae22916cd5fd0f63ffacc7a9e1aa97d311b83e6 (diff) | |
Major resource view cleanup
Remove dead pages#index and occurrences resource; fix menu_items#new
menu_items#new called menu_item_params, which requires a submitted
menu_item key that can never be present on a fresh GET -- new only
ever needs a blank record to render against.
pages#index and the entire occurrences resource were unmodified Rails
scaffold generator output, unlinked from any nav and unreachable except
by direct URL. pages#index had no controller action at all (@pages was
never assigned); occurrences#index queried every row with no scoping or
pagination and its layout referenced a scaffold.css asset that no
longer exists in the pipeline. Neither is a real editorial surface --
occurrences are auto-generated from an event's RRULE and were never
meant to be browsed as a flat list. Removed rather than repaired.
pages#preview and pages#sort_images remain, now as explicit routes
rather than under a full resources :pages block.
Diffstat (limited to 'app/views/assets')
| -rw-r--r-- | app/views/assets/index.html.erb | 6 | ||||
| -rw-r--r-- | app/views/assets/show.html.erb | 50 |
2 files changed, 31 insertions, 25 deletions
diff --git a/app/views/assets/index.html.erb b/app/views/assets/index.html.erb index 4301fee..6591091 100644 --- a/app/views/assets/index.html.erb +++ b/app/views/assets/index.html.erb | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | <% content_for :subnavigation do %> | 1 | <h1>Assets</h1> |
| 2 | <%= link_to 'New asset', new_asset_path %> | 2 | |
| 3 | <% end %> | 3 | <%= link_to 'New asset', new_asset_path, class: 'action_button' %> |
| 4 | 4 | ||
| 5 | <%= will_paginate @assets %> | 5 | <%= will_paginate @assets %> |
| 6 | 6 | ||
diff --git a/app/views/assets/show.html.erb b/app/views/assets/show.html.erb index 694be5a..0286678 100644 --- a/app/views/assets/show.html.erb +++ b/app/views/assets/show.html.erb | |||
| @@ -1,23 +1,29 @@ | |||
| 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', edit_asset_path(@asset), class: 'action_button' %> |
| 12 | <td>Public Path</td> | 10 | </div> |
| 13 | <td><%= @asset.upload.url.sub(/\?\d+$/, "") %></td> | 11 | <div class="node_info_item"> |
| 14 | </tr> | 12 | <%= link_to 'Back', assets_path %> |
| 15 | <tr> | 13 | </div> |
| 16 | <td>Content Type</td> | 14 | </div> |
| 17 | <td><%= @asset.upload.content_type %></td> | 15 | </div> |
| 18 | </tr> | 16 | |
| 19 | <tr> | 17 | <div class="node_description">Thumbnail</div> |
| 20 | <td>Size</td> | 18 | <div class="node_content"><%= image_tag @asset.upload.url(:medium), style: "max-width: 300px; max-height: 300px;" %></div> |
| 21 | <td><%= "#{@asset.upload.size/1024} KB" %></td> | 19 | |
| 22 | </tr> | 20 | <div class="node_description">Public Path</div> |
| 23 | </table> | 21 | <div class="node_content"><%= @asset.upload.url.sub(/\?\d+$/, "") %></div> |
| 22 | |||
| 23 | <div class="node_description">Content Type</div> | ||
| 24 | <div class="node_content"><%= @asset.upload.content_type %></div> | ||
| 25 | |||
| 26 | <div class="node_description">Size</div> | ||
| 27 | <div class="node_content"><%= "#{@asset.upload.size/1024} KB" %></div> | ||
| 28 | </div> | ||
| 29 | </div> | ||
