Report View CF

This commit is contained in:
Marc Ducobu 2014-11-12 12:35:57 +01:00
parent db31cf836e
commit 1ab9b44737
2 changed files with 33 additions and 37 deletions

View File

@ -28,6 +28,7 @@
<th>{{ 'Report Type' | trans }}</th> <th>{{ 'Report Type' | trans }}</th>
<th>{{ 'Report Scope' | trans }}</th> <th>{{ 'Report Scope' | trans }}</th>
<th></th> <th></th>
<th></th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@ -36,7 +37,8 @@
<td>{% if report.date %}{{ report.date|date('d-m-Y') }}{% endif %}</td> <td>{% if report.date %}{{ report.date|date('d-m-Y') }}{% endif %}</td>
<td>{{ report.cFGroup.getName(app.request.locale) }}</td> <td>{{ report.cFGroup.getName(app.request.locale) }}</td>
<td>{{ report.scope }}</td> <td>{{ report.scope }}</td>
<td><a href="{{ path('report_edit', { 'person_id': report.person.id, 'report_id': report.id }) }}">{{ 'update' | trans }}</a></td> <td><a href="{{ path('report_show', { 'person_id': report.person.id, 'report_id': report.id }) }}">{{ 'View' | trans }}</a></td>
<td><a href="{{ path('report_edit', { 'person_id': report.person.id, 'report_id': report.id }) }}">{{ 'Update' | trans }}</a></td>
</tr> </tr>
{% endfor %} {% endfor %}
</tbody> </tbody>

View File

@ -21,40 +21,34 @@
{% block title %}{{ 'Details d\' un rapport' |trans() }}{% endblock title %} {% block title %}{{ 'Details d\' un rapport' |trans() }}{% endblock title %}
{% block personcontent %} {% block personcontent %}
<table class="record_properties">
<tbody>
<tr> <a href="{{ path('report_edit', { 'person_id': entity.person.id, 'report_id': entity.id }) }}">{{ 'Modifier' | trans }}</a>
<th>Id</th>
<td>{{ entity.id }}</td> <h2>{{ 'Details'|trans }}</h2>
</tr>
<tr> <dl>
<th>User</th> <dt class="inline">{{ 'Personne'|trans }}</dt>
<td>{{ entity.user }}</td> <dd>{{ entity.person }}</dd>
</tr> <dt class="inline">{{ 'Scope'|trans }}</dt>
<tr> <dd>{{ entity.scope }}</dd>
<th>Person</th> <dt class="inline">{{ 'Date'|trans }}</dt>
<td>{{ entity.person }}</td> <dd>{{ entity.date|date('d-m-Y') }}</dd>
</tr> <dt class="inline">{{ 'Agent'|trans }}</dt>
<tr> <dd>{{ entity.user }}</dd>
<th>Date</th> <dt class="inline">{{ 'Type de rapport'|trans }}</dt>
<td>{{ entity.date|date('d-m-Y') }}</td> <dd>{{ entity.cFGroup.getName(app.request.locale) }}</dd>
</tr>
<tr> {% for customField in entity.cFGroup.customFields %}
<th>Scope</th> {% if customField.type == 'title' %}
<td>{{ entity.scope }}</td> {{ chill_custom_field_widget(entity.cFData , customField) }}
</tr> {% else %}
<tr> <dt>{{ chill_custom_field_label(customField) }}</dt>
<th>Cfdata</th> <dd>{{ chill_custom_field_widget(entity.cFData , customField) }}</dd>
<td>{# { entity.cFData } #}</td> {% endif %}
</tr> {% endfor %}
<tr> </dl>
<th>Cfgroup</th>
<td>{{ entity.cFGroup.getName(app.request.locale) }}</td> <a href="{{ path('report_edit', { 'person_id': entity.person.id, 'report_id': entity.id }) }}">{{ 'Modifier' | trans }}</a>
</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 %} {% endblock %}