Skip to content

Commit

Permalink
Use rights for svg download
Browse files Browse the repository at this point in the history
  • Loading branch information
TeoGoddet committed Oct 11, 2020
1 parent c169cdb commit 4f5d25c
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,8 @@
{% load i18n humanize rights_extras %}

{% block bonus_buttons %}
{% if obj.status == '4_archived' or obj.status == '3_sent' or obj.status == '2_accord' %}
{% ifhasright obj user 'DOWNLOAD_PDF' %}
<a href="{% url 'accounting_tools.views.invoice_qr' obj.pk %}{% trans "Facture" %} {{obj.title|urlencode}} - {{obj.get_reference}}.svg?{% if upk_noswitch %}&_upkns=_{% endif %}{% if from_related %}&_fromrelated=_{% endif %}" style="margin-left: 3px;" target="_blank" class="btn btn-warning"><i class="fa fa-download"></i> QR-Facture </a>
{% endif %}
{% if obj.status == '4_archived' or obj.status == '3_sent' or obj.status == '2_accord' %}
<a href="{% url 'accounting_tools.views.invoice_pdf' obj.pk %}{% trans "Facture" %} {{obj.title|urlencode}} - {{obj.get_reference}}.pdf?{% if upk_noswitch %}&_upkns=_{% endif %}{% if from_related %}&_fromrelated=_{% endif %}" style="margin-left: 3px;" target="_blank" class="btn btn-primary"><i class="fa fa-download"></i> PDF</a>
{% endifhasright %}
{% endblock %}
Expand Down

0 comments on commit 4f5d25c

Please sign in to comment.