mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-23 16:13:50 +00:00
allow to edit existing saved export with new export options
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
{#
|
||||
* Copyright (C) 2014-2015, Champs Libres Cooperative SCRLFS,
|
||||
* Copyright (C) 2014-2015, Champs Libres Cooperative SCRLFS,
|
||||
<info@champs-libres.coop> / <http://www.champs-libres.coop>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
@@ -19,7 +19,7 @@
|
||||
{% extends "@ChillMain/layout.html.twig" %}
|
||||
|
||||
{% block title "Download export"|trans ~ export.title|trans %}
|
||||
|
||||
|
||||
{% block js %}
|
||||
<script type="text/javascript">
|
||||
window.addEventListener("DOMContentLoaded", function(e) {
|
||||
@@ -27,20 +27,20 @@ window.addEventListener("DOMContentLoaded", function(e) {
|
||||
query = window.location.search,
|
||||
container = document.querySelector("#download_container")
|
||||
;
|
||||
|
||||
|
||||
chill.download_report(url+query, container);
|
||||
});
|
||||
});
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
||||
|
||||
{% block content %}
|
||||
<div class="col-md-10">
|
||||
|
||||
|
||||
{{ include('@ChillMain/Export/_breadcrumb.html.twig') }}
|
||||
|
||||
|
||||
<h1>{{ export.title|trans }}</h1>
|
||||
<h2>{{ "Download export"|trans }}</h2>
|
||||
|
||||
|
||||
<div id="download_container"
|
||||
data-alias="{{ alias|escape('html_attr') }}"
|
||||
{%- if mime_type is defined %}
|
||||
@@ -53,10 +53,24 @@ window.addEventListener("DOMContentLoaded", function(e) {
|
||||
<li class="cancel"><a href="{{ chill_return_path_or('chill_main_export_index') }}" class="btn btn-cancel">{{ 'Back to the list'|trans }}</a></li>
|
||||
|
||||
{% if not app.request.query.has('prevent_save') %}
|
||||
{% if saved_export is null %}
|
||||
<li>
|
||||
<a href="{{ chill_path_add_return_path('chill_main_export_save_from_key', { alias: alias, key: app.request.query.get('key')}) }}" class="btn btn-save">{{ 'Save'|trans }}</a>
|
||||
</li>
|
||||
{% else %}
|
||||
<li>
|
||||
<div class="dropdown">
|
||||
<button class="btn btn-save dropdown-toggle" type="button" data-bs-toggle="dropdown" aria-expanded="false">
|
||||
{{ 'Save'|trans }}
|
||||
</button>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="{{ chill_path_add_return_path('chill_main_export_save_from_key', { alias: alias, key: app.request.query.get('key')}) }}" class="dropdown-item">{{ 'Save'|trans }}</a></li>
|
||||
<li><a href="{{ chill_path_add_return_path('chill_main_export_saved_edit_options_from_key', { id: saved_export.id(), key: app.request.query.get('key') }) }}" class="dropdown-item">{{ 'saved_export.Update existing'|trans }}</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</ul>
|
||||
</div>
|
||||
{% endblock content %}
|
||||
{% endblock content %}
|
||||
|
Reference in New Issue
Block a user