update dashboard to use new panels

This commit is contained in:
Luke Hatcher 2012-07-13 21:42:37 -04:00
parent bc95b2d09a
commit 98bf1120dd

View file

@ -8,98 +8,117 @@
{% block body_class %}auth{% endblock %} {% block body_class %}auth{% endblock %}
{% block body %} {% block body %}
<h2>{% trans "Dashboard" %}</h2> <div class="dashboard-panel">
<div class="dashboard-panel-header">
<section id="dashboard_speakers" class="dashboard-section well"> <i class="icon-bullhorn"></i>
<h3>{% trans "Speaking" %}</h3> <h3>{% trans "Speaking" %}</h3>
{% if not user.speaker_profile %} <div class="pull-right header-actions">
<p>To submit a proposal, you must first create a speaker profile.</p> {% if not user.speaker_profile %}
<a href="{% url speaker_create %}" class="btn"> <a href="{% url speaker_create %}" class="btn">
Create a speaker profile <i class="icon-plus-sign"></i> Create a speaker profile
</a> </a>
{% else %}
{% else %} <a href="{% url speaker_edit %}" class="btn">
<a href="{% url speaker_edit %}" class="btn"> <i class="icon-pencil"></i> Edit your speaker profile
Edit your speaker profile </a>
</a> <a href="{% url proposal_submit %}" class="btn">
<i class="icon-plus-sign"></i> Submit a new proposal
<a href="{% url proposal_submit %}" class="btn"> </a>
Submit a new proposal {% endif %}
</a> </div>
</div>
<h4>Your Proposals</h4>
{% if user.speaker_profile.proposals.exists %}
<table class="table">
<tr>
<th>Title</th>
<th>Session type</th>
<th>Status</th>
<th>Actions</th>
</tr>
{% for proposal in user.speaker_profile.proposals.all %}
{% include "proposals/_proposal_row.html" %}
{% endfor %}
</table>
{% else %}
<p>No proposals submitted yet.</p>
{% endif %}
{% associated_proposals as associated_proposals %} <div class="dashboard-panel-content">
{% if associated_proposals %} {% if not user.speaker_profile %}
<h4>Proposals you have joined as an additional speaker</h4> <p>To submit a proposal, you must first <a href="{% url speaker_create %}">create a speaker profile</a>.</p>
<table class="table"> {% else %}
<tr> <h4>Your Proposals</h4>
<th>Title</th> {% if user.speaker_profile.proposals.exists %}
<th>Session type</th> <table class="table">
<th>Status</th> <tr>
<th>Actions</th> <th>Title</th>
</tr> <th>Session type</th>
{% for proposal in associated_proposals %} <th>Status</th>
{% include "proposals/_proposal_row.html" %} <th>Actions</th>
{% endfor %} </tr>
</table> {% for proposal in user.speaker_profile.proposals.all %}
{% endif %} {% include "proposals/_proposal_row.html" %}
{% endfor %}
</table>
{% else %}
<p>No proposals submitted yet.</p>
{% endif %}
{% pending_proposals as pending_proposals %} {% associated_proposals as associated_proposals %}
{% if pending_proposals %} {% if associated_proposals %}
<h4>Proposals you have been invited to join</h4> <h4>Proposals you have joined as an additional speaker</h4>
<table class="table"> <table class="table">
<tr> <tr>
<th>Title</th> <th>Title</th>
<th>Session type</th> <th>Session type</th>
<th>Status</th> <th>Status</th>
<th>Actions</th> <th>Actions</th>
</tr> </tr>
{% for proposal in pending_proposals %} {% for proposal in associated_proposals %}
{% include "proposals/_pending_proposal_row.html" %} {% include "proposals/_proposal_row.html" %}
{% endfor %} {% endfor %}
</table> </table>
{% endif %}
{% pending_proposals as pending_proposals %}
{% if pending_proposals %}
<h4>Proposals you have been invited to join</h4>
<table class="table">
<tr>
<th>Title</th>
<th>Session type</th>
<th>Status</th>
<th>Actions</th>
</tr>
{% for proposal in pending_proposals %}
{% include "proposals/_pending_proposal_row.html" %}
{% endfor %}
</table>
{% endif %}
{% endif %} {% endif %}
{% endif %} </div>
</section> </div>
<section id="dashboard_sponsorship" class="dashboard-section well"> <div class="dashboard-panel">
<h3>{% trans "Sponsorship" %}</h3> <div class="dashboard-panel-header">
{% if not user.sponsorships.exists %} <i class="icon-briefcase"></i>
<a href="{% url sponsor_apply %}" class="btn"> <h3>{% trans "Sponsorship" %}</h3>
Apply to be a sponsor <div class="pull-right header-actions">
</a> {% if not user.sponsorships.exists %}
{% else %} <a href="{% url sponsor_apply %}" class="btn">
<h4>Your Sponsorship</h4> <i class="icon-plus-sign"></i> Apply to be a sponsor
<ul> </a>
{% for sponsorship in user.sponsorships.all %} {% endif %}
<li> </div>
{% if sponsorship.active %} </div>
<a href="{% url sponsor_detail sponsorship.pk %}"><b>{{ sponsorship.name }}</b></a>
({{ sponsorship.level }}) <div class="dashboard-panel-content">
{% else %} <p>
<b>{{ sponsorship.name }}</b> {% if not user.sponsorships.exists %}
({{ sponsorship.level }}) <p>If you or your organization would be interested in sponsorship opportunities, <a href="{% url sponsor_apply %}">use our online form to apply to be a sponsor</a>.
<span class="label label-warning">awaiting approval</span> {% else %}
{% endif %} <h4>Your Sponsorship</h4>
</li> <ul>
{% endfor %} {% for sponsorship in user.sponsorships.all %}
</ul> <li>
{% endif %} {% if sponsorship.active %}
</section> <a href="{% url sponsor_detail sponsorship.pk %}"><b>{{ sponsorship.name }}</b></a>
({{ sponsorship.level }})
{% else %}
<b>{{ sponsorship.name }}</b>
({{ sponsorship.level }})
<span class="label label-warning">awaiting approval</span>
{% endif %}
</li>
{% endfor %}
</ul>
{% endif %}
</p>
</div>
</div>
{% endblock %} {% endblock %}