From b6d97c91188a4301822722cc40bb6fd1b7f7844e Mon Sep 17 00:00:00 2001 From: Brian Rosner Date: Wed, 22 Aug 2012 16:15:21 -0600 Subject: [PATCH] fixed teams box to only show when content is available to show --- symposion_project/templates/dashboard.html | 97 +++++++++++----------- 1 file changed, 49 insertions(+), 48 deletions(-) diff --git a/symposion_project/templates/dashboard.html b/symposion_project/templates/dashboard.html index d454e15d..09ef8257 100644 --- a/symposion_project/templates/dashboard.html +++ b/symposion_project/templates/dashboard.html @@ -122,53 +122,54 @@

- -
-
- -

{% trans "Teams" %}

+ + {% available_teams as available_teams %} + {% if user.memberships.exists or available_teams %} +
+
+ +

{% trans "Teams" %}

+
+ +
+ {% if user.memberships.exists %} +

Your Teams

+ + {% for membership in user.memberships.all %} + + + + + + {% endfor %} +
+ {{ membership.team.name }} + {% if membership.team.description %}
{{ membership.team.description }}{% endif %} +
+ {{ membership.get_state_display }} + + {% if membership.state == "manager" or user.is_staff %} + {% if membership.team.applicants %}{{ membership.team.applicants.count }} applicant{{ membership.team.applicants.count|pluralize }}{% endif %} + {% endif %} +
+ {% endif %} + {% if available_teams %} +

Available Teams

+ + {% for team in available_teams %} + + + + + {% endfor %} +
+ {{ team }} + {% if team.description %}
{{ team.description }}{% endif %} +
+ {{ team.get_access_display }} +
+ {% endif %} +
- -
- {% if user.memberships.exists %} -

Your Teams

- - {% for membership in user.memberships.all %} - - - - - - {% endfor %} -
- {{ membership.team.name }} - {% if membership.team.description %}
{{ membership.team.description }}{% endif %} -
- {{ membership.get_state_display }} - - {% if membership.state == "manager" or user.is_staff %} - {% if membership.team.applicants %}{{ membership.team.applicants.count }} applicant{{ membership.team.applicants.count|pluralize }}{% endif %} - {% endif %} -
- {% endif %} - {% available_teams as available_teams %} - {% if available_teams %} -

Available Teams

- - {% for team in available_teams %} - - - - - - {% endfor %} -
- {{ team }} - {% if team.description %}
{{ team.description }}{% endif %} -
- {{ team.get_access_display }} -
- {% endif %} -
-
+ {% endif %} {% endblock %}