Spacing tweaks

This commit is contained in:
Tobias Schulmann 2018-06-30 16:42:03 +12:00
parent 88ca6d819f
commit 99c74f1ccc
2 changed files with 35 additions and 38 deletions

View file

@ -99,31 +99,28 @@
{% endif %}
</div>
</div>
{% available_teams as available_teams %}
{% if user.memberships.exists or available_teams %}
<div class="container mb-t text-primary">
<div class="page-header">
<h2>{% trans "Teams" %}</h2>
<div class="container text-primary mb-5">
<div class="row">
<h2 class="col-12 my-5">{% trans "Teams "%}</h2>
{% if user.memberships.exists %}
</div>
<div class="row">
<div class="col-12">
<h3 class="text-primary">Your Teams</h3>
<div class="card-deck">
{% for membership in user.memberships.all %}
{% include "symposion/teams/_team_row.html" with team=membership.team %}
{% endfor %}
</div>
</div>
{% endif %}
</div>
</div>
<div class="container">
{% if user.memberships.exists %}
<div class="row">
<div class="col-12">
<h3 class="text-primary my-5">Your Teams</h3>
</div>
</div>
<div class="row">
<div class="col-12">
<div class="card-deck">
{% for membership in user.memberships.all %}
{% include "symposion/teams/_team_row.html" with team=membership.team %}
{% endfor %}
</div>
</div>
</div>
{% endif %}
</div>
<div class="container">
<div class="row">
{% if available_teams %}

View file

@ -1,23 +1,23 @@
<div class="card border-primary">
<div class="card border-primary mx-4 my-4">
<div class="card-body">
<h4 class="card-title text-primary">
{{ team.name }}
{{ team.name|title }}
</h4>
{% if membership %}
<h5><span class="{% if membership.state == 'invited' %} label-info{% endif %}">{{ membership.get_state_display }}</span></h5>
{% endif %}
<div class="card-text">
<p>
{% if team.description %}{{ team.description }}{% endif %}
</p>
</div>
</div>
<div class="card-footer bg-primary">
<a class="btn btn-lg btn-primary" role="button" href="{% url "team_detail" team.slug %}">Details</a>
{% if membership %}
{% if membership.state == "manager" or user.is_staff %}
{% if membership.team.applicants %}{{ membership.team.applicants.count }} applicant{{ membership.team.applicants.count|pluralize }}{% endif %}
{% if membership %}
<small class="badge float-right badge-pill badge-{% if membership.state == 'invited' %}info{% else %}primary{% endif %}">{{ membership.get_state_display }}</small>
{% endif %}
{% if team.description %}
<p>{{ team.description }}</p>
{% else %}
<p>No team description available.</p>
{% endif %}
</div>
<div class="card-footer bg-primary text-secondary">
<a href="{% url "team_detail" team.slug %}">Details</a>
{% if membership %}
{% 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 %}
{% endif %}
</div>
</div>