amélioration affichage listes des taches
This commit is contained in:
@@ -28,12 +28,13 @@ class EventController extends AbstractController
|
|||||||
$em = $this->getDoctrine()->getManager();
|
$em = $this->getDoctrine()->getManager();
|
||||||
$users = $em->getRepository("App:User")->findAll();
|
$users = $em->getRepository("App:User")->findAll();
|
||||||
$tasks = $em->getRepository("App:Task")->findAll();
|
$tasks = $em->getRepository("App:Task")->findAll();
|
||||||
|
$projects= $em->getRepository("App:Project")->findBy(["active"=>true]);
|
||||||
|
|
||||||
return $this->render($this->render.'list.html.twig',[
|
return $this->render($this->render.'list.html.twig',[
|
||||||
"useheader" => true,
|
"useheader" => true,
|
||||||
"usesidebar" => true,
|
"usesidebar" => true,
|
||||||
"users" => $users,
|
"users" => $users,
|
||||||
"tasks" => $tasks
|
"projects" => $projects
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -23,14 +23,14 @@ class TimerController extends AbstractController
|
|||||||
|
|
||||||
$iduser = $this->get("session")->get("iduser");
|
$iduser = $this->get("session")->get("iduser");
|
||||||
$user = $em->getRepository("App:User")->find($iduser);
|
$user = $em->getRepository("App:User")->find($iduser);
|
||||||
$tasks = $em->getRepository("App:Task")->findAll();
|
$projects= $em->getRepository("App:Project")->findBy(["active"=>true]);
|
||||||
$timers = $em->getRepository("App:Timer")->findBy(["user"=>$iduser]);
|
$timers = $em->getRepository("App:Timer")->findBy(["user"=>$iduser]);
|
||||||
|
|
||||||
return $this->render($this->render.'list.html.twig',[
|
return $this->render($this->render.'list.html.twig',[
|
||||||
"useheader" => true,
|
"useheader" => true,
|
||||||
"usesidebar" => true,
|
"usesidebar" => true,
|
||||||
"user" => $user,
|
"user" => $user,
|
||||||
"tasks" => $tasks,
|
"projects" => $projects,
|
||||||
"timers" => $timers,
|
"timers" => $timers,
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
@@ -42,6 +42,14 @@
|
|||||||
.eventEstimate {
|
.eventEstimate {
|
||||||
margin: -3px 10px;
|
margin: -3px 10px;
|
||||||
}
|
}
|
||||||
|
.select2-results__group {
|
||||||
|
font-size:12px !important;
|
||||||
|
}
|
||||||
|
.select2-results__option{
|
||||||
|
font-size: 14px;
|
||||||
|
padding-left:15px
|
||||||
|
}
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block body %}
|
{% block body %}
|
||||||
@@ -83,9 +91,14 @@
|
|||||||
</label>
|
</label>
|
||||||
<select class="select2entity" id="tasksubmit" name="tasksubmit">
|
<select class="select2entity" id="tasksubmit" name="tasksubmit">
|
||||||
<option></option>
|
<option></option>
|
||||||
{% for task in tasks|sort((a, b) => a.displayname <=> b.displayname) %}
|
{% for project in projects|sort((a, b) => a.displayname <=> b.displayname) %}
|
||||||
<option value="{{task.id}}">{{task.displayname}}</option>
|
<optgroup label="{{project.displayname}}">
|
||||||
|
{% for task in project.tasks|sort((a, b) => a.displayname <=> b.displayname) %}
|
||||||
|
<option value="{{task.id}}">{{task.displayname}}</option>
|
||||||
|
{% endfor %}
|
||||||
|
</optgroup>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -169,8 +182,12 @@
|
|||||||
</label>
|
</label>
|
||||||
<select class="select2entity" id="taskupdate" name="taskupdate">
|
<select class="select2entity" id="taskupdate" name="taskupdate">
|
||||||
<option></option>
|
<option></option>
|
||||||
{% for task in tasks|sort((a, b) => a.displayname <=> b.displayname) %}
|
{% for project in projects|sort((a, b) => a.displayname <=> b.displayname) %}
|
||||||
<option value="{{task.id}}">{{task.displayname}}</option>
|
<optgroup label="{{project.displayname}}">
|
||||||
|
{% for task in project.tasks|sort((a, b) => a.displayname <=> b.displayname) %}
|
||||||
|
<option value="{{task.id}}">{{task.displayname}}</option>
|
||||||
|
{% endfor %}
|
||||||
|
</optgroup>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
@@ -7,6 +7,13 @@
|
|||||||
#timer-desc {
|
#timer-desc {
|
||||||
width:300px;
|
width:300px;
|
||||||
}
|
}
|
||||||
|
.select2-results__group {
|
||||||
|
font-size:12px !important;
|
||||||
|
}
|
||||||
|
.select2-results__option{
|
||||||
|
font-size: 14px;
|
||||||
|
padding-left:15px
|
||||||
|
}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block body %}
|
{% block body %}
|
||||||
@@ -20,11 +27,16 @@ SUIVI HORAIRE
|
|||||||
<a class="btn btn-success" style="float:right" href={{ path('app_timer_submit') }}>Créer un Timer</a>
|
<a class="btn btn-success" style="float:right" href={{ path('app_timer_submit') }}>Créer un Timer</a>
|
||||||
{% if user %}
|
{% if user %}
|
||||||
Lancer un Timer :
|
Lancer un Timer :
|
||||||
<select class="select2entity" id="timer-task" name="timer-task">
|
<select class="select2entity" id="tasksubmit" name="tasksubmit">
|
||||||
<option> Tâche </option>
|
<option></option>
|
||||||
{% for task in tasks %}
|
{% for project in projects|sort((a, b) => a.displayname <=> b.displayname) %}
|
||||||
<option value="{{task.id}}">{{task.displayname}}</option>
|
<optgroup label="{{project.displayname}}">
|
||||||
|
{% for task in project.tasks|sort((a, b) => a.displayname <=> b.displayname) %}
|
||||||
|
<option value="{{task.id}}">{{task.displayname}}</option>
|
||||||
|
{% endfor %}
|
||||||
|
</optgroup>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
</select>
|
</select>
|
||||||
<input id="timer-desc" name="timer-desc" placeholder="Description" />
|
<input id="timer-desc" name="timer-desc" placeholder="Description" />
|
||||||
<a href='#' title='Add' id='addtimer'>
|
<a href='#' title='Add' id='addtimer'>
|
||||||
|
Reference in New Issue
Block a user