feat: Add shortcut to open rescue org website

This commit is contained in:
2025-08-11 22:16:26 +02:00
parent 15dd06a91f
commit c93b2631cb
2 changed files with 25 additions and 6 deletions

View File

@@ -2,4 +2,14 @@ function mark_checked(index) {
document.getElementById('mark_checked_'+index).submit();
}
function open_information(index) {
let link = document.getElementById('species_url_'+index+'_1');
if (!link) {
link = document.getElementById('rescue_org_website_'+index);
}
window.open(link.href);
}
Mousetrap.bind('c', function() { mark_checked(1); });
Mousetrap.bind('o', function() { open_information(1); });

View File

@@ -15,18 +15,27 @@
<strong>{% translate 'Zuletzt geprüft:' %}</strong> {{ rescue_org.last_checked_hr }}
</p>
<p>
<i class="fas fa-images" aria-label="{% translate "Material verwenden?" %}"></i> {{ rescue_org.get_allows_using_materials_display }}
<i class="fas fa-images"
aria-label="{% translate "Material verwenden?" %}"></i> {{ rescue_org.get_allows_using_materials_display }}
</p>
{% if rescue_org.website %}
<a href="{{ rescue_org.website }}" target="_blank">
<a href="{{ rescue_org.website }}" id="rescue_org_website_{{ forloop.counter }}" target="_blank">
<i class="fas fa-globe" aria-label="{% translate "Website" %}"></i>
{{ rescue_org.website|domain }}
</a>
{% endif %}
{% for species_url in rescue_org.species_urls %}
<p>{{ species_url.species }}: <a href="{{ species_url.url }}" target="_blank">{{ species_url.url }}</a>
</p>
{% endfor %}
{% with rescue_org_counter=forloop.counter %}
{% for species_url in rescue_org.species_urls %}
<p>{{ species_url.species }}:
<a href="{{ species_url.url }}"
id="species_url_{{ rescue_org_counter }}_{{ forloop.counter }}"
target="_blank">
{{ species_url.url }}
</a>
</p>
{% endfor %}
{% endwith %}
</div>
{% if set_internal_comment_available %}
<div class="block">