diff --git a/src/ninegitea-1.0/src/Controller/ScrumpriorityController.php b/src/ninegitea-1.0/src/Controller/ScrumpriorityController.php
new file mode 100755
index 0000000..1ab2cf3
--- /dev/null
+++ b/src/ninegitea-1.0/src/Controller/ScrumpriorityController.php
@@ -0,0 +1,194 @@
+giteaservice = $giteaservice; }
+
+ public function submit($scrumid, Request $request)
+ {
+ // Initialisation de l'enregistrement
+ $em = $this->getDoctrine()->getManager();
+ $scrum=$em->getRepository("App:Scrum")->find($scrumid);
+ $data = new Entity();
+ $data->setScrum($scrum);
+
+ $last = $em->getRepository('App:Scrumpriority')->findOneBy(["scrum"=>$scrum], ['rowid' => 'DESC']);
+ if(!$last) $data->setRowid(0);
+ else $data->setRowid($last->getRowid()+1);
+
+ // Récupérer les repos de gitea
+ $gitealabels=$this->giteaservice->getLabels($scrum->getGiteajson()["owner"]["login"],$scrum->getGiteajson()["name"]);
+ if(!is_array($gitealabels)) die("Probleme de connexion avec gitea veuillez vous reconnecter");
+
+ // Création du formulaire
+ $form = $this->createForm(Form::class,$data,array("mode"=>"submit","gitealabels"=>$gitealabels));
+
+ // 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();
+ $gitealabel=$this->giteaservice->getLabel($scrum->getGiteajson()["owner"]["login"],$scrum->getGiteajson()["name"],$data->getGiteaid());
+ $data->setGiteajson(json_decode(json_encode($gitealabel), true));
+
+ $em->persist($data);
+ $em->flush();
+
+ // Retour à la liste
+ 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' => '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);
+ $scrum=$data->getScrum();
+
+ // Récupérer les repos de gitea
+ $gitealabels=$this->giteaservice->getLabels($scrum->getGiteajson()["owner"]["login"],$scrum->getGiteajson()["name"]);
+
+ // Création du formulaire
+ $form = $this->createForm(Form::class,$data,array("mode"=>"submit","gitealabels"=>$gitealabels));
+
+ // Récupération des data du formulaire
+ $form->handleRequest($request);
+
+ // Sur erreur
+ $this->getErrorForm(null,$form,$request,$data,"update");
+
+ // Sur validation
+ if ($form->get('submit')->isClicked() && $form->isValid()) {
+ $data = $form->getData();
+ $gitealabel=$this->giteaservice->getLabel($scrum->getGiteajson()["owner"]["login"],$scrum->getGiteajson()["name"],$data->getGiteaid());
+ $data->setGiteajson(json_decode(json_encode($gitealabel), true));
+
+ $em->persist($data);
+ $em->flush();
+
+ // Retour à la liste
+ 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($id,Request $request)
+ {
+ // Initialisation de l'enregistrement
+ $em = $this->getDoctrine()->getManager();
+ $data=$em->getRepository($this->entity)->find($id);
+
+ // Controle avant suppression
+ $error=false;
+ if($id<0) $error=true;
+
+ if($error)
+ return $this->redirectToRoute($this->route."_update",["id"=>$id]);
+ else {
+ $em->remove($data);
+ $em->flush();
+
+ // Retour à la liste
+ return $this->render($this->render.'close.html.twig');
+ }
+ }
+
+ public function select($scrumid, Request $request)
+ {
+ // S'assurer que c'est un appel ajax
+ if (!$request->isXmlHttpRequest()) {
+ return new JsonResponse(array('message' => 'Interdit'), 400);
+ }
+
+ $em = $this->getDoctrine()->getManager();
+ $scrum=$em->getRepository("App:Scrum")->find($scrumid);
+
+ $scrumprioritys = $scrum->getScrumprioritys();
+ $output=array();
+ foreach($scrumprioritys as $scrumpriority) {
+ array_push($output,array("id"=>$scrumpriority->getId(),"name"=>"".$scrumpriority->getName()."
liè au label gitea ".$scrumpriority->getGiteajson()["name"].""));
+ }
+
+ $response = new Response(json_encode($output));
+ $response->headers->set('Content-Type', 'application/json');
+ return $response;
+ }
+
+ public function order($scrumid, Request $request)
+ {
+ $em = $this->getDoctrine()->getManager();
+ $scrumpriorityids=explode(",",$request->get('lstordered'));
+ $i=1;
+ foreach($scrumpriorityids as $id) {
+ $scrumpriority=$em->getRepository($this->entity)->find($id);
+ if($scrumpriority) {
+ $scrumpriority->setRowid($i);
+ $em->persist($scrumpriority);
+ $em->flush();
+ }
+ $i++;
+ }
+ $response = new Response();
+ $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() && ($mode=="submit" || $mode=="update")) {
+ }
+
+ 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/ninegitea-1.0/src/Entity/Scrumpriority.php b/src/ninegitea-1.0/src/Entity/Scrumpriority.php
new file mode 100644
index 0000000..91a9744
--- /dev/null
+++ b/src/ninegitea-1.0/src/Entity/Scrumpriority.php
@@ -0,0 +1,116 @@
+id;
+ }
+
+ public function getName(): ?string
+ {
+ return $this->name;
+ }
+
+ public function setName(string $name): self
+ {
+ $this->name = $name;
+
+ return $this;
+ }
+
+ public function getRowid(): ?int
+ {
+ return $this->rowid;
+ }
+
+ public function setRowid(int $rowid): self
+ {
+ $this->rowid = $rowid;
+
+ return $this;
+ }
+
+ public function getGiteaid(): ?int
+ {
+ return $this->giteaid;
+ }
+
+ public function setGiteaid(int $giteaid): self
+ {
+ $this->giteaid = $giteaid;
+
+ return $this;
+ }
+
+ public function getGiteajson(): ?array
+ {
+ return $this->giteajson;
+ }
+
+ public function setGiteajson(array $giteajson): self
+ {
+ $this->giteajson = $giteajson;
+
+ return $this;
+ }
+
+ public function getScrum(): ?Scrum
+ {
+ return $this->scrum;
+ }
+
+ public function setScrum(?Scrum $scrum): self
+ {
+ $this->scrum = $scrum;
+
+ return $this;
+ }
+
+}
\ No newline at end of file
diff --git a/src/ninegitea-1.0/src/Form/ScrumpriorityType.php b/src/ninegitea-1.0/src/Form/ScrumpriorityType.php
new file mode 100644
index 0000000..06dd300
--- /dev/null
+++ b/src/ninegitea-1.0/src/Form/ScrumpriorityType.php
@@ -0,0 +1,58 @@
+add('submit',
+ SubmitType::class, [
+ "label" => "Valider",
+ "attr" => ["class" => "btn btn-success no-print"],
+ ]
+ );
+
+ $builder->add('name',
+ TextType::class, [
+ "label" =>"Nom",
+ ]
+ );
+
+ $choices=[];
+ foreach($options["gitealabels"] as $label) {
+ $choices[$label->name]=$label->id;
+ }
+
+ $builder->add('giteaid',
+ ChoiceType::class, [
+ "label" => "Label Gitea",
+ "choices" => $choices,
+ "disabled" => ($options["mode"]=="submit"?false:true),
+ "placeholder" => "Selectionnez un label gitea",
+ ]
+ );
+ }
+
+ public function configureOptions(OptionsResolver $resolver)
+ {
+ $resolver->setDefaults(array(
+ 'data_class' => 'App\Entity\Scrumpriority',
+ 'mode' => 'string',
+ 'gitealabels' => 'string',
+ ));
+ }
+}
diff --git a/src/ninegitea-1.0/templates/Scrumpriority/close.html.twig b/src/ninegitea-1.0/templates/Scrumpriority/close.html.twig
new file mode 100755
index 0000000..6ad0c10
--- /dev/null
+++ b/src/ninegitea-1.0/templates/Scrumpriority/close.html.twig
@@ -0,0 +1,11 @@
+{% extends 'base.html.twig' %}
+
+{% block body %}
+
+{% endblock %}
+
+{% block localjavascript %}
+ $(document).ready(function() {
+ window.parent.$("#mymodalpriority").modal('hide');
+ });
+{% endblock %}
diff --git a/src/ninegitea-1.0/templates/Scrumpriority/edit.html.twig b/src/ninegitea-1.0/templates/Scrumpriority/edit.html.twig
new file mode 100755
index 0000000..d600a54
--- /dev/null
+++ b/src/ninegitea-1.0/templates/Scrumpriority/edit.html.twig
@@ -0,0 +1,51 @@
+{% extends 'base.html.twig' %}
+
+{% block body %}
+{{ form_start(form) }}
+ {{ form_widget(form.submit) }}
+
+
+ {% if mode=="update" %}
+
+ Supprimer
+
+ {% endif %}
+
+
+
+ {% if app.session.flashbag.has('error') %}
+