Make proposal-detail more friendly to read

This commit is contained in:
Sachi King 2017-05-07 16:15:41 +10:00
parent 3c5a14c97b
commit 8cf348acb5
2 changed files with 178 additions and 95 deletions

View file

@ -1,116 +1,194 @@
{% load i18n %} {% load i18n %}
{% load pyconau2017_tags %} {% load pyconau2017_tags %}
<h4>{% trans "Submitted by" %}</h4> <div>
<p>{{ proposal.speaker }} &lt;{{ proposal.speaker.email }}&gt;</p> <label class="col-sm-2 col-lg-2">Submitted by</label>
<div class="col-sm-10 col-lg-10">
<p>{{ proposal.speaker }} &lt;{{ proposal.speaker.email }}&gt;</p>
</div>
</div>
<h4>{% trans "Proposal Type" %}</h4> <div>
<p>{{ proposal.kind.name|capfirst }}</p> <label class="col-sm-2 col-lg-2">Proposal Type</label>
<div class="col-sm-10 col-lg-10">
<p>{{ proposal.kind.name|capfirst }}</p>
</div>
</div>
<h4>{% trans "Target Audience" %}</h4> <div>
<p>{{ proposal.get_target_audience_display }}&nbsp;</p> <label class="col-sm-2 col-lg-2">Target Audience</label>
<div class="col-sm-10 col-lg-10">
<p>{{ proposal.get_target_audience_display }}&nbsp;</p>
</div>
</div>
{% if proposal.additional_speakers.all %} {% if proposal.additional_speakers.all %}
<h4>{% trans "Additional Speakers" %}</h4> <div>
<ul> <label class="col-sm-2 col-lg-2">Additional Speakers</label>
{% for speaker in proposal.additional_speakers.all %} <div class="col-sm-10 col-lg-10">
<li> <table class="table">
{% if speaker.user %} <thead>
<strong>{{ speaker.name }}</strong> &lt;{{ speaker.email }}&gt; <tr>
{% else %} <th>Name</th>
{{ speaker.email }} ({% trans "Invitation Sent" %}) <th>Email</th>
{% endif %} <th>Status</th>
</li> </tr>
{% endfor %} </thead>
</ul> <tbody>
<p></p> {% for speaker in proposal.additional_speakers.all %}
<tr>
{% if speaker.user %}
<td>{{ speaker.name }}</td>
<td>{{ speaker.email }}</td>
<td>Joined</td>
{% else %}
<td>Unknown</td>
<td>{{ speaker.email }}</td>
<td>Invitation Sent</td>
{% endif %}
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
<p></p>
{% endif %} {% endif %}
<h4>{% trans "Abstract" %}</h4> <div>
<div class="abstract monospace-text">{{ proposal.abstract_html|safe }}&nbsp;</div> <label class="col-sm-2 col-lg-2">Abstract</label>
<div class="col-sm-10 col-lg-10">
<div class="abstract monospace-text well">{{ proposal.abstract_html|safe }}&nbsp;</div>
<p></p>
</div>
</div>
<h4>{% trans "Private Abstract" %}</h4> <div>
<div class="private_abstract monospace-text">{{ proposal.private_abstract_html|safe }}&nbsp;</div> <label class="col-sm-2 col-lg-2">Private Abstract</label>
<div class="col-sm-10 col-lg-10">
<div class="private_abstract monospace-text well">{{ proposal.private_abstract_html|safe }}&nbsp;</div>
<p></p>
</div>
</div>
<h4>{% trans "Project" %}</h4> <div>
<p>{{ proposal.project|safe }}&nbsp;</p> <label class="col-sm-2 col-lg-2">Project</label>
<div class="col-sm-10 col-lg-10">
{% if proposal.project %}
<p>{{ proposal.project|safe }}&nbsp;</p>
{% else %}
<p><b>None Provided</b></p>
{% endif %}
</div>
</div>
<h4>{% trans "Project URL" %}</h4> <div>
<p><a href="{{ proposal.project_url|safe }}">{{ proposal.project_url|safe }}</a>&nbsp;</p> <label class="col-sm-2 col-lg-2">Project URL</label>
<div class="col-sm-10 col-lg-10">
{% if proposal.project_url %}
<p><a href="{{ proposal.project_url|safe }}">{{ proposal.project_url|safe }}</a>&nbsp;</p>
{% else %}
<p><b>None Provided</b></p>
{% endif %}
</div>
</div>
<h4>{% trans "Video URL" %}</h4> <div>
<p><a href="{{ proposal.video_url|safe }}">{{ proposal.video_url|safe }}</a>&nbsp;</p> <label class="col-sm-2 col-lg-2">Video URL</label>
<div class="col-sm-10 col-lg-10">
{% if proposal.video_url %}
<p><a href="{{ proposal.video_url|safe }}">{{ proposal.video_url|safe }}</a>&nbsp;</p>
{% else %}
<p><b>None Provided</b></p>
{% endif %}
</div>
</div>
<h4>{% trans "Special Requirements" %}</h4> <div>
<div class="special_requirements monospace-text">{{ proposal.technical_requirements_html|safe }}</div> <label class="col-sm-2 col-lg-2">Special Requirements</label>
<div class="col-sm-10 col-lg-10">
{% if proposal.technical_requirements_html %}
<div class="special_requirements monospace-text">{{ proposal.technical_requirements_html|safe }}</div>
{% else %}
<div class="special_requirements monospace-text"><b>No Special Talk Requirements Requested</b></div>
{% endif %}
</div>
&nbsp;
</div>
<br/>
{% for speaker in proposal.speakers %} {% for speaker in proposal.speakers %}
<h4>{% trans "Speaker:" %} {{ speaker.name }}</h4> {% if speaker.name %}
<h5>{% trans "Biography" %}</h5> <div class="panel panel-default">
<div class="panel-heading">
<div class="biography monospace-text">{{ speaker.biography_html|safe }}&nbsp;</div> <h3 class="panel-title">Speaker: {{ speaker.name }}</h3>
</div>
<h5>{% trans "Experience" %}</h5> <div class="panel-body">
<div class="biography monospace-text">{{ speaker.experience_html|safe }}&nbsp;</div> <div>
<label class="col-sm-2 col-lg-2">Biography</label>
<div class="col-sm-10 col-lg-10 well monospace-text">{{ speaker.biography_html|safe }}&nbsp;</div>
</div>
<div>
<label class="col-sm-2 col-lg-2">Experience</label>
<div class="col-sm-10 col-lg-10 well monospace-text">{{ speaker.experience_html|safe }}&nbsp;</div>
</div>
{% if speaker.accessibility_html %}
<div>
<label class="col-sm-2 col-lg-2">Accessibility Requirements</label>
<div class="col-sm-10 col-lg-10 well monospace-text">{{ speaker.accessibility_html|safe }}&nbsp;</div>
</div>
{% endif %}
</div>
</div>
{% endif %}
{% endfor %} {% endfor %}
{% can_manage proposal as can_manage_proposal %} {% can_manage proposal as can_manage_proposal %}
{% if can_manage_proposal or request.user.speaker_profile in proposal.speakers %} {% if can_manage_proposal or request.user.speaker_profile in proposal.speakers %}
<div>
<h4>{% trans "Assistance required?" %}</h4> <label class="col-sm-2 col-lg-2">Travel Assistance Required</label>
<div class="col-sm-10 col-lg-10">
<table class="table">
<thead>
<tr>
<th>Name</th>
<th>Travel</th>
<th>Accomodation</th>
</tr>
</thead>
<tbody>
{% for speaker in proposal.speakers %}
<tr>
{% if speaker.user %}
<td>{{ speaker.name }}</td>
<td>{{ speaker.travel_assistance }}</td>
<td>{{ speaker.accommodation_assistance }}</td>
{% else %}
<td><b>Unconfirmed co-presenter</b></td>
<td><b>Unknown</b></td>
<td><b>Unknown</b></td>
{% endif %}
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
<br /> <br />
<table>
<tr>
<th></th>
<th>{% trans "Travel" %}</th>
<th>{% trans "Accommodation" %}</th>
</tr>
{% for speaker in proposal.speakers %}
<tr>
<td>{{ speaker.name }}</td>
<td>{{ speaker.travel_assistance }}</td>
<td>{{ speaker.accommodation_assistance }}</td>
</tr>
{% endfor %}
</table>
<br />
{% if proposal.speaker.accessibility_html %}
<h4>{% trans "Speaker Accessibility Requirements" %}</h4>
{% for speaker in proposal.speakers %}
{% if speaker.accessibility_html %}
<h5>{{ speaker.name }}</h5>
<div class="biography monospace-text">{{ speaker.accessibility_html|safe }}&nbsp;</div>
{% endif %}
{% endfor %}
{% endif %}
{% endif %} {% endif %}
<h4>{% trans "Documents" %}</h4>
<div> <div>
{% if proposal.supporting_documents.exists %} <label class="col-sm-2 col-lg-2">Recording Release</label>
<table class="table table-striped"> <div class="col-sm-10 col-lg-10">
{% for document in proposal.supporting_documents.all %} <p>{{ proposal.recording_release }}&nbsp;</p>
<tr> </div>
<td><a href="{{ document.download_url }}">{{ document.description }}</a></td> &nbsp;
<td>
<form class="form-horizontal" style="margin: 0;" method="post" action="{% url "proposal_document_delete" document.pk %}">
{% csrf_token %}
<button type="submit" class="btn btn-xs">delete</button>
</form>
</td>
</tr>
{% endfor %}
</table>
{% else %}
<p>No supporting documents attached to this proposal.</p>
{% endif %}
</div> </div>
<h4>{% trans "Recording Release" %}</h4> <div>
<p>{{ proposal.recording_release }}&nbsp;</p> <label class="col-sm-2 col-lg-2">Materials Release</label>
<div class="col-sm-10 col-lg-10">
<h4>{% trans "Materials Release" %}</h4> <p>{{ proposal.materials_release }}&nbsp;</p>
<p>{{ proposal.materials_release }}&nbsp;</p> </div>
&nbsp;
</div>

