mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-20 22:53:49 +00:00
Updating report
This commit is contained in:
@@ -23,11 +23,15 @@ report_list:
|
||||
person:
|
||||
order: 101
|
||||
label: Report list
|
||||
|
||||
report_show:
|
||||
path: /person/{person_id}/report/{id}/show
|
||||
path: /person/{person_id}/report/{report_id}/show
|
||||
defaults: { _controller: "ChillReportBundle:Report:show" }
|
||||
|
||||
cl_custom_fields_report:
|
||||
resource: "@ChillReportBundle/Resources/config/routing/report.yml"
|
||||
prefix: /report
|
||||
report_edit:
|
||||
path: /person/{person_id}/report/{report_id}/edit
|
||||
defaults: { _controller: "ChillReportBundle:Report:edit" }
|
||||
|
||||
report_update:
|
||||
path: /person/{person_id}/report/{report_id}/update
|
||||
defaults: { _controller: "ChillReportBundle:Report:update" }
|
||||
requirements: { _method: post|put }
|
@@ -1,17 +0,0 @@
|
||||
report:
|
||||
path: /
|
||||
defaults: { _controller: "ChillReportBundle:Report:index" }
|
||||
|
||||
report_edit:
|
||||
path: /{id}/edit
|
||||
defaults: { _controller: "ChillReportBundle:Report:edit" }
|
||||
|
||||
report_update:
|
||||
path: /{id}/update
|
||||
defaults: { _controller: "ChillReportBundle:Report:update" }
|
||||
requirements: { _method: post|put }
|
||||
|
||||
report_delete:
|
||||
path: /{id}/delete
|
||||
defaults: { _controller: "ChillReportBundle:Report:delete" }
|
||||
requirements: { _method: post|delete }
|
@@ -1,16 +1,27 @@
|
||||
{% extends '::base.html.twig' %}
|
||||
{#
|
||||
* Copyright (C) 2014, Champs Libres Cooperative SCRLFS, <http://www.champs-libres.coop>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#}
|
||||
{% extends "ChillPersonBundle::layout.html.twig" %}
|
||||
|
||||
{% block body -%}
|
||||
<h1>Report edit</h1>
|
||||
{% set activeRouteKey = 'report_select_type' %}
|
||||
|
||||
{% block title %}{{ 'Edition du rapport' |trans() }}{% endblock title %}
|
||||
|
||||
{% block personcontent %}
|
||||
|
||||
{{ form(edit_form) }}
|
||||
|
||||
<ul class="record_actions">
|
||||
<li>
|
||||
<a href="{{ path('report') }}">
|
||||
Back to the list
|
||||
</a>
|
||||
</li>
|
||||
<li>{{ form(delete_form) }}</li>
|
||||
</ul>
|
||||
{% endblock %}
|
||||
|
@@ -36,7 +36,7 @@
|
||||
<td>{% if report.date %}{{ report.date|date('d-m-Y') }}{% endif %}</td>
|
||||
<td>{{ report.cFGroup.getName(app.request.locale) }}</td>
|
||||
<td>{{ report.scope }}</td>
|
||||
<td><a href="{#{ path('report_edit', { 'id': entity.id }) }#}">{{ 'update' | trans }}</a></td>
|
||||
<td><a href="{{ path('report_edit', { 'person_id': report.person.id, 'report_id': report.id }) }}">{{ 'update' | trans }}</a></td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
|
@@ -51,6 +51,10 @@
|
||||
<th>Cfgroup</th>
|
||||
<td>{{ entity.cFGroup.getName(app.request.locale) }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th></th>
|
||||
<td><a href="{{ path('report_edit', { 'person_id': entity.person.id, 'report_id': entity.id }) }}">{{ 'update' | trans }}</a></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
{% endblock %}
|
Reference in New Issue
Block a user