From 04273d0596ece471a44bd5e38e4e74231f36de4b Mon Sep 17 00:00:00 2001 From: root Date: Wed, 1 Jul 2020 15:45:29 +0200 Subject: [PATCH] nettoyage --- README.md | 3 + .../config/packages/doctrine_migrations.yaml | 6 +- src/nineskeletor-1.0/config/routes.yaml | 104 +--- src/nineskeletor-1.0/public/images/logo.png | Bin 4906 -> 14180 bytes .../src/Controller/ActivityController.php | 397 -------------- .../src/Controller/AnswerController.php | 283 ---------- .../src/Controller/DocumentController.php | 493 ------------------ .../src/Controller/HomeController.php | 14 +- .../src/Controller/MessageController.php | 268 ---------- .../src/Controller/SecurityController.php | 3 +- src/nineskeletor-1.0/src/Entity/Activity.php | 282 ---------- src/nineskeletor-1.0/src/Entity/Answer.php | 238 --------- src/nineskeletor-1.0/src/Entity/Document.php | 242 --------- src/nineskeletor-1.0/src/Entity/Group.php | 45 +- src/nineskeletor-1.0/src/Entity/Message.php | 156 ------ src/nineskeletor-1.0/src/Entity/User.php | 147 +----- .../src/Repository/ActivityRepository.php | 42 -- .../src/Repository/AnswerRepository.php | 15 - .../src/Repository/DocumentRepository.php | 15 - .../templates/Activity/edit.html.twig | 262 ---------- .../templates/Activity/list.html.twig | 125 ----- .../templates/Answer/edit.html.twig | 301 ----------- .../templates/Answer/list.html.twig | 104 ---- .../templates/Answer/view.html.twig | 304 ----------- .../templates/Cron/edit.html.twig | 59 --- .../templates/Cron/list.html.twig | 56 -- .../templates/Cron/logs.html.twig | 19 - .../templates/Crop/crop01.html.twig | 35 -- .../templates/Crop/crop02.html.twig | 71 --- .../templates/Document/close.html.twig | 8 - .../templates/Document/edit.html.twig | 52 -- .../templates/Document/record.html.twig | 302 ----------- .../templates/Document/render.html.twig | 18 - .../templates/Document/upload.html.twig | 52 -- .../templates/Document/view.html.twig | 55 -- .../templates/Form/fields.html.twig | 175 ------- .../templates/Group/edit.html.twig | 64 --- .../templates/Group/list.html.twig | 51 -- .../templates/Home/admin.html.twig | 7 - .../templates/Home/home.html.twig | 6 - .../templates/Home/login.html.twig | 36 -- .../templates/Home/mail.html.twig | 9 - .../templates/Message/close.html.twig | 8 - .../templates/Message/group.html.twig | 9 - .../templates/Message/message.html.twig | 95 ---- .../templates/User/edit.html.twig | 136 ----- .../templates/User/list.html.twig | 75 --- src/nineskeletor-1.0/templates/base.html.twig | 331 ------------ tmpl/nineskeletor.cron | 1 + 49 files changed, 26 insertions(+), 5553 deletions(-) delete mode 100755 src/nineskeletor-1.0/src/Controller/ActivityController.php delete mode 100755 src/nineskeletor-1.0/src/Controller/AnswerController.php delete mode 100755 src/nineskeletor-1.0/src/Controller/DocumentController.php delete mode 100755 src/nineskeletor-1.0/src/Controller/MessageController.php delete mode 100644 src/nineskeletor-1.0/src/Entity/Activity.php delete mode 100644 src/nineskeletor-1.0/src/Entity/Answer.php delete mode 100644 src/nineskeletor-1.0/src/Entity/Document.php delete mode 100644 src/nineskeletor-1.0/src/Entity/Message.php delete mode 100644 src/nineskeletor-1.0/src/Repository/ActivityRepository.php delete mode 100644 src/nineskeletor-1.0/src/Repository/AnswerRepository.php delete mode 100644 src/nineskeletor-1.0/src/Repository/DocumentRepository.php delete mode 100755 src/nineskeletor-1.0/templates/Activity/edit.html.twig delete mode 100644 src/nineskeletor-1.0/templates/Activity/list.html.twig delete mode 100755 src/nineskeletor-1.0/templates/Answer/edit.html.twig delete mode 100644 src/nineskeletor-1.0/templates/Answer/list.html.twig delete mode 100755 src/nineskeletor-1.0/templates/Answer/view.html.twig delete mode 100644 src/nineskeletor-1.0/templates/Cron/edit.html.twig delete mode 100644 src/nineskeletor-1.0/templates/Cron/list.html.twig delete mode 100644 src/nineskeletor-1.0/templates/Cron/logs.html.twig delete mode 100644 src/nineskeletor-1.0/templates/Crop/crop01.html.twig delete mode 100644 src/nineskeletor-1.0/templates/Crop/crop02.html.twig delete mode 100755 src/nineskeletor-1.0/templates/Document/close.html.twig delete mode 100755 src/nineskeletor-1.0/templates/Document/edit.html.twig delete mode 100644 src/nineskeletor-1.0/templates/Document/record.html.twig delete mode 100644 src/nineskeletor-1.0/templates/Document/render.html.twig delete mode 100644 src/nineskeletor-1.0/templates/Document/upload.html.twig delete mode 100644 src/nineskeletor-1.0/templates/Document/view.html.twig delete mode 100644 src/nineskeletor-1.0/templates/Form/fields.html.twig delete mode 100755 src/nineskeletor-1.0/templates/Group/edit.html.twig delete mode 100644 src/nineskeletor-1.0/templates/Group/list.html.twig delete mode 100644 src/nineskeletor-1.0/templates/Home/admin.html.twig delete mode 100644 src/nineskeletor-1.0/templates/Home/home.html.twig delete mode 100755 src/nineskeletor-1.0/templates/Home/login.html.twig delete mode 100644 src/nineskeletor-1.0/templates/Home/mail.html.twig delete mode 100755 src/nineskeletor-1.0/templates/Message/close.html.twig delete mode 100644 src/nineskeletor-1.0/templates/Message/group.html.twig delete mode 100644 src/nineskeletor-1.0/templates/Message/message.html.twig delete mode 100755 src/nineskeletor-1.0/templates/User/edit.html.twig delete mode 100644 src/nineskeletor-1.0/templates/User/list.html.twig delete mode 100644 src/nineskeletor-1.0/templates/base.html.twig create mode 100644 tmpl/nineskeletor.cron diff --git a/README.md b/README.md index 0036eb1..f6aeb7b 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,8 @@ Puis effectuer les changement suivants - Renommer sso/filtres/nineskeletor.ini en sso/filtres/nineXXXX.ini - Renommer sso/filtres/nineskeletor_apps.ini en sso/filtres/nineXXXX_apps.ini - Modifier sso/filtres/nineXXXX_apps.ini et remplacer tout les nineskeletor en nineXXXX +- Renommer tmpl/nineskeletor.cron en tmpl/nineXXXX.cron +- Modifier tmpl/nineXXXX.cron et remplacer tout les nineskeletor en nineXXXX - Renommer tmpl/nineskeletor-apache.conf en tmpl/nineXXXX-apache.conf - Modifier tmpl/nineXXXX-apache.conf et remplacer tout les nineskeletor en nineXXXX - Renommer tmpl/nineskeletor-db.yml en tmpl/nineXXXX-db.yml @@ -21,6 +23,7 @@ Puis effectuer les changement suivants - Modifier src/webpack.config.js et remplacer tout les nineskeletor en nineXXXX - Renommer tmpl/nineskeletor-proxy.sh en tmpl/nineXXXX-proxy.sh - Modifier Makefile et remplacer tout les nineskeletor en nineXXXX +- Remplacer logo public/images/logo.png 2= Compilier les asset installer npm diff --git a/src/nineskeletor-1.0/config/packages/doctrine_migrations.yaml b/src/nineskeletor-1.0/config/packages/doctrine_migrations.yaml index 3bf0fbc..49c3517 100644 --- a/src/nineskeletor-1.0/config/packages/doctrine_migrations.yaml +++ b/src/nineskeletor-1.0/config/packages/doctrine_migrations.yaml @@ -1,5 +1,3 @@ doctrine_migrations: - dir_name: '%kernel.project_dir%/src/Migrations' - # namespace is arbitrary but should be different from App\Migrations - # as migrations classes should NOT be autoloaded - namespace: DoctrineMigrations + migrations_paths: + 'DoctrineMigrations': '%kernel.project_dir%/src/Migrations' \ No newline at end of file diff --git a/src/nineskeletor-1.0/config/routes.yaml b/src/nineskeletor-1.0/config/routes.yaml index 8299d64..b429c86 100644 --- a/src/nineskeletor-1.0/config/routes.yaml +++ b/src/nineskeletor-1.0/config/routes.yaml @@ -3,6 +3,10 @@ app_home: path: / defaults: { _controller: App\Controller\HomeController:home } +app_admin: + path: /admin/home + defaults: { _controller: App\Controller\HomeController:admin } + app_ckeditor_upload: path: /user/activity/upload defaults: { _controller: App\Controller\HomeController:upload } @@ -105,103 +109,3 @@ app_group_delete: app_group_select: path: /user/group/select defaults: { _controller: App\Controller\GroupController:select } - -#== Activity ======================================================================================================== -app_activity: - path: /user/activity - defaults: { _controller: App\Controller\ActivityController:list } - -app_activity_submit: - path: /master/activity/submit - defaults: { _controller: App\Controller\ActivityController:submit } - -app_activity_update: - path: /master/activity/update/{id} - defaults: { _controller: App\Controller\ActivityController:update } - -app_activity_delete: - path: /master/activity/delete/{id} - defaults: { _controller: App\Controller\ActivityController:delete } - -app_activity_archive: - path: /master/activity/archive/{id} - defaults: { _controller: App\Controller\ActivityController:archive } - -app_activity_activeactivity: - path: /user/activity/activeactivity - defaults: { _controller: App\Controller\ActivityController:activeactivity } - -#== Answer ======================================================================================================== -app_answer_update: - path: /user/answer/update/{id} - defaults: { _controller: App\Controller\AnswerController:update } - -app_answer_view: - path: /master/answer/view/{id} - defaults: { _controller: App\Controller\AnswerController:view } - -app_answer_select: - path: /master/answer/select - defaults: { _controller: App\Controller\AnswerController:select } - -#== Document ======================================================================================================== -app_document_upload: - path: /user/document/{entity}/{id}/upload - defaults: { _controller: App\Controller\DocumentController:upload } - -app_document_record: - path: /user/document/{entity}/{id}/record - defaults: { _controller: App\Controller\DocumentController:record } - -app_document_recordupload: - path: /user/document/{entity}/{id}/recordupload - defaults: { _controller: App\Controller\DocumentController:recordupload } - -app_document_listmaster: - path: /user/document/{entity}/{id}/listmaster - defaults: { _controller: App\Controller\DocumentController:list, master: true } - -app_document_listuser: - path: /user/document/{entity}/{id}/listuser - defaults: { _controller: App\Controller\DocumentController:list, master: false } - -app_document_view: - path: /user/document/{entity}/{id}/view - defaults: { _controller: App\Controller\DocumentController:view } - -app_document_show: - path: /user/document/{entity}/{id}/show - defaults: { _controller: App\Controller\DocumentController:show } - -app_document_update: - path: /user/document/{entity}/{id}/update - defaults: { _controller: App\Controller\DocumentController:update } - -app_document_delete: - path: /user/document/{entity}/{id}/delete - defaults: { _controller: App\Controller\DocumentController:delete } - -#== Message ======================================================================================================== -app_message_unread: - path: /user/message/unread - defaults: { _controller: App\Controller\MessageController:unread } - -app_message: - path: /user/message/{id} - defaults: { _controller: App\Controller\MessageController:message } - -app_message_load: - path: /user/message/{id}/load - defaults: { _controller: App\Controller\MessageController:load } - -app_message_delete: - path: /user/message/{id}/delete - defaults: { _controller: App\Controller\MessageController:delete } - -app_message_submit: - path: /user/message/{id}/submit - defaults: { _controller: App\Controller\MessageController:submit } - -app_message_group: - path: /master/message/{id}/group - defaults: { _controller: App\Controller\MessageController:messagegroup } diff --git a/src/nineskeletor-1.0/public/images/logo.png b/src/nineskeletor-1.0/public/images/logo.png index 7596de68dc8ab200557b86fb8ee18134fa2b9785..db76093055bcd4b7e2f9fb368d162216628c540c 100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bW#F*2Y>@!=IfJn_*~&Ty!z&kzbJy=HT~bxzn-UwkjzsL>7C)Y# z800&VSp3#%R6bCp7GN?L4?J-v2>*7ahnJO#Kt2@E!=(gsctO=8921>gd*hs52f8D+klv^nT3_wT2Wrp)OlI`mCqJb#KMUZ#TG~-782D*G)Fa_dk9}Ax8)_1-;QnA{%WDU zdex?G1Tc<>Q1Vdk=M~f=xKg?X!Osc&Ol0HEef3iDf@qaW4UnnKjI0LGF1&jnKI+}%WUKfqrC)a*x**8;`}2rrAsOEFor z_woao>XC*Jz-0J??}buH^9}-UBcg2pZmh9IM@7^g0rtd$*1pMyFg5}WCxFXIzO!pN zX>^-F-6kYk6w5j&m8ej0W5PHLlDA3dEy-wa#czG|bcM>Q3JouS%MlSW5ANz<3alaU zN)W9S;2L7Ig18l=TEU30;t*J6kM&e+D^@lXOb8D{)UYTF6UzVy0|IqiG2V-GK6bL+ coVdC2{~)GsJNc!%`Tzg`07*qoM6N<$f}7DWPyhe` diff --git a/src/nineskeletor-1.0/src/Controller/ActivityController.php b/src/nineskeletor-1.0/src/Controller/ActivityController.php deleted file mode 100755 index 06d9d24..0000000 --- a/src/nineskeletor-1.0/src/Controller/ActivityController.php +++ /dev/null @@ -1,397 +0,0 @@ -mail = $mail; } - - public function list(Request $request) - { - $em = $this->getDoctrine()->getManager(); - $user=$this->getUser(); - $activeactivity=$this->get('session')->get('activeactivity'); - - // View master - if ($user->hasRole('ROLE_ADMIN')||$user->hasRole('ROLE_MASTER')) { - $datas = $em->getRepository($this->entity)->findAllMasterActivityActive($user,$activeactivity); - - return $this->render($this->render.'list.html.twig',[ - $this->data."s" => $datas, - "useheader" => true, - "usesidebar" => ($this->getUser()->hasRole("ROLE_ADMIN")), - ]); - } - // View student - elseif($user->hasRole('ROLE_STUDENT')) { - $user=$this->getUser(); - - // Recherche de l'ensemble des activités distribuées des groupes de l'utilisateur - $datas=new ArrayCollection(); - foreach($user->getGroups() as $group) { - $activitys = $em->getRepository($this->entity)->findAllGroupActivityActive($group,$activeactivity); - - foreach($activitys as $activity) { - if($activeactivity&&$activity->getStatus()==10) continue; - if(!$activeactivity&&$activity->getStatus()<10) continue; - - - // Recherche d'une réponse pour l'utilistaeur - $answer=$em->getRepository("App:Answer")->findOneBy(["user"=>$user, "activity" => $activity]); - - // Si pas de réponse on initialise une réponse à vue - if(!$answer) { - $answer=new Answer(); - $answer->setStatus(0); - $answer->setUser($user); - $answer->setActivity($activity); - $em->persist($answer); - $em->flush(); - } - - // Si réponse non vu on la place en vu - if($answer->getStatus()==-1) { - $answer->setStatus(0); - $em->persist($answer); - $em->flush(); - - // Message - $message = new Message; - $message->setMessage("Vu"); - $message->setDeletable(false); - $message->setUser($user); - $message->setAnswer($answer); - $message->addReader($user); - $em->persist($message); - $em->flush(); - } - - $activity->setAnsweruser($answer); - $datas->add($activity); - } - } - return $this->render('Answer/list.html.twig',[ - $this->data."s" => $datas, - "useheader" => true, - "usesidebar" => ($this->getUser()->hasRole("ROLE_ADMIN")), - ]); - } - } - - public function submit(Request $request) - { - // Initialisation de l'enregistrement - $em = $this->getDoctrine()->getManager(); - $data = new Entity(); - $data->setStatus(0); - - // Création du formulaire - $form = $this->createForm(Form::class,$data,array("mode"=>"submit","status"=>$data->getStatus())); - - // Récupération des data du formulaire - $form->handleRequest($request); - - // Sur erreur - $this->getErrorForm(null,$form,$request,$data,"submit"); - - // Sur validation - if ($form->get('submit')->isClicked() && $form->isValid()) { - $data = $form->getData(); - $data->setUser($this->getUser()); - $em->persist($data); - $em->flush(); - - // Retour à la liste - return $this->redirectToRoute($this->route."_update",["id"=>$data->getId()]); - } - - // Affichage du formulaire - return $this->render($this->render.'edit.html.twig', [ - 'useheader' => true, - 'usesidebar' => ($this->getUser()->hasRole("ROLE_ADMIN")), - $this->data => $data, - 'mode' => 'submit', - 'form' => $form->createView() - ]); - } - - public function update($id,Request $request) - { - // Initialisation de l'enregistrement - $em = $this->getDoctrine()->getManager(); - $data=$em->getRepository($this->entity)->find($id); - - // Controle accès - if(!$data) - return $this->redirectToRoute($this->route); - else { - if(!$this->getUser()->Hasrole("ROLE_ADMIN")&&$this->getUser()!=$data->getUser()) - return $this->redirectToRoute($this->route); - } - - // Création du formulaire - $form = $this->createForm(Form::class,$data,array("mode"=>"update","status"=>$data->getStatus())); - - // Récupération des data du formulaire - $form->handleRequest($request); - - // Sur erreur - $this->getErrorForm(null,$form,$request,$data,"update"); - - $valid=false; - if($form->isSubmitted()&&$form->isValid()) { - if($form->get('submit')->isClicked()) - $valid=true; - - if ($form->has('distribution') && $form->get('distribution')->isClicked()) - $valid=true; - - if ($form->has('archiving') && $form->get('archiving')->isClicked()) - $valid=true; - } - - // Sur validation - if ($valid) { - $data = $form->getData(); - - // Distribution de l'activité - if ($form->has('distribution') && $form->get('distribution')->isClicked()) { - // Si réouverture - if($data->getStatus()==10) { - // Message - foreach($data->getAnswers() as $answer) { - $message=new Message; - $message->setMessage("Réouverture de l'Activité"); - $message->setDeletable(false); - $message->setUser($data->getUser()); - $message->setAnswer($answer); - $message->addReader($data->getUser()); - $em->persist($message); - $em->flush(); - - // Notification par mail de la distribution de l'activité - $to = $answer->getUser()->getEmail(); - $from = $data->getUser()->getEmail(); - $subject="Nineschool : Réouverture de l'activité"; - $body ="Activité = ".$data->getName()."
"; - $body.="Professeur = ".$data->getUser()->getDisplayname()."
"; - $body.="Matière = ".$data->getSubject()."
"; - $body.="Url = ".$this->generateUrl('app_answer_update', ["id"=>$answer->getId()], UrlGeneratorInterface::ABSOLUTE_URL); - - $this->mail->sendEmail($subject, $body, $to, $from); - } - } - - // Passage à distribuer - $data->setStatus(1); - } - - // Archivage de l'activité - if ($form->has('archiving') && $form->get('archiving')->isClicked()) { - $data->setStatus(10); - - // Message - foreach($data->getAnswers() as $answer) { - $message=new Message; - $message->setMessage("Archivage de l'Activité"); - $message->setDeletable(false); - $message->setUser($data->getUser()); - $message->setAnswer($answer); - $message->addReader($data->getUser()); - $message->addReader($answer->getUser()); - $em->persist($message); - $em->flush(); - - } - } - - $em->persist($data); - $em->flush(); - - // On initialise une réponse pour l'ensemble des élèves - if($data->getStatus()>0&&$data->getStatus()<10) - $this->initAnswer($data); - - // Retour à la liste - return $this->redirectToRoute($this->route); - } - - // Affichage du formulaire - return $this->render($this->render.'edit.html.twig', [ - 'useheader' => true, - 'usesidebar' => ($this->getUser()->hasRole("ROLE_ADMIN")), - $this->data => $data, - 'mode' => 'update', - 'form' => $form->createView() - ]); - } - - public function delete($id,Request $request) - { - // Initialisation de l'enregistrement - $em = $this->getDoctrine()->getManager(); - $data=$em->getRepository($this->entity)->find($id); - - // Controle accès - if(!$data) - return $this->redirectToRoute($this->route); - else { - if(!$this->getUser()->Hasrole("ROLE_ADMIN")&&$this->getUser()!=$data->getUser()) - return $this->redirectToRoute($this->route); - } - - // Controle avant suppression - $haveerror=false; - if($data->getStatus()!=0&&$data->getStatus()!=10) { - $request->getSession()->getFlashBag()->add("error", 'Cette activité a été distribué vous ne pouvez plus la supprimer'); - $haveerror=true; - } - - if($haveerror) { - return $this->redirectToRoute($this->route."_update",["id"=>$id]); - } - else { - $em->remove($data); - $em->flush(); - - // Retour à la liste - return $this->redirectToRoute($this->route); - } - } - - public function archive($id,Request $request) - { - // Initialisation de l'enregistrement - $em = $this->getDoctrine()->getManager(); - $data=$em->getRepository($this->entity)->find($id); - - // Controle accès - if(!$data) - return $this->redirectToRoute($this->route); - else { - if(!$this->getUser()->Hasrole("ROLE_ADMIN")&&$this->getUser()!=$data->getUser()) - return $this->redirectToRoute($this->route); - } - - // Message - foreach($data->getAnswers() as $answer) { - $message=new Message; - $message->setMessage("Archivage de l'Activité"); - $message->setDeletable(false); - $message->setUser($data->getUser()); - $message->setAnswer($answer); - $message->addReader($data->getUser()); - $message->addReader($answer->getUser()); - $em->persist($message); - $em->flush(); - } - - $data->setStatus(10); - $em->persist($data); - $em->flush(); - - // Retour à la liste - return $this->redirectToRoute($this->route); - } - - protected function initAnswer($activity) { - $em = $this->getDoctrine()->getManager(); - - // Pour chaque élève - $group=$activity->getGroup(); - foreach($group->getUsers() as $user) { - // Existe-t-il une réponse pour l'élève - if($user->hasRole("ROLE_STUDENT")) { - $answer=$em->getRepository("App:Answer")->findOneBy(["user"=>$user,"activity"=>$activity]); - if(!$answer) { - $answer=new Answer; - $answer->setActivity($activity); - $answer->setUser($user); - $answer->setStatus(-1); - - $em->persist($answer); - $em->flush(); - - // Message - $message=new Message; - $message->setMessage("Distribution de l'Activité"); - $message->setDeletable(false); - $message->setUser($activity->getUser()); - $message->setAnswer($answer); - $message->addReader($activity->getUser()); - - $em->persist($message); - $em->flush(); - - // Notification par mail de la distribution de l'activité - $to = $user->getEmail(); - $from = $activity->getUser()->getEmail(); - $subject="Nineschool : Nouvelle Activité à réaliser"; - $body ="Activité = ".$activity->getName()."
"; - $body.="Professeur = ".$activity->getUser()->getDisplayname()."
"; - $body.="Matière = ".$activity->getSubject()."
"; - $body.="Url = ".$this->generateUrl('app_answer_update', ["id"=>$answer->getId()], UrlGeneratorInterface::ABSOLUTE_URL); - - $this->mail->sendEmail($subject, $body, $to, $from); - } - } - } - } - - public function activeactivity() { - $this->get('session')->set('activeactivity',!$this->get('session')->get('activeactivity')); - return $this->redirectToRoute($this->route); - } - - protected function getErrorForm($id,$form,$request,$data,$mode) { - if ($form->get('submit')->isClicked()&&$mode=="delete") { - } - - if ($form->get('submit')->isClicked() && $mode=="submit") { - } - - if ($form->has('archiving') && $form->get('archiving')->isClicked()) { - // On s'assure que l'ensemble des réponses sont corrigés sinon message de conformation - $ok=true; - foreach($data->getAnswers() as $answer) { - if($answer->getStatus()!=15) { - $ok=false; - } - } - if(!$ok) { - $url=$this->generateUrl('app_activity_archive', ["id"=>$data->getId()]); - $form->addError(new FormError("L'ensemble des activités non pas été corrigées. Souhaitez-vous archiver l'activité malgré tout ?
Forcer l'Archivage")); - } - } - - if (($form->get('submit')->isClicked() || ($form->has('archiving') && $form->get('archiving')->isClicked()) ) && !$form->isValid()) { - $this->get('session')->getFlashBag()->clear(); - - $errors = $form->getErrors(); - foreach( $errors as $error ) { - $request->getSession()->getFlashBag()->add("error", $error->getMessage()); - } - } - } -} diff --git a/src/nineskeletor-1.0/src/Controller/AnswerController.php b/src/nineskeletor-1.0/src/Controller/AnswerController.php deleted file mode 100755 index 62e2d97..0000000 --- a/src/nineskeletor-1.0/src/Controller/AnswerController.php +++ /dev/null @@ -1,283 +0,0 @@ -mail = $mail; } - - public function update($id,Request $request) - { - // Initialisation de l'enregistrement - $em = $this->getDoctrine()->getManager(); - $data=$em->getRepository($this->entity)->find($id); - - // Controle accès - if(!$data) - return $this->redirectToRoute($this->route); - else { - if(!$this->getUser()->Hasrole("ROLE_ADMIN")&&$this->getUser()!=$data->getActivity()->getUser()&&$this->getUser()!=$data->getUser()) - return $this->redirectToRoute($this->route); - } - - // Passer la réponse en cours si l'utilisateur en cours est l'élève - if($this->getUser()==$data->getUser()&&$data->getStatus()==0) { - $data->setStatus(1); - $em->persist($data); - $em->flush(); - - // Message - $message = new Message; - $message->setMessage("En cours"); - $message->setDeletable(false); - $message->setUser($data->getUser()); - $message->setAnswer($data); - $message->addReader($data->getUser()); - $em->persist($message); - $em->flush(); - } - - // Création du formulaire - $form = $this->createForm(Form::class,$data,array("mode"=>"update","status"=>$data->getStatus(),"activitystatus"=>$data->getActivity()->getStatus())); - - // Récupération des data du formulaire - $form->handleRequest($request); - - // Sur erreur - $this->getErrorForm(null,$form,$request,$data,"update"); - - $valid=false; - if($form->isSubmitted()&&$form->isValid()) { - if($form->get('submit')->isClicked()) - $valid=true; - - if ($form->has('returned') && $form->get('returned')->isClicked()) - $valid=true; - } - - // Sur validation - if ($valid) { - $data = $form->getData(); - - // Retour de la réponse - if ($form->has('returned') && $form->get('returned')->isClicked()){ - $data->setStatus(10); - - // Message - $message=new Message; - $message->setMessage("Activité rendue"); - $message->setDeletable(false); - $message->setUser($data->getUser()); - $message->setAnswer($data); - $message->addReader($data->getUser()); - - $em->persist($message); - $em->flush(); - - // Notification par mail du rendu de l'activité - $to = $data->getActivity()->getUser()->getEmail(); - $from = $data->getUser()->getEmail(); - $subject="Nineschool : Activité rendue"; - $body ="Activité = ".$data->getActivity()->getName()."
"; - $body.="Elève = ".$data->getUser()->getDisplayname()."
"; - $body.="Matière = ".$data->getActivity()->getSubject()."
"; - $body.="Url = ".$this->generateUrl('app_answer_view', ["id"=>$data->getId()], UrlGeneratorInterface::ABSOLUTE_URL); - - $this->mail->sendEmail($subject, $body, $to, $from); - } - - - $em->persist($data); - $em->flush(); - - // Retour à la liste - return $this->redirectToRoute("app_activity"); - } - - // Affichage du formulaire - return $this->render($this->render.'edit.html.twig', [ - 'useheader' => true, - 'usesidebar' => ($this->getUser()->hasRole("ROLE_ADMIN")), - $this->data => $data, - 'mode' => 'update', - 'form' => $form->createView() - ]); - } - - public function view($id,Request $request) { - // Initialisation de l'enregistrement - $em = $this->getDoctrine()->getManager(); - $data=$em->getRepository($this->entity)->find($id); - - // Controle accès - if(!$data) - return $this->redirectToRoute($this->route); - else { - if(!$this->getUser()->Hasrole("ROLE_ADMIN")&&$this->getUser()!=$data->getActivity()->getUser()) - return $this->redirectToRoute($this->route); - } - - // Création du formulaire - $form = $this->createForm(Corrected::class,$data,array("mode"=>"update","status"=>$data->getStatus(),"activitystatus"=>$data->getActivity()->getStatus())); - - // Récupération des data du formulaire - $form->handleRequest($request); - - // Sur erreur - $this->getErrorForm(null,$form,$request,$data,"update"); - - $valid=false; - if($form->isSubmitted()&&$form->isValid()) { - if($form->get('submit')->isClicked()) - $valid=true; - - if ($form->has('corrected') && $form->get('corrected')->isClicked()) - $valid=true; - - if ($form->has('canceled') && $form->get('canceled')->isClicked()) - $valid=true; - } - - // Sur validation - if ($valid) { - $data = $form->getData(); - - // Retour de la réponse - if ($form->has('corrected') && $form->get('corrected')->isClicked()) { - $data->setStatus(15); - - // Message - $message=new Message; - $message->setMessage("Activité corrigée"); - $message->setDeletable(false); - $message->setUser($this->getUser()); - $message->setAnswer($data); - $message->addReader($this->getUser()); - - $em->persist($message); - $em->flush(); - - // Notification par mail de la correction de l'activité - $to = $data->getActivity()->getUser()->getEmail(); - $from = $data->getUser()->getEmail(); - $subject="Nineschool : Activité réouverte"; - $body ="Activité = ".$data->getActivity()->getName()."
"; - $body.="Professeur = ".$data->getActivity()->getUser()->getDisplayname()."
"; - $body.="Matière = ".$data->getActivity()->getSubject()."
"; - $body.="Url = ".$this->generateUrl('app_answer_update', ["id"=>$data->getId()], UrlGeneratorInterface::ABSOLUTE_URL); - - $this->mail->sendEmail($subject, $body, $to, $from); - } - - // Annuler le rendu de l'élève - if ($form->has('canceled') && $form->get('canceled')->isClicked()) { - $data->setStatus(2); - - // Message - $message=new Message; - $message->setMessage("Activité réouverte"); - $message->setDeletable(false); - $message->setUser($this->getUser()); - $message->setAnswer($data); - $message->addReader($this->getUser()); - - $em->persist($message); - $em->flush(); - - // Notification par mail de la réouverture de l'activité - $to = $data->getActivity()->getUser()->getEmail(); - $from = $data->getUser()->getEmail(); - $subject="Nineschool : Activité réouverte"; - $body ="Activité = ".$data->getActivity()->getName()."
"; - $body.="Professeur = ".$data->getActivity()->getUser()->getDisplayname()."
"; - $body.="Matière = ".$data->getActivity()->getSubject()."
"; - $body.="Url = ".$this->generateUrl('app_answer_update', ["id"=>$data->getId()], UrlGeneratorInterface::ABSOLUTE_URL); - - $this->mail->sendEmail($subject, $body, $to, $from); - } - - - $em->persist($data); - $em->flush(); - - // Retour à la liste - return $this->redirectToRoute("app_activity"); - } - - // Affichage du formulaire - return $this->render($this->render.'view.html.twig', [ - 'useheader' => true, - 'usesidebar' => ($this->getUser()->hasRole("ROLE_ADMIN")), - $this->data => $data, - 'mode' => 'update', - 'form' => $form->createView() - ]); - } - - public function select(Request $request) { - // S'assurer que c'est un appel ajax - if (!$request->isXmlHttpRequest()) { - return new JsonResponse(array('message' => 'Interdit'), 400); - } - - $output=array(); - $em = $this->getDoctrine()->getManager(); - $page_limit=$request->query->get('page_limit'); - $q=$request->query->get('q'); - $id=$request->query->get('activity'); - - $activity=$em->getRepository("App:Activity")->find($id); - if(!$activity) { - $response = new Response(json_encode($ret_string)); - $response->headers->set('Content-Type', 'application/json'); - return $response; - } - - $datas=$activity->getAnswers(); - foreach($datas as $data) { - array_push($output,array("id"=>$data->getId(),"text"=>$data->getDisplayname())); - } - - $ret_string["results"]=$output; - $response = new Response(json_encode($ret_string)); - $response->headers->set('Content-Type', 'application/json'); - return $response; - } - - protected function getErrorForm($id,$form,$request,$data,$mode) { - if ($form->get('submit')->isClicked()&&$mode=="delete") { - } - - if ($form->get('submit')->isClicked() && $mode=="submit") { - } - - if ($form->get('submit')->isClicked() && !$form->isValid()) { - $this->get('session')->getFlashBag()->clear(); - - $errors = $form->getErrors(); - foreach( $errors as $error ) { - $request->getSession()->getFlashBag()->add("error", $error->getMessage()); - } - } - } -} diff --git a/src/nineskeletor-1.0/src/Controller/DocumentController.php b/src/nineskeletor-1.0/src/Controller/DocumentController.php deleted file mode 100755 index 3893e0d..0000000 --- a/src/nineskeletor-1.0/src/Controller/DocumentController.php +++ /dev/null @@ -1,493 +0,0 @@ -ctrlAccessentity($entity,$id,"update")) return $this->redirectToRoute("app_activity"); - - // Rendu - return $this->render($this->render.'upload.html.twig',[ - 'useheader' => false, - 'usesidebar' => false, - 'entity' => $entity, - 'id' => $id, - ]); - } - - public function record($entity,$id) - { - // Controles d'accès en fonction de l'entité d'arrivé - if(!$this->ctrlAccessentity($entity,$id,"update")) return $this->redirectToRoute("app_activity"); - - // Rendu - return $this->render($this->render.'record.html.twig',[ - 'useheader' => false, - 'usesidebar' => false, - 'entity' => $entity, - 'id' => $id, - ]); - } - - public function recordupload($entity,$id,Request $request) - { - // Controles d'accès en fonction de l'entité d'arrivé - if(!$this->ctrlAccessentity($entity,$id,"update")) return $this->redirectToRoute("app_activity"); - - // Récupérper l'enregistrement - $content = $request->getContent(); - $name = $request->get('name'); - - // Destination - $directory = $this->getParameter('kernel.project_dir')."/uploads/document/".$entity."/".$id; - $filename = uniqid().".ogg"; - - // Ecrire sur le filesystem - $fs = new Filesystem(); - $fs->mkdir($directory); - $fp = fopen($directory."/".$filename, 'wb'); - fwrite($fp, $content); - fclose($fp); - - // Création du document - $em = $this->getDoctrine()->getManager(); - $document=new Entity(); - $document->setName($name); - $document->setFilename($filename); - $document->setRoworder(99999); - $document->setExtention("ogg"); - $document->setMinetype("video/webm"); - $document->setHavethumb(false); - $document->setEntity($entity); - - - // Rattacher le document à l'entity - switch($entity) { - case "activity": - $activity=$em->getRepository("App:Activity")->find($id); - $document->setActivity($activity); - break; - - case "corrected": - $corrected=$em->getRepository("App:Activity")->find($id); - $document->setCorrected($corrected); - break; - - case "answer": - $answer=$em->getRepository("App:Answer")->find($id); - $document->setAnswer($answer); - break; - - case "answercorrected": - $answer=$em->getRepository("App:Answer")->find($id); - $document->setAnswercorrected($answer); - break; - } - - // Sauvegarde - $em->persist($document); - $em->flush(); - - // Retour - return new Response(json_encode([])); - } - - public function list($entity,$id,$master) { - // Controles d'accès en fonction de l'entité d'arrivé - if(!$this->ctrlAccessentity($entity,$id,"view")) return $this->redirectToRoute("app_activity"); - - // Récupérer les documents - $em = $this->getDoctrine()->getManager(); - $documents=null; - switch($entity) { - case "activity": - $activity=$em->getRepository("App:Activity")->find($id); - if($activity) { - $documents=$em->getRepository("App:Document")->findBy(["activity"=>$activity]); - if($activity->getStatus()!=0) $master=false; - } - break; - - case "corrected": - $corrected=$em->getRepository("App:Activity")->find($id); - if($corrected) { - $documents=$em->getRepository("App:Document")->findBy(["corrected"=>$corrected]); - if($corrected->getStatus()==10) $master=false; - } - - break; - - case "answer": - $answer=$em->getRepository("App:Answer")->find($id); - if($answer) { - $documents=$em->getRepository("App:Document")->findBy(["answer"=>$answer]); - if($answer->getStatus()>=10) - $master=false; - if($answer->getActivity()->getStatus()==10) - $master=false; - } - break; - - case "answercorrected": - $answercorrected=$em->getRepository("App:Answer")->find($id); - if($answercorrected) { - $documents=$em->getRepository("App:Document")->findBy(["answercorrected"=>$answercorrected]); - if($answercorrected->getStatus()>=15) - $master=false; - if($answercorrected->getActivity()->getStatus()==10) - $master=false; - } - break; - } - - // Construire le tableau d'id - $output=[]; - - foreach($documents as $document) { - $tmp=[ - "id"=>$document->getId(), - "html"=>$this->thumb($document->getId(),$master), - ]; - - array_push($output,$tmp); - - } - - // Retour - return new Response(json_encode($output)); - } - - public function thumb($id,$master) - { - $em = $this->getDoctrine()->getManager(); - $data=$em->getRepository($this->entity)->find($id); - - $title=$data->getName(); - $filename=$data->getFilename(); - $description=$data->getDescription(); - $extention=$data->getExtention(); - $minetype=$data->getMinetype(); - $minefamily=explode("/",$minetype)[0]; - - switch($data->getEntity()) { - case "activity" : $identity=$data->getActivity()->getId(); break; - case "corrected" : $identity=$data->getCorrected()->getId(); break; - case "answer" : $identity=$data->getAnswer()->getId(); break; - case "answercorrected" : $identity=$data->getAnswercorrected()->getId(); break; - } - if($data->getHavethumb()) { - $directory = $this->getParameter('kernel.project_dir') . '/uploads/document/'.$data->getEntity()."/".$identity; - $dataimg = file_get_contents($directory."/thumb/".$filename); - $url="data:image/" . $extention . ";base64," . base64_encode($dataimg); - } - else { - $url="/".$this->getParameter("appAlias")."/images/files/".$extention.".png"; - } - - - return $this->renderView($this->render.'render.html.twig',[ - 'entity' => $data->getEntity(), - 'id' => $id, - 'title' => $title, - 'description' => $description, - 'url' => $url, - 'extention' => $extention, - 'minefamily' => $minefamily, - 'master' => $master, - ]); - } - - public function view($entity,$id) { - // Controles d'accès sur le document - if(!$this->ctrlAccessdocument($entity,$id,"view")) return $this->redirectToRoute("app_activity"); - - $em = $this->getDoctrine()->getManager(); - $data=$em->getRepository($this->entity)->find($id); - - switch($data->getEntity()) { - case "activity" : $identity=$data->getActivity()->getId(); break; - case "corrected" : $identity=$data->getCorrected()->getId(); break; - case "answer" : $identity=$data->getAnswer()->getId(); break; - case "answercorrected" : $identity=$data->getAnswercorrected()->getId(); break; - } - - $directory= $this->getParameter('kernel.project_dir') . '/uploads/document/'.$entity."/".$identity; - $url=$directory."/".$data->getFilename(); - $file = new file($url); - - $minetype=$file->getMimeType(); - $minefamily=explode("/",$minetype)[0]; - - if($minefamily=="text" || $minefamily=="image") { - $image=""; - if($minefamily=="image") { - $image = "data:image/" . $file->getExtension() . ";base64," . base64_encode(file_get_contents($url)); - } - - return $this->render($this->render.'view.html.twig',[ - 'useheader' => false, - 'usesidebar' => false, - 'entity' => $entity, - 'id' => $id, - 'minefamily' => $minefamily, - 'image' => $image - ]); - } - else { - $response = new BinaryFileResponse($file); - $response->setContentDisposition(ResponseHeaderBag::DISPOSITION_INLINE); - - return $response; - } - } - - public function show($entity,$id) { - // Controles d'accès sur le document - if(!$this->ctrlAccessdocument($entity,$id,"view")) return $this->redirectToRoute("app_activity"); - - $em = $this->getDoctrine()->getManager(); - $data=$em->getRepository($this->entity)->find($id); - - switch($data->getEntity()) { - case "activity" : $identity=$data->getActivity()->getId(); break; - case "corrected" : $identity=$data->getCorrected()->getId(); break; - case "answer" : $identity=$data->getAnswer()->getId(); break; - case "answercorrected" : $identity=$data->getAnswercorrected()->getId(); break; - } - - $directory= $this->getParameter('kernel.project_dir') . '/uploads/document/'.$entity."/".$identity; - $url=$directory."/".$data->getFilename(); - $file = new file($url); - - $response = new BinaryFileResponse($file); - //$response->setContentDisposition(ResponseHeaderBag::DISPOSITION_INLINE); - $name= ($data->getName()==$data->getFilename()?$data->getFilename():$data->getName().'.'.$data->getExtention()); - $response->setContentDisposition( - ResponseHeaderBag::DISPOSITION_ATTACHMENT, - $name - ); - - return $response; - } - - public function update($entity,$id,Request $request) - { - // Controles d'accès sur le document - if(!$this->ctrlAccessdocument($entity,$id,"update")) return $this->redirectToRoute("app_activity"); - - // Initialisation de l'enregistrement - $em = $this->getDoctrine()->getManager(); - $data=$em->getRepository($this->entity)->find($id); - - // Création du formulaire - $form = $this->createForm(Form::class,$data,array("mode"=>"update")); - - // Récupération des data du formulaire - $form->handleRequest($request); - - // Sur validation - if ($form->get('submit')->isClicked() && $form->isValid()) { - $data = $form->getData(); - $em->persist($data); - $em->flush(); - - return $this->render($this->render.'close.html.twig'); - } - - // Affichage du formulaire - return $this->render($this->render.'edit.html.twig', [ - 'useheader' => false, - 'usesidebar' => false, - $this->data => $data, - 'mode' => 'update', - 'form' => $form->createView(), - ]); - } - - public function delete($entity,$id,Request $request) - { - // Controles d'accès sur le document - if(!$this->ctrlAccessdocument($entity,$id,"update")) return $this->redirectToRoute("app_activity"); - - // Initialisation de l'enregistrement - $em = $this->getDoctrine()->getManager(); - $data=$em->getRepository($this->entity)->find($id); - - // Création du formulaire - $form = $this->createForm(Form::class,$data,array("mode"=>"update")); - - // Récupération des data du formulaire - $form->handleRequest($request); - - if($data) { - $em->remove($data); - $em->flush(); - - return $this->render($this->render.'close.html.twig'); - } - - // Affichage du formulaire - return $this->render($this->render.'edit.html.twig', [ - 'useheader' => false, - 'usesidebar' => false, - $this->data => $data, - 'mode' => 'update', - 'form' => $form->createView(), - ]); - } - - private function ctrlAccessentity($entity,$id,$mode) { - // Initialisation de l'enregistrement - $em = $this->getDoctrine()->getManager(); - - switch($entity) { - case "activity" : - $data=$em->getRepository("App:Activity")->find($id); - if(!$data) return false; - - $group=$data->getGroup(); - $user=$this->getUser(); - $isadmin=($user->Hasrole("ROLE_ADMIN")); - $ismaster=($user==$data->getUser()); - $ismember=($group->getUsers()->contains($this->getUser())); - - // Test visualisation = tout les membres du groupes peuvent voir l'énoncé - if(!$isadmin && !$ismaster && !$ismember) - return false; - - // Membre = Test visualisation activité que si activité non brouillon - if(!$isadmin && !$ismaster && $ismember) { - if($data->getStatus()==0) - return false; - } - - // Test modification = Impossible de modifier un document si activité non brouillon - if ($mode=="update" && ((!$isadmin && !$ismaster) || $data->getStatus()>0)) - return false; - break; - - case "corrected": - $data=$em->getRepository("App:Activity")->find($id); - if(!$data) return false; - - $group=$data->getGroup(); - $user=$this->getUser(); - $isadmin=($user->Hasrole("ROLE_ADMIN")); - $ismaster=($user==$data->getUser()); - $ismember=($group->getUsers()->contains($this->getUser())); - - // Test visualisation - if(!$isadmin && !$ismaster && !$ismember) - return false; - - // Membre = Visualisation uniquement si sa réponse est corrigée - if(!$isadmin && !$ismaster && $ismember) { - $answer=$em->getRepository("App:Answer")->findOneBy(["activity"=>$data,"user"=>$user]); - if(!$answer || $answer->getStatus()<15) - return false; - } - - // Test modification = Impossible de modifier un document si activité close - if ($mode=="update" && ((!$isadmin && !$ismaster) || $data->getStatus()==10)) - return false; - break; - - case "answer": - $data=$em->getRepository("App:Answer")->find($id); - if(!$data) return false; - - $user=$this->getUser(); - $isadmin=($user->Hasrole("ROLE_ADMIN")); - $ismaster=($user==$data->getActivity()->getUser()); - $isuser=($user==$data->getUser()); - - // Test visualisation - if(!$isadmin && !$ismaster && !$isuser) - return false; - - // Test modification = Impossible de modifier un document si réponse rendues ou activité non distribut - if ($mode=="update" && ((!$isadmin && !$isuser) || $data->getStatus()>=10 || $data->getActivity()->getStatus()!=1)) - return false; - break; - - case "answercorrected": - $data=$em->getRepository("App:Answer")->find($id); - if(!$data) return false; - - $user=$this->getUser(); - $isadmin=($user->Hasrole("ROLE_ADMIN")); - $ismaster=($user==$data->getActivity()->getUser()); - $isuser=($user==$data->getUser()); - - // Test visualisation - if(!$isadmin && !$ismaster && !$isuser) - return false; - - // Membre = Visualisation uniquement si sa réponse est rendu - if(!$isadmin && !$ismaster && $isuser) { - if($data->getStatus()<10) - return false; - } - - // Test modification = Impossible de modifier un document si réponse corrigées - if ($mode=="update" && ((!$isadmin && !$ismaster) || $data->getStatus()>=15 || $data->getActivity()->getStatus()!=1) ) - return false; - break; - } - - return true; - } - - private function ctrlAccessdocument($entity,$id,$mode) { - // Initialisation de l'enregistrement - $em = $this->getDoctrine()->getManager(); - - $document=$em->getRepository($this->entity)->find($id); - if(!$document) return false; - - switch($entity) { - case "activity" : - $data=$document->getActivity(); - return $this->ctrlAccessentity($entity,$data->getId(),$mode); - break; - - case "corrected": - $data=$document->getCorrected(); - return $this->ctrlAccessentity($entity,$data->getId(),$mode); - break; - - case "answer" : - $data=$document->getAnswer(); - return $this->ctrlAccessentity($entity,$data->getId(),$mode); - break; - - case "answercorrected" : - $data=$document->getAnswercorrected(); - return $this->ctrlAccessentity($entity,$data->getId(),$mode); - break; - } - - return true; - } - -} diff --git a/src/nineskeletor-1.0/src/Controller/HomeController.php b/src/nineskeletor-1.0/src/Controller/HomeController.php index c71ad54..f967d4f 100755 --- a/src/nineskeletor-1.0/src/Controller/HomeController.php +++ b/src/nineskeletor-1.0/src/Controller/HomeController.php @@ -11,14 +11,18 @@ class HomeController extends AbstractController { public function home() { - return $this->redirectToRoute("app_activity"); - - /* return $this->render('Home/home.html.twig',[ "useheader" => true, - "usesidebar" => ($this->getUser()?$this->getUser()->hasRole("ROLE_ADMIN"):false), + "usesidebar" => false, + ]); + } + + public function admin() + { + return $this->render('Home/admin.html.twig',[ + "useheader" => true, + "usesidebar" => true, ]); - */ } public function upload(Request $request,$access=null) { diff --git a/src/nineskeletor-1.0/src/Controller/MessageController.php b/src/nineskeletor-1.0/src/Controller/MessageController.php deleted file mode 100755 index 97d98ca..0000000 --- a/src/nineskeletor-1.0/src/Controller/MessageController.php +++ /dev/null @@ -1,268 +0,0 @@ -getDoctrine()->getManager(); - - // Création du formulaire - $data=new Entity; - $form = $this->createForm(Form::class,$data,array("mode"=>"submit")); - - // Récupération des data du formulaire - $form->handleRequest($request); - - - return $this->render('Message/message.html.twig',[ - 'id' => $id, - 'form' => $form->createView() - ]); - } - - public function messagegroup($id, Request $request) { - $em = $this->getDoctrine()->getManager(); - - // Création du formulaire - $activity=$em->getRepository("App:Activity")->find($id); - if(!$activity) return $this->redirectToRoute("app_activity"); - - // Formulaire - $form = $this->createForm(Activitymessage::class,$activity,array("mode"=>"submit","id"=>$activity->getId())); - - // Récupération des data du formulaire - $form->handleRequest($request); - - // Sur validation - if ($form->get('submit')->isClicked() && $form->isValid()) { - $data = $form->getData(); - $message = $form->get("message")->getData(); - - if($message) { - foreach($data->getAnswers() as $answer) { - $data=new Entity; - $data->setMessage($message); - $data->setUser($this->getUser()); - $data->addReader($this->getUser()); - $data->setDeletable(true); - $data->setAnswer($answer); - - $em->persist($data); - $em->flush(); - } - } - - // Fermeture de la popup - return $this->render($this->render.'close.html.twig'); - } - - return $this->render('Message/group.html.twig',[ - 'id' => $id, - 'activity' => $activity, - 'form' => $form->createView() - ]); - } - - public function load($id,Request $request) { - return new Response(json_encode($this->getMessages($id))); - } - - public function submit($id,Request $request) { - $em = $this->getDoctrine()->getManager(); - $answer=$em->getRepository("App:Answer")->find($id); - if(!$answer) { - $output=["return"=>"KO","error"=>"Utilisateur inconnu"]; - return new Response(json_encode($output)); - } - // Controler que l'on peut créer mesage sur la answer - - // Récupérer les datas envoyés en post - $html = $request->request->get('html'); - - // Création du message - $data = new Entity(); - $data->setUser($this->getUser()); - $data->setAnswer($answer); - $data->setMessage($html); - $data->setDeletable(true); - $em->persist($data); - $em->flush(); - - // Si on génère le message c'est qu'il est forcement lu - $data->addReader($this->getUser()); - - return new Response(json_encode($this->getMessages($id))); - } - - public function unread() { - $em = $this->getDoctrine()->getManager(); - $user=$this->getUser(); - $output=[]; - - // View master - if ($user->hasRole('ROLE_ADMIN')||$user->hasRole('ROLE_MASTER')) { - // Sur chaque activité de l'activité - $activitys = $em->getRepository("App:Activity")->findBy(["user"=>$user]); - foreach($activitys as $activity) { - // Sur chaque réponse de l'activité - $answers = $em->getRepository("App:Answer")->findBy(["activity"=>$activity]); - foreach($answers as $answer) { - // Statut de la réponse - switch($answer->getStatus()) { - case -1: $status = "non vu"; break; - case 0: $status = "vu"; break; - case 1: $status = "en cours"; break; - case 2: $status = "réouvert"; break; - case 10: $status = "rendu"; break; - case 15: $status = "corrigé"; break; - } - - // Initialisation du tableau des messages non lus - $tmp = [ - "id" => $answer->getId(), - "cpt" => 0, - "status" => $status - ]; - - // Sur chaque message de la réponse - $messages = $em->getRepository("App:Message")->findBy(["answer"=>$answer]); - foreach($messages as $message) { - $readers=$message->getReaders(); - if(!$readers->contains($user)) - $tmp["cpt"]=$tmp["cpt"]+1; - } - array_push($output,$tmp); - } - } - } - // View student - elseif($user->hasRole('ROLE_STUDENT')) { - $answers = $em->getRepository("App:Answer")->findBy(["user"=>$user]); - foreach($answers as $answer) { - // Statut de la réponse - switch($answer->getStatus()) { - case -1: $status = "non vu"; break; - case 0: $status = "vu"; break; - case 1: $status = "en cours"; break; - case 2: $status = "réouvert"; break; - case 10: $status = "rendu"; break; - case 15: $status = "corrigé"; break; - } - - // Initialisation du tableau des messages non lus - $tmp = [ - "id" => $answer->getId(), - "cpt" => 0, - "status" => $status - ]; - - // Sur chaque message de la réponse - $messages = $em->getRepository("App:Message")->findBy(["answer"=>$answer]); - foreach($messages as $message) { - $readers=$message->getReaders(); - if(!$readers->contains($user)) - $tmp["cpt"]=$tmp["cpt"]+1; - } - array_push($output,$tmp); - } - } - - return new Response(json_encode($output)); - } - - private function getMessages($id) { - $em = $this->getDoctrine()->getManager(); - - $datas=$em->getRepository($this->entity)->findBy(["answer"=>$id],["submitdate"=>"DESC"]); - - $return=[]; - foreach($datas as $data) { - $user=$this->getUser(); - $isadmin=($user->Hasrole("ROLE_ADMIN")); - $ismaster=($user==$data->getAnswer()->getActivity()->getUser()); - $isuser=($user==$data->getUser()); - - //Si le message est supprimable : seul le propriétaire peut supprimer - $deletable=$data->getDeletable(); - if($deletable) { - if(!$isadmin&&!$ismaster&&!$isuser) $deletable=false; - } - else{ - // Un admin peut tout supprimer - if($isadmin) $deletable=true; - } - - // Si on liste le message c'est qu'il est lu - $readers=$data->getReaders(); - if(!$readers->contains($user)) { - $data->addReader($user); - $em->persist($data); - $em->flush(); - } - - $tmp = [ - "id" => $data->getId(), - "message" => $data->getMessage(), - "submitdate" => $data->getSubmitdate()->format("d/m/Y H:i"), - "userdisplayname" => $data->getUser()->getDisplayname(), - "deletable" => $deletable - ]; - array_push($return,$tmp); - } - - return $return; - } - - public function delete($id) { - $em = $this->getDoctrine()->getManager(); - $data=$em->getRepository($this->entity)->find($id); - if(!$data) { - $output=["return"=>"KO","error"=>"Message non retrouvé"]; - return new Response(json_encode($output)); - } - - $user=$this->getUser(); - $isadmin=($user->Hasrole("ROLE_ADMIN")); - $ismaster=($user==$data->getAnswer()->getActivity()->getUser()); - $isuser=($user==$data->getUser()); - - //Si le message est supprimable : seul le propriétaire peut supprimer - $deletable=$data->getDeletable(); - if($deletable) { - if(!$isadmin&&!$ismaster&&!$isuser) $deletable=false; - } - else{ - // Un admin peut tout supprimer - if($isadmin) $deletable=true; - } - - if(!$deletable) { - $output=["return"=>"KO","error"=>"Message non supprimable"]; - return new Response(json_encode($output)); - } - - $em->remove($data); - $em->flush(); - - return new Response(json_encode([])); - } -} diff --git a/src/nineskeletor-1.0/src/Controller/SecurityController.php b/src/nineskeletor-1.0/src/Controller/SecurityController.php index a2a197b..0861cd7 100755 --- a/src/nineskeletor-1.0/src/Controller/SecurityController.php +++ b/src/nineskeletor-1.0/src/Controller/SecurityController.php @@ -158,7 +158,8 @@ class SecurityController extends AbstractController $this->get('session')->invalidate(); // Init Client CAS - \phpCAS::setDebug('/var/www/html/schedule/var/log/cas.log'); + $alias=$this->getParameter('appAlias'); + \phpCAS::setDebug('/var/www/html/'.$alias.'/var/log/cas.log'); \phpCAS::client(CAS_VERSION_2_0, $this->getParameter('casHost'), intval($this->getParameter('casPort')), is_null($this->getParameter('casPath')) ? '' : $this->getParameter('casPath'), false); \phpCAS::setNoCasServerValidation(); diff --git a/src/nineskeletor-1.0/src/Entity/Activity.php b/src/nineskeletor-1.0/src/Entity/Activity.php deleted file mode 100644 index b53ec25..0000000 --- a/src/nineskeletor-1.0/src/Entity/Activity.php +++ /dev/null @@ -1,282 +0,0 @@ -answeruser; - } - public function setAnsweruser(?Answer $answer): self - { - $this->answeruser = $answer; - - return $this; - } - - public function __construct() - { - $this->activitydocuments = new ArrayCollection(); - $this->correcteddocuments = new ArrayCollection(); - $this->answers = new ArrayCollection(); - } - - public function getId(): ?int - { - return $this->id; - } - - public function getName(): ?string - { - return $this->name; - } - - public function setName(string $name): self - { - $this->name = $name; - - return $this; - } - - public function getSubject(): ?string - { - return $this->subject; - } - - public function setSubject(?string $subject): self - { - $this->subject = $subject; - - return $this; - } - - public function getStatus(): ?int - { - return $this->status; - } - - public function setStatus(int $status): self - { - $this->status = $status; - - return $this; - } - - public function getActivity(): ?string - { - return $this->activity; - } - - public function setActivity(?string $activity): self - { - $this->activity = $activity; - - return $this; - } - - public function getCorrected(): ?string - { - return $this->corrected; - } - - public function setCorrected(?string $corrected): self - { - $this->corrected = $corrected; - - return $this; - } - - public function getUser(): ?User - { - return $this->user; - } - - public function setUser(?User $user): self - { - $this->user = $user; - - return $this; - } - - public function getGroup(): ?Group - { - return $this->group; - } - - public function setGroup(?Group $group): self - { - $this->group = $group; - - return $this; - } - - /** - * @return Collection|Document[] - */ - public function getActivitydocuments(): Collection - { - return $this->activitydocuments; - } - - public function addActivitydocument(Document $activitydocument): self - { - if (!$this->activitydocuments->contains($activitydocument)) { - $this->activitydocuments[] = $activitydocument; - $activitydocument->setActivity($this); - } - - return $this; - } - - public function removeActivitydocument(Document $activitydocument): self - { - if ($this->activitydocuments->contains($activitydocument)) { - $this->activitydocuments->removeElement($activitydocument); - // set the owning side to null (unless already changed) - if ($activitydocument->getActivity() === $this) { - $activitydocument->setActivity(null); - } - } - - return $this; - } - - /** - * @return Collection|Document[] - */ - public function getCorrecteddocuments(): Collection - { - return $this->correcteddocuments; - } - - public function addCorrecteddocument(Document $correcteddocument): self - { - if (!$this->correcteddocuments->contains($correcteddocument)) { - $this->correcteddocuments[] = $correcteddocument; - $correcteddocument->setCorrected($this); - } - - return $this; - } - - public function removeCorrecteddocument(Document $correcteddocument): self - { - if ($this->correcteddocuments->contains($correcteddocument)) { - $this->correcteddocuments->removeElement($correcteddocument); - // set the owning side to null (unless already changed) - if ($correcteddocument->getCorrected() === $this) { - $correcteddocument->setCorrected(null); - } - } - - return $this; - } - - /** - * @return Collection|Answer[] - */ - public function getAnswers(): Collection - { - return $this->answers; - } - - public function addAnswer(Answer $answer): self - { - if (!$this->answers->contains($answer)) { - $this->answers[] = $answer; - $answer->setActivity($this); - } - - return $this; - } - - public function removeAnswer(Answer $answer): self - { - if ($this->answers->contains($answer)) { - $this->answers->removeElement($answer); - // set the owning side to null (unless already changed) - if ($answer->getActivity() === $this) { - $answer->setActivity(null); - } - } - - return $this; - } - - - -} \ No newline at end of file diff --git a/src/nineskeletor-1.0/src/Entity/Answer.php b/src/nineskeletor-1.0/src/Entity/Answer.php deleted file mode 100644 index baaa7e2..0000000 --- a/src/nineskeletor-1.0/src/Entity/Answer.php +++ /dev/null @@ -1,238 +0,0 @@ -user->getDisplayname(); - } - - public function __construct() - { - $this->answerdocuments = new ArrayCollection(); - $this->answercorrecteddocuments = new ArrayCollection(); - $this->messages = new ArrayCollection(); - } - - public function getId(): ?int - { - return $this->id; - } - - public function getStatus(): ?int - { - return $this->status; - } - - public function setStatus(int $status): self - { - $this->status = $status; - - return $this; - } - - public function getAnswer(): ?string - { - return $this->answer; - } - - public function setAnswer(?string $answer): self - { - $this->answer = $answer; - - return $this; - } - - public function getAnswercorrected(): ?string - { - return $this->answercorrected; - } - - public function setAnswercorrected(?string $answercorrected): self - { - $this->answercorrected = $answercorrected; - - return $this; - } - - public function getUser(): ?User - { - return $this->user; - } - - public function setUser(?User $user): self - { - $this->user = $user; - - return $this; - } - - /** - * @return Collection|Document[] - */ - public function getAnswerdocuments(): Collection - { - return $this->answerdocuments; - } - - public function addAnswerdocument(Document $answerdocument): self - { - if (!$this->answerdocuments->contains($answerdocument)) { - $this->answerdocuments[] = $answerdocument; - $answerdocument->setAnswer($this); - } - - return $this; - } - - public function removeAnswerdocument(Document $answerdocument): self - { - if ($this->answerdocuments->contains($answerdocument)) { - $this->answerdocuments->removeElement($answerdocument); - // set the owning side to null (unless already changed) - if ($answerdocument->getAnswer() === $this) { - $answerdocument->setAnswer(null); - } - } - - return $this; - } - - /** - * @return Collection|Document[] - */ - public function getAnswercorrecteddocuments(): Collection - { - return $this->answercorrecteddocuments; - } - - public function addAnswercorrecteddocument(Document $answercorrecteddocument): self - { - if (!$this->answercorrecteddocuments->contains($answercorrecteddocument)) { - $this->answercorrecteddocuments[] = $answercorrecteddocument; - $answercorrecteddocument->setAnswercorrected($this); - } - - return $this; - } - - public function removeAnswercorrecteddocument(Document $answercorrecteddocument): self - { - if ($this->answercorrecteddocuments->contains($answercorrecteddocument)) { - $this->answercorrecteddocuments->removeElement($answercorrecteddocument); - // set the owning side to null (unless already changed) - if ($answercorrecteddocument->getAnswercorrected() === $this) { - $answercorrecteddocument->setAnswercorrected(null); - } - } - - return $this; - } - - public function getActivity(): ?Activity - { - return $this->activity; - } - - public function setActivity(?Activity $activity): self - { - $this->activity = $activity; - - return $this; - } - - /** - * @return Collection|Message[] - */ - public function getMessages(): Collection - { - return $this->messages; - } - - public function addMessage(Message $message): self - { - if (!$this->messages->contains($message)) { - $this->messages[] = $message; - $message->setAnswer($this); - } - - return $this; - } - - public function removeMessage(Message $message): self - { - if ($this->messages->contains($message)) { - $this->messages->removeElement($message); - // set the owning side to null (unless already changed) - if ($message->getAnswer() === $this) { - $message->setAnswer(null); - } - } - - return $this; - } - - - -} \ No newline at end of file diff --git a/src/nineskeletor-1.0/src/Entity/Document.php b/src/nineskeletor-1.0/src/Entity/Document.php deleted file mode 100644 index f630c4b..0000000 --- a/src/nineskeletor-1.0/src/Entity/Document.php +++ /dev/null @@ -1,242 +0,0 @@ -id; - } - - public function getName(): ?string - { - return $this->name; - } - - public function setName(string $name): self - { - $this->name = $name; - - return $this; - } - - public function getFilename(): ?string - { - return $this->filename; - } - - public function setFilename(string $filename): self - { - $this->filename = $filename; - - return $this; - } - - public function getDescription(): ?string - { - return $this->description; - } - - public function setDescription(?string $description): self - { - $this->description = $description; - - return $this; - } - - public function getEntity(): ?string - { - return $this->entity; - } - - public function setEntity(string $entity): self - { - $this->entity = $entity; - - return $this; - } - - public function getRoworder(): ?int - { - return $this->roworder; - } - - public function setRoworder(int $roworder): self - { - $this->roworder = $roworder; - - return $this; - } - - public function getExtention(): ?string - { - return $this->extention; - } - - public function setExtention(string $extention): self - { - $this->extention = $extention; - - return $this; - } - - public function getMinetype(): ?string - { - return $this->minetype; - } - - public function setMinetype(string $minetype): self - { - $this->minetype = $minetype; - - return $this; - } - - public function getHavethumb(): ?bool - { - return $this->havethumb; - } - - public function setHavethumb(bool $havethumb): self - { - $this->havethumb = $havethumb; - - return $this; - } - - public function getActivity(): ?Activity - { - return $this->activity; - } - - public function setActivity(?Activity $activity): self - { - $this->activity = $activity; - - return $this; - } - - public function getCorrected(): ?Activity - { - return $this->corrected; - } - - public function setCorrected(?Activity $corrected): self - { - $this->corrected = $corrected; - - return $this; - } - - public function getAnswer(): ?Answer - { - return $this->answer; - } - - public function setAnswer(?Answer $answer): self - { - $this->answer = $answer; - - return $this; - } - - public function getAnswercorrected(): ?Answer - { - return $this->answercorrected; - } - - public function setAnswercorrected(?Answer $answercorrected): self - { - $this->answercorrected = $answercorrected; - - return $this; - } - - -} \ No newline at end of file diff --git a/src/nineskeletor-1.0/src/Entity/Group.php b/src/nineskeletor-1.0/src/Entity/Group.php index fb8aaa6..9fd0973 100644 --- a/src/nineskeletor-1.0/src/Entity/Group.php +++ b/src/nineskeletor-1.0/src/Entity/Group.php @@ -6,12 +6,14 @@ use Doctrine\Common\Collections\ArrayCollection; use Doctrine\Common\Collections\Collection; use Doctrine\ORM\Mapping as ORM; use Symfony\Component\Validator\Constraints as Assert; +use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity; /** * Group - * - * @ORM\Table(name="groupe") + * * @ORM\Entity(repositoryClass="App\Repository\GroupRepository") + * @ORM\Table(name="groupe",uniqueConstraints={@ORM\UniqueConstraint(name="name", columns={"name"})})) + * @UniqueEntity("name", message="Ce nom de groupe existe dèja") */ class Group { @@ -38,15 +40,9 @@ class Group */ protected $users; - /** - * @ORM\OneToMany(targetEntity="Activity", mappedBy="group", cascade={"persist"}, orphanRemoval=true) - */ - private $activitys; - public function __construct() { $this->users = new ArrayCollection(); - $this->activitys = new ArrayCollection(); } public function getId(): ?int @@ -106,37 +102,4 @@ class Group return $this; } - /** - * @return Collection|Activity[] - */ - public function getActivitys(): Collection - { - return $this->activitys; - } - - public function addActivity(Activity $activity): self - { - if (!$this->activitys->contains($activity)) { - $this->activitys[] = $activity; - $activity->setGroup($this); - } - - return $this; - } - - public function removeActivity(Activity $activity): self - { - if ($this->activitys->contains($activity)) { - $this->activitys->removeElement($activity); - // set the owning side to null (unless already changed) - if ($activity->getGroup() === $this) { - $activity->setGroup(null); - } - } - - return $this; - } - - - } \ No newline at end of file diff --git a/src/nineskeletor-1.0/src/Entity/Message.php b/src/nineskeletor-1.0/src/Entity/Message.php deleted file mode 100644 index 1a0577f..0000000 --- a/src/nineskeletor-1.0/src/Entity/Message.php +++ /dev/null @@ -1,156 +0,0 @@ -submitdate = new \DateTime(); - $this->readers = new ArrayCollection(); - } - - public function getId(): ?int - { - return $this->id; - } - - public function getMessage(): ?string - { - return $this->message; - } - - public function setMessage(string $message): self - { - $this->message = $message; - - return $this; - } - - public function getSubmitdate(): ?\DateTimeInterface - { - return $this->submitdate; - } - - public function setSubmitdate(\DateTimeInterface $submitdate): self - { - $this->submitdate = $submitdate; - - return $this; - } - - public function getDeletable(): ?bool - { - return $this->deletable; - } - - public function setDeletable(bool $deletable): self - { - $this->deletable = $deletable; - - return $this; - } - - public function getAnswer(): ?Answer - { - return $this->answer; - } - - public function setAnswer(?Answer $answer): self - { - $this->answer = $answer; - - return $this; - } - - public function getUser(): ?User - { - return $this->user; - } - - public function setUser(?User $user): self - { - $this->user = $user; - - return $this; - } - - /** - * @return Collection|User[] - */ - public function getReaders(): Collection - { - return $this->readers; - } - - public function addReader(User $reader): self - { - if (!$this->readers->contains($reader)) { - $this->readers[] = $reader; - } - - return $this; - } - - public function removeReader(User $reader): self - { - if ($this->readers->contains($reader)) { - $this->readers->removeElement($reader); - } - - return $this; - } - -} diff --git a/src/nineskeletor-1.0/src/Entity/User.php b/src/nineskeletor-1.0/src/Entity/User.php index 2cac5ca..623feed 100644 --- a/src/nineskeletor-1.0/src/Entity/User.php +++ b/src/nineskeletor-1.0/src/Entity/User.php @@ -13,7 +13,7 @@ use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity; * User * * @ORM\Entity(repositoryClass="App\Repository\UserRepository") - * @ORM\Table(name="user",indexes={@ORM\Index(name="username", columns={"username"})}) + * @ORM\Table(name="user",uniqueConstraints={@ORM\UniqueConstraint(name="username", columns={"username"})}) * @UniqueEntity("username", message="Ce nom d'utilisateur existe dèja") */ @@ -90,34 +90,10 @@ class User implements UserInterface, \Serializable */ private $groups; - /** - * @ORM\OneToMany(targetEntity="Activity", mappedBy="user", cascade={"persist"}, orphanRemoval=true) - */ - private $activitys; - - /** - * @ORM\OneToMany(targetEntity="Answer", mappedBy="user", cascade={"persist"}, orphanRemoval=true) - */ - private $answers; - - /** - * @ORM\OneToMany(targetEntity="Message", mappedBy="user", cascade={"persist"}, orphanRemoval=true) - */ - private $messages; - - /** - * @ORM\ManyToMany(targetEntity="Message", mappedBy="readers") - */ - protected $messagereaders; public function __construct() { $this->groups = new ArrayCollection(); - $this->activitys = new ArrayCollection(); - $this->anwsers = new ArrayCollection(); - $this->answers = new ArrayCollection(); - $this->messages = new ArrayCollection(); - $this->messagereaders = new ArrayCollection(); } public function getUsername(): ?string @@ -310,125 +286,4 @@ class User implements UserInterface, \Serializable return $this; } - /** - * @return Collection|Activity[] - */ - public function getActivitys(): Collection - { - return $this->activitys; - } - - public function addActivity(Activity $activity): self - { - if (!$this->activitys->contains($activity)) { - $this->activitys[] = $activity; - $activity->setUser($this); - } - - return $this; - } - - public function removeActivity(Activity $activity): self - { - if ($this->activitys->contains($activity)) { - $this->activitys->removeElement($activity); - // set the owning side to null (unless already changed) - if ($activity->getUser() === $this) { - $activity->setUser(null); - } - } - - return $this; - } - - /** - * @return Collection|Answer[] - */ - public function getAnswers(): Collection - { - return $this->answers; - } - - public function addAnswer(Answer $answer): self - { - if (!$this->answers->contains($answer)) { - $this->answers[] = $answer; - $answer->setUser($this); - } - - return $this; - } - - public function removeAnswer(Answer $answer): self - { - if ($this->answers->contains($answer)) { - $this->answers->removeElement($answer); - // set the owning side to null (unless already changed) - if ($answer->getUser() === $this) { - $answer->setUser(null); - } - } - - return $this; - } - - /** - * @return Collection|Message[] - */ - public function getMessages(): Collection - { - return $this->messages; - } - - public function addMessage(Message $message): self - { - if (!$this->messages->contains($message)) { - $this->messages[] = $message; - $message->setUser($this); - } - - return $this; - } - - public function removeMessage(Message $message): self - { - if ($this->messages->contains($message)) { - $this->messages->removeElement($message); - // set the owning side to null (unless already changed) - if ($message->getUser() === $this) { - $message->setUser(null); - } - } - - return $this; - } - - /** - * @return Collection|Message[] - */ - public function getMessagereaders(): Collection - { - return $this->messagereaders; - } - - public function addMessagereader(Message $messagereader): self - { - if (!$this->messagereaders->contains($messagereader)) { - $this->messagereaders[] = $messagereader; - $messagereader->addReader($this); - } - - return $this; - } - - public function removeMessagereader(Message $messagereader): self - { - if ($this->messagereaders->contains($messagereader)) { - $this->messagereaders->removeElement($messagereader); - $messagereader->removeReader($this); - } - - return $this; - } - } diff --git a/src/nineskeletor-1.0/src/Repository/ActivityRepository.php b/src/nineskeletor-1.0/src/Repository/ActivityRepository.php deleted file mode 100644 index 11afe54..0000000 --- a/src/nineskeletor-1.0/src/Repository/ActivityRepository.php +++ /dev/null @@ -1,42 +0,0 @@ -createQueryBuilder('activity') - ->Where('activity.user=:user') - ->setParameter('user',$user); - - if($activeactivity) - $qb->andWhere('activity.status<10'); - else - $qb->andWhere('activity.status=10'); - - return $qb->getQuery()->getResult(); - } - - public function findAllGroupActivityActive($group,$activeactivity) { - $qb = $this->createQueryBuilder('activity') - ->Where('activity.group=:group') - ->setParameter('group',$group); - - if($activeactivity) - $qb->andWhere('activity.status=1'); - else - $qb->andWhere('activity.status=10'); - - return $qb->getQuery()->getResult(); - } - -} diff --git a/src/nineskeletor-1.0/src/Repository/AnswerRepository.php b/src/nineskeletor-1.0/src/Repository/AnswerRepository.php deleted file mode 100644 index 16d7f1a..0000000 --- a/src/nineskeletor-1.0/src/Repository/AnswerRepository.php +++ /dev/null @@ -1,15 +0,0 @@ - - {% if mode=="update" %} - Modification ACTIVITE - {% elseif mode=="submit" %} - Création ACTIVITE - {% endif %} - - - {{ form_widget(form.submit) }} - - Annuler - - {% if mode=="update" %} - {% if activity.status==0 or activity.status==10%} - - Supprimer - - {% else %} - {{ form_widget(form.archiving) }} - {% endif %} - - {% if form.distribution is defined %} - {{ form_widget(form.distribution) }} - {% endif %} - - {% endif %} - -

