]> git.agnieray.net Git - galette.git/blob - galette/templates/default/export.tpl
43719b7aefadfa47ddb7313e9a4465b617158107
[galette.git] / galette / templates / default / export.tpl
1 {extends file="page.tpl"}
2
3 {block name="content"}
4 <form class="form" action="{path_for name="doExport"}" method="post" enctype="multipart/form-data">
5 <p>{_T string="Each selected export will be stored into a separate file in the exports directory."}</p>
6
7 {assign var="written_exports" value=$flash->getMessage('written_exports')}
8 {if is_array($written_exports) && $written_exports|@count > 0}
9 <div id="successbox">
10 <p>{_T string="The following files have been written on disk:"}</p>
11 <ul>
12 {foreach from=$flash->getMessage('written_exports') item=ex}
13 <li>{$ex}</li>
14 {/foreach}
15 </ul>
16 </div>
17 {/if}
18
19 {if $existing|@count gt 0}
20 <fieldset>
21 <legend class="ui-state-active ui-corner-top">{_T string="Existing exports"}</legend>
22 <div>
23 <p>{_T string="The following exports already seems to exist on the disk:"}</p>
24 <table class="listing">
25 <thead>
26 <tr>
27 <th class="id_row">#</th>
28 <th>{_T string="Name"}</th>
29 <th>{_T string="Date"}</th>
30 <th>{_T string="Size"}</th>
31 <th class="actions_row"></th>
32 </tr>
33 </thead>
34 <tbody>
35 {foreach item=export from=$existing name=existing_list name=eachexport}
36 <tr class="{if $smarty.foreach.existing_list.iteration % 2 eq 0}even{else}odd{/if}">
37 <td data-scope="id">
38 {$smarty.foreach.eachexport.iteration}
39 </td>
40 <td data-scope="row">
41 <a href="{path_for name="getCsv" data=["type" => "export", "file" => $export.name]}">{$export.name}</a>
42 </td>
43 <td data-title="{_T string="Date"}">
44 {$export.date}
45 </td>
46 <td data-title="{_T string="Size"}">
47 {$export.size}
48 </td>
49 <td class="actions_row">
50 <a
51 href="{path_for name="removeCsv" data=["type" => "export", "file" => $export.name]}"
52 class="delete tooltip"
53 >
54 <i class="fas fa-trash"></i>
55 <span class="sr-only">{_T string="Remove '%file' from disk" pattern="/%file/" replace=$export.name}</span>
56 </a>
57 </td>
58 </tr>
59 {/foreach}
60 </tbody>
61 </table>
62 </div>
63 </fieldset>
64 {/if}
65 <fieldset>
66 <legend class="ui-state-active ui-corner-top">{_T string="Parameted exports"}</legend>
67 <div>
68 {if $parameted|@count gt 0}
69 <p>{_T string="Which parameted export(s) do you want to run?"}</p>
70 <table class="listing">
71 <thead>
72 <tr>
73 <th class="small_head"/>
74 <th>{_T string="Name"}</th>
75 <th>{_T string="Description"}</th>
76 </tr>
77 </thead>
78 <tbody>
79 {foreach item=param from=$parameted name=parameted_list}
80 <tr class="{if $smarty.foreach.parameted_list.iteration % 2 eq 0}even{else}odd{/if}">
81 <td data-scope="id">
82 <input type="checkbox" name="export_parameted[]" id="{$param.id}" value="{$param.id}"/>
83 </td>
84 <td data-scope="row">
85 <label for="{$param.id}">{$param.name}</label>
86 </td>
87 <td data-title="{_T string="Description"}">
88 <label for="{$param.id}">{$param.description}</label>
89 </td>
90 </tr>
91 {/foreach}
92 </tbody>
93 </table>
94 {else}
95 <p>{_T string="No parameted exports are available."}</p>
96 {/if}
97 </div>
98 </fieldset>
99
100 <fieldset>
101 <legend class="ui-state-active ui-corner-top">{_T string="Galette tables exports"}</legend>
102 <div>
103 <p>{_T string="Additionnaly, which table(s) do you want to export?"}</p>
104 <table class="listing same">
105 <thead>
106 <tr>
107 <th>{_T string="Table name"}</th>
108 <th class="small_head"/>
109 </tr>
110 </thead>
111 <tbody>
112 {foreach item=table from=$tables_list name=tables_list}
113 <tr class="{if $smarty.foreach.tables_list.iteration % 2 eq 0}even{else}odd{/if}">
114 <td class="left">
115 <label for="{$table}">{$table}</label>
116 </td>
117 <td>
118 <input type="checkbox" name="export_tables[]" id="{$table}" value="{$table}"/>
119 </td>
120 </tr>
121 {/foreach}
122 </tbody>
123 </table>
124 </fieldset>
125 <div class="button-container">
126 <input type="submit" name="valid" value="{_T string="Continue"}"/>
127 </div>
128 </form>
129 {/block}
130
131 {block name="javascripts"}
132 <script type="text/javascript">
133 $(function() {
134 _collapsibleFieldsets();
135 {include file="js_removal.tpl"}
136 });
137 </script>
138 {/block}