From 0309afdf0f8ceb9695e32e6e88b32a603e5a6c04 Mon Sep 17 00:00:00 2001 From: Matthew Lemon Date: Sun, 7 Jul 2024 15:36:50 +0100 Subject: Better display of number of files in PDF - The header bar now contains a Number of files: X dependent on the number of files in the resource - The File Preview header now includes a counter number if this is a multi-page PDF - The title of PDF file is put alongside the File Preview text in the h4 --- pyblackbird_cc/templates/resources/resource_detail.html | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'pyblackbird_cc/templates/resources/resource_detail.html') diff --git a/pyblackbird_cc/templates/resources/resource_detail.html b/pyblackbird_cc/templates/resources/resource_detail.html index 4db7f56..f6de740 100644 --- a/pyblackbird_cc/templates/resources/resource_detail.html +++ b/pyblackbird_cc/templates/resources/resource_detail.html @@ -18,7 +18,7 @@ Resource type: {{ resource.resource_type }}
- Number of files: X NUMBER OF FILES + Number of files in this resource: {{ resource.pdf_filenames|length }}
@@ -58,9 +58,11 @@ {% for snapshot_filename, snapshot_urls in resource.snapshot_urls.items %}
-

File preview:

-

{{ snapshot_filename|cut:".pdf" }}

- + {% if resource.snapshot_urls.items|length > 1 %} +

File preview {{ forloop.counter }}: {{ snapshot_filename|cut:".pdf" }}

+ {% else %} +

File preview: {{ snapshot_filename|cut:".pdf" }}

+ {% endif %}