%inherit file="base.html" />
<%!
import headphones
# Removed direct DB imports and queries from template.
# These operations (fetching artists and creating json_artists)
# should be performed in the Python view/controller and passed
# to the template as part of its context.
# import json
# from headphones import db, helpers
# myDB = db.DBConnection()
# artist_json = {}
# counter = 0
# artist_list = myDB.action("SELECT ArtistName from artists ORDER BY ArtistName COLLATE NOCASE")
# for artist in artist_list:
# artist_json[counter] = artist['ArtistName']
# counter+=1
# json_artists = json.dumps(artist_json)
%>
<%def name="headerIncludes()">
<% count_albums=0 %> <%-- Still useful for unique IDs if needed, but aiming for generic dialogs --%>
%for album in unmatchedalbums:
<%
# Pre-escape for direct use in data-attributes where JS string is needed.
# URL encoding will happen in JS with encodeURIComponent.
old_artist_js_str = album['ArtistName'].replace("'","\\'").replace('"','"')
old_album_js_str = album['AlbumTitle'].replace("'","\\'").replace('"','"')
%>
${album['ArtistName']}
<%-- Data attributes to pass context to JS --%>
${album['AlbumTitle']}
<% count_albums+=1 %>
%endfor
<%-- Generic Ignore Confirmation Dialog --%>
<%-- Generic Match Dialog --%>
Local Artist:
Local Album:
Match Artist:
Match Album:
%def>
<%def name="headIncludes()">
${parent.headIncludes()} <%-- Ensure parent head includes are kept --%>
%def>
<%def name="javascriptIncludes()">
${parent.javascriptIncludes()} <%-- Ensure parent javascript includes are kept --%>
%def>