added action to reload twig invoice template (#3876)
This commit is contained in:
@@ -11,8 +11,8 @@
|
||||
{{ widgets.table_actions(event.actions) }}
|
||||
{% endmacro %}
|
||||
|
||||
{% macro invoice_document(document, view) %}
|
||||
{% macro invoice_document(document, inUse, view) %}
|
||||
{% import "macros/widgets.html.twig" as widgets %}
|
||||
{% set event = actions(app.user, 'invoice_document', view, {'document': document, 'token': csrf_token('invoice.delete_document')}) %}
|
||||
{% set event = actions(app.user, 'invoice_document', view, {'document': document, 'in_use': inUse, 'token': csrf_token('invoice.delete_document')}) %}
|
||||
{{ widgets.table_actions(event.actions) }}
|
||||
{% endmacro %}
|
||||
|
||||
@@ -1,6 +1,11 @@
|
||||
{% extends 'base.html.twig' %}
|
||||
{% import "macros/widgets.html.twig" as widgets %}
|
||||
|
||||
{% block status %}
|
||||
{% from "macros/status.html.twig" import status_count %}
|
||||
{{ status_count(documents|length) }}
|
||||
{% endblock %}
|
||||
|
||||
{% block main %}
|
||||
{% if can_upload and form is not null %}
|
||||
{% embed '@theme/embeds/card.html.twig' %}
|
||||
@@ -60,9 +65,7 @@
|
||||
{% endif %}
|
||||
</td>
|
||||
<td class="actions">
|
||||
{% if not config.used %}
|
||||
{{ actions.invoice_document(document, 'index') }}
|
||||
{% endif %}
|
||||
{{ actions.invoice_document(document, config.used, 'index') }}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
|
||||
Reference in New Issue
Block a user