Commit c49da081 authored by Patrick Etcheverry's avatar Patrick Etcheverry

Un peu d'ergonomie

parent 936d30ab
......@@ -22,6 +22,7 @@ formation: "Formation"
user: "User"
pedagogicalScenario: "Pedagogical Scenario"
add: "Add"
create: "Create"
delete: "Delete"
backToList: "Back to the list"
......
......@@ -22,6 +22,7 @@ formation: ""
user: ""
pedagogicalScenario: ""
add: ""
create: ""
delete: ""
backToList: ""
......
......@@ -22,6 +22,7 @@ formation: "Formation"
user: "Utilisateur"
pedagogicalScenario: "Scénario Pédagogique"
add: "Ajouter"
create: "Créer"
delete: "Supprimer"
backToList: "Retour à la liste"
......
......@@ -17,6 +17,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>{% block title %}{{ appName }}{% endblock %}</title>
{% block stylesheets %}
<link rel="stylesheet" href="{{ asset('css/general.css')}}" type="text/css">
<link rel="stylesheet" href="{{ asset('css/font-awesome.min.css')}}" type="text/css">
<link rel="stylesheet" href="{{ asset('css/bootstrap.min.css')}}" type="text/css">
<link rel="stylesheet" href="{{ asset('css/style_vue_mere.css')}}" type="text/css">
......
......@@ -78,9 +78,21 @@ class PedagogicalScenarioController extends Controller
{
$deleteForm = $this->createDeleteForm($pedagogicalScenario);
// On récupère la liste des formations dans lesquelles intervient le scénario
// courant
$em = $this->getDoctrine()->getManager();
$dql_formationsAssociees = $em->createQuery ('
select f
FROM ScenarioBundle:Formation f
JOIN f.pedagogicalScenarioFormation psf
WHERE psf.pedagogicalScenario = :pedagogicalScenario');
$dql_formationsAssociees->setParameter('pedagogicalScenario', $pedagogicalScenario);
$formationsAssociees = $dql_formationsAssociees->getResult();
return $this->render('ScenarioBundle:pedagogicalscenario:show.html.twig', array(
'pedagogicalScenario' => $pedagogicalScenario,
'delete_form' => $deleteForm->createView(),
'formations' => $formationsAssociees
));
}
......@@ -92,7 +104,7 @@ class PedagogicalScenarioController extends Controller
{
$deleteForm = $this->createDeleteForm($pedagogicalScenario);
$editForm = $this->createForm('ScenarioBundle\Form\PedagogicalScenarioTypeEdit', $pedagogicalScenario);
$editForm->handleRequest($request);
if ($editForm->isSubmitted() && $editForm->isValid())
......
{% extends 'base.html.twig' %}
{% block body %}
<h1>{{'formation.edit'|trans}}</h1>
<h2 class="text-center">{{'formation.edit'|trans}}</h2>
{{ form_start(edit_form) }}
{{ form_widget(edit_form) }}
<input type="submit" value="{{'edit'|trans}}" />
{{ form_end(edit_form) }}
<br/>
<ul>
<li>
<a href="{{ path('formation_index', {'userRole': currentRole }) }}">{{'backToList'|trans}}</a>
</li>
<li>
{{ form_start(delete_form) }}
<input type="submit" value="{{'delete'|trans}}">
{{ form_end(delete_form) }}
</li>
</ul>
<div class="formulaire">
{{ form_start(edit_form) }}
{{ form_widget(edit_form) }}
<input type="submit" value="{{'edit'|trans}}" />
{{ form_end(edit_form) }}
<ul>
<li>
<a href="{{ path('formation_index', {'userRole': currentRole }) }}">{{'backToList'|trans}}</a>
</li>
<li>
{{ form_start(delete_form) }}
<input type="submit" value="{{'delete'|trans}}">
{{ form_end(delete_form) }}
</li>
</ul>
</div>
{% endblock %}
{% extends 'base.html.twig' %}
{% block body %}
<h1>{{ 'formation.list'|trans }}</h1>
<h2 class="text-center">{{ 'formation.list'|trans }}</h2>
<table class="table">
<thead>
......
{% extends 'base.html.twig' %}
{% block body %}
<h1>{{ 'formation.add'|trans }}</h1>
<h2 class="text-center">{{ 'formation.add'|trans }}</h2>
<br/>
<div class="formulaire">
{{ form_start(form) }}
{{ form_widget(form) }}
......@@ -13,4 +17,5 @@
<a href="{{ path('formation_index', {'userRole': currentRole }) }}">{{'backToList'|trans}}</a>
</li>
</ul>
</div>
{% endblock %}
{% extends 'base.html.twig' %}
{% block body %}
<h1>Gestion des scénarios pédagoiques d'une formation</h1>
Formation courante : {{ formation.shortname }}
<h2 class="text-center">Gestion des scénarios pédagoiques d'une formation</h2>
<h4 class="text-center">Formation courante : {{ formation.shortname }}</h4>
<hr/>
<p> Liste des scénarios pédagogiques déjà liés :</p>
{% if pedagogicalScenariosAlreadyLinked is not empty %}
<p> Liste des scénarios pédagogiques déjà liés </p>
<table class="table">
<thead>
<tr>
......@@ -27,11 +28,11 @@
</table>
{% else %}
<p> La formation courante ne possède aucun scénario pédagogique </p>
<p> <i> &nbsp;&nbsp;&nbsp;La formation courante ne possède aucun scénario pédagogique </i> </p>
{% endif %}
{% if pedagogicalScenariosAvailable is not empty %}
<p> Liste des scénarios pédagogiques disponibles </p>
<p> Liste des scénarios pédagogiques disponibles : </p>
<table class="table">
<thead>
<tr>
......@@ -45,7 +46,7 @@
<tr>
<td>{{ pedagogicalScenario.shortname }}</td>
<td>{{ pedagogicalScenario.fullname }}</td>
<td><a href="{{ path('formation_pedagogical_scenario_add', {'userRole': currentRole, 'id' : formation.id, 'pedagogicalScenario' : pedagogicalScenario.id}) }}">{{ 'Add'|trans}}</a></td>
<td><a href="{{ path('formation_pedagogical_scenario_add', {'userRole': currentRole, 'id' : formation.id, 'pedagogicalScenario' : pedagogicalScenario.id}) }}">{{ 'add'|trans}}</a></td>
</tr>
{% endfor %}
</tbody>
......
{% extends 'base.html.twig' %}
{% block body %}
<h1>{{'formation'|trans}}</h1>
<h2 class="text-center">{{'formation'|trans}}</h2>
<table class="table">
<tbody>
<tr>
<th>{{ 'shortname'|trans }}</th>
<td>{{ formation.shortname }}</td>
</tr>
<tr>
<th>{{ 'fullname'|trans }}</th>
<td>{{ formation.fullname }}</td>
</tr>
</tbody>
</table>
<br/>
<ul>
<li>
<a href="{{ path('formation_index', {'userRole': currentRole }) }}">{{ 'backToList'|trans }}</a>
</li>
<li>
<a href="{{ path('formation_edit', { 'id': formation.id, 'userRole': currentRole }) }}">{{'edit'|trans}}</a>
</li>
<li>
{{ form_start(delete_form) }}
<input type="submit" value="{{'delete'|trans}}">
{{ form_end(delete_form) }}
</li>
</ul>
<div class="formulaire">
<table class="table">
<tbody>
<tr>
<th>{{ 'shortname'|trans }}</th>
<td>{{ formation.shortname }}</td>
</tr>
<tr>
<th>{{ 'fullname'|trans }}</th>
<td>{{ formation.fullname }}</td>
</tr>
</tbody>
</table>
<ul>
<li>
<a href="{{ path('formation_index', {'userRole': currentRole }) }}">{{ 'backToList'|trans }}</a>
</li>
<li>
<a href="{{ path('formation_edit', { 'id': formation.id, 'userRole': currentRole }) }}">{{'edit'|trans}}</a>
</li>
<li>
{{ form_start(delete_form) }}
<input type="submit" value="{{'delete'|trans}}">
{{ form_end(delete_form) }}
</li>
</ul>
</div>
{% endblock %}
{% extends 'base.html.twig' %}
{% block body %}
<h1>{{'pedagogicalScenario.edit'|trans}}</h1>
<h2 class="text-center">{{'pedagogicalScenario.edit'|trans}}</h2>
{{ form_start(edit_form) }}
{{ form_widget(edit_form) }}
<input type="submit" value="{{'edit'|trans}}" />
{{ form_end(edit_form) }}
<br/>
<div class="formulaire">
{{ form_start(edit_form) }}
{{ form_widget(edit_form) }}
<input type="submit" value="{{'edit'|trans}}" />
{{ form_end(edit_form) }}
<ul>
<li>
<a href="{{ path('pedagogicalscenario_index', { 'userRole': currentRole }) }}">{{'backToList'|trans}}</a>
</li>
<li>
{{ form_start(delete_form) }}
<input type="submit" value="{{'delete'|trans}}">
{{ form_end(delete_form) }}
</li>
</ul>
<ul>
<li>
<a href="{{ path('pedagogicalscenario_index', { 'userRole': currentRole }) }}">{{'backToList'|trans}}</a>
</li>
<li>
{{ form_start(delete_form) }}
<input type="submit" value="{{'delete'|trans}}">
{{ form_end(delete_form) }}
</li>
</ul>
</div>
{% endblock %}
{% extends 'base.html.twig' %}
{% block body %}
<h1>Gestion des formations d'un scénario pédagogique</h1>
Scénario Pédagogique courant : {{ pedagogicalScenario.shortname }}
<h2 class="text-center">Gestion des formations d'un scénario pédagogique</h2>
<br/>
<h4 class="text-center">Scénario Pédagogique : {{ pedagogicalScenario.shortname }}</h4>
<hr/>
<p> Liste des formations déjà liées </p>
<p> Liste des formations déjà liées :</p>
{% if formationsAlreadyLinked is not empty %}
<table class="table">
<thead>
......@@ -27,10 +28,12 @@
</table>
{% else %}
<p> <i>&nbsp;&nbsp;&nbsp;Le scénario pédagogique courant ne possède aucun formation</i> </p>
<p> <i>&nbsp;&nbsp;&nbsp;Le scénario pédagogique courant ne possède aucune formation</i> </p>
{% endif %}
<p> Liste des formations disponibles </p>
<hr/>
<p> Liste des formations disponibles :</p>
{% if formationsAvailable is not empty %}
<table class="table">
<thead>
......@@ -45,7 +48,7 @@
<tr>
<td>{{ formation.shortname }}</td>
<td>{{ formation.fullname }}</td>
<td><a href="{{ path('pedagogicalscenario_formation_add', {'userRole': currentRole, 'id' : pedagogicalScenario.id, 'formation' : formation.id}) }}">{{ 'Add'|trans}}</a></td>
<td><a href="{{ path('pedagogicalscenario_formation_add', {'userRole': currentRole, 'id' : pedagogicalScenario.id, 'formation' : formation.id}) }}">{{'add'|trans}}</a></td>
</tr>
{% endfor %}
</tbody>
......
{% extends 'base.html.twig' %}
{% block body %}
<h1>{{ 'pedagogicalScenario.list'|trans }}</h1>
<h2 class="text-center">{{ 'pedagogicalScenario.list'|trans }}</h2>
<table class="table">
<thead>
......
{% extends 'base.html.twig' %}
{% block body %}
<h1>{{ 'pedagogicalScenario.add'|trans }}</h1>
<h2 class="text-center">{{ 'pedagogicalScenario.add'|trans }}</h2>
{{ form_start(form) }}
{{ form_widget(form) }}
<input type="submit" value="{{'create'|trans}}" />
{{ form_end(form) }}
<br/>
<ul>
<li>
<a href="{{ path('pedagogicalscenario_index', {'userRole': currentRole}) }}">{{'backToList'|trans}}</a>
</li>
</ul>
<div class="formulaire">
{{ form_start(form) }}
{{ form_widget(form) }}
<input type="submit" value="{{'create'|trans}}" />
{{ form_end(form) }}
<ul>
<li>
<a href="{{ path('pedagogicalscenario_index', {'userRole': currentRole}) }}">{{'backToList'|trans}}</a>
</li>
</ul>
</div>
{% endblock %}
{% extends 'base.html.twig' %}
{% block body %}
<h1>{{'pedagogicalScenario'|trans}}</h1>
<table class="table">
<tbody>
<tr>
<th>{{ 'shortname'|trans }}</th>
<td>{{ pedagogicalScenario.shortname }}</td>
</tr>
<tr>
<th>{{ 'fullname'|trans }}</th>
<td>{{ pedagogicalScenario.fullname }}</td>
</tr>
<tr>
<th>{{ 'referentLecturer'|trans }}</th>
<td>{{ pedagogicalScenario.referentTeacher.firstname }} {{ pedagogicalScenario.referentTeacher.lastname }}</td>
</tr>
<tr>
<th>{{ 'project'|trans }}</th>
{% if (pedagogicalScenario.project == null) %}
<td>LIE A AUCUN PROJET</td>
{% else %}
<td>{{ pedagogicalScenario.project.shortname}}</td>
{% endif %}
</tr>
<tr>
<th>{{ 'scenarisationProcess'|trans }}</th>
<td>{{ pedagogicalScenario.scenarisationProcess.title }}</td>
</tr>
</tbody>
</table>
<h2 class="text-center">{{'pedagogicalScenario'|trans}}</h2>
<ul>
<li>
<a href="{{ path('pedagogicalscenario_index' , { 'userRole': currentRole} ) }}">{{ 'backToList'|trans }}</a>
</li>
<li>
<a href="{{ path('pedagogicalscenario_edit', { 'id': pedagogicalScenario.id, 'userRole': currentRole }) }}">{{'edit'|trans}}</a>
</li>
<li>
{{ form_start(delete_form) }}
<input type="submit" value="{{'delete'|trans}}">
{{ form_end(delete_form) }}
</li>
</ul>
<br/>
<div class="formulaire">
<table class="table">
<tbody>
<tr>
<th>{{ 'shortname'|trans }}</th>
<td>{{ pedagogicalScenario.shortname }}</td>
</tr>
<tr>
<th>{{ 'fullname'|trans }}</th>
<td>{{ pedagogicalScenario.fullname }}</td>
</tr>
<tr>
<th>{{ 'referentTeacher'|trans }}</th>
<td>
<a href="{{ path('user_show', { 'id': pedagogicalScenario.referentTeacher.id, 'userRole': currentRole }) }}">
{{ pedagogicalScenario.referentTeacher.firstname }} {{ pedagogicalScenario.referentTeacher.lastname }}
</a>
</td>
</tr>
<tr>
<th>{{ 'project'|trans }}</th>
{% if (pedagogicalScenario.project == null) %}
<td>LIE A AUCUN PROJET</td>
{% else %}
<td>{{ pedagogicalScenario.project.shortname}}</td>
{% endif %}
</tr>
<tr>
<th>{{ 'scenarisationProcess'|trans }}</th>
<td>
<a href="{{ path('scenarisation_process_show', { 'id': pedagogicalScenario.scenarisationProcess.id, 'userRole': currentRole }) }}">
{{ pedagogicalScenario.scenarisationProcess.title }}
</a>
</td>
</tr>
<tr>
<th>{{ 'formation'|trans }}s</th>
<td>
{% if formations is not empty %}
{% for formation in formations %}
<a href="{{ path('formation_show', { 'id': formation.id, 'userRole': currentRole }) }}">
{{ formation.shortname }}
</a>
<br/>
{% endfor %}
{% else %}
Aucune formation
{% endif %}
</td>
</tr>
</tbody>
</table>
<ul>
<li>
<a href="{{ path('pedagogicalscenario_index' , { 'userRole': currentRole} ) }}">{{ 'backToList'|trans }}</a>
</li>
<li>
<a href="{{ path('pedagogicalscenario_edit', { 'id': pedagogicalScenario.id, 'userRole': currentRole }) }}">{{'edit'|trans}}</a>
</li>
<li>
{{ form_start(delete_form) }}
<input type="submit" value="{{'delete'|trans}}">
{{ form_end(delete_form) }}
</li>
</ul>
</div>
{% endblock %}
{% extends 'base.html.twig' %}
{% block body %}
<h1>{{'project.edit'|trans}}</h1>
<h2 class="text-center">{{'project.edit'|trans}}</h2>
{{ form_start(edit_form) }}
{{ form_widget(edit_form) }}
<input type="submit" value="{{'edit'|trans}}" />
{{ form_end(edit_form) }}
<br/>
<ul>
<li>
<a href="{{ path('project_index', {'userRole': currentRole }) }}">{{'backToList'|trans}}</a>
</li>
<li>
{{ form_start(delete_form) }}
<input type="submit" value="{{'delete'|trans}}">
{{ form_end(delete_form) }}
</li>
</ul>
<div class="formulaire">
{{ form_start(edit_form) }}
{{ form_widget(edit_form) }}
<input type="submit" value="{{'edit'|trans}}" />
{{ form_end(edit_form) }}
<ul>
<li>
<a href="{{ path('project_index', {'userRole': currentRole }) }}">{{'backToList'|trans}}</a>
</li>
<li>
{{ form_start(delete_form) }}
<input type="submit" value="{{'delete'|trans}}">
{{ form_end(delete_form) }}
</li>
</ul>
</div>
{% endblock %}
{% extends 'base.html.twig' %}
{% block body %}
<h1>{{ 'project.list'|trans }}</h1>
<h2 class="text-center">{{ 'project.list'|trans }}</h2>
<table class="table">
<thead>
<tr>
<th>{{ knp_pagination_sortable(projects, 'shortname'|trans, 'projects.shortname') }}</th>
<th>{{ knp_pagination_sortable(projects, 'fullname'|trans, 'projects.fullname') }}</th>
<th>{{ 'actions'|trans }}</th>
</tr>
</thead>
<tbody>
{% for project in projects %}
<tr>
<td>{{ project.shortname }}</td>
<td>{{ project.fullname }}</td>
<td>
<ul>
{% dump(currentRole) %}
<li>
<a href="{{ path('project_show', { 'id': project.id, 'userRole': currentRole }) }}">{{ 'show'|trans }}</a>
</li>
{% if currentRole == "pedagogical-engineer" %}
<li>
<a href="{{ path('project_edit', { 'id': project.id, 'userRole': currentRole }) }}">{{ 'edit'|trans }}</a>
</li>
<li>
<a href="{{ path('project_pedagogical_scenario_management', { 'id': project.id, 'userRole': currentRole } ) }}">Associer les scénarios pédagogiques</a>
</li>
{% endif %}
</ul>
</td>
</tr>
{% endfor %}
</tbody>
</table>
<br/>
<table class="table">
<thead>
<tr>
<th>{{ knp_pagination_sortable(projects, 'shortname'|trans, 'projects.shortname') }}</th>
<th>{{ knp_pagination_sortable(projects, 'fullname'|trans, 'projects.fullname') }}</th>
<th>{{ 'actions'|trans }}</th>
</tr>
</thead>
<tbody>
{% for project in projects %}
<tr>
<td>{{ project.shortname }}</td>
<td>{{ project.fullname }}</td>
<td>
<ul>
{% dump(currentRole) %}
<li>
<a href="{{ path('project_show', { 'id': project.id, 'userRole': currentRole }) }}">{{ 'show'|trans }}</a>
</li>
{% if currentRole == "pedagogical-engineer" %}
<li>
<a href="{{ path('project_edit', { 'id': project.id, 'userRole': currentRole }) }}">{{ 'edit'|trans }}</a>