Skip to content

Commit

Permalink
Merge pull request #1892 from digitalfabrik/bugfix/short-urls
Browse files Browse the repository at this point in the history
Fix copy short url button in page tree
  • Loading branch information
timobrembeck committed Nov 24, 2022
2 parents e534a32 + 73b133f commit 43990f9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 2 additions & 0 deletions integreat_cms/cms/fixtures/test_data.json
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,7 @@
"locations_enabled": true,
"chat_enabled": true,
"push_notifications_enabled": true,
"short_urls_enabled": true,
"latitude": 48.36882,
"longitude": 10.8958715,
"latitude_min": 48.2581444,
Expand Down Expand Up @@ -246,6 +247,7 @@
"fallback_translations_enabled": false,
"chat_enabled": true,
"push_notifications_enabled": true,
"short_urls_enabled": true,
"latitude": 49.455288,
"longitude": 11.0766198,
"postal_code": "90403",
Expand Down
9 changes: 5 additions & 4 deletions integreat_cms/cms/templates/pages/page_tree_node.html
Original file line number Diff line number Diff line change
Expand Up @@ -201,12 +201,13 @@
{% endif %}
{% if request.region.short_urls_enabled and request.user.expert_mode %}
{% if page_translation %}
<button data-copy-to-clipboard="{{ page_translation.short_url }}"
title="{% trans "Copy short link" %}"
class="btn-icon">
<a href="#"
data-copy-to-clipboard="{{ page_translation.short_url }}"
title="{% trans "Copy short link" %}"
class="btn-icon">
<i icon-name="copy"></i>
<i icon-name="check" class="hidden text-green-500"></i>
</button>
</a>
{% else %}
<button title="{% trans "You cannot copy a short link of a page which has no translation." %}"
class="btn-icon"
Expand Down

0 comments on commit 43990f9

Please sign in to comment.