Better list of activities

This commit is contained in:
Marc Ducobu 2015-07-05 11:07:32 +02:00
parent 33461d90ce
commit 2c9cddcecc

View File

@ -21,47 +21,40 @@
{% block title %}{{ 'Activity list' |trans }}{% endblock title %} {% block title %}{{ 'Activity list' |trans }}{% endblock title %}
{% block personcontent %} {% block personcontent %}
<h1>Activity list</h1>
<table class="records_list"> <table class="records_list">
<thead> <thead>
<tr> <tr>
<th>Id</th> <th>{{'Date' | trans }}</th>
<th>Date</th> <th>{{'Duration Time' | trans }}</th>
<th>Durationtime</th> <th>{{'Reason' | trans}}</th>
<th>Remark</th> <th>{{'Type' | trans}}</th>
<th>Attendee</th> <th>{{'Attendee' | trans }}</th>
<th>Actions</th> <th></th>
<th></th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
{% for activity in activities %} {% for activity in activities %}
<tr> <tr>
<td><a href="{{ path('chill_activity_activity_show', { 'id': activity.id, 'person_id': person.id }) }}">{{ activity.id }}</a></td> <td>{% if activity.date %}{{ activity.date|localizeddate('long', 'none') }}{% endif %}</td>
<td>{% if activity.date %}{{ activity.date|date('Y-m-d') }}{% endif %}</td>
<td>{{ activity.durationTime|date('H:i') }}</td> <td>{{ activity.durationTime|date('H:i') }}</td>
<td>{{ activity.remark }}</td> <td>{{ activity.reason.name | localize_translatable_string }}</td>
<td>{{ activity.type.name | localize_translatable_string }}</td>
<td>{{ activity.attendee }}</td> <td>{{ activity.attendee }}</td>
<td> <td>
<ul> <a href="{{ path('chill_activity_activity_show', { 'id': activity.id, 'person_id': person.id }) }}">{{ 'Show the activity' | trans }}</a>
<li> </td>
<a href="{{ path('chill_activity_activity_show', { 'id': activity.id, 'person_id': person.id }) }}">show</a> <td>
</li> <a href="{{ path('chill_activity_activity_edit', { 'id': activity.id, 'person_id': person.id }) }}">{{ 'Edit the report' | trans }}</a>
<li>
<a href="{{ path('chill_activity_activity_edit', { 'id': activity.id, 'person_id': person.id }) }}">edit</a>
</li>
</ul>
</td> </td>
</tr> </tr>
{% endfor %} {% endfor %}
</tbody> </tbody>
</table> </table>
<ul> <p>
<li> <a href="{{ path('chill_activity_activity_new', {'person_id': person.id}) }}">
<a href="{{ path('chill_activity_activity_new', {'person_id': person.id}) }}"> {{ 'Add a new activity' | trans }}
Create a new entry </a>
</a> </p>
</li>
</ul>
{% endblock %} {% endblock %}