Skip to content

Commit

Permalink
Updating templates and JS
Browse files Browse the repository at this point in the history
  • Loading branch information
villanueval committed Dec 5, 2024
1 parent 5848326 commit 932a4b6
Show file tree
Hide file tree
Showing 8 changed files with 201 additions and 121 deletions.
79 changes: 75 additions & 4 deletions web_app/static/js/openseadragon.min.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions web_app/static/js/openseadragon.min.js.map

Large diffs are not rendered by default.

11 changes: 7 additions & 4 deletions web_app/templates/about.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,12 @@

<p><strong>Important Note:</strong> Osprey is <strong>not</strong> a permanent system of record. This system
provides a convenient way to see the products of digitization projects in a timely fashion. Do not link to specific
pages or images since they will go away without notice.</p>

pages or images since they will go away without notice.</p>
{% if site_net == "internal" %}

<p>Image viewer uses Openseadragon 5.0.0.</p>

<p>This is a project of the: <a href="https://sinet.sharepoint.com/sites/DPO" title="Link to the SharePoint site of the Digitization Program Office">Digitization Program Office</a>, a division of the Smithsonian's <a href="https://sinet.sharepoint.com/sites/ODT" class="bg-white" title="Link to the Office of Digital Transformation
">Office of Digital Transformation</a> (formerly a division of the Office of the Chief Information Officer).</p>
{% else %}
Expand All @@ -38,10 +41,10 @@
</div>
<div class="col">
{% if site_net == "internal" %}
<p>There is an API available (JSON). Please contact Luis J. Villanueva, DPO, for an API key.</p>
<!-- <p>There is an API available (JSON). Please contact Luis J. Villanueva, DPO, for an API key.</p> -->
{% endif %}

<br><br>
<!-- <br><br> -->

<p>Special thanks to:</p>
<ul>
Expand Down
6 changes: 4 additions & 2 deletions web_app/templates/dashboard.html
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ <h1 class="modal-title" id="previewmodal1Label">Image Preview (JPG)</h1>
href="{{ url_for('file', file_id=file.file_id) }}"
title="Details of the file {{ file.file_name }}">

<img src="{% if file.preview_image_ext == None %}{{ url_for('static', filename=file.preview_img_path) }}{% else %}{{ file.preview_image_ext }}&max=160{% endif %}" alt="Preview image of {{ file.file_name }}" style="padding: 10px; max-width: 160px;" class="img-fluid"><br>
<img src="{% if file.preview_image_ext == None %}{{ url_for('static', filename=file.preview_img_path) }}{% else %}{{ file.preview_image_ext }}&max=160{% endif %}" alt="Preview image of {{ file.file_name }}" style="padding: 10px; max-width: 160px;" class="img-fluid img-thumbnail"><br>

<small>{{ file.file_name }}</small>
</a>
Expand Down Expand Up @@ -357,7 +357,9 @@ <h1 class="modal-title" id="previewmodal1Label">Image Preview (JPG)</h1>
<p>Select a folder on the left</p>
{% endif %}

</div></div></div>
</div>
</div>
</div>
</div>
<br>
{% if project_info.project_notice != None %}
Expand Down
36 changes: 23 additions & 13 deletions web_app/templates/file.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ <h1 class="navbar-brand navtitle">Details of {{ file_details.file_name }}</h1>
{% block content %}

<div class="row">

<div class="col">
<p>
<a class="btn btn-primary btn-sm" href="{{ url_for('dashboard_f', project_alias=project_alias, folder_id=folder_info.folder_id) }}" title="Folder {{ folder_info.project_folder }} page" role="button">
Expand Down Expand Up @@ -77,10 +76,25 @@ <h2>Image Preview:</h2>

{% if file_details.preview_image_ext == None %}

<p><a href="{{ url_for('get_fullsize', file_id=file_details.file_id) }}" rel="noopener noreferrer" title="Open JPG in full size of {{ file_details.file_name }}"><img src="{{ url_for('static', filename=file_details.preview_img_path) }}" alt="Preview image of {{ file_details.file_name }}" class="img-fluid card-img-top"><br>

