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