Files
django-anymail/djrill/templates/djrill/senders_list.html
2012-01-20 16:33:29 -08:00

113 lines
3.4 KiB
HTML

{% extends "admin/base_site.html" %}
{% load adminmedia admin_list i18n %}
{% load url from future %}
{% block extrastyle %}
{{ block.super }}
<link rel="stylesheet" type="text/css" href="{% admin_media_prefix %}css/changelists.css" />
{{ media.css }}
{% if not actions_on_top and not actions_on_bottom %}
<style>
#changelist table thead th:first-child {width: inherit}
</style>
{% endif %}
{% endblock %}
{% block extrahead %}
{{ block.super }}
{{ media.js }}
{% endblock %}
{% block bodyclass %}change-list{% endblock %}
{% if not is_popup %}
{% block breadcrumbs %}
<div class="breadcrumbs">
<a href="../../">
{% trans "Home" %}
</a>
&rsaquo;
<a href="../">
Djrill
</a>
&rsaquo;
Senders
</div>
{% endblock %}
{% endif %}
{% block coltype %}flex{% endblock %}
{% block content %}
<div id="content-main">
{% block object-tools %}
{% if has_add_permission %}
<ul class="object-tools">
{% block object-tools-items %}
<li>
<a href="add/{% if is_popup %}?_popup=1{% endif %}" class="addlink">
{% blocktrans %}Add sender{% endblocktrans %}
</a>
</li>
{% endblock %}
</ul>
{% endif %}
{% endblock %}
<p>Add a new sender</p>
<form action="{% url "admin:djrill_add_sender" %}" method="POST">
{{ form.as_p }}
{% csrf_token %}
<input type="submit" value="Submit">
</form>
<div class="module" id="changelist">
{% block search %}{% endblock %}
{% block date_hierarchy %}{% endblock %}
{% block filters %}{% endblock %}
{% block result_list %}
{% if objects %}
<div class="results">
<table cellspacing="0" id="result_list">
<thead>
<tr>
{% for header in objects.0.keys %}
<th scope="col">{{ header|capfirst }}</th>
{% endfor %}
<th></th>
</tr>
</thead>
<tbody>
{% for result in objects %}
<tr class="{% cycle 'row1' 'row2' %}">
{% for item in result.values %}
<td>{{ item }}</td>
{% endfor %}
<td>
{% if result.is_enabled and result.approved_at %}
<form method="POST" action="{% url "admin:djrill_disable_sender" %}">
{% else %}
<form method="POST" action="{% url "admin:djrill_verify_sender" %}">
{% endif %}
<input type="hidden" name="email" value="{{ result.address }}">
{% csrf_token %}
{% if result.is_enabled and result.approved_at %}
<button>disable</buton>
{% else %}
<button>enable</buton>
{% endif %}
</form>
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
{% endif %}
{% endblock %}
{% block pagination %}{% endblock %}
</div>
</div>
{% endblock %}