diff --git a/Form/ReportType.php b/Form/ReportType.php index 0eb17773a..4f7dfd3b3 100644 --- a/Form/ReportType.php +++ b/Form/ReportType.php @@ -38,7 +38,7 @@ class ReportType extends AbstractType $builder ->add('user') ->add('date', 'date', - array('required' => false, 'widget' => 'single_text', 'format' => 'dd-MM-yyyy')) + array('required' => true, 'widget' => 'single_text', 'format' => 'dd-MM-yyyy')) //->add('scope') ->add('cFData', 'custom_field', array('attr' => array('class' => 'only-label'), 'group' => $options['cFGroup'])) diff --git a/Resources/translations/messages.fr.yml b/Resources/translations/messages.fr.yml new file mode 100644 index 000000000..ce323b21d --- /dev/null +++ b/Resources/translations/messages.fr.yml @@ -0,0 +1,14 @@ +'Report edit': "Edition d'un rapport" +'Save report': "Enregister le rapport" +'Reset report': "Remise à zéro" +'Add a report': "Ajout d'un rapport" +'Add report': 'Ajouter le rapport' +'Create a new report': 'Créer un nouveau rapport' +'Report view': "Détails d'un rapport" +'Update the report': 'Mettre à jour le rapport' +Details: Détails +Person: Personne +Scope: Scope +Date: Date +User: Utilisateur +'Report type': 'Type de rapport' \ No newline at end of file diff --git a/Resources/views/Report/edit.html.twig b/Resources/views/Report/edit.html.twig index 10ff09e23..6cc18d064 100644 --- a/Resources/views/Report/edit.html.twig +++ b/Resources/views/Report/edit.html.twig @@ -18,15 +18,15 @@ {% set activeRouteKey = 'report_select_type' %} -{% block title %}{{ 'Edition du rapport' |trans() }}{% endblock title %} +{% block title %}{{ 'Report edit' |trans }}{% endblock title %} {% block personcontent %} {{ form_start(edit_form) }} {{ form_widget(edit_form) }}
- - + +
{{ form_end(edit_form) }} {% endblock %} diff --git a/Resources/views/Report/list.html.twig b/Resources/views/Report/list.html.twig deleted file mode 100644 index fcc9eb600..000000000 --- a/Resources/views/Report/list.html.twig +++ /dev/null @@ -1,46 +0,0 @@ -{# - * Copyright (C) 2014, Champs Libres Cooperative SCRLFS, - * - * 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 . -#} -{% extends "ChillPersonBundle::layout.html.twig" %} - -{% set activeRouteKey = 'report_select_type' %} - -{% block title %}{{ 'List des rapports' |trans() }}{% endblock title %} - -{% block personcontent %} - - - - - - - - - - - - {% for report in reports %} - - - - - - - - {% endfor %} - -
{{ 'Date' | trans }}{{ 'Report Type' | trans }}{{ 'Report Scope' | trans }}
{% if report.date %}{{ report.date|date('d-m-Y') }}{% endif %}{{ report.cFGroup.getName(app.request.locale) }}{{ report.scope }}{{ 'View' | trans }}{{ 'Update' | trans }}
-{% endblock %} diff --git a/Resources/views/Report/new.html.twig b/Resources/views/Report/new.html.twig index b6ac8357b..67ff20f54 100644 --- a/Resources/views/Report/new.html.twig +++ b/Resources/views/Report/new.html.twig @@ -18,15 +18,15 @@ {% set activeRouteKey = 'report_select_type' %} -{% block title %}{{ 'Ajout d\' un rapport' |trans() }}{% endblock title %} +{% block title %}{{ 'Add a report'|trans }}{% endblock title %} {% block personcontent %} {{ form_start(form) }} {{ form_widget(form) }}
- - + +
{{ form_end(form) }} {% endblock %} \ No newline at end of file diff --git a/Resources/views/Report/select_report_type.html.twig b/Resources/views/Report/select_report_type.html.twig index 1bc812f81..581c63e52 100644 --- a/Resources/views/Report/select_report_type.html.twig +++ b/Resources/views/Report/select_report_type.html.twig @@ -18,17 +18,16 @@ {% set activeRouteKey = 'report_select_type' %} -{% block title %}{{ 'Ajout d\' un rapport' |trans() }}{% endblock title %} +{% block title %}{{ 'Add a report'|trans() }}{% endblock title %} {% block personcontent %} {{ form_start(form) }} - {{ form_row(form.cFGroup) }} - + {{ form_widget(form.cFGroup) }} {{ form_end(form) }} diff --git a/Resources/views/Report/view.html.twig b/Resources/views/Report/view.html.twig index d83196d41..68594b853 100644 --- a/Resources/views/Report/view.html.twig +++ b/Resources/views/Report/view.html.twig @@ -18,25 +18,25 @@ {% set activeRouteKey = 'report_select_type' %} -{% block title %}{{ 'Details d\' un rapport' |trans() }}{% endblock title %} +{% block title %}{{ 'Report view' |trans() }}{% endblock title %} {% block personcontent %} - {{ 'Update' | trans }} + {{ 'Update the report'|trans }}

{{ 'Details'|trans }}

-
{{ 'Personne'|trans }}
+
{{ 'Person'|trans }}
{{ entity.person }}
{{ 'Date'|trans }}
{{ entity.date|date('d-m-Y') }}
-
{{ 'Agent'|trans }}
+
{{ 'User'|trans }}
{{ entity.user }}
-
{{ 'Type de rapport'|trans }}
+
{{ 'Report type'|trans }}
{{ entity.cFGroup.getName(app.request.locale) }}
{% for customField in entity.cFGroup.customFields %} @@ -49,6 +49,6 @@ {% endfor %}
- {{ 'Update' | trans }} + {{ 'Update the report' | trans }} {% endblock %} \ No newline at end of file