78 lines
1.6 KiB
HTML
78 lines
1.6 KiB
HTML
{% extends "welco/base.html" %}
|
|
{% load i18n static %}
|
|
|
|
{% block bodyargs %}class="mail-table mail-table-subtype{{subtype}}"{% endblock %}
|
|
|
|
{% block content %}
|
|
|
|
{% if objects %}
|
|
<div class="source-mail all">
|
|
<div class="cell document top">
|
|
<h2>{{title}}</h2>
|
|
<div>
|
|
<div class="mails source">
|
|
<ul>
|
|
{% for object in objects %}
|
|
<li
|
|
data-source-pk="{{object.source.id}}"
|
|
data-pdf-href="{{object.source.content.url}}">
|
|
{{object.source.creation_timestamp}}
|
|
{% for association in object.source.associations.all %}
|
|
<br/><span data-formdata-url="{{association.formdata_url}}">{{association.formdef_name}}</span>
|
|
{% endfor %}
|
|
</li>
|
|
{% endfor %}
|
|
</ul>
|
|
</div>
|
|
<div id="postit" class="readonly" style="display: none"
|
|
data-base-url="{% url 'mail-edit-note' %}"
|
|
>
|
|
</div>
|
|
<iframe id="pdf-viewer" src="{% url 'mail-viewer' %}" style="width: 100%;
|
|
height: 100%; border: 0;">
|
|
</iframe>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="cell">
|
|
</div>
|
|
|
|
<div class="cell mark-as-seen">
|
|
<form method="POST">
|
|
{% csrf_token %}
|
|
{% if display_comments_field %}
|
|
<textarea name="comments" id="comments-field" placeholder="{% trans "Comments" %}"></textarea>
|
|
{% endif %}
|
|
<input type="hidden" name="object-pk"></input>
|
|
<button>{{ button_text }}</button>
|
|
</form>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<script>
|
|
$(function() {
|
|
$('[data-pdf-href]').on('welco:mail-selected', function() {
|
|
$('input[name="object-pk"]').val($(this).data('source-pk'));
|
|
});
|
|
});
|
|
</script>
|
|
{% else %}
|
|
<!-- nothing -->
|
|
|
|
<div class="source-mail all">
|
|
<div class="cell document top">
|
|
<h2>{{title}}</h2>
|
|
|
|
<p class="no-mail-table">
|
|
{% trans 'There is currently no mail in this list.' %}
|
|
</p>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
{% endif %}
|
|
|
|
{% endblock %}
|