Align styling for team list on dashboard with rest of dashboard page
Fix #91
This commit is contained in:
parent
cde5f93555
commit
c2524da650
2 changed files with 47 additions and 42 deletions
|
@ -105,54 +105,36 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="container">
|
||||
<div class="page-row">
|
||||
{% if user.memberships.exists %}
|
||||
<div class="page-header">
|
||||
<h3>Your Teams</h3>
|
||||
</div>
|
||||
<div clas="page-row">
|
||||
{% for membership in user.memberships.all %}
|
||||
<div class="col-xs-12 col-sm-6 col-lg-6">
|
||||
<div class="card card-primary">
|
||||
<div class="card-header">
|
||||
<h5>{{ membership.team.name }}</h5>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
{% if membership.team.description %}<p>{{ membership.team.description }}</p>{% endif %}
|
||||
<a class="btn btn-lg btn-primary" role="button" href="{% url "team_detail" membership.team.slug %}">Details</a>
|
||||
<span class="{% if membership.state == 'invited' %} label-info{% endif %}">{{ membership.get_state_display }}</span>
|
||||
{% 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>
|
||||
<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>
|
||||
<div class="container">
|
||||
<div class="page-row">
|
||||
<div class="row">
|
||||
{% if available_teams %}
|
||||
<div class="page-header">
|
||||
<h3>Available Teams</h3>
|
||||
<div class="col-12">
|
||||
<h3 class="text-primary my-5">Available Teams</h3>
|
||||
</div>
|
||||
<div class="page-row">
|
||||
{% for team in available_teams %}
|
||||
<div class="col-xs-12 col-sm-6 col-lg-6">
|
||||
<div class="card card-primary">
|
||||
<div class="card-header">
|
||||
<h5>{{ team }}</h5>
|
||||
</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 class="col-12">
|
||||
<div class="card-deck">
|
||||
{% for team in available_teams %}
|
||||
{% include "symposion/teams/_team_row.html" %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
|
23
pinaxcon/templates/symposion/teams/_team_row.html
Normal file
23
pinaxcon/templates/symposion/teams/_team_row.html
Normal 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>
|
Loading…
Reference in a new issue