Commit 3450fee7 authored by Patrick Etcheverry's avatar Patrick Etcheverry

Esthétique beaucoup améliorée (fil d'ariane + glyphicons de Font Awesome)

parent c0b69dc9
......@@ -23,7 +23,10 @@ description: "Description"
position: "Position"
referentLecturer: "Referent Teacher"
projects: "Projects"
project: "Project"
formation: "Formation"
formations: "Formations"
trainingCourses: "Training courses"
user: "Users"
......@@ -57,10 +60,9 @@ parameters: "Settings"
scenarios: "Scenarios"
menu:
projets: "Projects"
formations: "Formations"
formations: "Formations"
utilisateurs: "Users"
questions: "Questions"
questions: "Questions"
scenarisationProcess: "Scenarisation Process"
pageLogin:
......@@ -72,5 +74,5 @@ pageLogin:
connexion: "Sign in"
appDescription: 'Design and export of pedagogical scenarios'
associatedScenarios: "Pedagogical scenarios associated"
footer: "Txuleton platform is hosted by "
......@@ -23,7 +23,10 @@ description: "Descripción"
position: "Posición"
referentTeacher: "Profesor referente"
project: "Proyecto"
projects: "Proyectos"
project: "Project"
formation: "Formation"
formations: "Formationes"
trainingCourses: "Formaciones"
user: "Usuarios"
......@@ -56,7 +59,6 @@ parameters: "Parámetros"
scenarios: "Escenarios"
menu:
projets: "Proyectos"
questions: "Preguntas"
scenarisationProcess: ""
......@@ -69,5 +71,5 @@ pageLogin:
connexion: "Conección"
appDescription: 'Diseño y exportación de escenarios pedagógicos'
associatedScenarios: ""
footer: "La plataforma Txuleton está albergada por la "
......@@ -23,7 +23,10 @@ description: "Description"
position: "Position"
referentTeacher: "Enseignant Référent"
project: "Projet"
projects: "Projets"
project: "Project"
formation: "Formation"
formations: "Formations"
trainingCourses: "Formations"
user: "Utilisateurs"
......@@ -57,8 +60,6 @@ parameters: "Paramètres"
scenarios: "Scénarios"
menu:
projets: "Projets"
formations: "Formations"
utilisateurs: "Utilisateurs"
questions: "Questions"
scenarisationProcess: "Démarche de scénarisation"
......@@ -72,5 +73,5 @@ pageLogin:
connexion: "Connexion"
appDescription: 'Conception et exportation de scénarios pédagogiques'
associatedScenarios: "Scénarios pédagogiques associés"
footer: "La plateforme Txuleton est hébergée par l'"
{# app/Resources/views/base.html.twig #}
{% set appName = "Txuleton" %}
{% set currentLanguage = app.request.locale %}
<!DOCTYPE html>
<html>
......
......@@ -17,7 +17,7 @@
<li class="list-group-item {{app.session.get('menu').projects}}" style="text-decoration: none;">
<a href="{{ path('project_index', { 'userRole': currentRole })}}">
<i class="fa fa-briefcase" aria-hidden="true"></i>
{{'menu.projets'|trans}}
{{'projects'|trans}}
</a>
</li>
......
......@@ -21,17 +21,10 @@ class FormationController extends Controller
*/
public function indexAction(Request $request)
{
// We generate the new breadcrumb
$this->createBreadcrumb("index");
// Mise en évidence du menu, changement du menu sélectionné
$menu = array('pedagogical_scenario' => "",
'projects' => "",
'formation' => "list-group-item-info",
'user' => "",
'parameters' => "",
'scenarisation_process'=> "",
'scenarisation_stage' => "",
'question' => "");
// Mise en session du menu
$this->get('session')->set('menu',$menu);
$this->updateMenu();
$em = $this->getDoctrine()->getManager();
......@@ -49,8 +42,7 @@ class FormationController extends Controller
);
return $this->render('ScenarioBundle:formation:index.html.twig', array(
'formations' => $formations,
'menu' => $menu
'formations' => $formations
));
}
......@@ -60,6 +52,11 @@ class FormationController extends Controller
*/
public function newAction(Request $request)
{
// We generate the new breadcrumb
$this->createBreadcrumb("new");
// Mise en évidence du menu, changement du menu sélectionné
$this->updateMenu();
$formation = new Formation();
$form = $this->createForm('ScenarioBundle\Form\FormationType', $formation);
$form->handleRequest($request);
......@@ -84,6 +81,11 @@ class FormationController extends Controller
*/
public function showAction(Formation $formation)
{
// We generate the new breadcrumb
$this->createBreadcrumb("show", $formation);
// Mise en évidence du menu, changement du menu sélectionné
$this->updateMenu();
$deleteForm = $this->createDeleteForm($formation);
return $this->render('ScenarioBundle:formation:show.html.twig', array(
......@@ -98,6 +100,11 @@ class FormationController extends Controller
*/
public function editAction(Request $request, Formation $formation)
{
// We generate the new breadcrumb
$this->createBreadcrumb("edit", $formation);
// Mise en évidence du menu, changement du menu sélectionné
$this->updateMenu();
$deleteForm = $this->createDeleteForm($formation);
$editForm = $this->createForm('ScenarioBundle\Form\FormationType', $formation);
$editForm->handleRequest($request);
......@@ -157,7 +164,11 @@ class FormationController extends Controller
*
*/
public function pedagogicalScenarioManagementAction(Formation $formation)
{
{ // We generate the new breadcrumb
$this->createBreadcrumb("pedagogical_scenario_management",$formation);
// Mise en évidence du menu, changement du menu sélectionné
$this->updateMenu();
$em = $this->getDoctrine()->getManager();
/*$queryBuilder = $em->getRepository('ScenarioBundle:PedagogicalScenario')->createQueryBuilder('pedagogicalScenarios');
......@@ -265,4 +276,67 @@ class FormationController extends Controller
else
return $this->redirectToRoute('formation_pedagogical_scenario_management', array('userRole' => 'pedagogical-engineer', 'id' => $formation->getId()));
}
private function updateMenu()
{
// Mise en évidence du menu, changement du menu sélectionné
$menu = array('pedagogical_scenario' => "",
'projects' => "",
'formation' => "list-group-item-info",
'user' => "",
'parameters' => "",
'scenarisation_process'=> "",
'scenarisation_stage' => "",
'question' => "");
// Mise en session du menu
$this->get('session')->set('menu',$menu);
}
private function createBreadcrumb($currentAction, $formation = null)
{
$breadcrumbs = $this->get("white_october_breadcrumbs");
switch($currentAction)
{
case "index":
$breadcrumbs->addItem("formations");
break;
case "show":
$breadcrumbs->addRouteItem("formations", "formation_index", [
'userRole' => ($this->get('security.authorization_checker')->isGranted('ROLE_PEDAGOGICAL_ENGINEER')?"pedagogical-engineer":"teacher")
]);
$breadcrumbs->addItem($formation->getShortname());
$breadcrumbs->addItem("show");
break;
case "new":
$breadcrumbs->addRouteItem("formations", "formation_index", [
'userRole' => ($this->get('security.authorization_checker')->isGranted('ROLE_PEDAGOGICAL_ENGINEER')?"pedagogical-engineer":"teacher")
]);
$breadcrumbs->addItem("formation.new");
break;
case "edit":
$breadcrumbs->addRouteItem("formations", "formation_index", [
'userRole' => ($this->get('security.authorization_checker')->isGranted('ROLE_PEDAGOGICAL_ENGINEER')?"pedagogical-engineer":"teacher")
]);
$breadcrumbs->addItem($formation->getShortname());
$breadcrumbs->addItem("edit");
break;
case "pedagogical_scenario_management":
$breadcrumbs->addRouteItem("formations", "formation_index", [
'userRole' => ($this->get('security.authorization_checker')->isGranted('ROLE_PEDAGOGICAL_ENGINEER')?"pedagogical-engineer":"teacher")
]);
$breadcrumbs->addRouteItem($formation->getShortname(), "formation_show", [
'userRole' => ($this->get('security.authorization_checker')->isGranted('ROLE_PEDAGOGICAL_ENGINEER')?"pedagogical-engineer":"teacher"),
'id' => $formation->getId()
]);
$breadcrumbs->addItem("associatedScenarios");
break;
}
}
}
......@@ -671,7 +671,7 @@ class PedagogicalScenarioController extends Controller
$breadcrumbs->addRouteItem("pedagogicalScenario", "pedagogicalscenario_index", [
'userRole' => ($this->get('security.authorization_checker')->isGranted('ROLE_PEDAGOGICAL_ENGINEER')?"pedagogical-engineer":"teacher")
]);
$breadcrumbs->addItem("new");
$breadcrumbs->addItem("pedagogicalScenario.new");
break;
case "edit":
......
......@@ -21,17 +21,11 @@ class ProjectController extends Controller
*/
public function indexAction(Request $request)
{
// We generate the new breadcrumb
$this->createBreadcrumb("index");
// Mise en évidence du menu, changement du menu sélectionné
$menu = array('pedagogical_scenario' => "",
'projects' => "list-group-item-info",
'formation' => "",
'user' => "",
'parameters' => "",
'scenarisation_process'=> "",
'scenarisation_stage' => "",
'question' => "");
// Mise en session du menu
$this->get('session')->set('menu',$menu);
$this->updateMenu();
$em = $this->getDoctrine()->getManager();
......@@ -49,8 +43,7 @@ class ProjectController extends Controller
);
return $this->render('ScenarioBundle:project:index.html.twig', array(
'projects' => $projects,
'menu' => $menu
'projects' => $projects
));
}
......@@ -60,6 +53,11 @@ class ProjectController extends Controller
*/
public function newAction(Request $request)
{
// We generate the new breadcrumb
$this->createBreadcrumb("new");
// Mise en évidence du menu, changement du menu sélectionné
$this->updateMenu();
$project = new Project();
$form = $this->createForm('ScenarioBundle\Form\ProjectType', $project);
$form->handleRequest($request);
......@@ -84,6 +82,11 @@ class ProjectController extends Controller
*/
public function showAction(Project $project)
{
// We generate the new breadcrumb
$this->createBreadcrumb("show",$project);
// Mise en évidence du menu, changement du menu sélectionné
$this->updateMenu();
$deleteForm = $this->createDeleteForm($project);
return $this->render('ScenarioBundle:project:show.html.twig', array(
......@@ -98,6 +101,11 @@ class ProjectController extends Controller
*/
public function editAction(Request $request, Project $project)
{
// We generate the new breadcrumb
$this->createBreadcrumb("edit",$project);
// Mise en évidence du menu, changement du menu sélectionné
$this->updateMenu();
$deleteForm = $this->createDeleteForm($project);
$editForm = $this->createForm('ScenarioBundle\Form\ProjectType', $project);
$editForm->handleRequest($request);
......@@ -160,6 +168,11 @@ class ProjectController extends Controller
public function pedagogicalScenarioManagementAction(Project $project)
{
// We generate the new breadcrumb
$this->createBreadcrumb("pedagogical_scenario_management",$project);
// Mise en évidence du menu, changement du menu sélectionné
$this->updateMenu();
$em = $this->getDoctrine()->getManager();
/*$queryBuilder = $em->getRepository('ScenarioBundle:PedagogicalScenario')->createQueryBuilder('pedagogicalScenarios');
......@@ -196,4 +209,67 @@ class ProjectController extends Controller
'project' => $project
));
}
private function updateMenu()
{
// Mise en évidence du menu, changement du menu sélectionné
$menu = array('pedagogical_scenario' => "",
'projects' => "list-group-item-info",
'formation' => "",
'user' => "",
'parameters' => "",
'scenarisation_process'=> "",
'scenarisation_stage' => "",
'question' => "");
// Mise en session du menu
$this->get('session')->set('menu',$menu);
}
private function createBreadcrumb($currentAction, $project = null)
{
$breadcrumbs = $this->get("white_october_breadcrumbs");
switch($currentAction)
{
case "index":
$breadcrumbs->addItem("projects");
break;
case "show":
$breadcrumbs->addRouteItem("projects", "project_index", [
'userRole' => ($this->get('security.authorization_checker')->isGranted('ROLE_PEDAGOGICAL_ENGINEER')?"pedagogical-engineer":"teacher")
]);
$breadcrumbs->addItem($project->getShortname());
$breadcrumbs->addItem("show");
break;
case "new":
$breadcrumbs->addRouteItem("projects", "project_index", [
'userRole' => ($this->get('security.authorization_checker')->isGranted('ROLE_PEDAGOGICAL_ENGINEER')?"pedagogical-engineer":"teacher")
]);
$breadcrumbs->addItem("project.new");
break;
case "edit":
$breadcrumbs->addRouteItem("projects", "project_index", [
'userRole' => ($this->get('security.authorization_checker')->isGranted('ROLE_PEDAGOGICAL_ENGINEER')?"pedagogical-engineer":"teacher")
]);
$breadcrumbs->addItem($project->getShortname());
$breadcrumbs->addItem("edit");
break;
case "pedagogical_scenario_management":
$breadcrumbs->addRouteItem("projects", "project_index", [
'userRole' => ($this->get('security.authorization_checker')->isGranted('ROLE_PEDAGOGICAL_ENGINEER')?"pedagogical-engineer":"teacher")
]);
$breadcrumbs->addRouteItem($project->getShortname(), "project_show", [
'userRole' => ($this->get('security.authorization_checker')->isGranted('ROLE_PEDAGOGICAL_ENGINEER')?"pedagogical-engineer":"teacher"),
'id' => $project->getId()
]);
$breadcrumbs->addItem("associatedScenarios");
break;
}
}
}
{% extends 'base.html.twig' %}
{% block body %}
<h2 class="text-center">{{'formation.edit'|trans}}</h2>
<div class="panel-heading">
<h4>
<b>{{'formation.edit'|trans}}</b>
</h4>
</div>
<div class="panel-body">
<br/>
{{ form_start(edit_form) }}
<div class="formulaire">
{{ form_start(edit_form) }}
{{ form_widget(edit_form) }}
<input type="submit" value="{{'edit'|trans}}" />
{{ form_widget(edit_form) }}
<div style="float: right">
<h4>
<i class="fa fa-floppy-o" aria-hidden="true"></i>
<input class="boutonSansBordure" type="submit" value="{{'save'|trans}}"/>
</h4>
</div>
{{ 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 style="float: left">
<h4>
{{ form_start(delete_form) }}
{# Bouton supprimer #}
<i class="fa fa-trash-o" aria-hidden="true"></i>
<input class="boutonSansBordure" type="submit" value="{{'delete'|trans}}">
{{ form_end(delete_form) }}
</h4>
</div>
</div>
</div>
{% endblock %}
{% extends 'base.html.twig' %}
{% block body %}
<h2 class="text-center">{{ 'formation.list'|trans }}</h2>
<div class="panel-heading">
<h4>
<b>{{ 'formation.list'|trans }}</b>
</h4>
</div>
<div class="panel-body">
<table class="table">
<thead>
<tr>
<th>{{ knp_pagination_sortable(formations, 'shortname'|trans, 'formations.shortname') }}</th>
<th>{{ knp_pagination_sortable(formations, 'fullname'|trans, 'formations.fullname') }}</th>
<th>{{ 'actions'|trans }}</th>
</tr>
</thead>
<tbody>
<thead>
<tr>
<th>{{ knp_pagination_sortable(formations, 'shortname'|trans, 'formations.shortname') }}</th>
<th>{{ knp_pagination_sortable(formations, 'fullname'|trans, 'formations.fullname') }}</th>
<th>{{ 'actions'|trans }}</th>
</tr>
</thead>
<tbody>
{% for formation in formations %}
<tr>
<td>{{ formation.shortname }}</td>
<td>{{ formation.fullname }}</td>
<td>
<ul>
<li>
<a href="{{ path('formation_show', { 'id': formation.id, 'userRole': currentRole }) }}">{{ 'show'|trans }}</a>
</li>
{% if currentRole == "pedagogical-engineer" %}
<li>
<a href="{{ path('formation_edit', { 'id': formation.id, 'userRole': currentRole }) }}">{{ 'edit'|trans }}</a>
</li>
<li>
<a href="{{ path('formation_pedagogical_scenario_management', { 'id': formation.id, 'userRole': currentRole } ) }}">Associer les scénarios pédagogiques</a>
</li>
{% endif %}
</ul>
</td>
</tr>
<tr>
<td>{{ formation.shortname }}</td>
<td>{{ formation.fullname }}</td>
<td>
<a title="{{ 'show'|trans }}" href="{{ path('formation_show', { 'userRole': currentRole, 'id': formation.id }) }}">
<i class="fa fa-eye" aria-hidden="true"></i>
</a>
&nbsp;
{% if currentRole == "pedagogical-engineer" %}
<a title="{{ 'edit'|trans }}" href="{{ path('formation_edit', { 'userRole': "pedagogical-engineer", 'id': formation.id }) }}">
<i class="fa fa-pencil" aria-hidden="true"></i>
</a>
&nbsp;
<a title="{{ 'ASSOCIER LES SCENARIOS PEDA'|trans }}" href="{{ path('formation_pedagogical_scenario_management', { 'userRole': "pedagogical-engineer", 'id': formation.id }) }}">
<i class="fa fa-book" aria-hidden="true"></i>
</a>
{% endif %}
</td>
</tr>
{% endfor %}
</tbody>
</tbody>
</table>
<ul>
<li>
<a href="{{ path('formation_new', {'userRole': currentRole}) }}">{{ 'formation.new'|trans }}</a>
</li>
</ul>
{% if currentRole == "pedagogical-engineer" %}
<div style="float: right">
<h4>
{# Bouton Ajouter #}
<i class="fa fa-plus" aria-hidden="true"></i>
<a href="{{ path('formation_new', { 'userRole': "pedagogical-engineer" }) }}">{{"formation.new"|trans}}</a>
</h4>
</div>
{% endif %}
</div>
{% endblock %}
{% extends 'base.html.twig' %}
{% block body %}
<h2 class="text-center">{{ 'formation.add'|trans }}</h2>
<div class="panel-heading">
<h4>
<b>{{'formation.add'|trans}}</b>
</h4>
</div>
<div class="panel-body">
<br/>
<div class="formulaire">
{{ form_start(form) }}
{{ form_widget(form) }}
<input type="submit" value="{{'create'|trans}}" />
{{ form_end(form) }}
{{ form_start(form) }}
{{ form_widget(form) }}
<ul>
<li>
<a href="{{ path('formation_index', {'userRole': currentRole }) }}">{{'backToList'|trans}}</a>
</li>
</ul>
<div style="float: right">
<h4>
{# Bouton enregistrer #}
<i class="fa fa-floppy-o" aria-hidden="true"></i>
<input class="boutonSansBordure" type="submit" value="{{'save'|trans}}">
{{ form_end(form) }}
</h4>
</div>
</div>
</div>
{% endblock %}
{% extends 'base.html.twig' %}
{% block body %}
<h2 class="text-center">Gestion des scénarios pédagoiques d'une formation</h2>
<h4 class="text-center">Formation courante : {{ formation.shortname }}</h4>
<hr/>
<div class="panel-heading">
<h4>
<b>GESTION DES SCENARIOS D'UNE FORMATION</b>