fmi...@hephaestos.ovh.adullact.org
unread,May 5, 2021, 11:11:29 AM5/5/21Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Sign in to report message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to openmairie-...@googlegroups.com
Author: fmichon
Date: 2021-05-05 17:11:27 +0200 (Wed, 05 May 2021)
New Revision: 1051
Modified:
branches/2.0.0-develop/app/css/app.css
branches/2.0.0-develop/obj/election.class.php
branches/2.0.0-develop/obj/om_formulaire.class.php
Log:
* Ergonomie : Amelioration de la visibilite du workflow sur la fiche de l'election (renommage des actions, ajout d'un widget de formulaire dedie, ajout d'icones, ...).
Modified: branches/2.0.0-develop/app/css/app.css
===================================================================
--- branches/2.0.0-develop/app/css/app.css 2021-05-05 15:06:52 UTC (rev 1050)
+++ branches/2.0.0-develop/app/css/app.css 2021-05-05 15:11:27 UTC (rev 1051)
@@ -426,4 +426,52 @@
.wait-election_unite-16 { background-image: url("../img/clock-time-blue.svg"); background-size: 16px; }
.done-election_unite-16 { background-image: url("../img/check-green.svg"); background-size: 16px; }
+/**
+ * WORKFLOW
+ */
+.workflow-display-status {
+ padding: 10px 40px;
+ color: #888;
+ background-image: url("../img/workflow-blue.svg");
+ background-size: 32px;
+ background-repeat: no-repeat;
+ background-position: 4px;
+}
+.workflow-selected {
+ font-weight: bold;
+ color: #434343;
+ font-size: 120%;
+}
+.workflow-action-go-to-prev-step-parametrage-16 {
+ background-image: url("../img/workflow-prev.svg");
+ background-size: 16px;
+}
+.workflow-action-go-to-next-step-simulation-16 {
+ background-image: url("../img/workflow-next.svg");
+ background-size: 16px;
+}
+.workflow-action-go-to-prev-step-simulation-16 {
+ background-image: url("../img/workflow-prev.svg");
+ background-size: 16px;
+}
+.workflow-action-go-to-next-step-saisie-16 {
+ background-image: url("../img/workflow-next.svg");
+ background-size: 16px;
+}
+.workflow-action-go-to-prev-step-saisie-16 {
+ background-image: url("../img/workflow-prev.svg");
+ background-size: 16px;
+}
+.workflow-action-go-to-next-step-finalisation-16 {
+ background-image: url("../img/workflow-next.svg");
+ background-size: 16px;
+}
+.workflow-action-go-to-prev-step-finalisation-16 {
+ background-image: url("../img/workflow-prev.svg");
+ background-size: 16px;
+}
+.workflow-action-go-to-next-step-archivage-16 {
+ background-image: url("../img/workflow-next.svg");
+ background-size: 16px;
+}
Modified: branches/2.0.0-develop/obj/election.class.php
===================================================================
--- branches/2.0.0-develop/obj/election.class.php 2021-05-05 15:06:52 UTC (rev 1050)
+++ branches/2.0.0-develop/obj/election.class.php 2021-05-05 15:11:27 UTC (rev 1051)
@@ -258,9 +258,9 @@
"identifier" => "simulation",
"portlet" => array(
"type" => "action-direct-with-confirmation",
- "libelle" => _("Commencer la simulation"),
- "order" => 10,
- "class" => "edit-16",
+ "libelle" => _("aller à l'étape *simulation*"),
+ "order" => 30,
+ "class" => "workflow-action-go-to-next-step-simulation-16",
),
"view" => "formulaire",
"method" => "trigger_simulation",
@@ -274,9 +274,9 @@
"identifier" => "retour_parametrage",
"portlet" => array(
"type" => "action-direct-with-confirmation",
- "libelle" => _("Retour à l'étape de paramétrage"),
- "order" => 11,
- "class" => "edit-16",
+ "libelle" => _("retour à l'étape *paramétrage*"),
+ "order" => 31,
+ "class" => "workflow-action-go-to-prev-step-parametrage-16",
),
"view" => "formulaire",
"method" => "trigger_retour_parametrage",
@@ -290,9 +290,9 @@
"identifier" => "saisie",
"portlet" => array(
"type" => "action-direct-with-confirmation",
- "libelle" => _("Commencer la saisie"),
- "order" => 12,
- "class" => "edit-16",
+ "libelle" => _("aller à l'étape *saisie*"),
+ "order" => 32,
+ "class" => "workflow-action-go-to-next-step-saisie-16",
),
"view" => "formulaire",
"method" => "trigger_saisie",
@@ -306,9 +306,9 @@
"identifier" => "retour_simulation",
"portlet" => array(
"type" => "action-direct-with-confirmation",
- "libelle" => _("Reprendre la simulation"),
- "order" => 13,
- "class" => "edit-16",
+ "libelle" => _("retour à l'étape *simulation*"),
+ "order" => 33,
+ "class" => "workflow-action-go-to-prev-step-simulation-16",
),
"view" => "formulaire",
"method" => "trigger_retour_simulation",
@@ -322,9 +322,9 @@
"identifier" => "finalisation",
"portlet" => array(
"type" => "action-direct-with-confirmation",
- "libelle" => _("Finaliser l'élection"),
- "order" => 14,
- "class" => "edit-16",
+ "libelle" => _("aller à l'étape *finalisation*"),
+ "order" => 34,
+ "class" => "workflow-action-go-to-next-step-finalisation-16",
),
"view" => "formulaire",
"method" => "trigger_finalisation",
@@ -338,9 +338,9 @@
"identifier" => "retour_saisie",
"portlet" => array(
"type" => "action-direct-with-confirmation",
- "libelle" => _("Reprendre la saisie"),
- "order" => 15,
- "class" => "edit-16",
+ "libelle" => _("retour à l'étape *saisie*"),
+ "order" => 35,
+ "class" => "workflow-action-go-to-prev-step-saisie-16",
),
"view" => "formulaire",
"method" => "trigger_retour_saisie",
@@ -354,9 +354,9 @@
"identifier" => "archiver",
"portlet" => array(
"type" => "action-direct-with-confirmation",
- "libelle" => _("Archiver l'élection"),
- "order" => 16,
- "class" => "edit-16",
+ "libelle" => _("aller à l'étape *archivage*"),
+ "order" => 36,
+ "class" => "workflow-action-go-to-next-step-archivage-16",
),
"view" => "formulaire",
"method" => "trigger_archiver",
@@ -370,9 +370,9 @@
"identifier" => "retour_finalisation",
"portlet" => array(
"type" => "action-direct-with-confirmation",
- "libelle" => _("Désarchiver l'élection"),
- "order" => 17,
- "class" => "edit-16",
+ "libelle" => _("retour à l'étape *finalisation*"),
+ "order" => 37,
+ "class" => "workflow-action-go-to-prev-step-finalisation-16",
),
"view" => "formulaire",
"method" => "trigger_desarchiver",
@@ -573,6 +573,10 @@
$form->setType("votant_defaut", 'hidden');
$form->setType("is_centaine", 'hidden');
$form->setType("election_reference", 'hidden');
+
+ if ($maj == 3) {
+ $form->setType("workflow", 'widget__election_workflow');
+ }
}
/**
Modified: branches/2.0.0-develop/obj/om_formulaire.class.php
===================================================================
--- branches/2.0.0-develop/obj/om_formulaire.class.php 2021-05-05 15:06:52 UTC (rev 1050)
+++ branches/2.0.0-develop/obj/om_formulaire.class.php 2021-05-05 15:11:27 UTC (rev 1051)
@@ -17,6 +17,41 @@
*/
class om_formulaire extends formulaire {
+ /**
+ * WIDGET_FORM - widget__election_workflow.
+ *
+ * @param string $champ Nom du champ
+ * @param integer $validation
+ * @param boolean $DEBUG Parametre inutilise
+ *
+ * @return void
+ */
+ function widget__election_workflow($champ, $validation, $DEBUG = false) {
+ // On appelle le widget de formulaire hidden en changeant l'attribut
+ $tmp_type = $this->type[$champ];
+ $this->type[$champ] = "hidden";
+ $this->hidden($champ, $validation, $DEBUG);
+ $this->type[$champ] = $tmp_type;
+ // On affiche un bloc d'information sur le workflow de l'élection
+ printf(
+ '<div class="workflow-display-status">
+ <span class="%1$s">Paramétrage</span>
+ >
+ <span class="%2$s">Simulation</span>
+ >
+ <span class="%3$s">Saisie</span>
+ >
+ <span class="%4$s">Finalisation</span>
+ >
+ <span class="%5$s">Archivage</span>
+ </div>',
+ ($this->val[$champ] === "" || $this->val[$champ] === "Paramétrage" ? "workflow-selected" : ""),
+ ($this->val[$champ] === "Simulation" ? "workflow-selected" : ""),
+ ($this->val[$champ] === "Saisie" ? "workflow-selected" : ""),
+ ($this->val[$champ] === "Finalisation" ? "workflow-selected" : ""),
+ ($this->val[$champ] === "Archivage" ? "workflow-selected" : "")
+ );
+ }
function afficheall($champ, $validation, $DEBUG = false) {