Overview
Comment: | {{#list}}: Throw error if order is not a number |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | dev |
Files: | files | file ages | folders |
SHA3-256: |
4dc8a2272dbf6fb19fb1d17ede3c6f2e |
User & Date: | bohwaz on 2023-02-27 21:59:37 |
Other Links: | branch diff | manifest | tags |
Context
2023-02-27
| ||
22:01 | Use one-based order, not zero-based check-in: 8617ab8ac5 user: bohwaz tags: dev | |
21:59 | {{#list}}: Throw error if order is not a number check-in: 4dc8a2272d user: bohwaz tags: dev | |
19:33 | {{#section}} ... {{elseif}} is not possible actually check-in: 767123f00d user: bohwaz tags: dev | |
Changes
Modified src/include/lib/Garradin/UserTemplate/Sections.php from [12e48946c9] to [2abc7a4ca6].
︙ | ︙ | |||
362 363 364 365 366 367 368 | } $select = self::_moduleReplaceJSONExtract($select); $columns['col' . $i] = compact('label', 'select'); } | | > > > | > | 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 | } $select = self::_moduleReplaceJSONExtract($select); $columns['col' . $i] = compact('label', 'select'); } if (isset($params['order'])) { if (!is_int($params['order']) && !ctype_digit($params['order'])) { throw new Brindille_Exception(sprintf('Line %d: "order" parameter must be the number of the column (starting from zero)', $line)); } $params['order'] = 'col' . (int)$params['order']; } } else { $columns = self::_getModuleColumnsFromSchema($params['schema'], $params['columns'] ?? null, $tpl, $line); } $columns['id'] = []; |
︙ | ︙ |
Modified src/skel-dist/modules/recus_fiscaux/index.html from [07a652d3c3] to [818922a3ba].
︙ | ︙ | |||
61 62 63 64 65 66 67 | {{elseif $_GET.year}} {{:assign where="SUBSTR($$.date, 1, 4) = :year"}} {{/if}} {{#list select="id AS 'Numéro'; $$.nom AS 'Nom du bénéficiaire'; $$.date AS 'Date d''émission'; $$.montant AS 'Montant'" where=$where | | | 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 | {{elseif $_GET.year}} {{:assign where="SUBSTR($$.date, 1, 4) = :year"}} {{/if}} {{#list select="id AS 'Numéro'; $$.nom AS 'Nom du bénéficiaire'; $$.date AS 'Date d''émission'; $$.montant AS 'Montant'" where=$where order=0 desc=true :year=$_GET.year :date=$date :id_search=$id :nom=$nom }} <tr class="{{if $annule}}disabled crossed{{/if}}"> <td class="num"> |
︙ | ︙ |