Align styling for team list on dashboard with rest of dashboard page

Fix #91
This commit is contained in:
William Hughes 2018-06-30 14:58:39 +12:00 committed by Tobias S
parent cde5f93555
commit c2524da650
2 changed files with 47 additions and 42 deletions

View file

@ -105,54 +105,36 @@
</div> </div>
</div> </div>
<div class="container"> <div class="container">
<div class="page-row">
{% if user.memberships.exists %} {% if user.memberships.exists %}
<div class="page-header"> <div class="row">
<h3>Your Teams</h3> <div class="col-12">
</div> <h3 class="text-primary my-5">Your Teams</h3>
<div clas="page-row"> </div>
{% for membership in user.memberships.all %} </div>
<div class="col-xs-12 col-sm-6 col-lg-6"> <div class="row">
<div class="card card-primary"> <div class="col-12">
<div class="card-header"> <div class="card-deck">
<h5>{{ membership.team.name }}</h5> {% for membership in user.memberships.all %}
</div> {% include "symposion/teams/_team_row.html" with team=membership.team %}
<div class="card-body"> {% endfor %}
{% if membership.team.description %}<p>{{ membership.team.description }}</p>{% endif %} </div>
<a class="btn btn-lg btn-primary" role="button" href="{% url "team_detail" membership.team.slug %}">Details</a> </div>
<span class="{% if membership.state == 'invited' %} label-info{% endif %}">{{ membership.get_state_display }}</span> </div>
{% if membership.state == "manager" or user.is_staff %}
{% if membership.team.applicants %}{{ membership.team.applicants.count }} applicant{{ membership.team.applicants.count|pluralize }}{% endif %}
{% endif %}
</div>
</div>
</div>
{% endfor %}
</div>
{% endif %} {% endif %}
</div>
</div> </div>
<div class="container"> <div class="container">
<div class="page-row"> <div class="row">
{% if available_teams %} {% if available_teams %}
<div class="page-header"> <div class="col-12">
<h3>Available Teams</h3> <h3 class="text-primary my-5">Available Teams</h3>
</div> </div>
<div class="page-row"> <div class="col-12">
{% for team in available_teams %} <div class="card-deck">
<div class="col-xs-12 col-sm-6 col-lg-6"> {% for team in available_teams %}
<div class="card card-primary"> {% include "symposion/teams/_team_row.html" %}
<div class="card-header"> {% endfor %}
<h5>{{ team }}</h5> </div>
</div> </div>
<div class="card-body">
{% if team.description %}<p>{{ team.description }}</p>{% endif %}
<span class="label label-default">{{ team.get_access_display }}</span>
<a class="btn btn-lg btn-primary" role="button" href="{% url "team_detail" team.slug %}">Details</a>
</div>
</div>
</div>
{% endfor %}
</div> </div>
{% endif %} {% endif %}
</div> </div>

View file

@ -0,0 +1,23 @@
<div class="card border-primary">
<div class="card-body">
<h4 class="card-title text-primary">
{{ team.name }}
</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 %}
{% endif %}
{% endif %}
</div>
</div>