From 228993dbd6f9272df23e8e1dfee492f876ee3ccf Mon Sep 17 00:00:00 2001 From: afornerot Date: Mon, 8 Jun 2020 09:01:52 +0200 Subject: [PATCH 01/21] =?UTF-8?q?filtre=20de=20recherche=20sur=20le=20nom?= =?UTF-8?q?=20du=20propri=C3=A9taire=20(ref=20#147)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CoreBundle/Controller/GroupController.php | 8 ++++++-- .../Resources/public/themes/transnum/look.png | Bin 27748 -> 27748 bytes .../public/themes/transnum/transnum-logo.png | Bin 27748 -> 27748 bytes 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/ninegate-1.0/src/Cadoles/CoreBundle/Controller/GroupController.php b/src/ninegate-1.0/src/Cadoles/CoreBundle/Controller/GroupController.php index 2176e20e..de1d446f 100644 --- a/src/ninegate-1.0/src/Cadoles/CoreBundle/Controller/GroupController.php +++ b/src/ninegate-1.0/src/Cadoles/CoreBundle/Controller/GroupController.php @@ -82,7 +82,9 @@ class GroupController extends Controller $qb=$em->createQueryBuilder(); $qb->select('COUNT(table)') ->from($this->labelentity,'table') + ->leftJoin('CadolesCoreBundle:User', 'u', 'WITH', 'table.owner = u.id') ->where('table.label LIKE :value') + ->orWhere('u.username LIKE :value') ->setParameter("value", "%".$search["value"]."%"); if($access=="user") { $qb->from("CadolesCoreBundle:UserGroup","ug") @@ -107,19 +109,21 @@ class GroupController extends Controller // Parcours des Enregistrement $qb = $em->createQueryBuilder(); - $qb->select('table')->from($this->labelentity,'table'); + $qb ->select('table') + ->from($this->labelentity,'table') + ->leftJoin('CadolesCoreBundle:User', 'u', 'WITH', 'table.owner = u.id'); if($access=="user") { $qb->from("CadolesCoreBundle:UserGroup","ug") ->andWhere(("table.fgcanshare=:flag")) ->andWhere("table.id=ug.group") ->andWhere(":user=ug.user") - ->leftJoin('CadolesCoreBundle:User', 'u', 'WITH', 'table.owner = u.id') ->setParameter("flag", true) ->setParameter("user", $this->getUser()); } if($search["value"]!="") { $qb ->andwhere('table.label LIKE :value') + ->orWhere('u.username LIKE :value') ->setParameter("value", "%".$search["value"]."%"); } switch($order[0]["column"]) { diff --git a/src/ninegate-1.0/src/Cadoles/CoreBundle/Resources/public/themes/transnum/look.png b/src/ninegate-1.0/src/Cadoles/CoreBundle/Resources/public/themes/transnum/look.png index 8bcffd031afa1a650c7fdfbbb734622a929742c2..aecff8038c7a39cf461b549526afa3123923e8f8 100644 GIT binary patch delta 23 fcmaEIgYn4?#tqj@Iiz`2t>bU9d2POD+GYj-fO-kg delta 23 fcmaEIgYn4?#tqj@Irw>1<@YR93f_Frw9O0vfkg@O diff --git a/src/ninegate-1.0/src/Cadoles/CoreBundle/Resources/public/themes/transnum/transnum-logo.png b/src/ninegate-1.0/src/Cadoles/CoreBundle/Resources/public/themes/transnum/transnum-logo.png index 8bcffd031afa1a650c7fdfbbb734622a929742c2..aecff8038c7a39cf461b549526afa3123923e8f8 100644 GIT binary patch delta 23 fcmaEIgYn4?#tqj@Iiz`2t>bU9d2POD+GYj-fO-kg delta 23 fcmaEIgYn4?#tqj@Irw>1<@YR93f_Frw9O0vfkg@O From 920e6d66d32999423048162b46fb508bc9d9086f Mon Sep 17 00:00:00 2001 From: afornerot Date: Mon, 8 Jun 2020 09:07:16 +0200 Subject: [PATCH 02/21] =?UTF-8?q?permettre=20au=20propri=C3=A9taire=20du?= =?UTF-8?q?=20groupe=20de=20changer=20le=20propri=C3=A9taire=20(ref=20#146?= =?UTF-8?q?)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/Cadoles/CoreBundle/Form/GroupType.php | 42 +++++++++---------- 1 file changed, 20 insertions(+), 22 deletions(-) diff --git a/src/ninegate-1.0/src/Cadoles/CoreBundle/Form/GroupType.php b/src/ninegate-1.0/src/Cadoles/CoreBundle/Form/GroupType.php index e898bed0..7ed00e06 100644 --- a/src/ninegate-1.0/src/Cadoles/CoreBundle/Form/GroupType.php +++ b/src/ninegate-1.0/src/Cadoles/CoreBundle/Form/GroupType.php @@ -58,28 +58,26 @@ class GroupType extends AbstractType "attr" => array("class" => "form-control", "style" => "margin-bottom:15px","readonly" => ($options["mode"]=="delete"?true:false)) ]); - if($options["access"]=="config") { - $builder->add('owner', - Select2EntityType::class, array( - 'label' => "Propriétaire", - 'disabled' => ($options["mode"]=="delete"?true:false), - "required" => false, - 'multiple' => false, - 'remote_route' => 'cadoles_core_config_user_ajax_selectlist', - 'class' => 'Cadoles\coreBundle\Entity\User', - 'primary_key' => 'id', - 'text_property' => 'username', - 'minimum_input_length' => 2, - 'page_limit' => 10, - 'allow_clear' => true, - 'delay' => 250, - 'cache' => false, - 'cache_timeout' => 60000, // if 'cache' is true - 'language' => 'fr', - 'placeholder' => 'Selectionner un propriétaire', - 'attr' => array("class" => "form-control", "style" => "margin-bottom:15px") - )); - } + $builder->add('owner', + Select2EntityType::class, array( + 'label' => "Propriétaire", + 'disabled' => ($options["mode"]=="delete"?true:false), + "required" => false, + 'multiple' => false, + 'remote_route' => 'cadoles_core_config_user_ajax_selectlist', + 'class' => 'Cadoles\coreBundle\Entity\User', + 'primary_key' => 'id', + 'text_property' => 'username', + 'minimum_input_length' => 2, + 'page_limit' => 10, + 'allow_clear' => true, + 'delay' => 250, + 'cache' => false, + 'cache_timeout' => 60000, // if 'cache' is true + 'language' => 'fr', + 'placeholder' => 'Selectionner un propriétaire', + 'attr' => array("class" => "form-control", "style" => "margin-bottom:15px") + )); } if($options["access"]=="config") { From 7eae2ee972d902d3e3efc1b72d73a77d4197b1ce Mon Sep 17 00:00:00 2001 From: afornerot Date: Mon, 8 Jun 2020 09:16:26 +0200 Subject: [PATCH 03/21] =?UTF-8?q?formattage=20de=20la=20l=C3=A9gende=20du?= =?UTF-8?q?=20login=20correcte=20(ref=20#132)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CoreBundle/Resources/views/Registration/edit.html.twig | 4 ++-- .../Cadoles/CoreBundle/Resources/views/User/edit.html.twig | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/ninegate-1.0/src/Cadoles/CoreBundle/Resources/views/Registration/edit.html.twig b/src/ninegate-1.0/src/Cadoles/CoreBundle/Resources/views/Registration/edit.html.twig index 61aac292..53ca6ac7 100755 --- a/src/ninegate-1.0/src/Cadoles/CoreBundle/Resources/views/Registration/edit.html.twig +++ b/src/ninegate-1.0/src/Cadoles/CoreBundle/Resources/views/Registration/edit.html.twig @@ -68,8 +68,8 @@
Caractères interdits = accent, espace, caractères spéciaux sauf @ . - _
- Taille minimum = {{keyterm}} caractères - Doit être constitué de chiffres, de lettres et caractères spéciaux + Taille minimum = 5 caractères
+ Formatez votre login sous la forme prenom.nom dans la mesure du possible
{% if form.password is defined %} diff --git a/src/ninegate-1.0/src/Cadoles/CoreBundle/Resources/views/User/edit.html.twig b/src/ninegate-1.0/src/Cadoles/CoreBundle/Resources/views/User/edit.html.twig index ad422948..16be8812 100755 --- a/src/ninegate-1.0/src/Cadoles/CoreBundle/Resources/views/User/edit.html.twig +++ b/src/ninegate-1.0/src/Cadoles/CoreBundle/Resources/views/User/edit.html.twig @@ -75,8 +75,8 @@
Caractères interdits = accent, espace, caractères spéciaux sauf @ . - _
- Taille minimum = {{keyterm}} caractères - Doit être constitué de chiffres, de lettres et caractères spéciaux + Taille minimum = 5 caractères
+ Formatez votre login sous la forme prenom.nom dans la mesure du possible
{% if form.password is defined %} From a2c17379e40b32e86e1ee74ecb17290bee1f4982 Mon Sep 17 00:00:00 2001 From: afornerot Date: Mon, 8 Jun 2020 09:52:16 +0200 Subject: [PATCH 04/21] date de fin sous forme calendrier (ref #153) --- .../src/Cadoles/PortalBundle/Form/ProjecttaskType.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/ninegate-1.0/src/Cadoles/PortalBundle/Form/ProjecttaskType.php b/src/ninegate-1.0/src/Cadoles/PortalBundle/Form/ProjecttaskType.php index 3c8b0737..c7125fd4 100644 --- a/src/ninegate-1.0/src/Cadoles/PortalBundle/Form/ProjecttaskType.php +++ b/src/ninegate-1.0/src/Cadoles/PortalBundle/Form/ProjecttaskType.php @@ -49,6 +49,7 @@ class ProjecttaskType extends AbstractType ->add('end', DateType::class, [ "label" => 'A Réaliser avant le', "required" => false, + "widget" => 'single_text', ]) ->add('percentage', IntegerType::class, [ From eac7f6309462d0416b99d8cab8df7e7002c1489d Mon Sep 17 00:00:00 2001 From: afornerot Date: Mon, 8 Jun 2020 10:55:27 +0200 Subject: [PATCH 05/21] navigation projet pour retour vers le groupe (ref #152) --- .../Controller/ProjectController.php | 15 +++++++++++- .../Controller/ProjecttaskController.php | 24 +++++++++++++++---- .../views/Pagewidget/viewproject.html.twig | 12 +++++----- .../Resources/views/Project/view.html.twig | 8 ++++++- .../views/Projecttask/edit.html.twig | 6 ++++- .../views/Projecttask/view.html.twig | 7 +++++- 6 files changed, 58 insertions(+), 14 deletions(-) diff --git a/src/ninegate-1.0/src/Cadoles/PortalBundle/Controller/ProjectController.php b/src/ninegate-1.0/src/Cadoles/PortalBundle/Controller/ProjectController.php index 51918b4a..f8f7aff1 100644 --- a/src/ninegate-1.0/src/Cadoles/PortalBundle/Controller/ProjectController.php +++ b/src/ninegate-1.0/src/Cadoles/PortalBundle/Controller/ProjectController.php @@ -352,6 +352,18 @@ class ProjectController extends Controller if (!$entity) throw $this->createNotFoundException('Unable to find entity.'); } + // On recherche la premiere page associé au groupe du projet + $idpage=null; + if($id!=0) { + $groups=$entity->getGroups(); + if($groups) { + if($groups[0]->getFgcanshare()) { + $pages=$groups[0]->getPages(); + if($pages) $idpage=$pages[0]->getId(); + } + } + } + // Permissions $user=$this->getUser(); if($access=="config") { @@ -415,7 +427,8 @@ class ProjectController extends Controller 'projects' => $projects, 'countarticles' => $count, 'pagination' => $pagination, - 'page' => $page + 'page' => $page, + 'idpage' => $idpage ]); } diff --git a/src/ninegate-1.0/src/Cadoles/PortalBundle/Controller/ProjecttaskController.php b/src/ninegate-1.0/src/Cadoles/PortalBundle/Controller/ProjecttaskController.php index d966ae55..c4046d9b 100644 --- a/src/ninegate-1.0/src/Cadoles/PortalBundle/Controller/ProjecttaskController.php +++ b/src/ninegate-1.0/src/Cadoles/PortalBundle/Controller/ProjecttaskController.php @@ -48,7 +48,8 @@ class ProjecttaskController extends Controller if($project) $entity->setProject($project); $entity->setPriority(0); $entity->setPercentage(0); - + $pageid=$request->get("page"); + $form = $this->entityForm($entity,$access); $form->handleRequest($request); @@ -76,7 +77,10 @@ class ProjecttaskController extends Controller } } - return $this->redirect($this->generateUrl('cadoles_portal_'.$access.'_projecttask_view',["id"=>$entity->getId()])); + if(is_null($pageid)) + return $this->redirect($this->generateUrl('cadoles_portal_'.$access.'_projecttask_view',["id"=>$entity->getId()])); + else + return $this->redirect($this->generateUrl('cadoles_portal_'.$access.'_page_view',["id"=>$pageid])); } return $this->render($this->labelentity.':edit.html.twig', [ @@ -87,7 +91,8 @@ class ProjecttaskController extends Controller 'entity' => $entity, 'mode' => "submit", 'access' => $access, - 'form' => $form->createView() + 'form' => $form->createView(), + 'pageid' => $pageid ]); } @@ -186,6 +191,16 @@ class ProjecttaskController extends Controller $entity = $em->getRepository($this->labelentity)->find($id); if (!$entity) throw $this->createNotFoundException('Unable to find entity.'); + // On recherche la premiere page associé au groupe du projet + $groups=$entity->getProject()->getGroups(); + $idpage=null; + if($groups) { + if($groups[0]->getFgcanshare()) { + $pages=$groups[0]->getPages(); + if($pages) $idpage=$pages[0]->getId(); + } + } + // Permissions $user=$this->getUser(); if($access=="config") { @@ -278,7 +293,8 @@ class ProjecttaskController extends Controller 'canadd' => $canadd, 'projects' => $projects, 'projecttasks' => $projecttasks, - 'files' => $files + 'files' => $files, + 'idpage' => $idpage, ]); } diff --git a/src/ninegate-1.0/src/Cadoles/PortalBundle/Resources/views/Pagewidget/viewproject.html.twig b/src/ninegate-1.0/src/Cadoles/PortalBundle/Resources/views/Pagewidget/viewproject.html.twig index 90edb129..a4f3d5ba 100644 --- a/src/ninegate-1.0/src/Cadoles/PortalBundle/Resources/views/Pagewidget/viewproject.html.twig +++ b/src/ninegate-1.0/src/Cadoles/PortalBundle/Resources/views/Pagewidget/viewproject.html.twig @@ -21,19 +21,19 @@
{% if canupdate %} - - + + {% endif %} {% if access=="config" %} {% else %} {% set idproject = "" %} - {% set url= path('cadoles_portal_user_project_view') %} + {% set url= path('cadoles_portal_user_projecttask_submit') %} {% if usage=="group" and firstproject is defined %} - {% set url= path('cadoles_portal_user_project_view',{id:firstproject}) %} + {% set url= path('cadoles_portal_user_projecttask_submit',{idproject:firstproject,page:entity.page.id}) %} {% endif %} - + {% endif %}
@@ -61,7 +61,7 @@ {% set colortask = projecttask.projecttasktag.color %} {% endif %}
- +