From 1f98d945110b7cd467811e784eead280edcdee9e Mon Sep 17 00:00:00 2001 From: Alexander Sulfrian Date: Sun, 10 Jan 2016 15:33:52 +0100 Subject: One URL for public/member group view. The group is now always reachable with a consistent URL regardless of membership of the current_user. If the user is no member the public view is rendered with the possibility to join the group. --- templates/all.html | 22 ---------------------- templates/browse.html | 22 ++++++++++++++++++++++ templates/group.html | 12 +++++++++--- templates/group_delete.html | 2 +- templates/index.html | 2 +- 5 files changed, 33 insertions(+), 27 deletions(-) delete mode 100644 templates/all.html create mode 100644 templates/browse.html (limited to 'templates') diff --git a/templates/all.html b/templates/all.html deleted file mode 100644 index 128c115..0000000 --- a/templates/all.html +++ /dev/null @@ -1,22 +0,0 @@ -{% extends "layout.html" %} -{% from "_pagination.html" import render_pagination %} - -{% block head %}Public groups{% endblock %} - -{% block content %} -
-
-

Public groups

-
- -
- {% for group in groups %} - {{group}} - {% endfor %} -
- - -
-{% endblock %} diff --git a/templates/browse.html b/templates/browse.html new file mode 100644 index 0000000..34bd10d --- /dev/null +++ b/templates/browse.html @@ -0,0 +1,22 @@ +{% extends "layout.html" %} +{% from "_pagination.html" import render_pagination %} + +{% block head %}Public groups{% endblock %} + +{% block content %} +
+
+

Public groups

+
+ +
+ {% for group in groups %} + {{group}} + {% endfor %} +
+ + +
+{% endblock %} diff --git a/templates/group.html b/templates/group.html index 38e078f..1d3205c 100644 --- a/templates/group.html +++ b/templates/group.html @@ -24,7 +24,7 @@ {% endif %} -{% if not public_view %} +{% if membership.active %}
{% endif %} diff --git a/templates/group_delete.html b/templates/group_delete.html index 543c0f9..951b640 100644 --- a/templates/group_delete.html +++ b/templates/group_delete.html @@ -16,7 +16,7 @@

Are you sure you want to delete the group {{group}}?

- +

This will permanently delete all pads of this group and all information about the group members. diff --git a/templates/index.html b/templates/index.html index f79fb68..11105e0 100644 --- a/templates/index.html +++ b/templates/index.html @@ -16,7 +16,7 @@

-- cgit v1.2.3-1-g7c22