Skip to content

Commit

Permalink
Merge pull request #1535 from laws-africa/copy-citation
Browse files Browse the repository at this point in the history
Add copy button for Law Report Citations
  • Loading branch information
nickmwangemi authored Sep 14, 2023
2 parents 2c95ed3 + ca274f3 commit ac90e1d
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion peachjam/templates/peachjam/layouts/document_detail.html
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,19 @@ <h1>{{ document.title }}</h1>
</dt>
{% endif %}
<dd class="text-muted">
{% for alternative_name in alternative_names %}<div>{{ alternative_name.title }}</div>{% endfor %}
{% for alternative_name in alternative_names %}
<div>
{{ alternative_name.title }}
<button type="button"
class="btn btn-outline-secondary btn-xs ms-2"
title="{% trans "Copy to clipboard" %}"
data-component="CopyToClipboard"
data-value="{{ alternative_name.title }}"
data-confirmation="{% trans "Copied!" %}">
{% trans "Copy" %}
</button>
</div>
{% endfor %}
</dd>
{% endif %}
{% endwith %}
Expand Down

0 comments on commit ac90e1d

Please sign in to comment.