Skip to content

Commit

Permalink
fix cooperative template extension (#8)
Browse files Browse the repository at this point in the history
use super to call to other extension instead of overwriting the whole block
  • Loading branch information
aymanizz authored Oct 9, 2024
1 parent e8e1f1e commit ad84a1e
Showing 1 changed file with 2 additions and 33 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,38 +2,7 @@

{% block resource_item_explore_links %}
{%if h.is_public(pkg.id) or c.userobj%}
<li>
<a href="{{ url }}">
{% if not is_activity_archive and res.has_views %}
<i class="fa fa-bar-chart-o"></i>
{{ _('Preview') }}
{% else %}
<i class="fa fa-info-circle"></i>
{{ _('More information') }}
{% endif %}
</a>
</li>
{% if res.url and h.is_url(res.url) %}
<li>
<a href="{{ res.url }}" class="resource-url-analytics" target="_blank">
{% if res.has_views or res.url_type == 'upload' %}
<i class="fa fa-arrow-circle-o-down"></i>
{{ _('Download') }}
{% else %}
<i class="fa fa-external-link"></i>
{{ _('Go to resource') }}
{% endif %}
</a>
</li>
{% endif %}
{% if can_edit %}
<li>
<a href="{{ h.url_for(pkg.type ~ '_resource.edit', id=pkg.name, resource_id=res.id) }}">
<i class="fa fa-pencil-square-o"></i>
{{ _('Edit') }}
</a>
</li>
{% endif %}
{{ super() }}
{% else %}
<li>
<a href="https://mdep.smdh.uk/user/saml2login">
Expand All @@ -42,4 +11,4 @@
</a>
</li>
{% endif %}
{% endblock %}
{% endblock %}

0 comments on commit ad84a1e

Please sign in to comment.