diff options
Diffstat (limited to 'src/django_pgpmailman/templates')
4 files changed, 175 insertions, 0 deletions
diff --git a/src/django_pgpmailman/templates/account/base.html b/src/django_pgpmailman/templates/account/base.html new file mode 100644 index 0000000..6db00ba --- /dev/null +++ b/src/django_pgpmailman/templates/account/base.html @@ -0,0 +1 @@ +{% extends "django_pgpmailman/base.html" %}
\ No newline at end of file diff --git a/src/django_pgpmailman/templates/django_mailman3/base.html b/src/django_pgpmailman/templates/django_mailman3/base.html new file mode 100644 index 0000000..6db00ba --- /dev/null +++ b/src/django_pgpmailman/templates/django_mailman3/base.html @@ -0,0 +1 @@ +{% extends "django_pgpmailman/base.html" %}
\ No newline at end of file diff --git a/src/django_pgpmailman/templates/django_pgpmailman/base.html b/src/django_pgpmailman/templates/django_pgpmailman/base.html new file mode 100644 index 0000000..3472cd9 --- /dev/null +++ b/src/django_pgpmailman/templates/django_pgpmailman/base.html @@ -0,0 +1,124 @@ +{% load i18n %} +{% load staticfiles %} +{% load gravatar %} +<!DOCTYPE html> +<html lang="en"> +<head> + <meta charset="UTF-8"> + <meta http-equiv="X-UA-Compatible" content="IE=edge"> + <meta name="viewport" content="width=device-width, initial-scale=1"> + <title>{% block head_title %}{{ site_name|title }}{% endblock %}</title> + <link rel="shortcut icon" href="{% static 'django_pgpmailman/img/favicon.ico' %}"> + <link rel="stylesheet" href="{% static 'django_pgpmailman/libs/bootstrap/css/bootstrap.min.css' %}"> + <link rel="stylesheet" href="{% static 'django_mailman3/css/main.css' %}"> +</head> +<body> + + <nav class="navbar navbar-default"> + <div class="container"> + <div class="navbar-header"> + <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#header-nav" aria-expanded="false"> + <span class="sr-only">Toggle navigation</span> + <span class="icon-bar"></span> + <span class="icon-bar"></span> + <span class="icon-bar"></span> + </button> + <a class="navbar-brand" href="{% url 'pgp_list_index' %}"><span><img src="{% static 'django_pgpmailman/img/mailman_logo_small_trans.png' %}" /> PGPMailman</span></a> + </div> + <div class="collapse navbar-collapse" id="header-nav"> + <ul class="nav navbar-nav"> + {% if 'postorius' in INSTALLED_APPS %} + <ul class="nav navbar-nav navbar-right"><li> + {% if mlist %} + <a href="{% url 'list_summary' mlist.list_id %}"> + <span class="fa fa-cog"></span> + {% trans 'Manage this list' %} + </a> + {% else %} + <a href="{% url 'list_index' %}"> + <span class="fa fa-cog"></span> + {% trans 'Manage lists' %} + </a> + {% endif %} + </li></ul> + {% endif %} + {% if 'hyperkitty' in INSTALLED_APPS %} + <li><a href="{% url 'hk_root' %}"> + <span class="glyphicon glyphicon-comment"></span> + {% trans 'Archives' %} + </a></li> + {% endif %} + </ul> + <ul class="nav navbar-nav navbar-right"> + {% if user.is_authenticated %} + <li class="dropdown"> + <a href="#" class="dropdown-toggle" data-toggle="dropdown" + role="button" aria-haspopup="true" aria-expanded="false"> + {% gravatar user.email 20 %} + {{ user.username|truncatechars:"35" }} + <span class="caret"></span> + </a> + <ul class="dropdown-menu"> + <li><a href="{% url 'mm_user_profile' %}"> + <span class="glyphicon glyphicon-user"></span> + {% trans 'Account' %} + </a></li> + <li><a href="{% url 'pgp_user_profile' %}"> + <span class="glyphicon glyphicon-lock"></span> + {% trans 'PGP settings' %} + </a></li> + {% if 'postorius' in INSTALLED_APPS %} + <li><a href="{% url 'ps_user_profile' %}"> + <span class="fa fa-cog"></span> + {% trans 'Mailman settings' %} + </a></li> + {% endif %} + {% if 'hyperkitty' in INSTALLED_APPS %} + <li><a href="{% url 'hk_user_profile' %}"> + <span class="glyphicon glyphicon-comment"></span> + {% trans 'Posting activity' %} + </a></li> + {% endif %} + <li role="separator" class="divider"></li> + <li><a href="{% url LOGOUT_URL %}?next={% url 'list_index' %}"> + <span class="glyphicon glyphicon-log-out"></span> + {% trans 'Logout' %} + </a></li> + </ul> + </li> + {% else %} + <li><a href="{% url LOGIN_URL %}?next={{ next|default:request.path|urlencode }}"> + <span class="glyphicon glyphicon-log-in"></span> + {% trans 'Login' %} + </a></li> + <li><a href="{% url 'account_signup' %}?next={{next|default:request.path|urlencode}}"> + <span class="glyphicon glyphicon-plus-sign"></span> + {% trans 'Sign Up' %} + </a></li> + {% endif %} + </ul> + </div> + </div> + </nav> + + <div class="container"> + {% for message in messages %} + <div class="alert alert-{{ message.tags }}">{{ message }}</div> + {% endfor %} + {% block content %}{% endblock content %} + </div> + + <footer class="footer"> + <div class="container"> + <p class="text-center"> + <a href="http://list.org">GNU Mailman</a> + </p> + </div> + </footer> + + <script src="{% static 'django_pgpmailman/libs/jquery/jquery-1.11.3.min.js' %}"></script> + <script src="{% static 'django_pgpmailman/libs/bootstrap/js/bootstrap.min.js' %}"></script> + <script src="{% static 'django_mailman3/js/main.js' %}"></script> + {% block additionaljs %}{% endblock %} +</body> +</html> diff --git a/src/django_pgpmailman/templates/django_pgpmailman/index.html b/src/django_pgpmailman/templates/django_pgpmailman/index.html new file mode 100644 index 0000000..5a5d93a --- /dev/null +++ b/src/django_pgpmailman/templates/django_pgpmailman/index.html @@ -0,0 +1,49 @@ +{% extends "django_pgpmailman/base.html" %} +{% load i18n %} +{% load pagination %} + +{% block head_title %} +{% trans 'PGP List Index' %} - {{ block.super }} +{% endblock %} + +{% block content %} + + <div class="page-header"> + <h1>{% trans 'PGP enabled Mailing Lists' %}</h1> + </div> + + {% if lists|length > 0 %} + <div class="table-responsive"> + <table class="table table-bordered table-striped"> + <thead> + <tr> + <th>{% trans 'List name' %}</th> + <th>{% trans 'Post address' %}</th> + <th>{% trans 'Description' %}</th> + </tr> + </thead> + <tbody> + {% for pgp_list in lists %} + {% with pgp_list.mlist as mlist %} + <tr> + <td> + <a href="{% url 'pgp_list_summary' list_id=mlist.list_id %}">{{ mlist.display_name }}</a> + {% if user.is_superuser and not mlist.settings.advertised %} ({% trans 'unadvertised' %}*){% endif %} + </td> + <td>{{ mlist.fqdn_listname }}</td> + <td>{{ pgp_list.key.fingerprint }}</td> + <td>{{ mlist.settings.description }}</td> + </tr> + {% endfor %} + </tbody> + </table> + </div> + {% if user.is_superuser %} + <small>* {% trans 'Only admins see unadvertised lists in the list index.' %}</small> + {% endif %} + {% paginator lists %} + {% else %} + <p>{% trans 'There are currently no PGP enabled mailing lists.' %}</p> + {% endif %} + +{% endblock content %} |
