From a5f7ea46001b5566432342af802ee2fe882bf1e7 Mon Sep 17 00:00:00 2001 From: Paul <203217+uniquePWD@users.noreply.github.com> Date: Sun, 6 Jul 2025 15:00:43 +0100 Subject: [PATCH] Update managemanual.html Modernised --- data/interfaces/default/managemanual.html | 188 +++++++++++++++------- 1 file changed, 134 insertions(+), 54 deletions(-) diff --git a/data/interfaces/default/managemanual.html b/data/interfaces/default/managemanual.html index 5b88c698..90197134 100644 --- a/data/interfaces/default/managemanual.html +++ b/data/interfaces/default/managemanual.html @@ -1,8 +1,9 @@ <%inherit file="base.html" /> <%! import headphones - from headphones import db, helpers - myDB = db.DBConnection() + # Removed direct DB imports/interactions here, as data should be pre-fetched server-side. + # from headphones import db, helpers + # myDB = db.DBConnection() # This should not be in the template %> <%def name="headerIncludes()"> @@ -20,73 +21,82 @@

Manage Manually Matched Albums

- +
<%-- Changed ID for clarity --%> - - - + <%-- Changed ID to class --%> + <%-- Changed ID to class --%> + <%-- Changed ID to class --%> - <% count_albums=0 %> + <% count_albums=0 %> <%-- Keeping count_albums for potential unique element IDs if still absolutely necessary, though aiming for generic approach --%> %for album in manualalbums: <% + # These replacements should ideally be done server-side before passing to template, + # or in JS using encodeURIComponent, but kept here for minimal change. old_artist_clean = album['ArtistName'].replace('&','%26').replace('+', '%2B').replace("'","%27") old_album_clean = album['AlbumTitle'].replace('&','%26').replace('+', '%2B').replace("'","%27") %> - - - <% count_albums+=1 %> %endfor
Local ArtistLocal AlbumPrevious ActionLocal ArtistLocal AlbumPrevious Action
${album['ArtistName']}
- - +
+ ${album['ArtistName']}
+ <%-- Use a common class and data attributes to pass info to generic dialog --%> +
${album['AlbumTitle']}
- - - +
+ ${album['AlbumTitle']}
+ <%-- Use a common class and data attributes to pass info to generic dialog --%> +
${album['AlbumStatus']} - + + ${album['AlbumStatus']}
+ + <%-- Generic Reset Confirmation Dialog (only one on the page) --%> + + <%def name="headIncludes()"> + ${parent.headIncludes()} <%-- Ensure parent head includes are kept --%> <%def name="javascriptIncludes()"> + ${parent.javascriptIncludes()} <%-- Ensure parent javascript includes are kept --%>