From ee73b4cb4a3250a10f3efb2bf562f04c13f34a4f Mon Sep 17 00:00:00 2001 From: Ludovic Pouzenc Date: Fri, 20 Jul 2018 09:09:18 +0200 Subject: configure all filters, no align-right on 'view' --- app-from-scratch.sh | 6 ++ fai_gestion/config/bake_extra.php | 118 ++++++++++++++++++++++++++++++++++++-- fai_gestion/webroot/css/local.css | 10 ++++ 3 files changed, 130 insertions(+), 4 deletions(-) diff --git a/app-from-scratch.sh b/app-from-scratch.sh index 08a0947..80a12b3 100644 --- a/app-from-scratch.sh +++ b/app-from-scratch.sh @@ -330,3 +330,9 @@ editor $p/Template/index.twig $p/Template/view.twig $p/Element/form.twig src/Tem git add $p/Template/index.twig $p/Template/view.twig $p/Element/form.twig src/Template/Layout/default.ctp git add ../app-from-scratch.sh git commit -m "make side bar skinny, add shortcuts to main controllers" +# 5cb131935f0e4a8fb4082ed989a17c214d1e4beb + +# configure all filters, no align-right on 'view' +editor config/bake_extra.php webroot/css/local.css +git add config/bake_extra.php webroot/css/local.css ../app-from-scratch.sh +git commit -m "configure all filters, no align-right on 'view'" diff --git a/fai_gestion/config/bake_extra.php b/fai_gestion/config/bake_extra.php index 559b340..788c073 100644 --- a/fai_gestion/config/bake_extra.php +++ b/fai_gestion/config/bake_extra.php @@ -45,16 +45,31 @@ $taskParams = [ 'theme' => 'CustomTheme', 'no-fixture' => true, 'no-test' => true, - 'no-rules' => true, - 'index-columns' => 6 + 'index-columns' => 7 #'components' => 'hello,world', ], - 'Adherents' => [ 'index-columns' => 7 ], + #'Adherents' => [ 'index-columns' => 7 ], ]; $controllerActions = [ 'default' => [ 'index', 'view', 'add', 'edit'], 'AdherentRoles' => [ 'index', 'add', 'delete' ], 'AdherentRoleTypes' => [ ], + 'AdherentStatuts' => [ ], + 'AdherentTypes' => [ ], + 'Civilites' => [ ], + #'EquipementInterfaces' => [ ], # TODO in equipements ? + 'EquipementModes' => [ ], + 'Interesses' => [ 'index', 'view', 'add', 'edit', 'delete'], + 'InteresseStatuts' => [ ], + 'Ippubliques' => [ 'index', 'view' ], # FIXME rename table to ip_publiques + #'LienFilaire' => [ ], # TODO in equipements ? + #'LienRadio' => [ ], # TODO in equipements ? + #'LienTunnel' => [ ], # TODO in equipements ? + 'Periodicites' => [ ], + 'Secteurs' => [ ], + 'ServiceStatuts' => [ ], + 'ServiceTypes' => [ ], + # 'Villes' => [ ], # default ]; $templateExtra = [ 'Adherents' => [ @@ -70,7 +85,7 @@ EOT 'after' => 'true', 'field' => ['id','nom','nom2','prenom','prenom2','raison','proprio','tel_mobile1','tel_mobile2'], 'colspan' => 3, - 'hint' => 'Find...', + 'hint' => 'Chercher...', ], 'adherent_type_id' => [ 'mode' => 'value', @@ -84,6 +99,101 @@ EOT ], ], ], + 'Equipements' => [ + 'title' => [ + 'custom_code' => <<<'EOT' + $this->_properties['ip_management'] . ( $this->_properties['hostname']?(" (" . $this->_properties['hostname'] . ")"):"") +EOT + ], + 'filters' => [ + 'q' => [ + 'mode' => 'like', + 'before' => 'true', + 'after' => 'true', + 'field' => ['mac_boite', 'ip_management', 'hostname'], + 'colspan' => 3, + 'hint' => 'MAC, IPv4, Hostname...', + ], + 'equipement_modele_id' => [ + 'mode' => 'value', + 'colspan' => 2, + 'hint' => 'Equipement Modeles', + ], + 'relais_id' => [ + 'mode' => 'value', + 'colspan' => 2, + 'hint' => 'Relais', + ], + ], + ], + 'EquipementModeles' => [ + 'title' => [ + 'glue' => ' ', + 'pieces' => ['constructeur', 'modele'], + ], + ], + 'Interesses' => [ + 'filters' => [ + 'q' => [ + 'mode' => 'like', + 'before' => 'true', + 'after' => 'true', + 'field' => ['nom', 'prenom', 'date_demande', 'raison'], + 'colspan' => 5, + 'hint' => 'Chercher...', + ], + 'interesse_statut_id' => [ + 'mode' => 'value', + 'colspan' => 2, + 'hint' => 'Interesse Statut', + ], + ], + ], + 'Ippubliques' => [ + 'title' => [ + 'glue' => ' ', + 'pieces' => ['ip4', 'ip6'], + ], + 'filters' => [ + 'q' => [ + 'mode' => 'like', + 'before' => 'true', + 'after' => 'false', + 'field' => ['ip4','ip6'], + 'colspan' => 2, + 'hint' => 'Derniers chiffres...', + ], + 'secteur_id' => [ + 'mode' => 'value', + 'colspan' => 1, + 'hint' => 'Secteurs', + ], + ], + ], + 'Services' => [ + 'title' => [ + 'glue' => '-', + 'prefix' => 'SER', + 'pieces' => ['id'], + ], + 'filters' => [ + 'service_type_id' => [ + 'mode' => 'value', + 'colspan' => 3, + 'hint' => 'Service Type', + ], + 'service_statut_id' => [ + 'mode' => 'value', + 'colspan' => 2, + 'hint' => 'Service Statut', + ], + 'relais_id' => [ + 'mode' => 'value', + 'colspan' => 2, + 'hint' => 'Relais', + ], + ], + ], ]; return compact('skipTables', 'taskParams', 'controllerActions', 'templateExtra'); diff --git a/fai_gestion/webroot/css/local.css b/fai_gestion/webroot/css/local.css index b55ce54..d8a99fa 100644 --- a/fai_gestion/webroot/css/local.css +++ b/fai_gestion/webroot/css/local.css @@ -26,3 +26,13 @@ .filter input,button { padding: 0.5rem; } + +/* view Template : use left-align for data colomn, tidy things a bit */ +.vertical-table th { + width: 10rem; +} + +.vertical-table td { + text-align: left; +} + -- cgit v1.1