alfortville: add missing dg table template

This commit is contained in:
Frédéric Péters 2016-03-25 15:02:48 +01:00
parent cb4367902d
commit 518b26ac57
1 changed files with 49 additions and 0 deletions

View File

@ -0,0 +1,49 @@
{% extends "welco/base.html" %}
{% load i18n static %}
{% block bodyargs %}class="mail-dg-table"{% endblock %}
{% block breadcrumb %}
{{block.super}}
<a href=".">{{home_screen_title}}</a>
{% endblock %}
{% block content %}
<div class="source-mail all">
<div class="cell document top">
{% if source.get_queryset %}
<div>
<table class="main">
<thead>
<th>{% trans 'Scan Date' %}</th>
<th>{% trans 'User' %}</th>
<th>{% trans 'Category' %}</th>
<th>{% trans 'Related Forms' %}</th>
</thead>
<tbody>
{% for object in mails %}
<tr data-mail-id="{{object.id}}">
<td>{{object.creation_timestamp|date:"d F Y"|lower}}</td>
<td>{{object.contact_name }}</td>
<td>{{object.categories|join:", " }}</td>
<td>{% for association in object.associations.all %}{{association.formdef_name}}{% if not forloop.last %}, {% endif %}{% endfor %}</td>
</tr>
{% endfor %}
</tbody>
<script>
$('tr').click(function() {
window.open('../?' + $(this).data('mail-id'), target='_welco_dg');
});
</script>
</table>
</div>
{%else %}
<p class="no-mail-table">
{% trans 'There is currently no mail in this list.' %}
</p>
{% endif %}
</div>
</div>
{% endblock %}