welco/welco/contrib/alfortville/templates/alfortville/dg-table.html

57 lines
1.4 KiB
HTML

{% 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 %}
<form method="post" action="qualif-many">
<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>
<td></td>
</thead>
<tbody>
{% for object in mails %}
<tr data-mail-id="{{object.id}}">
<td class="r">{{object.creation_timestamp|date:"d F Y"|lower}}</td>
<td class="r">{{object.contact_name }}</td>
<td class="r">{{object.categories|join:", " }}</td>
<td class="r">{% for association in object.associations.all %}{{association.formdef_name}}{% if not forloop.last %}, {% endif %}{% endfor %}</td>
<td><input type="checkbox" name="pks" value="{{object.id}}"/></td>
</tr>
{% endfor %}
</tbody>
<script>
$('td.r').click(function() {
window.open('../?' + $(this).parent().data('mail-id'), target='_welco_dg');
});
</script>
</table>
</div>
<div id="dg-transmit">
{% csrf_token %}
<button>Transmettre</button>
</form>
{%else %}
<p class="no-mail-table">
{% trans 'There is currently no mail in this list.' %}
</p>
{% endif %}
</div>
</div>
{% endblock %}