diff options
author | Alexander Sulfrian <alex@spline.inf.fu-berlin.de> | 2016-01-10 15:33:52 +0100 |
---|---|---|
committer | Alexander Sulfrian <alex@spline.inf.fu-berlin.de> | 2016-01-10 17:37:01 +0100 |
commit | 1f98d945110b7cd467811e784eead280edcdee9e (patch) | |
tree | 75c30a12b06e96553783379b4cd38a533dbc23f3 /templates | |
parent | 1ec270de4390f215f874e8fad23736ce978c1bbd (diff) | |
download | padlite-teams-1f98d945110b7cd467811e784eead280edcdee9e.tar.gz padlite-teams-1f98d945110b7cd467811e784eead280edcdee9e.tar.bz2 padlite-teams-1f98d945110b7cd467811e784eead280edcdee9e.zip |
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.
Diffstat (limited to 'templates')
-rw-r--r-- | templates/browse.html (renamed from templates/all.html) | 2 | ||||
-rw-r--r-- | templates/group.html | 12 | ||||
-rw-r--r-- | templates/group_delete.html | 2 | ||||
-rw-r--r-- | templates/index.html | 2 |
4 files changed, 12 insertions, 6 deletions
diff --git a/templates/all.html b/templates/browse.html index 128c115..34bd10d 100644 --- a/templates/all.html +++ b/templates/browse.html @@ -11,7 +11,7 @@ <div class="list-group"> {% for group in groups %} - <a class="list-group-item" href="{{ url_for('public_group', group_name=group.name) }}">{{group}}</a> + <a class="list-group-item" href="{{ url_for('group', group_name=group.name) }}">{{group}}</a> {% endfor %} </div> 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 %} </div> -{% if not public_view %} +{% if membership.active %} <div class="panel panel-default"> <div class="panel-heading" style="border-bottom: 0"> <h3 class="panel-title">Pads</h3> @@ -56,7 +56,7 @@ <div class="panel-body">No pads created.</div> {% endfor %} - {% if admin %} + {% if membership.admin %} <div class="panel-footer"> <a href="{{ url_for('pad_create', group_name=group.name) }}"> Create pad @@ -77,7 +77,7 @@ </ul> </div> -{% if admin %} +{% if membership.admin %} {% for member in members|rejectattr("active") %} {% if loop.first %} <div class="panel panel-default"> @@ -139,6 +139,11 @@ </div> <div class="panel-body"> + {% if membership %} + <div class="text-center"> + Membership request pending. + </div> + {% else %} <form class="form-horizontal" role="form" method="POST"> <div class="form-group"> <div class="col-lg-offset-2 col-lg-8"> @@ -146,6 +151,7 @@ </div> </div> </form> + {% endif %} </div> </div> {% 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 @@ <p class="form-control-static text-center lead"> Are you sure you want to delete the group {{group}}? </p> - + <p class="form-control-static text-center"> 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 @@ </div> <div class="panel-footer"> - <a href="{{ url_for('all') }}">Find public browsable groups</a> + <a href="{{ url_for('browse') }}">Find public browsable groups</a> </div> </div> |