- - {% if app.session.flashbag.has('error') %} -
- Erreur
- {% for flashMessage in app.session.flashbag.get('error') %} - {{ flashMessage | raw }}
- {% endfor %} -
- {% endif %} - - {% if app.session.flashbag.has('notice') %} -
- Information
- {% for flashMessage in app.session.flashbag.get('notice') %} - {{ flashMessage }}
- {% endfor %} -
- {% endif %} - -

Entête

-
-
-
-
- Informations -
- -
- {{ form_row(form.name) }} - {{ form_row(form.subject) }} - {{ form_row(form.group) }} -
-
-
-
- -
-

Enoncés

-
-
- {% if mode == "submit" %} -
-
- Pièces Jointes -
- -
- Vous pourrez rattacher des pièces jointes une fois l'activité créée. -
-
- {% else %} -
-
- Pièces Jointes - {% if activity.status == 0 %} - - - {% endif %} -
- -
-
-
- - {% endif %} - -
- -
-
-
- Description -
- -
- {{ form_widget(form.activity) }} -
-
-
-
- - -
-

Corrigés

-
-
- {% if mode == "submit" %} -
-
- Pièces Jointes -
- -
- Vous pourrez rattacher des pièces jointes une fois l'activité créée. -
-
- {% else %} -
-
- Pièces Jointes - {% if activity.status < 10 %} - - - {% endif %} -
- -
-
-
- - {% endif %} - -
- -
-
-
- Description -
- -
- {{ form_widget(form.corrected) }} -
-
-
-
- -{{ form_end(form) }} - - -{% endblock %} - -{% block localjavascript %} - $(document).ready(function() { - loadDocument(); - $("#activity_name").focus(); - }); - - {% if mode != "submit" %} - function myupload(entity) { - url='{{ path('app_document_upload',{'entity': 'xxxxx', 'id':activity.id }) }}'; - url=url.replace('xxxxx',entity); - ModalLoad('mymodal','Pièces Jointes',url); - } - - function myrecord(entity) { - url='{{ path('app_document_record',{'entity': 'xxxxx', 'id':activity.id }) }}'; - url=url.replace('xxxxx',entity); - ModalLoad('mymodal','Enregistrement',url); - } - - function myviewer(entity,id) { - url='{{ path('app_document_view',{'entity': 'yyyyy', 'id':'xxxxx' }) }}'; - url=url.replace('xxxxx',id); - url=url.replace('yyyyy',entity); - - ModalLoad('mymodal','Pièce Jointe',url); - } - - function mydownload(entity,id) { - url='{{ path('app_document_show',{'entity': 'yyyyy', 'id':'xxxxx' }) }}'; - url=url.replace('xxxxx',id); - url=url.replace('yyyyy',entity); - - document.location=url; - } - - function myedit(entity,id) { - url='{{ path('app_document_update',{'entity': 'yyyyy', 'id':'xxxxx' }) }}'; - url=url.replace('xxxxx',id); - url=url.replace('yyyyy',entity); - - ModalLoad('mymodal','Pièce Jointe',url); - } - - $('#mymodal').on('hidden.bs.modal', function (e) { - loadDocument(); - }); - - - - function loadDocument() { - // Sur fermeture de la modal on recharge les PJ - $.ajax({ - type: "POST", - url: "{{ path('app_document_listmaster',{entity:'activity',id:activity.id}) }}", - success: function (response) { - response=JSON.parse(response); - if(response.return=="KO") { - alert(response.error); - } - else { - // On vide le conteneur document - $("#activitydocuments").empty(); - - // On reconstruit la liste - for (doc of response) { - $("#activitydocuments").append(doc.html); - } - } - } - }); - - // Sur fermeture de la modal on recharge les PJ - $.ajax({ - type: "POST", - url: "{{ path('app_document_listmaster',{entity:'corrected',id:activity.id}) }}", - success: function (response) { - response=JSON.parse(response); - if(response.return=="KO") { - alert(response.error); - } - else { - // On vide le conteneur document - $("#correcteddocuments").empty(); - - // On reconstruit la liste - for (doc of response) { - $("#correcteddocuments").append(doc.html); - } - } - } - }); - } - {%endif%} - -{% endblock %} diff --git a/src/nineskeletor-1.0/templates/Activity/list.html.twig b/src/nineskeletor-1.0/templates/Activity/list.html.twig deleted file mode 100644 index 2785f37..0000000 --- a/src/nineskeletor-1.0/templates/Activity/list.html.twig +++ /dev/null @@ -1,125 +0,0 @@ -{% extends "base.html.twig" %} - -{% block body %} -

-ACTIVITES -

- -

Ajouter

- -
-
- Liste des Activités -
- - -
-
- -
-
- - - - - - - - - - - - {% for activity in activitys %} - - - - - - - - {% endfor %} - -
ActionNomStatutGroupeElèves
- - - {{activity.name}} - {% if activity.status == 0 %} - brouillon - {% elseif activity.status == 1 %} - distribué - {% else %} - clos - {% endif %} - {{activity.group.name}} - {% set answerusers = [] %} - - {% for answer in activity.answers %} - {% set answerusers = answerusers|merge([answer.user.id]) %} - - 0 - {{ answer.user.displayname }} = - - -
- {% endfor %} - - {% if activity.status > 0 %} - {% for user in activity.group.users %} - {% if user.id not in answerusers and "ROLE_STUDENT" in user.roles %} - 0{{ user.displayname }} = non vu
- {% endif %} - {% endfor %} - {% endif %} -
-
-
-
-{% endblock %} - -{% block localjavascript %} - $(document).ready(function() { - $('#dataTables').DataTable({ - columnDefs: [ { "targets": "no-sort", "orderable": false }, { "targets": "no-string", "type" : "num" } ], - responsive: true, - iDisplayLength: 100, - order: [[ 1, "asc" ]] - }); - - myloadMessage(); - }); - - function myloadMessage() { - $.ajax({ - type: "POST", - url: "{{ path("app_message_unread") }}", - success: function (response) { - response=JSON.parse(response); - if(response.return=="KO") { - alert(response.error); - } - else { - $(".badge").removeClass("badge-danger").removeClass("badge-success").addClass("badge-success"); - - for (answer of response) { - $("#badge"+answer.id).html(answer.cpt); - if(answer.cpt>0) $("#badge"+answer.id).removeClass("badge-success").addClass("badge-danger"); - $("#status"+answer.id).html(answer.status); - } - } - } - }); - } - - function mymessage(id) { - url='{{ path('app_message_group',{'id':'xxxxx' }) }}'; - url=url.replace('xxxxx',id); - - ModalLoad('mymodal','Message aux Elèves',url); - } - - $('#switchactive').change(function() { - window.location="{{ path('app_activity_activeactivity' )}}"; - }); - - window.setInterval(myloadMessage, 5000); -{% endblock %} \ No newline at end of file diff --git a/src/nineskeletor-1.0/templates/Answer/edit.html.twig b/src/nineskeletor-1.0/templates/Answer/edit.html.twig deleted file mode 100755 index d05f8dc..0000000 --- a/src/nineskeletor-1.0/templates/Answer/edit.html.twig +++ /dev/null @@ -1,301 +0,0 @@ -{% extends 'base.html.twig' %} - -{% block body %} -{{ form_start(form) }} -
-
-

- ACTIVITE = {{ answer.activity.name }} -

- - {{ form_widget(form.submit) }} - - Annuler - - {% if mode=="update" %} - {% if answer.status<10 and answer.activity.status==1%} - {{ form_widget(form.returned) }} - {% endif %} - {% endif %} - -

- - {% if app.session.flashbag.has('error') %} -
- Erreur
- {% for flashMessage in app.session.flashbag.get('error') %} - {{ flashMessage }}
- {% endfor %} -
- {% endif %} - - {% if app.session.flashbag.has('notice') %} -
- Information
- {% for flashMessage in app.session.flashbag.get('notice') %} - {{ flashMessage }}
- {% endfor %} -
- {% endif %} - - {% if answer.status == 15 %} -
-
-

Corrigé

-
-
-
-
- Appréciation -
- -
- {{ answer.answercorrected | raw }} -
-
- - {% if answer.activity.corrected %} -
-
-
- Corrigé -
- -
- {{ answer.activity.corrected | raw }} -
-
- {% endif %} -
- -
-
-
- Pièces Jointes de l'Appréciation -
- -
-
-
- - {% if answer.activity.correcteddocuments %} -
-
-
- Pièces Jointes de la Correction -
- -
-
-
- {% endif %} -
-
-
- {% endif %} - -
-
-

Enoncés

-
-
- Informations -
- -
- Titre = {{ answer.activity.name}}
- Matière = {{ answer.activity.subject}}
- -
- {{ answer.activity.activity|raw}} -
-
- -
-
-
- Pièces Jointes -
- -
-
-
- -
- -
-

Activité

-
-
- Description -
- -
- {{ form_widget(form.answer) }} -
-
- -
-
-
- Pièces Jointes - {% if answer.status < 10 and answer.activity.status == 1 %} - - - {% endif %} -
- -
-
-
-
-
-
- -
-

Messages

- {{ render_esi(controller('App\\Controller\\MessageController::message', { 'id': answer.id })) }} -
-
-{{ form_end(form) }} - - -{% endblock %} - -{% block localjavascript %} - $(document).ready(function() { - loadDocument(); - $("#anwser_anwser").focus(); - }); - - {% if mode != "submit" %} - function myupload(entity) { - url='{{ path('app_document_upload',{'entity': 'xxxxx', 'id':answer.id }) }}'; - url=url.replace('xxxxx',entity); - ModalLoad('mymodal','Pièces Jointes',url); - } - - function myrecord(entity) { - url='{{ path('app_document_record',{'entity': 'xxxxx', 'id':answer.id }) }}'; - url=url.replace('xxxxx',entity); - ModalLoad('mymodal','Enregistrement',url); - } - - function myviewer(entity,id) { - url='{{ path('app_document_view',{'entity': 'yyyyy', 'id':'xxxxx' }) }}'; - url=url.replace('xxxxx',id); - url=url.replace('yyyyy',entity); - - ModalLoad('mymodal','Pièce Jointe',url); - } - - function mydownload(entity,id) { - url='{{ path('app_document_show',{'entity': 'yyyyy', 'id':'xxxxx' }) }}'; - url=url.replace('xxxxx',id); - url=url.replace('yyyyy',entity); - - document.location=url; - } - - function myedit(entity,id) { - url='{{ path('app_document_update',{'entity': 'yyyyy', 'id':'xxxxx' }) }}'; - url=url.replace('xxxxx',id); - url=url.replace('yyyyy',entity); - - ModalLoad('mymodal','Pièce Jointe',url); - } - - $('#mymodal').on('hidden.bs.modal', function (e) { - loadDocument(); - }); - - - - function loadDocument() { - // Sur fermeture de la modal on recharge les PJ - $.ajax({ - type: "POST", - url: "{{ path('app_document_listuser',{entity:'activity',id:answer.activity.id}) }}", - success: function (response) { - response=JSON.parse(response); - if(response.return=="KO") { - alert(response.error); - } - else { - // On vide le conteneur document - $("#activitydocuments").empty(); - - // On reconstruit la liste - for (doc of response) { - $("#activitydocuments").append(doc.html); - } - } - } - }); - - $.ajax({ - type: "POST", - url: "{{ path('app_document_listmaster',{entity:'answer',id:answer.id}) }}", - success: function (response) { - response=JSON.parse(response); - if(response.return=="KO") { - alert(response.error); - } - else { - // On vide le conteneur document - $("#answerdocuments").empty(); - - // On reconstruit la liste - for (doc of response) { - $("#answerdocuments").append(doc.html); - } - } - } - }); - - // Sur fermeture de la modal on recharge les PJ - $.ajax({ - type: "POST", - url: "{{ path('app_document_listuser',{entity:'corrected',id:answer.activity.id}) }}", - success: function (response) { - response=JSON.parse(response); - if(response.return=="KO") { - alert(response.error); - } - else { - // On vide le conteneur document - $("#correcteddocuments").empty(); - - // On reconstruit la liste - for (doc of response) { - $("#correcteddocuments").append(doc.html); - } - } - } - }); - - // Sur fermeture de la modal on recharge les PJ - $.ajax({ - type: "POST", - url: "{{ path('app_document_listuser',{entity:'answercorrected',id:answer.id}) }}", - success: function (response) { - response=JSON.parse(response); - if(response.return=="KO") { - alert(response.error); - } - else { - // On vide le conteneur document - $("#answercorrecteddocuments").empty(); - - // On reconstruit la liste - for (doc of response) { - $("#answercorrecteddocuments").append(doc.html); - } - } - } - }); - - } - {%endif%} - -{% endblock %} diff --git a/src/nineskeletor-1.0/templates/Answer/list.html.twig b/src/nineskeletor-1.0/templates/Answer/list.html.twig deleted file mode 100644 index 6120c76..0000000 --- a/src/nineskeletor-1.0/templates/Answer/list.html.twig +++ /dev/null @@ -1,104 +0,0 @@ -{% extends "base.html.twig" %} - -{% block body %} -

-ACTIVITES -

- -
-
- Liste des Activités -
- - -
-
- -
-
- - - - - - - - - - - - - {% for activity in activitys %} - - - - - - - - - {% endfor %} - -
ActionNomProfesseurMatièreStatut
- - 0{{activity.name}}{{activity.user.displayname}}{{activity.subject}} - - {% if activity.answeruser.status == 0 %} - vu - {% elseif activity.answeruser.status == 1 %} - en cours - {% elseif activity.answeruser.status == 2 %} - réouvert - {% elseif activity.answeruser.status == 10 %} - rendu - {% elseif activity.answeruser.status == 15 %} - corrigé - {% endif %} - -
-
-
-
-{% endblock %} - -{% block localjavascript %} - $(document).ready(function() { - $('#dataTables').DataTable({ - columnDefs: [ { "targets": "no-sort", "orderable": false }, { "targets": "no-string", "type" : "num" } ], - responsive: true, - iDisplayLength: 100, - order: [[ 1, "asc" ]] - }); - - myloadMessage(); - }); - - function myloadMessage() { - $.ajax({ - type: "POST", - url: "{{ path("app_message_unread") }}", - success: function (response) { - response=JSON.parse(response); - if(response.return=="KO") { - alert(response.error); - } - else { - $(".badge").removeClass("badge-danger").removeClass("badge-success").addClass("badge-success"); - - for (answer of response) { - $("#badge"+answer.id).html(answer.cpt); - if(answer.cpt>0) $("#badge"+answer.id).removeClass("badge-success").addClass("badge-danger"); - $("#status"+answer.id).html(answer.status); - } - } - } - }); - } - - $('#switchactive').change(function() { - window.location="{{ path('app_activity_activeactivity' )}}"; - }); - - window.setInterval(myloadMessage, 5000); - -{% endblock %} \ No newline at end of file diff --git a/src/nineskeletor-1.0/templates/Answer/view.html.twig b/src/nineskeletor-1.0/templates/Answer/view.html.twig deleted file mode 100755 index b0f8809..0000000 --- a/src/nineskeletor-1.0/templates/Answer/view.html.twig +++ /dev/null @@ -1,304 +0,0 @@ -{% extends 'base.html.twig' %} - -{% block body %} -{{ form_start(form) }} -
-
-

- ACTIVITE = {{ answer.activity.name }} = {{ answer.user.displayname }} -

- - {{ form_widget(form.submit) }} - - Annuler - - {% if mode=="update" %} - {% if answer.status>=10 and answer.status<15 and answer.activity.status==1 %} - {{ form_widget(form.corrected) }} - {{ form_widget(form.canceled) }} - {% endif %} - {% endif %} - -

- - {% if app.session.flashbag.has('error') %} -
- Erreur
- {% for flashMessage in app.session.flashbag.get('error') %} - {{ flashMessage }}
- {% endfor %} -
- {% endif %} - - {% if app.session.flashbag.has('notice') %} -
- Information
- {% for flashMessage in app.session.flashbag.get('notice') %} - {{ flashMessage }}
- {% endfor %} -
- {% endif %} - - {% if form.answercorrected is defined %} -
-
-

Corrigé

-
-
-
-
- Appréciation -
- -
- {{ form_widget(form.answercorrected) }} -
-
- - {% if answer.activity.corrected %} -
-
-
- Corrigé -
- -
- {{ answer.activity.corrected | raw }} -
-
- {% endif %} -
- -
-
-
- Pièces Jointes de l'Appréciation - {% if answer.status>=10 and answer.status<15 and answer.activity.status==1 %} - - - {% endif %} -
- -
-
-
- - {% if answer.activity.correcteddocuments %} -
-
-
- Pièces Jointes de la Correction -
- -
-
-
- {% endif %} -
-
-
- {% endif %} - -
-
-

Enoncés

-
-
- Informations -
- -
- Titre = {{ answer.activity.name}}
- {% if answer.activity.subject %} - Matière = {{ answer.activity.subject}}
- {% endif %} - -
- {{ answer.activity.activity|raw}} -
-
- -
-
-
- Pièces Jointes -
- -
-
-
- -
- -
-

Activité

-
-
- Description -
- -
- {{ answer.answer|raw}} -
-
- -
-
-
- Pièces Jointes -
- -
-
-
-
-
-
- -
-

Messages

- {{ render_esi(controller('App\\Controller\\MessageController::message', { 'id': answer.id })) }} -
-
-{{ form_end(form) }} - - -{% endblock %} - -{% block localjavascript %} - $(document).ready(function() { - loadDocument(); - $("#anwser_anwser").focus(); - }); - - {% if mode != "submit" %} - function myupload(entity) { - url='{{ path('app_document_upload',{'entity': 'xxxxx', 'id':answer.id }) }}'; - url=url.replace('xxxxx',entity); - ModalLoad('mymodal','Pièces Jointes',url); - } - - function myrecord(entity) { - url='{{ path('app_document_record',{'entity': 'xxxxx', 'id':answer.id }) }}'; - url=url.replace('xxxxx',entity); - ModalLoad('mymodal','Enregistrement',url); - } - - function myviewer(entity,id) { - url='{{ path('app_document_view',{'entity': 'yyyyy', 'id':'xxxxx' }) }}'; - url=url.replace('xxxxx',id); - url=url.replace('yyyyy',entity); - - ModalLoad('mymodal','Pièce Jointe',url); - } - - function mydownload(entity,id) { - url='{{ path('app_document_show',{'entity': 'yyyyy', 'id':'xxxxx' }) }}'; - url=url.replace('xxxxx',id); - url=url.replace('yyyyy',entity); - - document.location=url; - } - - function myedit(entity,id) { - url='{{ path('app_document_update',{'entity': 'yyyyy', 'id':'xxxxx' }) }}'; - url=url.replace('xxxxx',id); - url=url.replace('yyyyy',entity); - - ModalLoad('mymodal','Pièce Jointe',url); - } - - $('#mymodal').on('hidden.bs.modal', function (e) { - loadDocument(); - }); - - - - function loadDocument() { - // Sur fermeture de la modal on recharge les PJ - $.ajax({ - type: "POST", - url: "{{ path('app_document_listuser',{entity:'activity',id:answer.activity.id}) }}", - success: function (response) { - response=JSON.parse(response); - if(response.return=="KO") { - alert(response.error); - } - else { - // On vide le conteneur document - $("#activitydocuments").empty(); - - // On reconstruit la liste - for (doc of response) { - $("#activitydocuments").append(doc.html); - } - } - } - }); - - $.ajax({ - type: "POST", - url: "{{ path('app_document_listuser',{entity:'answer',id:answer.id}) }}", - success: function (response) { - response=JSON.parse(response); - if(response.return=="KO") { - alert(response.error); - } - else { - // On vide le conteneur document - $("#answerdocuments").empty(); - - // On reconstruit la liste - for (doc of response) { - $("#answerdocuments").append(doc.html); - } - } - } - }); - - // Sur fermeture de la modal on recharge les PJ - $.ajax({ - type: "POST", - url: "{{ path('app_document_listuser',{entity:'corrected',id:answer.activity.id}) }}", - success: function (response) { - response=JSON.parse(response); - if(response.return=="KO") { - alert(response.error); - } - else { - // On vide le conteneur document - $("#correcteddocuments").empty(); - - // On reconstruit la liste - for (doc of response) { - $("#correcteddocuments").append(doc.html); - } - } - } - }); - - // Sur fermeture de la modal on recharge les PJ - $.ajax({ - type: "POST", - url: "{{ path('app_document_listmaster',{entity:'answercorrected',id:answer.id}) }}", - success: function (response) { - response=JSON.parse(response); - if(response.return=="KO") { - alert(response.error); - } - else { - // On vide le conteneur document - $("#answercorrecteddocuments").empty(); - - // On reconstruit la liste - for (doc of response) { - $("#answercorrecteddocuments").append(doc.html); - } - } - } - }); - - } - {%endif%} - -{% endblock %} diff --git a/src/nineskeletor-1.0/templates/Cron/edit.html.twig b/src/nineskeletor-1.0/templates/Cron/edit.html.twig deleted file mode 100644 index 91b6c8f..0000000 --- a/src/nineskeletor-1.0/templates/Cron/edit.html.twig +++ /dev/null @@ -1,59 +0,0 @@ - -{% extends 'base.html.twig' %} - -{% block body %} -{{ form_start(form) }} -

- {% if mode=="update" %} - Modification JOB - {% endif %} -

- - {{ form_widget(form.submit) }} - - Annuler - -

- - {% if app.session.flashbag.has('error') %} -
- Erreur
- {% for flashMessage in app.session.flashbag.get('error') %} - {{ flashMessage }}
- {% endfor %} -
- {% endif %} - - {% if app.session.flashbag.has('notice') %} -
- Information
- {% for flashMessage in app.session.flashbag.get('notice') %} - {{ flashMessage }}
- {% endfor %} -
- {% endif %} -
-
- Informations -
- -
- {{ form_row(form.command) }} - {{ form_row(form.jsonargument) }} - {{ form_row(form.statut) }} - {{ form_row(form.repeatcall) }} - {{ form_row(form.repeatinterval) }} - {{ form_row(form.nextexecdate) }} -
-
-{{ form_end(form) }} -{% endblock %} - -{% block localjavascript %} - $(document).ready(function() { - $("#command").focus(); - }); -{% endblock %} - - - diff --git a/src/nineskeletor-1.0/templates/Cron/list.html.twig b/src/nineskeletor-1.0/templates/Cron/list.html.twig deleted file mode 100644 index dde3511..0000000 --- a/src/nineskeletor-1.0/templates/Cron/list.html.twig +++ /dev/null @@ -1,56 +0,0 @@ -{% extends "base.html.twig" %} - -{% block body %} -

-JOBS -

- -
-
- Liste des Jobs -
- -
-
- - - - - - - - - - - - - {% for cron in crons %} - - - - - - - - - {% endfor %} - -
ActionOrderCommandDescriptionStatutProchaine exécution
- - {{cron.id}}{{cron.command}}{{cron.description}}{{cron.statutlabel}}{{cron.nextexecdate|date("d/m/Y H:i")}}
-
-
-
-{% endblock %} - -{% block localjavascript %} - $(document).ready(function() { - $('#dataTables').DataTable({ - columnDefs: [ { "targets": "no-sort", "orderable": false }, { "targets": "no-string", "type" : "num" } ], - responsive: true, - iDisplayLength: 100, - order: [[ 1, "asc" ]] - }); - }); -{% endblock %} - diff --git a/src/nineskeletor-1.0/templates/Cron/logs.html.twig b/src/nineskeletor-1.0/templates/Cron/logs.html.twig deleted file mode 100644 index 0988633..0000000 --- a/src/nineskeletor-1.0/templates/Cron/logs.html.twig +++ /dev/null @@ -1,19 +0,0 @@ -{% extends "CRWhizBundle::base.html.twig" %} - -{% block body %} -

{{ title }}

- - Log CRON - Log PROD - Log DEV -

-
-
- Logs -
- -
- {{ content | nl2br }} -
-
-{% endblock %} \ No newline at end of file diff --git a/src/nineskeletor-1.0/templates/Crop/crop01.html.twig b/src/nineskeletor-1.0/templates/Crop/crop01.html.twig deleted file mode 100644 index da5966e..0000000 --- a/src/nineskeletor-1.0/templates/Crop/crop01.html.twig +++ /dev/null @@ -1,35 +0,0 @@ -{% extends 'base.html.twig' %} - -{% block head_style %} - {{ encore_entry_link_tags('app') }} - {{ encore_entry_link_tags('dropzone') }} -{% endblock head_style %} - - -{% block body %} - - - -
- - {{ encore_entry_script_tags('dropzone') }} -{% endblock %} - - - -{% block localjavascript %} - window.parent.$(".modal-title").html("ETAPE 1 - Téléchargez votre image"); - - Dropzone.options.MyDropZone = { - maxFiles: 1, - acceptedMimeTypes: 'image/*', - //renameFilename: false, - success: function(file, response){ - $(location).attr('href',"{{ path('app_crop02') }}"); - } - } - - function closeModal() { - window.parent.$("#extraLargeModal").modal('hide'); - } -{% endblock %} diff --git a/src/nineskeletor-1.0/templates/Crop/crop02.html.twig b/src/nineskeletor-1.0/templates/Crop/crop02.html.twig deleted file mode 100644 index ada9256..0000000 --- a/src/nineskeletor-1.0/templates/Crop/crop02.html.twig +++ /dev/null @@ -1,71 +0,0 @@ -{% extends 'base.html.twig' %} - -{% block body %} - {{ form_start(form) }} - {{ form_widget(form.submit) }} - - -
- Thumbnail Preview -
- -
-
-
-
- {{ form_end(form) }} - -{% endblock %} - - -{% block localjavascript %} - function move(data) { - $('#form_x').val(data.xScaledToImage); - $('#form_y').val(data.yScaledToImage); - - preview(); - } - - function resize(data) { - $('#form_w').val(data.widthScaledToImage); - $('#form_h').val(data.heightScaledToImage); - - preview(); - } - - function preview(data) { - var scaleX = 90 / $('#form_w').val(); - var scaleY = 90 / $('#form_h').val(); - - $('#preview img').css({ - width: Math.round(scaleX * $('#largeimg').width()) + 'px', - height: Math.round(scaleY * $('#largeimg').height()) + 'px', - marginLeft: '-' + Math.round(scaleX * $('#form_x').val()) + 'px', - marginTop: '-' + Math.round(scaleY * $('#form_y').val()) + 'px' - }); - - } - - function reportThumb() { - window.parent.$("#user_avatar").val("thumb_{{ app.session.get('uploadavatar') }}"); - window.parent.$("#user_avatar_img").attr("src","/{{ appAlias }}/uploads/avatar/thumb_{{ app.session.get('uploadavatar') }}"); - closeModal(); - } - - function closeModal() { - window.parent.$("#extraLargeModal").modal('hide'); - } - - $(document).ready(function() { - window.parent.$(".modal-title").html("ETAPE 2 - Découper votre image"); - - $('#largeimg').CropSelectJs({ - imageSrc: "/{{ appAlias }}/uploads/avatar/{{ app.session.get('uploadavatar') }}", - selectionResize: function(data) { resize(data); }, - selectionMove: function(data) { move(data); }, - }); - $('#largeimg').CropSelectJs('setSelectionAspectRatio',1); - - - }); -{% endblock %} diff --git a/src/nineskeletor-1.0/templates/Document/close.html.twig b/src/nineskeletor-1.0/templates/Document/close.html.twig deleted file mode 100755 index 6a7cb25..0000000 --- a/src/nineskeletor-1.0/templates/Document/close.html.twig +++ /dev/null @@ -1,8 +0,0 @@ -{% extends 'base.html.twig' %} - -{% block body %} - -{% endblock %} - diff --git a/src/nineskeletor-1.0/templates/Document/edit.html.twig b/src/nineskeletor-1.0/templates/Document/edit.html.twig deleted file mode 100755 index fa7d237..0000000 --- a/src/nineskeletor-1.0/templates/Document/edit.html.twig +++ /dev/null @@ -1,52 +0,0 @@ -{% extends 'base.html.twig' %} - -{% block body %} -{{ form_start(form) }} - {{ form_widget(form.submit) }} - - - - {% if mode=="update" %} - - Supprimer - - {% endif %} - -

- - {% if app.session.flashbag.has('error') %} -
- Erreur
- {% for flashMessage in app.session.flashbag.get('error') %} - {{ flashMessage }}
- {% endfor %} -
- {% endif %} - - {% if app.session.flashbag.has('notice') %} -
- Information
- {% for flashMessage in app.session.flashbag.get('notice') %} - {{ flashMessage }}
- {% endfor %} -
- {% endif %} - - {{ form_row(form.name) }} - {{ form_row(form.description) }} -{{ form_end(form) }} - -{% endblock %} - -{% block localjavascript %} - $(document).ready(function() { - $("#document_name").focus(); - }); - - function closeModal() { - window.parent.$("#mymodal").modal('hide'); - } -{% endblock %} diff --git a/src/nineskeletor-1.0/templates/Document/record.html.twig b/src/nineskeletor-1.0/templates/Document/record.html.twig deleted file mode 100644 index ee35250..0000000 --- a/src/nineskeletor-1.0/templates/Document/record.html.twig +++ /dev/null @@ -1,302 +0,0 @@ -{% extends "base.html.twig" %} - -{% block localstyle %} - .main-controls { - padding: 0.5rem 0; - } - - canvas { - display: block; - margin-bottom: 0.5rem; - } - - #buttons button { - font-size: 1rem; - padding: 1rem; - width: 100%; - } - - #buttons i { - margin-right: 5px; - } - - - - /* Make the clips use as much space as possible, and also show a scrollbar when there are too many clips to show in the available space */ - .sound-clips { - flex: 1; - overflow: auto; - } - - section, article { - display: block; - } - - .clip { - padding-bottom: 1rem; - } - - audio { - width: 100%; - display: block; - margin: 1rem auto 0.5rem; - } - - .clip p { - display: inline-block; - font-size: 1rem; - } - - .clip button { - font-size: 1rem; - float: right; - } - - - aside { - position: fixed; - top: 0; - left: 0; - width: 100%; - height: 100%; - transform: translateX(100%); - transition: 0.3s all ease-out; - background-color: #efefef; - padding: 1rem; - } - - aside p { - font-size: 1.2rem; - margin: 0.5rem 0; - } - - aside a { - color: #666; - } - - /* Toggled State of information box */ - input[type=checkbox]:checked ~ aside { - transform: translateX(0); - } - - /* Cursor when clip name is clicked over */ - .clip p { - cursor: pointer; - } - -{% endblock %} - -{% block body %} -
- -
- - -
-
- -
- - -
- -{% endblock %} - -{% block localjavascript %} - // set up basic variables for app - const record = document.querySelector('.record'); - const stop = document.querySelector('.stop'); - const soundClips = document.querySelector('.sound-clips'); - const canvas = document.querySelector('.visualizer'); - const mainSection = document.querySelector('.main-controls'); - - // disable stop button while not recording - $('.stop').hide(); - - // visualiser setup - create web audio api context and canvas - let audioCtx; - const canvasCtx = canvas.getContext("2d"); - - //main block for doing the audio recording - if (navigator.mediaDevices.getUserMedia) { - console.log('getUserMedia supported.'); - - const constraints = { audio: true }; - let chunks = []; - - let onSuccess = function(stream) { - const mediaRecorder = new MediaRecorder(stream); - - visualize(stream); - - record.onclick = function() { - mediaRecorder.start(); - console.log(mediaRecorder.state); - console.log("recorder started"); - record.style.background = "red"; - - $(".stop").show(); - $(".record").hide(); - } - - stop.onclick = function() { - mediaRecorder.stop(); - console.log(mediaRecorder.state); - console.log("recorder stopped"); - record.style.background = ""; - record.style.color = ""; - - $(".stop").hide(); - $(".record").show(); - } - - mediaRecorder.onstop = function(e) { - console.log("data available after MediaRecorder.stop() called."); - - const clipName = prompt("Nom de l'enregistrement ?",'Activite'); - - const clipContainer = document.createElement('article'); - const clipLabel = document.createElement('p'); - const audio = document.createElement('audio'); - const deleteButton = document.createElement('button'); - const addButton = document.createElement('button'); - - clipContainer.classList.add('clip'); - audio.setAttribute('controls', ''); - deleteButton.textContent = 'Supprimer'; - deleteButton.className = 'delete btn btn-danger'; - addButton.textContent = "Ajouter à l'Activité"; - addButton.className = 'add btn btn-success mr-2'; - - if(clipName === null) { - clipLabel.textContent = 'My unnamed clip'; - } else { - clipLabel.textContent = clipName; - } - - clipContainer.appendChild(audio); - clipContainer.appendChild(clipLabel); - clipContainer.appendChild(deleteButton); - clipContainer.appendChild(addButton); - soundClips.appendChild(clipContainer); - - audio.controls = true; - const blob = new Blob(chunks, { 'type' : 'audio/ogg; codecs=opus' }); - chunks = []; - const audioURL = window.URL.createObjectURL(blob); - audio.src = audioURL; - console.log("recorder stopped"); - - deleteButton.onclick = function(e) { - let evtTgt = e.target; - evtTgt.parentNode.parentNode.removeChild(evtTgt.parentNode); - } - - addButton.onclick = function(e) { - url='{{ path('app_document_recordupload',{entity:entity,id:id,name:'xxxxx'})}}'; - url=url.replace('xxxxx',clipName); - - fetch(url, { - method: 'POST', - body: blob, - }) - .then(response => response.json()) - .then(result => { - let evtTgt = e.target; - evtTgt.parentNode.parentNode.removeChild(evtTgt.parentNode); - }) - .catch(error => { - console.error('Error:', error); - }); - } - - clipLabel.onclick = function() { - const existingName = clipLabel.textContent; - const newClipName = prompt("Nom de l'enregistrement ?",existingName); - - if(newClipName === null) { - clipLabel.textContent = existingName; - } else { - clipLabel.textContent = newClipName; - } - } - } - - mediaRecorder.ondataavailable = function(e) { - chunks.push(e.data); - } - } - - let onError = function(err) { - console.log('The following error occured: ' + err); - } - - navigator.mediaDevices.getUserMedia(constraints).then(onSuccess, onError); - } - else { - console.log('getUserMedia not supported on your browser!'); - } - - function visualize(stream) { - if(!audioCtx) { - audioCtx = new AudioContext(); - } - - const source = audioCtx.createMediaStreamSource(stream); - - const analyser = audioCtx.createAnalyser(); - analyser.fftSize = 2048; - const bufferLength = analyser.frequencyBinCount; - const dataArray = new Uint8Array(bufferLength); - - source.connect(analyser); - - draw() - - function draw() { - const WIDTH = canvas.width - const HEIGHT = canvas.height; - - requestAnimationFrame(draw); - - analyser.getByteTimeDomainData(dataArray); - - canvasCtx.fillStyle = 'rgb(200, 200, 200)'; - canvasCtx.fillRect(0, 0, WIDTH, HEIGHT); - - canvasCtx.lineWidth = 2; - canvasCtx.strokeStyle = 'rgb(0, 0, 0)'; - - canvasCtx.beginPath(); - - let sliceWidth = WIDTH * 1.0 / bufferLength; - let x = 0; - - - for(let i = 0; i < bufferLength; i++) { - let v = dataArray[i] / 128.0; - let y = v * HEIGHT/2; - - if(i === 0) { - canvasCtx.moveTo(x, y); - } - else { - canvasCtx.lineTo(x, y); - } - - x += sliceWidth; - } - - canvasCtx.lineTo(canvas.width, canvas.height/2); - canvasCtx.stroke(); - - } - } - - window.onresize = function() { - canvas.width = mainSection.offsetWidth; - } - - window.onresize(); - -{% endblock %} \ No newline at end of file diff --git a/src/nineskeletor-1.0/templates/Document/render.html.twig b/src/nineskeletor-1.0/templates/Document/render.html.twig deleted file mode 100644 index 710cafa..0000000 --- a/src/nineskeletor-1.0/templates/Document/render.html.twig +++ /dev/null @@ -1,18 +0,0 @@ -
- -
-
{{title}}
- - {% if minefamily=="image" or minefamily=="image" or minefamily=="video" or extention=="pdf" %} - - {% endif %} - - - - {% if master %} - - {% endif %} - - {{ description|raw }} -
-
\ No newline at end of file diff --git a/src/nineskeletor-1.0/templates/Document/upload.html.twig b/src/nineskeletor-1.0/templates/Document/upload.html.twig deleted file mode 100644 index a250bef..0000000 --- a/src/nineskeletor-1.0/templates/Document/upload.html.twig +++ /dev/null @@ -1,52 +0,0 @@ -{% extends 'base.html.twig' %} - -{% block head_style %} - {{ encore_entry_link_tags('app') }} - {{ encore_entry_link_tags('dropzone') }} -{% endblock head_style %} - - -{% block body %} - - - - - {{ encore_entry_script_tags('dropzone') }} -{% endblock %} - - - -{% block localjavascript %} - Dropzone.options.MyDropZone = { - init: function() { - var totalFiles = 0; - var completeFiles = 0; - - this.on("sending", function(file, xhr, formData) { - formData.append("nameentity", "{{ entity }}"); - formData.append("identity", "{{ id }}"); - }); - - this.on("addedfile", function (file) { - totalFiles += 1; - }); - - this.on("removed file", function (file) { - totalFiles -= 1; - }); - - this.on("complete", function (file) { - completeFiles += 1; - if (completeFiles === totalFiles) { - window.parent.$("#mymodal").modal('hide'); - } - }); - }, - success: function( file, response ){ - } - } - - function closeModal() { - window.parent.$("#mymodal").modal('hide'); - } -{% endblock %} \ No newline at end of file diff --git a/src/nineskeletor-1.0/templates/Document/view.html.twig b/src/nineskeletor-1.0/templates/Document/view.html.twig deleted file mode 100644 index dd8031a..0000000 --- a/src/nineskeletor-1.0/templates/Document/view.html.twig +++ /dev/null @@ -1,55 +0,0 @@ -{% extends 'base.html.twig' %} - -{% block body %} - {% if minefamily == "image" %} - - {% else %} - - {% endif %} -{% endblock %} - - -{% block localjavascript %} - $(document).ready(function() { - $(window).resize(function() { - AjustFrame(); - }); - - AjustFrame(); - }); - - // Ajustement des frames - function AjustFrame() { - var heightbody = $('html').height(); - var heightheader = $('.nav').height(); - var heightframe = 600; - console.log(heightbody); - var widthbody = $('body').width(); - - if($("#frameviewfile").length>0) { - $("#frameviewfile").height(heightframe); - } - - if($("#image").length>0) { - widthbody=widthbody-250; - if(widthbody<950) widthbody="100%"; - - console.log("euhe"+widthbody); - //$("#image").css({}); - $("#image").css("height","auto"); - $("#image").css("max-width",widthbody); - if($("#image").height()>heightframe) { - $("#image").css({height:heightframe}); - - - } - - } - } -{% endblock %} - - - - diff --git a/src/nineskeletor-1.0/templates/Form/fields.html.twig b/src/nineskeletor-1.0/templates/Form/fields.html.twig deleted file mode 100644 index 03835d7..0000000 --- a/src/nineskeletor-1.0/templates/Form/fields.html.twig +++ /dev/null @@ -1,175 +0,0 @@ -{% extends 'form_div_layout.html.twig' %} - -{# Voir https://github.com/symfony/symfony/blob/master/src/Symfony/Bridge/Twig/Resources/views/Form/form_div_layout.html.twig #} - -{# On commence par simplement ajouter le form-group au row de nos formulaires #} -{% block form_row -%} - {% set attr = attr|merge({'help': (attr.help|default(true)) }) %} -
- {{- form_label(form) }} - {{- form_widget(form) }} - {{ form_errors(form) }} -
-{%- endblock form_row %} - -{# Puis on modifie très simplement nos input et textarea -les plus importants pour y ajouter le class imposée par Bootstrap 3 #} -{% block textarea_widget %} - {% set attr = attr|merge({'class': attr.class|default('') ~ ' form-control'}) %} - {{ parent() }} -{% endblock textarea_widget %} - -{% block form_widget_simple %} - {% set attr = attr|merge({'class': attr.class|default('') ~ ' form-control'}) %} - {{ parent() }} -{% endblock form_widget_simple %} - -{% block form_label -%} - {% set label_attr = label_attr|merge({'class': (label_attr.class|default('') ~ ' control-label')|trim}) %} - {% if 'checkbox' not in block_prefixes %} - {% if label is not same as(false) -%} - {% if not compound -%} - {% set label_attr = label_attr|merge({'for': id}) %} - {%- endif %} - {% if required -%} - {% set label_attr = label_attr|merge({'class': (label_attr.class|default('') ~ ' required')|trim}) %} - {%- endif %} - {% if label is empty -%} - {% set label = name|humanize %} - {%- endif -%} - - - {{ label|trans({}, translation_domain)|raw }} - {% if required %}*{% endif %} - - {%- endif %} - {% endif %} -{%- endblock form_label %} - -{# et enfin les erreurs #} -{% block form_errors %} - {% if errors|length > 0 %} - {% if attr.help is defined and attr.help %} -

- {% for error in errors %} - {{ error.message }}
- {% endfor %} -

- {% else %} -
- - {% for error in errors %} - {{ error.message|raw }}
- {% endfor %} -
- {% endif %} - {% endif %} -{% endblock form_errors %} - -{# Personnalisation des boutons #} -{% block button_widget -%} - {% if label is empty -%} - {% set label = name|humanize %} - {%- endif -%} - {% set attr = attr|merge({'class': (attr.class|default('') ~ '')|trim}) %} - -{%- endblock button_widget %} - -{# Personnalisation des attributs des boutons #} -{% block button_attributes -%} - {% if type is defined and type == 'submit' -%} - {% set class = 'btn-primary' %} - {% else %} - {% set class = 'btn-default' %} - {%- endif -%} - - {% set attr = attr|merge({'class': (attr.class|default('') ~ ' btn ' ~ class)|trim}) %} - {{ parent() }} -{%- endblock button_attributes %} - - -{# Personnalisation des select #} -{% block choice_widget_collapsed %} - {% set attr = attr|merge({'class': (attr.class|default('') ~ ' form-control')|trim}) %} - {{ parent() }} -{%- endblock choice_widget_collapsed %} - -{% block choice_widget %} - {% if expanded %} -
    - {% for child in form %} -
  • - {{ form_widget(child) }} - {{ form_label(child) }} -
  • - {% endfor %} -
- {% else %} - {{ parent() }} - {% endif %} -{% endblock choice_widget %} - -{% block checkbox_widget %} - -{% endblock checkbox_widget %} - -{% block radio_widget %} -    -{% endblock radio_widget %} - -{# Inline date marcro #} -{% macro date_form_widget(form) %} -
- {{ form_widget(form) }} -
-{% endmacro %} - -{# Inline date #} -{% block date_widget %} - {% if widget == 'single_text' %} - {{ block('form_widget_simple') }} - {% else %} - {% import _self as self %} -
- {{ date_pattern|replace({ - '{{ year }}': self.date_form_widget(form.year), - '{{ month }}': self.date_form_widget(form.month), - '{{ day }}': self.date_form_widget(form.day), - })|raw }} -
- {% endif %} -{% endblock date_widget %} - -{# Inline date_time -{% block time_widget %} - {% if widget == 'single_text' %} - {{ block('form_widget_simple') }} - {% else %} - {% import _self as self %} -
- {{ time_pattern|replace({ - '{{ hour }}': self.date_form_widget(form.hour), - '{{ minute }}': self.date_form_widget(form.minute), - })|raw }} -
- {% endif %} -{% endblock time_widget %} -#} - -{% block file_widget %} - {% set type = type|default('file') %} - -{% endblock file_widget %} diff --git a/src/nineskeletor-1.0/templates/Group/edit.html.twig b/src/nineskeletor-1.0/templates/Group/edit.html.twig deleted file mode 100755 index 92c58a5..0000000 --- a/src/nineskeletor-1.0/templates/Group/edit.html.twig +++ /dev/null @@ -1,64 +0,0 @@ -{% extends 'base.html.twig' %} - -{% block body %} -{{ form_start(form) }} -

- {% if mode=="update" %} - Modification GROUPE - {% elseif mode=="submit" %} - Création GROUPE - {% endif %} -

- - {{ form_widget(form.submit) }} - - Annuler - - {% if mode=="update" %} - - Supprimer - - {% endif %} - -

- - {% if app.session.flashbag.has('error') %} -
- Erreur
- {% for flashMessage in app.session.flashbag.get('error') %} - {{ flashMessage }}
- {% endfor %} -
- {% endif %} - - {% if app.session.flashbag.has('notice') %} -
- Information
- {% for flashMessage in app.session.flashbag.get('notice') %} - {{ flashMessage }}
- {% endfor %} -
- {% endif %} - -
-
- Informations -
- -
- {{ form_row(form.name) }} - {{ form_row(form.users) }} -
-
-{{ form_end(form) }} - -{% endblock %} - -{% block localjavascript %} - $(document).ready(function() { - $("#group_name").focus(); - }); -{% endblock %} diff --git a/src/nineskeletor-1.0/templates/Group/list.html.twig b/src/nineskeletor-1.0/templates/Group/list.html.twig deleted file mode 100644 index a643786..0000000 --- a/src/nineskeletor-1.0/templates/Group/list.html.twig +++ /dev/null @@ -1,51 +0,0 @@ -{% extends "base.html.twig" %} - -{% block body %} -

-GROUPES -

- -

Ajouter

- -
-
- Liste des Groupes -
- -
-
- - - - - - - - - {% for group in groups %} - - - - - {% endfor %} - -
ActionNom
- {% if not group.ldapfilter %} - - {% endif %} - {{group.name}}
-
-
-
-{% endblock %} - -{% block localjavascript %} - $(document).ready(function() { - $('#dataTables').DataTable({ - columnDefs: [ { "targets": "no-sort", "orderable": false }, { "targets": "no-string", "type" : "num" } ], - responsive: true, - iDisplayLength: 100, - order: [[ 1, "asc" ]] - }); - }); -{% endblock %} \ No newline at end of file diff --git a/src/nineskeletor-1.0/templates/Home/admin.html.twig b/src/nineskeletor-1.0/templates/Home/admin.html.twig deleted file mode 100644 index 8352af0..0000000 --- a/src/nineskeletor-1.0/templates/Home/admin.html.twig +++ /dev/null @@ -1,7 +0,0 @@ -{% extends "CRWhizBundle::base.html.twig" %} - -{% block body %} - - - -{% endblock %} \ No newline at end of file diff --git a/src/nineskeletor-1.0/templates/Home/home.html.twig b/src/nineskeletor-1.0/templates/Home/home.html.twig deleted file mode 100644 index 643f0d8..0000000 --- a/src/nineskeletor-1.0/templates/Home/home.html.twig +++ /dev/null @@ -1,6 +0,0 @@ -{% extends "base.html.twig" %} - -{% block body %} - -{% endblock %} - diff --git a/src/nineskeletor-1.0/templates/Home/login.html.twig b/src/nineskeletor-1.0/templates/Home/login.html.twig deleted file mode 100755 index 54b9806..0000000 --- a/src/nineskeletor-1.0/templates/Home/login.html.twig +++ /dev/null @@ -1,36 +0,0 @@ -{% extends "base.html.twig" %} - -{% block localstyle %} - body { - background-color: #efefef; - } - .homecard { - padding-top: 20px; - } -{% endblock %} - -{% block body %} -
-
-

{{appName}}

- -
-
- {% if error %} -
{{ error.messageKey|trans(error.messageData, 'security') }}
- {% endif %} - - - - - - - - - - -
-
- -
-{% endblock %} \ No newline at end of file diff --git a/src/nineskeletor-1.0/templates/Home/mail.html.twig b/src/nineskeletor-1.0/templates/Home/mail.html.twig deleted file mode 100644 index a99b325..0000000 --- a/src/nineskeletor-1.0/templates/Home/mail.html.twig +++ /dev/null @@ -1,9 +0,0 @@ -{% block subject %} - {{ subject }} -{% endblock %} - -{% block body %} -{% autoescape %} -

{{ body|raw }}

-{% endautoescape %} -{% endblock %} \ No newline at end of file diff --git a/src/nineskeletor-1.0/templates/Message/close.html.twig b/src/nineskeletor-1.0/templates/Message/close.html.twig deleted file mode 100755 index 6a7cb25..0000000 --- a/src/nineskeletor-1.0/templates/Message/close.html.twig +++ /dev/null @@ -1,8 +0,0 @@ -{% extends 'base.html.twig' %} - -{% block body %} - -{% endblock %} - diff --git a/src/nineskeletor-1.0/templates/Message/group.html.twig b/src/nineskeletor-1.0/templates/Message/group.html.twig deleted file mode 100644 index b8d9758..0000000 --- a/src/nineskeletor-1.0/templates/Message/group.html.twig +++ /dev/null @@ -1,9 +0,0 @@ -{% extends 'base.html.twig' %} - -{% block body %} - {{ form_start(form) }} - - {{ form_row(form.message) }} - {{ form_row(form.answers) }} - {{ form_end(form) }} -{% endblock %} diff --git a/src/nineskeletor-1.0/templates/Message/message.html.twig b/src/nineskeletor-1.0/templates/Message/message.html.twig deleted file mode 100644 index 814769c..0000000 --- a/src/nineskeletor-1.0/templates/Message/message.html.twig +++ /dev/null @@ -1,95 +0,0 @@ -{{ form_widget(form.message) }} - -
-
- \ No newline at end of file diff --git a/src/nineskeletor-1.0/templates/User/edit.html.twig b/src/nineskeletor-1.0/templates/User/edit.html.twig deleted file mode 100755 index e62a103..0000000 --- a/src/nineskeletor-1.0/templates/User/edit.html.twig +++ /dev/null @@ -1,136 +0,0 @@ -{% extends 'base.html.twig' %} - -{% block body %} -{{ form_start(form) }} -

- {% if mode=="update" %} - Modification UTILISATEUR - {% elseif mode=="submit" %} - Création UTILISATEUR - {% elseif mode=="profil" %} - Profil UTILISATEUR - {% endif %} -

- - {{ form_widget(form.submit) }} - - {% if mode=="profil" %} - Annuler - {% else %} - Annuler - {% endif %} - - {% if mode=="update" %} - - Supprimer - - {% endif %} - -

- - {% if app.session.flashbag.has('error') %} -
- Erreur
- {% for flashMessage in app.session.flashbag.get('error') %} - {{ flashMessage }}
- {% endfor %} -
- {% endif %} - - {% if app.session.flashbag.has('notice') %} -
- Information
- {% for flashMessage in app.session.flashbag.get('notice') %} - {{ flashMessage }}
- {% endfor %} -
- {% endif %} - -
- {% set avatar= "noavatar.png" %} - {% if user.avatar %} - {% set avatar= user.avatar %} - {% endif %} - - {{ form_widget(form.avatar) }} - Modifier -
- -
-
-
-
- Informations -
- -
- {{ form_row(form.username) }} - {% if form.password is defined %} - {{ form_row(form.password) }} - {%endif%} - {{ form_row(form.lastname) }} - {{ form_row(form.firstname) }} - {{ form_row(form.email) }} - {{ form_row(form.apikey) }} -
-
-
- -
- {% if form.roles is defined %} -
-
- Organisation -
- -
- {{ form_row(form.groups) }} - {{ form_row(form.roles) }} -
-
- {%endif%} -
-
-{{ form_end(form) }} - - - - -{% endblock %} - -{% block localjavascript %} - $(document).ready(function() { - $("#user_password_first").val(""); - $("#user_login").focus(); - }); - - $("#user_avatar_img").on('load', function() { - - }) - $("#user_avatar_img").on('error', function(){ - console.log("la"); - var imgSrc = $(this).attr('src'); - if(imgSrc!="/{{appAlias}}/uploads/avatar/") - $(this).attr('src',imgSrc); - }); - - function showModal() { - $("#frameModal").attr("src","{{path("app_crop01")}}"); - $("#extraLargeModal").modal("show"); - } -{% endblock %} diff --git a/src/nineskeletor-1.0/templates/User/list.html.twig b/src/nineskeletor-1.0/templates/User/list.html.twig deleted file mode 100644 index e6d4b50..0000000 --- a/src/nineskeletor-1.0/templates/User/list.html.twig +++ /dev/null @@ -1,75 +0,0 @@ -{% extends "base.html.twig" %} - -{% block body %} -

-UTILISATEURS -

- -

Ajouter

- -
-
- Liste des Utilisateurs -
- -
-
- - - - - - - - - - - - - - {% for user in users %} - - - - - - - - - - {% endfor %} - -
ActionAvatarLoginPrénomNomRôlesGroupes
- - {{user.username}}{{user.firstname}}{{user.lastname}} - {%for role in user.roles %} - {%if role=="ROLE_ADMIN" %} - Administrateur
- {%elseif role=="ROLE_MASTER" %} - Professeur
- {%elseif role=="ROLE_STUDENT" %} - Elève
- {%elseif role=="ROLE_USER" %} - Utilisateur
- {%endif%} - {% endfor %} -
- {% for group in user.groups %} - {{ group.name }}
- {% endfor %} -
-
-
-
-{% endblock %} - -{% block localjavascript %} - $(document).ready(function() { - $('#dataTables').DataTable({ - columnDefs: [ { "targets": "no-sort", "orderable": false }, { "targets": "no-string", "type" : "num" } ], - responsive: true, - iDisplayLength: 100, - order: [[ 2, "asc" ]] - }); - }); -{% endblock %} \ No newline at end of file diff --git a/src/nineskeletor-1.0/templates/base.html.twig b/src/nineskeletor-1.0/templates/base.html.twig deleted file mode 100644 index 6c8b871..0000000 --- a/src/nineskeletor-1.0/templates/base.html.twig +++ /dev/null @@ -1,331 +0,0 @@ - - - {% set color = app.session.get('color') %} - - - - {% block title %}{{ appName }}{% endblock %} - - - - {% block head_style %} - {{ encore_entry_link_tags('app') }} - {% endblock head_style %} - - {% block stylesheets %}{% endblock %} - - - - - - - - - {% if useheader is defined and useheader %} - - {% endif %} - -
- {% set contentsidebar="" %} - {% if usesidebar is defined and usesidebar %} - {% set contentsidebar="contentsidebar" %} - - - {%endif%} - - -
- {% block body %} - - {% endblock %} -
-
- - - - - {{ encore_entry_script_tags('app') }} - - {% block localexternalscript %} - - {% endblock %} - - - - - - diff --git a/tmpl/nineskeletor.cron b/tmpl/nineskeletor.cron new file mode 100644 index 0000000..ebe9322 --- /dev/null +++ b/tmpl/nineskeletor.cron @@ -0,0 +1 @@ +* * * * * root /var/www/html/nineskeletor/scripts/cron.sh &>/dev/null