Open JPG in full size</a><br>
<a href="{{ url_for('static', filename=file_details.preview_img_path) }}" rel="noopener noreferrer" title="Download JPG in full size of {{ file_details.file_name }}"><i class="fa-solid fa-download"></i> Download JPG in full size</a></p>
{% if file_details.preview_img_path == "na_160.png" %}
<p><img src="{{ url_for('static', filename=file_details.preview_img_path) }}" alt="Preview image of {{ file_details.file_name }}" class="shadow-sm p-3 mb-5 bg-body-tertiary rounded"></p>

<!-- Info on why the preview is not available -->
<div class="alert alert-info m-100" role="alert">
{% if folder_info.delivered_to_dams == 0 %}
<i class="fa-solid fa-circle-info"></i> The preview is not available because the file has been delivered to DAMS. Please contact the Project Manager for more details.
{% elif file_details.datediff > 59 %}
<i class="fa-solid fa-circle-info"></i> The preview is not available because the file has been removed. Please contact the Project Manager for more details.
{% else %}
<i class="fa-solid fa-circle-info"></i> The preview is not available because the record was created recently. It might take up to a few hours for the images to be available. Please contact the Project Manager for more details.
{% endif %}

</div>
{% else %}
<p><a href="{{ url_for('get_fullsize', file_id=file_details.file_id) }}" rel="noopener noreferrer" title="Open JPG in full size of {{ file_details.file_name }}"><img src="{{ url_for('static', filename=file_details.preview_img_path) }}" alt="Preview image of {{ file_details.file_name }}" class="img-fluid card-img-top"></a><br>
Open JPG in full size</a><br>
<a href="{{ url_for('static', filename=file_details.preview_img_path) }}" rel="noopener noreferrer" title="Download JPG in full size of {{ file_details.file_name }}"><i class="fa-solid fa-download"></i> Download JPG in full size</a></p>
{% endif %}

{% else %}

Expand All @@ -91,7 +105,8 @@ <h2>Image Preview:</h2>
{% endif %}

<p style="font-size: large;">Filename: {{ file_details.file_name }}</p>
<p>File ID: {{ file_details.file_id }}</p>
<p>DPO File ID: {{ file_details.file_id }}<br>
Record created on: {{ file_details.created_at }}</p>

{% endif %}

Expand All @@ -112,16 +127,13 @@ <h2>Image Preview:</h2>
<img src="{{ file_details.preview_image_ext }}&max=600" alt="Preview image of {{ file_details.file_name }}" class="img-fluid card-img-top">

<p style="font-size: large;">Filename: {{ file_details.file_name }}</p>
<p>File ID: {{ file_details.file_id }}</p>
<p>DPO File ID: {{ file_details.file_id }}<br>
Record created on: {{ file_details.created_at }}</p>

{% endif %}

{% endif %}





</div>
</div>

Expand Down Expand Up @@ -360,7 +372,6 @@ <h1 class="modal-title" id="postmodalLabel">Postprocessing Details</h1>

modalBody2.textContent = postinfo;
})

});
</script>

Expand All @@ -385,5 +396,4 @@ <h1 class="modal-title" id="postmodalLabel">Postprocessing Details</h1>

{% endif %}


{% endblock %}
3 changes: 1 addition & 2 deletions web_app/templates/home.html
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,7 @@
<a href="{{ url_for('dashboard', project_alias = 'jpc_production') }}" title="Link to the JPC Archive Prodcution Project Dashboard"><img src="{{ url_for('static', filename='items/Hank_Aaron.jpg') }}" class="img-fluid" alt="Photo of Hank Aaron from the JPC Archive" style="padding: 10px;"></a>
</div>
<div class="col">
<p>After the successful Pilot Project, we have started the production project of the digitization of the JPC Archive. This phase will start by digitizing the Priority 1 material: about 70,275 reflective and transmissive photographic items.<br>
We will continue to develop and test the systems integration.</p>
<p>After the successful <em>Pilot</em> and <em>Priority One</em> projects, we have started the <em>Production 1A</em> project of the digitization of the JPC Archive. This phase will digitize more than 328,000 reflective and transmissive photographic items.</p>
<a href="{{ url_for('dashboard', project_alias = 'jpc_production') }}" class="btn btn-sm btn-outline-primary" title="Link to the JPC Archive Prodcution Project Dashboard">JPCA Production Project Dashboard</a>
</div>
</div>
Expand Down
Loading

0 comments on commit 932a4b6

Please sign in to comment.