Skip to content

Commit

Permalink
feat(chant detail): display Benedicamus Domino fields where available
Browse files Browse the repository at this point in the history
  • Loading branch information
dchiller committed Jul 24, 2024
1 parent 46619d6 commit caffa0d
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 0 deletions.
32 changes: 32 additions & 0 deletions django/cantusdb_project/main_app/templates/chant_detail.html
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,38 @@ <h3>{{ chant.incipit }}</h3>

</div>

{% if project == "Benedicamus Domino" %}
<div class = "row">
{% if chant.later_addition %}
<div class = "col">
<dt>Later Addition</dt>
<dd>{{ chant.later_addition }}</dd>
</div>
{% endif %}
{% if chant.rubrics %}
<div class = "col">
<dt>Rubrics</dt>
<dd>{{ chant.rubrics }}</dd>
</div>
{% endif %}
</div>

<div class = "row">
{% if chant.cm_melody_id %}
<div class = "col">
<dt>Corpus Monodicum Melody ID</dt>
<dd>{{ chant.cm_melody_id }}</dd>
</div>
{% endif %}
{% if chant.incipit_of_refrain %}
<div class = "col">
<dt>Incipit of Refrain</dt>
<dd>{{ chant.incipit_of_refrain }}</dd>
</div>
{% endif %}
</div>
{% endif %}

{% if chant.manuscript_full_text_std_spelling %}
<dt>Full text as in Source (standardized spelling)</dt>
<dd>{{ chant.manuscript_full_text_std_spelling }}</dd>
Expand Down
3 changes: 3 additions & 0 deletions django/cantusdb_project/main_app/views/chant.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,9 @@ def get_context_data(self, **kwargs):
)
context["syllabized_text_with_melody"] = text_and_mel

if project := chant.project:
context["project"] = project.name

# some chants don't have a source, for those chants, stop here without further calculating
# other context variables
if not chant.source:
Expand Down

0 comments on commit caffa0d

Please sign in to comment.