Skip to content

Commit

Permalink
Merge pull request #1245 from lucasmarchd01/issue-1202
Browse files Browse the repository at this point in the history
Change URI construction for Chant List and Chant Inventory
  • Loading branch information
lucasmarchd01 authored Feb 9, 2024
2 parents 9a9507e + cd8b601 commit 57092ca
Show file tree
Hide file tree
Showing 12 changed files with 440 additions and 290 deletions.
39 changes: 39 additions & 0 deletions django/cantusdb_project/main_app/templates/400.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{% load static %}
<html lang="en">

<head>
<!-- Required meta tags -->
<meta name="google-site-verification" content="EwxpNpZ_ZOQnetVVLELGn5-aD_beT3EQqUuI6glkArI" />
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,
initial-scale=1, shrink-to-fit=no">
<meta name="robots" content="noindex">

<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" integrity="sha384-xOolHFLEh07PJGoPkLv1IbcEPTNtaed2xpHsD9ESMhqIYd0nLMwNLD69Npy4HI+N" crossorigin="anonymous">
<style>
body {
margin-bottom: 30px;
/* Margin bottom by footer height */
background-image: url('{% static "background.jpg" %}');
}
</style>
</head>

<body>
<main role="main" class="content container pt-4">
{% block content %}
<div class="container">
<div class="row">
<div class="mr-3 p-3 col-md-8 bg-white rounded">
<h3>400</h3>
<h5>Bad Request</h5>
<br>
</div>
</div>
</div>
{% endblock %}
</main>
</body>

</html>
4 changes: 2 additions & 2 deletions django/cantusdb_project/main_app/templates/chant_detail.html
Original file line number Diff line number Diff line change
Expand Up @@ -267,10 +267,10 @@ <h4>List of melodies</h4>
</select>

{% if previous_folio %}
<a href="{% url "chant-list" %}?source={{ source.id }}&folio={{ previous_folio }}">{{ previous_folio }} <</a>
<a href="{% url "chant-list" source.id %}?folio={{ previous_folio }}">{{ previous_folio }} <</a>
{% endif %}
{% if next_folio %}
&nbsp;<a href="{% url "chant-list" %}?source={{ source.id }}&folio={{ next_folio }}">> {{ next_folio }}</a>
&nbsp;<a href="{% url "chant-list" source.id %}?folio={{ next_folio }}">> {{ next_folio }}</a>
{% endif %}

{% if chant.image_link %}
Expand Down
8 changes: 4 additions & 4 deletions django/cantusdb_project/main_app/templates/chant_list.html
Original file line number Diff line number Diff line change
Expand Up @@ -149,10 +149,10 @@ <h4><a href="{% url 'source-detail' source.id %}" title="{{ source.title }}">{{
</select>

{% if previous_folio %}
<a href="{% url "chant-list" %}?source={{ source.id }}&folio={{ previous_folio }}">{{ previous_folio }} <</a>
<a href="{% url "chant-list" source.id %}?folio={{ previous_folio }}">{{ previous_folio }} <</a>
{% endif %}
{% if next_folio %}
&nbsp;<a href="{% url "chant-list" %}?source={{ source.id }}&folio={{ next_folio }}">> {{ next_folio }}</a>
&nbsp;<a href="{% url "chant-list" source.id %}?folio={{ next_folio }}">> {{ next_folio }}</a>
{% endif %}
<br>

Expand All @@ -163,8 +163,8 @@ <h4><a href="{% url 'source-detail' source.id %}" title="{{ source.title }}">{{
{% endfor %}
</select>
<br>
<a href="{% url "chant-list" %}?source={{ source.id }}" class="guillemet" target="_blank">View all chants</a>
<a href="{% url "chant-index" %}?source={{ source.id }}" class="guillemet" target="_blank">View full inventory</a>
<a href="{% url "chant-list" source.id %}" class="guillemet" target="_blank">View all chants</a>
<a href="{% url "source-inventory" source.id %}" class="guillemet" target="_blank">View full inventory</a>
<a href="{% url "csv-export" source.id%}" class="guillemet" target="_blank">CSV export</a>
<a href="{% url "chant-search-ms" source.id %}" class="guillemet" target="_blank">Search chants in this manuscript</a>
{% if source.image_link %}
Expand Down
4 changes: 2 additions & 2 deletions django/cantusdb_project/main_app/templates/feast_detail.html
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@ <h4>Sources containing the feast</h4>
<tbody>
{% for source, count in sources_zip %}
<tr>
<td><a href="{% url 'chant-list' %}?source={{ source.id }}" title="{{ source.title }}">{{ source.siglum }}</a></td>
<td><a href="{% url 'chant-list' %}?source={{ source.id }}&feast={{ feast.id }}">{{ count }}</a></td>
<td><a href="{% url 'chant-list' source.id %}" title="{{ source.title }}">{{ source.siglum }}</a></td>
<td><a href="{% url 'chant-list' source.id %}?feast={{ feast.id }}">{{ count }}</a></td>
</tr>
{% endfor %}
</tbody>
Expand Down
4 changes: 2 additions & 2 deletions django/cantusdb_project/main_app/templates/source_detail.html
Original file line number Diff line number Diff line change
Expand Up @@ -191,9 +191,9 @@ <h4>{{ source.siglum }}</h4>
<br>
{% if source.segment.id == 4063 %}
{# only display this link for sources in the CANTUS segment #}
<a href="{% url "chant-list" %}?source={{ source.id }}" class="guillemet" target="_blank">View all chants</a>
<a href="{% url "chant-list" source.id %}" class="guillemet" target="_blank">View all chants</a>
{% endif %}
<a href="{% url "chant-index" %}?source={{ source.id }}" class="guillemet" target="_blank">View full inventory</a>
<a href="{% url "source-inventory" source.id %}" class="guillemet" target="_blank">View full inventory</a>
<a href="{% url "csv-export" source.id%}" class="guillemet" target="_blank" download="{{ source.id }}.csv">CSV export</a>
<a href="{% url "chant-search-ms" source.id %}" class="guillemet" target="_blank">Search chants in this manuscript</a>
{% if source.image_link %}
Expand Down
4 changes: 2 additions & 2 deletions django/cantusdb_project/main_app/templates/source_edit.html
Original file line number Diff line number Diff line change
Expand Up @@ -258,9 +258,9 @@ <h4>{{ source.siglum }}</h4>
<br>
{% if source.segment.id == 4063 %}
{# only display this link for sources in the CANTUS segment #}
<a href="{% url "chant-list" %}?source={{ source.id }}" class="guillemet" target="_blank">View all chants</a>
<a href="{% url "chant-list" source.id %}" class="guillemet" target="_blank">View all chants</a>
{% endif %}
<a href="{% url "chant-index" %}?source={{ source.id }}" class="guillemet" target="_blank">View full inventory</a>
<a href="{% url "source-inventory" source.id %}" class="guillemet" target="_blank">View full inventory</a>
<a href="{% url "csv-export" source.id%}" class="guillemet" target="_blank" download="{{ source.id }}.csv">CSV export</a>
<a href="{% url "chant-search-ms" source.id %}" class="guillemet" target="_blank">Search chants in this manuscript</a>
{% if source.image_link %}
Expand Down
Loading

0 comments on commit 57092ca

Please sign in to comment.