mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
[backend] prepare new page: controller, route, link and minimal template
This commit is contained in:
parent
7abecdea02
commit
6ab5e708ec
@ -178,6 +178,28 @@ class AccompanyingCourseWorkController extends AbstractController
|
|||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Route(
|
||||||
|
* "{_locale}/person/accompanying-period/work/{id}/show",
|
||||||
|
* name="chill_person_accompanying_period_work_show",
|
||||||
|
* methods={"GET"}
|
||||||
|
* )
|
||||||
|
*/
|
||||||
|
public function showWork(AccompanyingPeriodWork $work): Response
|
||||||
|
{
|
||||||
|
if (null === $work) {
|
||||||
|
throw $this->createNotFoundException('Unable to find Work entity.');
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->denyAccessUnlessGranted(AccompanyingPeriodWorkVoter::SEE, $work);
|
||||||
|
|
||||||
|
return $this->render('@ChillPerson/AccompanyingCourseWork/show.html.twig', [
|
||||||
|
'accompanyingCourse' => $work->getAccompanyingPeriod(),
|
||||||
|
'work' => $work,
|
||||||
|
]);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
private function createDeleteForm(int $id): Form
|
private function createDeleteForm(int $id): Form
|
||||||
{
|
{
|
||||||
$params = [];
|
$params = [];
|
||||||
|
@ -128,10 +128,15 @@
|
|||||||
'Chill\\PersonBundle\\Entity\\AccompanyingPeriod\\AccompanyingPeriodWork',
|
'Chill\\PersonBundle\\Entity\\AccompanyingPeriod\\AccompanyingPeriodWork',
|
||||||
w.id, [], suppEvaluations) }}
|
w.id, [], suppEvaluations) }}
|
||||||
</li>
|
</li>
|
||||||
|
<li>
|
||||||
|
<a class="btn btn-show" title="{{ 'Show'|trans }}"
|
||||||
|
href="{{ chill_path_add_return_path('chill_person_accompanying_period_work_show', {'id': w.id }) }}"
|
||||||
|
></a>
|
||||||
|
</li>
|
||||||
{% if is_granted('CHILL_MAIN_ACCOMPANYING_PERIOD_WORK_UPDATE', w) %}
|
{% if is_granted('CHILL_MAIN_ACCOMPANYING_PERIOD_WORK_UPDATE', w) %}
|
||||||
<li>
|
<li>
|
||||||
<a class="btn btn-edit" title="{{ 'Edit'|trans }}"
|
<a class="btn btn-edit" title="{{ 'Edit'|trans }}"
|
||||||
href="{{ chill_path_add_return_path('chill_person_accompanying_period_work_edit', { 'id': w.id }) }}"
|
href="{{ chill_path_add_return_path('chill_person_accompanying_period_work_edit', { 'id': w.id }) }}"
|
||||||
></a>
|
></a>
|
||||||
</li>
|
</li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div class="accompanying_course_work-edit">
|
<div class="accompanying_course_work">
|
||||||
<h1>{{ block('title') }}</h1>
|
<h1>{{ block('title') }}</h1>
|
||||||
<div id="accompanying_course_work_edit"></div>
|
<div id="accompanying_course_work_edit"></div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -0,0 +1,23 @@
|
|||||||
|
{% extends '@ChillPerson/AccompanyingCourse/layout.html.twig' %}
|
||||||
|
|
||||||
|
{% block title 'accompanying_course_work.Show accompanying course work'|trans %}
|
||||||
|
|
||||||
|
{% block css %}
|
||||||
|
{{ parent() }}
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block content %}
|
||||||
|
<div class="accompanying_course_work">
|
||||||
|
<h1>{{ block('title') }}</h1>
|
||||||
|
{{ dump() }}
|
||||||
|
|
||||||
|
</div>
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block block_post_menu %}
|
||||||
|
<div class="post-menu pt-4"></div>
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block js %}
|
||||||
|
{{ parent() }}
|
||||||
|
{% endblock %}
|
@ -886,6 +886,7 @@ accompanying_course_work:
|
|||||||
create: Créer une action
|
create: Créer une action
|
||||||
Create accompanying course work: Créer une action d'accompagnement
|
Create accompanying course work: Créer une action d'accompagnement
|
||||||
Edit accompanying course work: Modifier une action d'accompagnement
|
Edit accompanying course work: Modifier une action d'accompagnement
|
||||||
|
Show accompanying course work: Action d'accompagnement
|
||||||
List accompanying course work: Liste des actions d'accompagnement
|
List accompanying course work: Liste des actions d'accompagnement
|
||||||
action: Action
|
action: Action
|
||||||
create_date: Date de création
|
create_date: Date de création
|
||||||
|
Loading…
x
Reference in New Issue
Block a user