From a730a62280b656419c7380ca07a987a5b7fd799a Mon Sep 17 00:00:00 2001 From: John O'Keefe Date: Sun, 25 Oct 2026 12:50:37 -0400 Subject: [PATCH] refactor(ui): promote generic publication fields to their own editor section MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Age Rating, Imprint, Scan Information, and Metadata Notes are format-agnostic columns (the schema marks age rating 'applies to all formats'; imprint examples span comics and books) — but they rendered inside the Comic/Manga section, showing a manga dropdown on audiobooks and hiding useful fields behind comic gating. Split the editor into: - Publication Details: Age Rating, Imprint, Scan Information, Metadata Notes — always visible for every media type (empty for non-comics sources: no standard metadata carries these outside ComicInfo.xml; editable and persistent for all). - Comic/Manga (gated by ShowComicMetadata, unchanged): Manga Type, Reading Direction, Story Arc, Black & White. Pure presentation move — identical form field names, no handler or schema changes. --- templates/book_detail_modals.templ | 47 ++- templates/book_detail_modals_templ.go | 454 ++++++++++++++------------ 2 files changed, 267 insertions(+), 234 deletions(-) diff --git a/templates/book_detail_modals.templ b/templates/book_detail_modals.templ index 2dc19281..f88f6034 100644 --- a/templates/book_detail_modals.templ +++ b/templates/book_detail_modals.templ @@ -543,6 +543,36 @@ templ MetadataEditorModal(book handlers.MediaDetail) { } +
+ +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+
if book.ShowComicMetadata() {
-
- - -
-
- - -
-
- - -
-
- - -
") - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 135, "
") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + if book.ShowComicMetadata() { + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 124, "
") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + } + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 138, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 148, "Save") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err }