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 %} {% endif %}
</div> </div>
</div> </div>
{% available_teams as available_teams %} {% available_teams as available_teams %}
{% if user.memberships.exists or available_teams %} {% if user.memberships.exists or available_teams %}
<div class="container mb-t text-primary"> <div class="container text-primary mb-5">
<div class="page-header"> <div class="row">
<h2>{% trans "Teams" %}</h2> <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> </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="container">
<div class="row"> <div class="row">
{% if available_teams %} {% 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"> <div class="card-body">
<h4 class="card-title text-primary"> <h4 class="card-title text-primary">
{{ team.name }} {{ team.name|title }}
</h4> </h4>
{% if membership %} {% if membership %}
<h5><span class="{% if membership.state == 'invited' %} label-info{% endif %}">{{ membership.get_state_display }}</span></h5> <small class="badge float-right badge-pill badge-{% if membership.state == 'invited' %}info{% else %}primary{% endif %}">{{ membership.get_state_display }}</small>
{% endif %} {% endif %}
<div class="card-text"> {% if team.description %}
<p> <p>{{ team.description }}</p>
{% if team.description %}{{ team.description }}{% endif %} {% else %}
</p> <p>No team description available.</p>
</div> {% endif %}
</div> </div>
<div class="card-footer bg-primary"> <div class="card-footer bg-primary text-secondary">
<a class="btn btn-lg btn-primary" role="button" href="{% url "team_detail" team.slug %}">Details</a> <a href="{% url "team_detail" team.slug %}">Details</a>
{% if membership %} {% if membership %}
{% if membership.state == "manager" or user.is_staff %} {% 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.team.applicants %}{{ membership.team.applicants.count }} applicant{{ membership.team.applicants.count|pluralize }}{% endif %}
{% endif %}
{% endif %} {% endif %}
{% endif %}
</div> </div>
</div> </div>