diff options
| author | J08nY | 2017-08-22 15:33:43 +0200 |
|---|---|---|
| committer | J08nY | 2017-08-22 15:33:56 +0200 |
| commit | e360885f3f965cad9b5c61d849d73f0d48b56d39 (patch) | |
| tree | 711ffa2d52a9a7b6337631fe57d97cfd070178e8 /src | |
| parent | ccbc6ace6380dfa50fcc3ca3ca7f824c933f205c (diff) | |
| download | django-pgpmailman-e360885f3f965cad9b5c61d849d73f0d48b56d39.tar.gz django-pgpmailman-e360885f3f965cad9b5c61d849d73f0d48b56d39.tar.zst django-pgpmailman-e360885f3f965cad9b5c61d849d73f0d48b56d39.zip | |
Diffstat (limited to 'src')
4 files changed, 25 insertions, 33 deletions
diff --git a/src/django_pgpmailman/templates/django_pgpmailman/base.html b/src/django_pgpmailman/templates/django_pgpmailman/base.html index 4dfba80..372b3f8 100644 --- a/src/django_pgpmailman/templates/django_pgpmailman/base.html +++ b/src/django_pgpmailman/templates/django_pgpmailman/base.html @@ -1,6 +1,7 @@ {% load i18n %} {% load staticfiles %} {% load gravatar %} +{% load chunks %} <!DOCTYPE html> <html lang="en"> <head> @@ -27,27 +28,7 @@ </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 %} + {% app_chunk 'navbar' %} </ul> <ul class="nav navbar-nav navbar-right"> {% if user.is_authenticated %} @@ -67,18 +48,7 @@ <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 %} + {% app_chunk 'menu' %} <li role="separator" class="divider"></li> <li><a href="{% url LOGOUT_URL %}?next={% url 'pgp_list_index' %}"> <span class="glyphicon glyphicon-log-out"></span> diff --git a/src/django_pgpmailman/templates/django_pgpmailman/chunks/menu-large.html b/src/django_pgpmailman/templates/django_pgpmailman/chunks/menu-large.html new file mode 100644 index 0000000..8ffd5db --- /dev/null +++ b/src/django_pgpmailman/templates/django_pgpmailman/chunks/menu-large.html @@ -0,0 +1,5 @@ +{% load i18n %} +<li><a href="{% url 'pgp_user_profile' %}"> + <span class="fa fa-cog"></span> + {% trans 'PGP settings' %} +</a></li>
\ No newline at end of file diff --git a/src/django_pgpmailman/templates/django_pgpmailman/chunks/menu.html b/src/django_pgpmailman/templates/django_pgpmailman/chunks/menu.html new file mode 100644 index 0000000..76be31f --- /dev/null +++ b/src/django_pgpmailman/templates/django_pgpmailman/chunks/menu.html @@ -0,0 +1,5 @@ +{% load i18n %} +<li role="presentation"><a role="menuitem" tabindex="-1" href="{% url 'pgp_user_profile' %}"> + <span class="fa fa-cog"></span> + {% trans 'PGP settings' %} +</a></li>
\ No newline at end of file diff --git a/src/django_pgpmailman/templates/django_pgpmailman/chunks/navbar.html b/src/django_pgpmailman/templates/django_pgpmailman/chunks/navbar.html new file mode 100644 index 0000000..9b21449 --- /dev/null +++ b/src/django_pgpmailman/templates/django_pgpmailman/chunks/navbar.html @@ -0,0 +1,12 @@ +{% load i18n %} +{% if mlist %} + <a href="{% url 'pgp_list_summary' list_id=mlist.list_id %}"> + <span class="fa fa-cog"></span> + {% trans 'Manage PGP' %} + </a> +{% else %} + <a href="{% url 'pgp_list_index' %}"> + <span class="fa fa-cog"></span> + {% trans 'Manage PGP lists' %} + </a> +{% endif %}
\ No newline at end of file |
