Skip to content

Commit

Permalink
fix relationships on main tab
Browse files Browse the repository at this point in the history
  • Loading branch information
longhotsummer committed May 14, 2024
1 parent 57321ea commit 712333c
Showing 1 changed file with 20 additions and 16 deletions.
36 changes: 20 additions & 16 deletions peachjam/templates/peachjam/layouts/document_detail.html
Original file line number Diff line number Diff line change
Expand Up @@ -378,23 +378,27 @@ <h5>
<a href="#related-tab" data-component="ToggleTab">{% blocktrans %}{{ n_relationships }} related documents{% endblocktrans %}</a>
</li>
{% else %}
{% for rel in relationships_as_subject %}
{% if rel.object_work %}
<li>
{% translate rel.predicate.verb as verb %}
{{ verb|capfirst }}
<a href="{% url 'document_detail' frbr_uri=rel.object_work.frbr_uri|strip_first_character %}">{{ rel.object_work.title }}</a>
</li>
{% endif %}
{% for verb, rels in relationships_as_subject %}
{% for rel in rels %}
{% if rel.object_work %}
<li>
{% translate rel.predicate.verb as verb %}
{{ verb|capfirst }}
<a href="{% url 'document_detail' frbr_uri=rel.object_work.frbr_uri|strip_first_character %}">{{ rel.object_work.title }}</a>
</li>
{% endif %}
{% endfor %}
{% endfor %}
{% for rel in relationships_as_object %}
{% if rel.subject_work %}
<li>
{% translate rel.predicate.reverse_verb as verb %}
{{ verb|capfirst }}
<a href="{% url 'document_detail' frbr_uri=rel.subject_work.frbr_uri|strip_first_character %}">{{ rel.subject_work.title }}</a>
</li>
{% endif %}
{% for verb, rels in relationships_as_object %}
{% for rel in rels %}
{% if rel.subject_work %}
<li>
{% translate rel.predicate.reverse_verb as verb %}
{{ verb|capfirst }}
<a href="{% url 'document_detail' frbr_uri=rel.subject_work.frbr_uri|strip_first_character %}">{{ rel.subject_work.title }}</a>
</li>
{% endif %}
{% endfor %}
{% endfor %}
{% endif %}
</ul>
Expand Down

0 comments on commit 712333c

Please sign in to comment.