Clean up copresenter stuff a bit

This commit is contained in:
William Hughes 2018-06-30 15:50:53 +12:00 committed by Tobias S
parent 6e63465fea
commit b64999677a
2 changed files with 24 additions and 26 deletions

View file

@ -41,9 +41,9 @@
<div class="row">
<div class="col-12">
<div class="card-deck">
{% for proposal in user.speaker_profile.proposals.all %}
{% include "symposion/proposals/_proposal_row.html" %}
{% endfor %}
{% for proposal in user.speaker_profile.proposals.all %}
{% include "symposion/proposals/_proposal_row.html" %}
{% endfor %}
</div>
</div>
</div>
@ -57,10 +57,12 @@
{% pending_proposals as pending_proposals %}
{% if associated_proposals or pending_proposals %}
<div class="container mb-5">
<div class="page-header">
<h2>Copresenter Proposals</h2>
<div class="row">
<div class="col-12">
<h2 class="text-primary my-5">Copresenter Proposals</h2>
</div>
</div>
<div class="page-row">
<div class="row">
{% for proposal in associated_proposals %}
{% include "symposion/proposals/_proposal_row.html" %}
{% endfor %}

View file

@ -13,33 +13,29 @@
<h4 class="card-title text-primary">{{ proposal.title }}</h4>
<div class="card-text">
<p>
<ul>
<li><strong>Type:</strong> {{ proposal.kind.name }}</li>
<li>
<strong>Status:</strong>
{% if proposal.cancelled %}
<span class="label label-danger">Cancelled</span>
<small>{{ proposal.kind.name }}</small>
{% if proposal.cancelled %}
<small class="badge badge-pill float-right badge-danger">Cancelled</small>
{% else %}
{% if request.user == proposal.speaker.user %}
{% if proposal.result.status == "accepted" %}
<small class="badge badge-pill float-right badge-success">Accepted</small>
{% else %}
{% if request.user == proposal.speaker.user %}
{% if proposal.result.status == "accepted" %}
<span class="label label-success">Accepted</span>
{% else %}
<span class="label label-default">Submitted</span>
{% endif %}
{% else %}
<span class="label label-default">Invited</span>
{% endif %}
<small class="badge badge-pill float-right badge-default">Submitted</small>
{% endif %}
</li>
</ul>
{% else %}
<small class="badge badge-pill float-right badge-default">Invited</small>
{% endif %}
{% endif %}
</p>
<p>{{ proposal.abstract|truncatewords:40 }}</p>
</div>
</div>
<div class="card-footer bg-primary">
<a class="btn btn-lg btn-primary" role="button" href="{% url "proposal_detail" proposal.pk %}">View Details</a>
<a href="{% url "proposal_detail" proposal.pk %}">View Details</a><br />
{% if not proposal.cancelled %}
<a class="btn btn-lg btn-success" role="button" href="{% url "proposal_pending_join" proposal.id %}">Accept Copresenter Invitation</a>
<a class="btn btn-lg btn-danger" role="button" href="{% url "proposal_pending_decline" proposal.id %}">Decline Copresenter Invitation</a>
<a href="{% url "proposal_pending_join" proposal.id %}">Accept Invitation</a><br />
<a href="{% url "proposal_pending_decline" proposal.id %}">Decline Invitation</a>
{% endif %}
</div>
</div>