Skip to content

Commit

Permalink
✨ Add support for public body sources
Browse files Browse the repository at this point in the history
  • Loading branch information
pajowu committed Nov 13, 2024
1 parent 7966b69 commit ceda8b3
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,17 @@ <h1>
</dd>
<dt>{% trans "Source" %}</dt>
<dd>
<a href="{{ object.source }}" target="_blank">{{ object.source.domain }}</a>
{% if object.source.public_body %}
<a href="{{ object.source.public_body.get_absolute_url }}"
target="_blank">{{ object.source.public_body.name }}</a>
{% if object.source.url %}
<a href="{{ object.source.url }}" target="_blank">{{ object.source.document_number }}</a>
{% else %}
{{ object.source.document_number }}
{% endif %}
{% else %}
<a href="{{ object.source.url }}" target="_blank">{{ object.source.domain }}</a>
{% endif %}
</dd>
<dt>{% trans "Evidence Type" %}</dt>
<dd>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,10 @@ <h1>{{ row.title }}</h1>
<tr>
<th>{% trans "Source" %}</th>
<td>
<a href="{{ row.source__url }}" target="_blank">{{ row.source__url }}</a>
{% if row.source__public_body__name %}
{{ row.source__public_body__name }} – {{ row.source__document_number }}
{% endif %}
{% if row.source__url %}<a href="{{ row.source__url }}" target="_blank">{{ row.source__url }}</a>{% endif %}
</td>
</tr>
<tr>
Expand Down

0 comments on commit ceda8b3

Please sign in to comment.