From c75ff724d645b9c1acac112778aacf7e97b4271a Mon Sep 17 00:00:00 2001 From: Jason Heppler Date: Mon, 23 Sep 2024 13:50:46 -0500 Subject: [PATCH] fix: Adjusted template to match other manuscript pages and fixed cross origin bug --- templates/manuscript_musicscore.html | 431 ++++++++++++++------------- 1 file changed, 219 insertions(+), 212 deletions(-) diff --git a/templates/manuscript_musicscore.html b/templates/manuscript_musicscore.html index c85e8c4..45ece0a 100644 --- a/templates/manuscript_musicscore.html +++ b/templates/manuscript_musicscore.html @@ -1,147 +1,165 @@ {% extends "base.html" %} - {% load static %} {% block extrahead %} - + {% endblock extrahead %} -{% block title %} Denig Manuscript page {{ manuscript_page.page_range }} ({{ manuscript_page.docside }}) {% endblock title %} +{% block title %} + Denig Manuscript page {{ manuscript_page.page_range }} ({{ manuscript_page.docside }}) +{% endblock title %} {% block content %} +
+
+
+
+ + + + +
+
+ +
+
Viewing page {{ manuscript_page.page_range }} ({{manuscript_page.docside}})
-
- -
+ -
-
- {% if next_page %} - - {% for image in next_page.attached_images.all %} - Next Page - {% endfor %} - Next Page → - - {% endif %} + {% if next_page %} + + {# skip the image_type "fornesics" #} + {% for image in next_page.attached_images.all %} + {% if image.image_type != "forensics" %} + Next Page + {% endif %} + {% endfor %} + Next Page → + + {% endif %} -
-
-
-
- -
-
-
-
+
+
+
+
+ +
+
+
+
- {% if fragments %} - - {% endif %} + {% if fragments %} + + {% endif %} - {# if page has forensic images, display them #} - {% if forensic_images %} -
-

Forensic Images

-
- {% with forensic_images|first as first_image %} - {% if first_image %} - Thumbnail for forensic image {{ current_page }} - {% endif %} - {% endwith %} + {# if page has forensic images, display them #} + {% if forensic_images %} +
+

Forensic Images

+
+ {% with forensic_images|first as first_image %} + {% if first_image %} + Thumbnail for forensic image {{ current_page }} + {% endif %} + {% endwith %} - +
+ {% endif %} {% for music_score in manuscript_page.music_scores.all %} {% if music_score.audio_recording_file %} @@ -189,103 +207,92 @@
{% endif %} {% endfor %} -
-
-
- {% if fragments %} -
-
-
-
-
- - English - - - German - + +
+
+
-
-
+ {% if fragments %} +
+
+
+
+ + English + + + German (old) + +
-
- {% for fragment in fragments %} - {% for language in fragment.languages.all %} - {% if language.display_name == 'English' %} -

- - {{ fragment.line_number }} - - {{fragment.transcription }} -

- {% endif %} - {% endfor %} - {% endfor %} -
+
+ +
+ {% for fragment in fragments %} + {% for language in fragment.languages.all %} + {% if language.display_name == 'English' %} +

+ {{fragment.transcription }} +

+ {% endif %} + {% endfor %} + {% endfor %} +
-
- {% for fragment in fragments %} - {% for language in fragment.languages.all %} - {% if language.display_name == 'German (old)' %} -

- - {{ fragment.line_number }} - - {{fragment.transcription }} -

- {% endif %} - {% endfor %} - {% endfor %} +
+ {% for fragment in fragments %} + {% for language in fragment.languages.all %} + {% if language.display_name == 'German (old)' %} +

+ + {{ fragment.line_number }} + {{fragment.transcription }} +

+ {% endif %} + {% endfor %} + {% endfor %} +
+
-
-
- {% endif %} -
-
-
-

- Document Details -

-
    -
  • Description: {{ manuscript_page.description }}
  • -
  • Document type: {{ manuscript_page.doctype }}
  • -
  • Document side: {{ manuscript_page.docside }}
  • -
  • Page: {{ manuscript_page.page_range }}
  • -
  • - Page tagged with: - {% for tag in manuscript_page.tags.all %} - {{ tag.name }} - {% endfor %} -
  • -
+ {% endif %} -

- Last updated: {{ manuscript_page.last_modified | date:"Y-m-d" }} -

+
+
+

Document Details

+
    +
  • Description: {{ manuscript_page.description }}
  • +
  • Document type: {{ manuscript_page.doctype }}
  • +
  • Document side: {{ manuscript_page.docside }}
  • +
  • Page: {{ manuscript_page.page_range }}
  • +
  • Page tagged with: + {% for tag in manuscript_page.tags.all %} + {{ tag.name }} + {% endfor %} +
  • +
-

- Back to the Manuscript -

+

+ Browse all manuscript pages +

-
-

- Cite this page -

-

- The Denig Manuscript, Winterthur Museum, Garden & Library and the - Roy Rosenzweig Center for History and New Media (2024): p. {{ manuscript_page.page_range }}. - https://denig.rrchnm.org/manuscript/{{manuscript_page.slug}} -

+
+

Cite this page

+

The Denig Manuscript, Winterthur Museum, Garden & Library and the Roy Rosenzweig Center for + History + and New Media (2024): p. {{ manuscript_page.page_range }}. https://dev.winterthur.rrchnm.org{% url 'manuscript_page' manuscript_page.slug %}

+

+
-
{% endblock content %} +