]> git.agnieray.net Git - galette.git/blob - galette/templates/default/gestion_paymentstypes.tpl
3c8821696033ffea61142ecb36d66cf6939d2667
[galette.git] / galette / templates / default / gestion_paymentstypes.tpl
1 {extends file="page.tpl"}
2
3 {block name="content"}
4 <form action="{path_for name="paymentTypes"}" method="post" enctype="multipart/form-data">
5 <table class="listing">
6 <thead>
7 <tr>
8 <th class="id_row">#</th>
9 <th>{_T string="Name"}</th>
10 <th>{_T string="Actions"}</th>
11 </tr>
12 </thead>
13 <tfoot>
14 <tr>
15 <td data-scope="row">
16 <span class="row-title">
17 {_T string="Add payment type"}
18 </span>
19 </td>
20 <td class="left" data-title="{_T string="Label"}">
21 <input size="20" type="text" name="name"/>
22 </td>
23 <td class="center actions_row">
24 <input type="hidden" name="new" value="1" />
25 <button type="submit" name="valid">
26 <i class="fas fa-plus" aria-disabled="true"></i>
27 {_T string="Add"}
28 </button>
29 </td>
30 </tr>
31 </tfoot>
32 <tbody>
33 {foreach from=$list item=ptype name=alltypes}
34 <tr class="{if $smarty.foreach.alltypes.iteration % 2 eq 0}even{else}odd{/if}">
35 <td data-scope="row">
36 {if $preferences->pref_show_id}
37 {$ptype->id}
38 {else}
39 {$smarty.foreach.alltypes.iteration}
40 {/if}
41 <span class="row-title">
42 <a href="{path_for name="editPaymentType" data=["id" => $ptype->id]}">
43 {_T string="%s payment type" pattern="/%s/" replace=$ptype->getName()}
44 </a>
45 </span>
46 </td>
47 <td class="left" data-title="{_T string="Name"}">{$ptype->getName()}</td>
48 <td class="center actions_row">
49 <a
50 href="{path_for name="editPaymentType" data=["id" => $ptype->id]}"
51 class="tooltip action"
52 >
53 <i class="fas fa-edit"></i>
54 <span class="sr-only">{_T string="Edit '%s' payment type" pattern="/%s/" replace=$ptype->getName()}</span>
55 </a>
56 <a
57 href="{path_for name="dynamicTranslations" data=["text_orig" => {$ptype->getName(false)|escape}]}"
58 class="tooltip"
59 >
60 <i class="fas fa-language"></i>
61 <span class="sr-only">{_T string="Translate '%s'" pattern="/%s/" replace=$ptype->getName()}</span>
62 </a>
63 </a>
64 {if $ptype->isSystemType()}
65 <i class="fas fa-fw">&nbsp;</i>
66 {else}
67 <a
68 href="{path_for name="removePaymentType" data=["id" => $ptype->id]}"
69 class="delete tooltip"
70 >
71 <i class="fa fa-trash fa-fw"></i>
72 <span class="sr-only">{_T string="Delete '%s' payment type" pattern="/%s/" replace=$ptype->getName()}</span>
73 </a>
74 {/if}
75 </td>
76 </tr>
77 {/foreach}
78 </tbody>
79 </table>
80 </form>
81 {/block}
82
83 {block name="javascripts"}
84 <script type="text/javascript">
85 $(function() {
86 {include file="js_removal.tpl"}
87 });
88 </script>
89 {/block}