Overview
Comment:Use new dot dotation for defining arrays in skeletons
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | dev
Files: files | file ages | folders
SHA3-256: ebfa0fb4403fea26d289999f6b5a9a3c6578bc33c1502e67f1f2fc9ac36770eb
User & Date: bohwaz on 2023-02-05 16:40:52
Other Links: branch diff | manifest | tags
Context
2023-02-05
16:41
Allow raw SQL in {{#select section check-in: cffb3e4c6c user: bohwaz tags: dev
16:40
Use new dot dotation for defining arrays in skeletons check-in: ebfa0fb440 user: bohwaz tags: dev
16:03
Implement experimental support for a {{#select col1, col2 FROM table WHERE id=:id ...; debug=1 :id=$id}} section in Brindille check-in: 15e9813c63 user: bohwaz tags: dev
Changes

Modified src/skel-dist/modules/ouvertures/config.html from [b92435bfba] to [8bce58e3d1].

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
{{:admin_header title="Configuration des ouvertures"}}

{{if $_POST.save}}
	{{#foreach from=$_POST.slots|array_transpose key="i" item="slot"}}
		{{:assign line="%d+1"|math:$i}}
		{{:assign var="slot"
			day=$slot.day
			frequency=$slot.frequency
			open='%02d:%02d'|args:$slot.open_hour:$slot.open_minutes
			close='%02d:%02d'|args:$slot.close_hour:$slot.close_minutes
		}}
		{{:assign var="slots[%d]"|args:$i value=$slot}}

		{{if !"%s %s"|args:$slot.frequency:$slot.day|trim|strtotime}}
			{{:assign error="Ouvertures - ligne %d : le sélecteur de jour est invalide: %s %s"|args:$line:$slot.frequency:$slot.day}}
			{{:break}}
		{{elseif !$slot.open|regexp_match:'/^(2[0-3]|[01][0-9]):([0-5][0-9])$/'}}
			{{:assign error="Ouvertures - ligne %d: heure d'ouverture invalide."|args:$line}}
			{{:break}}











|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
{{:admin_header title="Configuration des ouvertures"}}

{{if $_POST.save}}
	{{#foreach from=$_POST.slots|array_transpose key="i" item="slot"}}
		{{:assign line="%d+1"|math:$i}}
		{{:assign var="slot"
			day=$slot.day
			frequency=$slot.frequency
			open='%02d:%02d'|args:$slot.open_hour:$slot.open_minutes
			close='%02d:%02d'|args:$slot.close_hour:$slot.close_minutes
		}}
		{{:assign var="slots.%d"|args:$i value=$slot}}

		{{if !"%s %s"|args:$slot.frequency:$slot.day|trim|strtotime}}
			{{:assign error="Ouvertures - ligne %d : le sélecteur de jour est invalide: %s %s"|args:$line:$slot.frequency:$slot.day}}
			{{:break}}
		{{elseif !$slot.open|regexp_match:'/^(2[0-3]|[01][0-9]):([0-5][0-9])$/'}}
			{{:assign error="Ouvertures - ligne %d: heure d'ouverture invalide."|args:$line}}
			{{:break}}

Modified src/skel-dist/modules/recus_fiscaux/_config_default.tpl from [89b94cb59d] to [27055a1caf].

1
2
3
4
5
6
7
8
9
10
11
12
13




14
15
16
17
18
19
{{if !$module.config}}
	{{* Valeurs par défaut *}}
	{{:assign var="module[config]"
		objet_asso=""
		type_asso=""
		comptes_don="754"
		comptes_don_nature="75412"
		comptes_especes="530"
		comptes_cheques="5112"
		art200=false
		art238=false
		art978=false
	}}




	{{:assign var="module[config][champs_adresse]"
		0="adresse"
		1="code_postal"
		2="ville"
	}}
{{/if}}


|


<
<
<
<




>
>
>
>
|





1
2
3
4
5




6
7
8
9
10
11
12
13
14
15
16
17
18
19
{{if !$module.config}}
	{{* Valeurs par défaut *}}
	{{:assign var="module.config"
		objet_asso=""
		type_asso=""




		art200=false
		art238=false
		art978=false
	}}
	{{:assign var="module.config.comptes_don." value="754"}}
	{{:assign var="module.config.comptes_don_nature." value="75412"}}
	{{:assign var="module.config.comptes_especes." value="530"}}
	{{:assign var="module.config.comptes_cheques." value="5112"}}
	{{:assign var="module.config.champs_adresse"
		0="adresse"
		1="code_postal"
		2="ville"
	}}
{{/if}}

Modified src/skel-dist/modules/recus_fiscaux/index.html from [906e591f56] to [07a652d3c3].

8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<nav class="tabs">
	{{#restrict section="accounting" level="write"}}
	<aside>
		{{#restrict section="accounting" level="admin"}}
			{{:linkbutton href="config.html" label="Configuration" shape="settings" target="_dialog"}}
		{{/restrict}}
		{{*{{:linkbutton href="generer.html" label="Générer des reçus" shape="check"}}*}}
		{{:linkbutton href="nouveau.html?type=vierge" label="Nouveau reçu" shape="plus"}}
	</aside>
	{{/restrict}}

	<ul>
		<li class="current"><a href="./">Liste des reçus</a></li>
		<li><a href="./recap.html">Récapitulatif annuel pour déclaration</a></li>
	</ul>
</nav>

<div class="shortForms">
	<form method="get" action="">
		<fieldset>
			<legend>Filtrer par année</legend>
			<p>
				{{:assign var="years[]" value="— Voir toutes les années —"}}

				{{#load select="SUBSTR($$.date, 1, 4) AS year" group="SUBSTR($$.date, 1, 4)"}}
					{{:assign var="years[%d]"|args:$year value=$year}}
				{{/load}}

				{{:input type="select" name="year" options=$years default=$_GET.year onchange="this.form.submit();"}}
			</p>
		</fieldset>
	</form>








|














|


|







8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<nav class="tabs">
	{{#restrict section="accounting" level="write"}}
	<aside>
		{{#restrict section="accounting" level="admin"}}
			{{:linkbutton href="config.html" label="Configuration" shape="settings" target="_dialog"}}
		{{/restrict}}
		{{*{{:linkbutton href="generer.html" label="Générer des reçus" shape="check"}}*}}
		{{:linkbutton href="nouveau.html" label="Nouveau reçu" shape="plus"}}
	</aside>
	{{/restrict}}

	<ul>
		<li class="current"><a href="./">Liste des reçus</a></li>
		<li><a href="./recap.html">Récapitulatif annuel pour déclaration</a></li>
	</ul>
</nav>

<div class="shortForms">
	<form method="get" action="">
		<fieldset>
			<legend>Filtrer par année</legend>
			<p>
				{{:assign var="years." value="— Voir toutes les années —"}}

				{{#load select="SUBSTR($$.date, 1, 4) AS year" group="SUBSTR($$.date, 1, 4)"}}
					{{:assign var="years.%d"|args:$year value=$year}}
				{{/load}}

				{{:input type="select" name="year" options=$years default=$_GET.year onchange="this.form.submit();"}}
			</p>
		</fieldset>
	</form>