View file

@ -19,8 +19,9 @@
<div class="btn-group"> <div class="btn-group">
{% if not proposal.cancelled %} {% if not proposal.cancelled %}
{% if request.user == proposal.speaker.user %} {% if request.user == proposal.speaker.user %}
<a href="{% url "proposal_edit" proposal.pk %}" class="btn btn-default">{% trans "Edit this proposal" %}</a> <a class="btn btn-lg btn-primary" href="{% url "proposal_edit" proposal.pk %}">{% trans "Edit this proposal" %}</a>
<a href="{% url "proposal_cancel" proposal.pk %}" class="btn btn-default">{% trans "Cancel this proposal" %}</a> <a class="btn btn-lg btn-success" role="button" href="{% url "proposal_speaker_manage" proposal.id %}">Manage Additional Speakers</a>
<a class="btn btn-lg btn-danger" href="{% url "proposal_cancel" proposal.pk %}">{% trans "Cancel this proposal" %}</a>
{% else %} {% else %}
<a href="{% url "proposal_leave" proposal.pk %}" class="btn btn-default">{% trans "Remove me from this proposal" %}</a> <a href="{% url "proposal_leave" proposal.pk %}" class="btn btn-default">{% trans "Remove me from this proposal" %}</a>
{% endif %} {% endif %}
@ -54,9 +55,13 @@
<div class="tab-pane" id="reviewer-feedback"> <div class="tab-pane" id="reviewer-feedback">
<h3>{% trans 'Conversation with Reviewers' %}</h3> <h3>{% trans 'Conversation with Reviewers' %}</h3>
{% for message in proposal.messages.all %} {% for message in proposal.messages.all %}
<div class="review-box"> <div class="panel panel-default">
<div class="comment monospace-text"><em>{{ message.message|safe }}</em></div> <div class="panel-body">
<div class="dateline"><b>{{ message.user.username }}</b> {{ message.submitted_at|timesince }} ago</div> <div class="comment monospace-text"><em>{{ message.message|safe }}</em></div>
</div>
<div class="panel-heading">
<div><b>{{ message.user.username }}</b> {{ message.submitted_at|timesince }} ago</div>
</div>
</div> </div>
<br /> <br />
{% endfor %} {% endfor %}