From fe1708bb2c16693088bf33feefb290ac2dc3f511 Mon Sep 17 00:00:00 2001 From: Thomas Steen Rasmussen Date: Sun, 2 Apr 2017 19:54:06 +0200 Subject: [PATCH] show team member count, only show join team button when team needs members --- src/teams/templates/team_detail.html | 4 ++-- src/teams/templates/team_list.html | 8 +++++++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/teams/templates/team_detail.html b/src/teams/templates/team_detail.html index 0857b56d..0c11db4a 100644 --- a/src/teams/templates/team_detail.html +++ b/src/teams/templates/team_detail.html @@ -14,10 +14,10 @@ Team: {{ team.name }} | {{ block.super }}

{{ team.area.name }} Area:

-

This team is under the {{ team.area.name }} area. The following users are responsible for the {{ team.area.name }} area:

+

This team is under the {{ team.area.name }} area. The following people are responsible for the {{ team.area.name }} area:

{% endblock %} diff --git a/src/teams/templates/team_list.html b/src/teams/templates/team_list.html index 70c7e73b..bd12b9a6 100644 --- a/src/teams/templates/team_list.html +++ b/src/teams/templates/team_list.html @@ -15,6 +15,7 @@ Teams | {{ block.super }} Description Area Responsible + Members {% if request.user.is_authenticated %} Membership Action @@ -26,7 +27,7 @@ Teams | {{ block.super }} - {{ team.name }} + {{ team.name }} Team @@ -40,6 +41,9 @@ Teams | {{ block.super }} {{ resp.get_full_name|default:"Unnamed" }}{% if not forloop.last %},{% endif %}
{% endfor %} + + {{ team.members.count }} + {% if request.user.is_authenticated %} {% if request.user in team.members.all %} @@ -52,8 +56,10 @@ Teams | {{ block.super }} {% if request.user in team.members.all %} Leave {% else %} + {% if team.needs_members %} Join {% endif %} + {% endif %} {% endif %}