Overview
Comment: | Avancement sur les champs membres personnalisés + réflexion sur la suite des cotisations... |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
932ea4a33e51579998c1c695b040f1ad |
User & Date: | bohwaz on 2013-01-13 15:37:06 |
Other Links: | manifest | tags |
Context
2013-01-18
| ||
13:31 | Garder l'ancien comportement pour le moment check-in: 03c6e31ed5 user: bohwaz tags: trunk | |
2013-01-13
| ||
15:37 | Avancement sur les champs membres personnalisés + réflexion sur la suite des cotisations... check-in: 932ea4a33e user: bohwaz tags: trunk | |
2013-01-04
| ||
07:33 | Renommage du fichier de base de données check-in: 25db7dcbc2 user: bohwaz tags: trunk | |
Changes
Modified include/class.champs_membres.php from [6cc5cf3775] to [6205058156].
1 2 3 4 5 6 7 8 9 10 11 12 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | - - + + | <?php namespace Garradin; class Champs_Membres { protected $champs = null; protected $types = array( 'email' => 'Adresse E-Mail', 'url' => 'Adresse URL', 'checkbox' => 'Case à cocher', |
︙ | |||
116 117 118 119 120 121 122 123 124 125 126 127 128 129 | 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 | + + + + + + + | return $this->champs[$champ]; } public function getAll() { return $this->champs; } public function getPublic() { return array_filter($this->champs, function ($row) { return empty($row['private']) ? true : false; }); } /** * Vérifie la cohérence et la présence des bons éléments pour un champ * @param string $name Nom du champ * @param array $config Configuration du champ * @return boolean true */ |
︙ | |||
155 156 157 158 159 160 161 162 163 164 165 166 167 168 | 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 | + + + + + + + + | elseif ($key == 'help' || $key == 'title') { $value = trim((string) $value); } elseif ($key == 'options') { $value = (array) $value; foreach ($value as $option_key=>$option_value) { if (!trim($option_value)) { unset($value[$option_key]); } } } } if (empty($config['title'])) { throw new UserException('Champ "'.$name.'" : Le titre est obligatoire.'); } |
︙ |
Modified include/class.membres.php from [10533ef891] to [e9c002d2c8].
︙ | |||
509 510 511 512 513 514 515 | 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 | - + + | public function countAllButHidden() { $db = DB::getInstance(); return $db->simpleQuerySingle('SELECT COUNT(*) FROM membres WHERE id_categorie NOT IN (SELECT id FROM membres_categories WHERE cacher = 1);'); } |
︙ |
Modified include/data/schema.sql from [ec287cf265] to [01ca919fb3].
︙ | |||
57 58 59 60 61 62 63 64 65 66 67 68 69 70 | 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + | -- Dernière cotisation enregistrée date_cotisation TEXT, FOREIGN KEY (id_categorie) REFERENCES membres_categories (id) ); CREATE INDEX membres_id_categorie ON membres (id_categorie); -- Paiements possibles CREATE TABLE types_transactions ( id INTEGER PRIMARY KEY, id_categorie_compta INTEGER NULL, -- NULL si le type n'est pas associé automatiquement à la compta titre TEXT NOT NULL, description TEXT NOT NULL, montant REAL NOT NULL, duree INTEGER NULL, debut TEXT NULL, fin TEXT NULL, FOREIGN KEY (id_categorie_compta) REFERENCES compta_categories (id) ); -- Paiements enregistrés CREATE TABLE membres_transactions ( id_membre INTEGER NOT NULL, id_transaction INTEGER NOT NULL, id_operation INTEGER NULL, date TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP, montant REAL NOT NULL, FOREIGN KEY (id_membre) REFERENCES membres (id), FOREIGN KEY (id_transaction) REFERENCES transactions (id), FOREIGN KEY (id_operation) REFERENCES compta_journal (id) ); -- -- WIKI -- CREATE TABLE wiki_pages -- Pages du wiki |
︙ |
Modified include/lib.template.php from [8ff6a87056] to [d93f2441d6].
︙ | |||
359 360 361 362 363 364 365 | 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 | - + - + - + - + - + - + | throw new \BadFunctionCallException('Paramètres type et name obligatoires.'); $config = $params['config']; $type = $config['type']; if ($type == 'select') { |
︙ |
Modified templates/admin/config/index.tpl from [5ad6698fd9] to [d3a9ce1c4b].
︙ | |||
10 11 12 13 14 15 16 | 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | - + | {$error|escape} </p> {/if} {/if} <ul class="actions"> <li class="current"><a href="{$www_url}admin/config/">Général</a></li> |
︙ |
Modified templates/admin/config/membres.tpl from [109faa7d86] to [25243cba6e].
1 2 3 4 | 1 2 3 4 5 6 7 8 9 10 11 12 | - + | {include file="admin/_head.tpl" title="Configuration — Fiche membres" current="config"} <ul class="actions"> <li><a href="{$www_url}admin/config/">Général</a></li> |
︙ | |||
125 126 127 128 129 130 131 | 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 | + - - - - + + + + + + + | <dt><label>Options disponibles</label></dt> {if $champ.type == 'multiple'} <dd class="help">Attention changer l'ordre des options peut avoir des effets indésirables.</dd> {else} <dd class="help">Attention renommer ou supprimer une option n'affecte pas ce qui a déjà été enregistré dans les fiches des membres.</dd> {/if} {if !empty($champ.options)} |
︙ |
Modified templates/admin/mes_infos.tpl from [4aa35a8ebb] to [9e2c8a3fd2].
1 2 3 4 5 6 7 8 9 10 11 12 13 | 1 2 3 4 5 6 7 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 41 42 43 44 45 46 47 48 49 | + - - - - - - - - + - - - - - - - - - - - - - - + - - - - - - + + - - - - - - - - - - - - - - - - - - - - - + - - - - - - - + + + + - - - - - - - - - - - + + + + + + + + + + + - - + - - + - - - - - - + - - | {include file="admin/_head.tpl" title="Mes informations personnelles" current="mes_infos"} {if $error} <p class="error"> {$error|escape} </p> {/if} <form method="post" action="{$self_url|escape}"> <fieldset> <legend>Informations personnelles</legend> <dl> |
︙ |
Modified www/admin/config/membres.php from [700b9b9b4e] to [314afb4bc4].
︙ | |||
77 78 79 80 81 82 83 | 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 | - + - + - + + + | $champs->add(utils::post('preset'), $presets[utils::post('preset')]); } elseif (utils::post('new')) { $presets = Champs_Membres::importPresets(); $new = utils::post('new'); |
︙ |
Modified www/admin/index.php from [abba5d78d2] to [b0dc52bbe0].
1 2 3 4 5 6 7 8 9 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | - + | <?php namespace Garradin; require_once __DIR__ . '/_inc.php'; $cats = new Membres_Categories; $categorie = $cats->get($user['id_categorie']); $tpl->assign('categorie', $categorie); |
Modified www/admin/mes_infos.php from [6caeebaa2e] to [ee56d13ace].
1 2 3 4 5 | 1 2 3 4 5 6 7 8 9 10 11 12 | - - - - - | <?php namespace Garradin; require_once __DIR__ . '/_inc.php'; |
︙ | |||
54 55 56 57 58 59 60 | 49 50 51 52 53 54 55 56 57 58 59 60 61 62 | - + - - - | $error = $e->getMessage(); } } } $tpl->assign('error', $error); $tpl->assign('passphrase', utils::suggestPassword()); |