mirror of
https://github.com/pacnpal/django-anymail.git
synced 2025-12-22 21:01:05 -05:00
urls and tags list views
This commit is contained in:
9
djrill/templates/djrill/_status.html
Normal file
9
djrill/templates/djrill/_status.html
Normal file
@@ -0,0 +1,9 @@
|
||||
<div id="changelist-filter">
|
||||
<h2>Tools & Info</h2>
|
||||
<h3>Status</h3>
|
||||
{% if status %}
|
||||
<p>Mandrill is <strong>UP</strong></p>
|
||||
{% else %}
|
||||
<p>Mandrill is <strong>DOWN</strong></p>
|
||||
{% endif %}
|
||||
</div>
|
||||
@@ -17,6 +17,8 @@
|
||||
{{ media.js }}
|
||||
{% endblock %}
|
||||
|
||||
{% block title %} Djrill Senders | {% trans "Django site admin" %}{% endblock %}
|
||||
|
||||
{% block bodyclass %}change-list{% endblock %}
|
||||
|
||||
{% if not is_popup %}
|
||||
@@ -26,9 +28,7 @@
|
||||
{% trans "Home" %}
|
||||
</a>
|
||||
›
|
||||
<a href="../">
|
||||
Djrill
|
||||
</a>
|
||||
›
|
||||
Senders
|
||||
</div>
|
||||
@@ -56,27 +56,19 @@
|
||||
<div class="module filtered" id="changelist">
|
||||
{% block search %}
|
||||
<div id="toolbar">
|
||||
<form action="{% url "admin:djrill_add_sender" %}" method="POST">
|
||||
<form action="{% url "admin:djrill_add_sender" %}" method="POST">
|
||||
<label for="id_email" class="addlink">Add a new sender</label>
|
||||
<input type="email" placeholder="E-mail address" name="email" id="id_email">
|
||||
{% csrf_token %}
|
||||
<input type="submit" value="Submit">
|
||||
</form>
|
||||
{% csrf_token %}
|
||||
<input type="submit" value="Submit">
|
||||
</form>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block date_hierarchy %}{% endblock %}
|
||||
|
||||
{% block filters %}
|
||||
<div id="changelist-filter">
|
||||
<h2>Tools & Info</h2>
|
||||
<h3>Status</h3>
|
||||
{% if status %}
|
||||
<p>Mandrill is <strong>UP</strong></p>
|
||||
{% else %}
|
||||
<p>Mandrill is <strong>DOWN</strong></p>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% include "djrill/_status.html" %}
|
||||
{% endblock %}
|
||||
|
||||
{% block result_list %}
|
||||
|
||||
102
djrill/templates/djrill/tags_list.html
Normal file
102
djrill/templates/djrill/tags_list.html
Normal file
@@ -0,0 +1,102 @@
|
||||
{% 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 title %} Djrill Tags | {% trans "Django site admin" %}{% endblock %}
|
||||
|
||||
{% block bodyclass %}change-list{% endblock %}
|
||||
|
||||
{% if not is_popup %}
|
||||
{% block breadcrumbs %}
|
||||
<div class="breadcrumbs">
|
||||
<a href="../../">
|
||||
{% trans "Home" %}
|
||||
</a>
|
||||
›
|
||||
Djrill
|
||||
›
|
||||
Tags
|
||||
</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 %}
|
||||
|
||||
<div class="module filtered" id="changelist">
|
||||
{% block search %} {% endblock %}
|
||||
|
||||
{% block date_hierarchy %}{% endblock %}
|
||||
|
||||
{% block filters %}
|
||||
{% include "djrill/_status.html" %}
|
||||
{% endblock %}
|
||||
|
||||
{% block result_list %}
|
||||
{% if objects %}
|
||||
<div class="results">
|
||||
<table cellspacing="0" id="result_list">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">Tag</th>
|
||||
<th scope="col">ID</th>
|
||||
<th scope="col">Sent</th>
|
||||
<th scope="col">Opens</th>
|
||||
<th scope="col">Clicks</th>
|
||||
<th scope="col">Rejects</th>
|
||||
<th scope="col">Bounces</th>
|
||||
<th scope="col">Complaints</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for result in objects %}
|
||||
<tr class="{% cycle 'row1' 'row2' %}">
|
||||
<td>{{ result.tag }}</td>
|
||||
<td>{{ result.id }}</td>
|
||||
<td>{{ result.sent }}</td>
|
||||
<td>{{ result.opens }}</td>
|
||||
<td>{{ result.clicks }}</td>
|
||||
<td>{{ result.rejects }}</td>
|
||||
<td>{{ result.bounces }}</td>
|
||||
<td>{{ result.complaints }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
{% block pagination %}{% endblock %}
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
108
djrill/templates/djrill/urls_list.html
Normal file
108
djrill/templates/djrill/urls_list.html
Normal file
@@ -0,0 +1,108 @@
|
||||
{% 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 title %} Djrill URLs | {% trans "Django site admin" %}{% endblock %}
|
||||
|
||||
{% block bodyclass %}change-list{% endblock %}
|
||||
|
||||
{% if not is_popup %}
|
||||
{% block breadcrumbs %}
|
||||
<div class="breadcrumbs">
|
||||
<a href="../../">
|
||||
{% trans "Home" %}
|
||||
</a>
|
||||
›
|
||||
Djrill
|
||||
›
|
||||
URLs
|
||||
</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 %}
|
||||
|
||||
<div class="module filtered" id="changelist">
|
||||
{% block search %}{% endblock %}
|
||||
|
||||
{% block date_hierarchy %}{% endblock %}
|
||||
|
||||
{% block filters %}
|
||||
{% include "djrill/_status.html" %}
|
||||
{% 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 %}
|
||||
Reference in New Issue
Block a user