diff options
| author | Ken D'Ambrosio <ken@jots.org> | 2026-05-09 09:00:15 +0000 |
|---|---|---|
| committer | Ken D'Ambrosio <ken@jots.org> | 2026-05-09 09:00:15 +0000 |
| commit | f607462f31d52d6287ef056c26ff518160805ef9 (patch) | |
| tree | e2b668be4af9f5d9df6fd29904be708c63fe9cf2 /views/admin/album.erb | |
| parent | 4bd3bb59a96df620f7b06f452ec2287dbcfe5780 (diff) | |
Replace dynamic cover checkbox with random image dropdown option
Adds "— random image —" as a selectable cover option (stored as __random__
sentinel). album_cover() now picks a random eligible file when that value is
set, giving a fresh cover on each page load. Removes the cover_dynamic field
that was saved but never actually used in display logic.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'views/admin/album.erb')
| -rw-r--r-- | views/admin/album.erb | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/views/admin/album.erb b/views/admin/album.erb index f6b80d6..afe4da0 100644 --- a/views/admin/album.erb +++ b/views/admin/album.erb @@ -28,16 +28,13 @@ <label>Cover image <select name="album_cover"> <option value="">— auto (first image) —</option> + <option value="__random__"<%= ' selected' if @data['cover'] == '__random__' %>>— random image —</option> <% @files.each do |name| %> <option value="<%= name %>"<%= ' selected' if @data['cover'] == name %>><%= name %></option> <% end %> </select> </label> <label class="checkbox-label"> - <input type="checkbox" name="album_cover_dynamic" value="1"<%= ' checked' if @data['cover_dynamic'] %>> - Dynamic cover - </label> - <label class="checkbox-label"> <input type="checkbox" name="album_sort_reverse" value="1"<%= ' checked' if @data['sort_reverse'] %>> Reverse sub-album order </label> |
