This repository has been archived on 2023-02-07. You can view files and clone it, but cannot push or open issues or pull requests.
Files
blender-bfct/blender-bfct/application/templates/applications/view.html

206 lines
8.8 KiB
HTML
Executable File

{% extends 'layout.html' %}
{% block page_title %}{{application.user.first_name}}'s BFCT Application{% endblock %}
{% block body %}
<div class="row">
<div class="col-md-8">
{% if application.user.first_name %}
<h1>{{application.user.first_name}} {{application.user.last_name}}</h1>
{% else %}
<h1>{{application.user.email}}</h1>
{% endif %}
<h4><i class="fa fa-map-marker"></i> {{application.city_country}}</h4>
<p>{{application.bio_message|safe}}</p>
<div class="box">
<i class="backicon fa fa-info-circle"></i>
<p>
<h3>{{application.user.first_name}}'s details:</h3>
<ul class="list-margin-none offset-top-1">
{% if current_user.has_role('admin') %}
<li>Email:
<a href="mailto:{{application.user.email}}">
{{application.user.email}}
</a>
</li>
{% endif %}
<li>Website:
<a href="{{application.website}}">
{{application.website}}
</a>
</li>
<li>Portfolio:
<a href="{{application.portfolio_cv}}">
{{application.portfolio_cv}}
</a>
</li>
<li>Video Example:
<a href="{{application.video_example}}">
{{application.video_example}}
</a>
</li>
<li>Written Example:
<a href="{{application.written_example}}">
{{application.written_example}}
</a>
</li>
</ul>
</p>
</div>
</div>
<div class="col-md-4">
<h3>Application Status</h3>
<div class="box">
{% if application.status == 'under_review' %}
<i class="backicon fa fa-clock-o"></i>
<h1>Under Review <i class="title-icon fa fa-clock-o"></i></h1>
{% elif application.status == 'submitted' %}
<i class="backicon fa fa-legal"></i>
<h1>Pending Review <span class="danger pull-right"><i class="fa fa-legal"></i></span></h1>
{% elif application.status == 'approved' %}
<i class="backicon fa fa-star"></i>
<h1>Approved! <span class="warning pull-right"><i class="fa fa-star"></i>
</span></h1>
{% elif application.status == 'rejected' %}
<i class="backicon fa fa-times"></i>
<h1>Rejected <span class="danger pull-right"><i class="fa fa-times"></i>
</i></h1>
{% else %}
{{application.status}}
{% endif %}
<p>Submitted <span title="{{application.submission_date.strftime('%A %d %B, %Y @ %H:%m')}}">{{application.show_pretty_date('submission')}}</span>.</p>
{% if review %}
<p>
<i class="fa fa-info-circle offset-vertical-2 offset-left-1 offset-right-1"></i>
You {% if review.approved %}
<strong class="success"> approved </strong>
{% else %}
<strong class="danger"> rejected </strong>
{% endif %} this candidate.
</p>
<hr/>
{% endif %}
<div class="row">
<div class="col-md-12">
<table class="table table-striped">
<thead>
<tr>
<th>Reviewer</th>
<th class="content-align-center">Verdict</th>
</tr>
</thead>
<tbody>
{% if reviews %}
{% for review in reviews%}
<tr>
<td>
{% if review.reviewer.id == current_user.id %}
<strong>
{% endif %}
{{review.reviewer.first_name}} {{review.reviewer.last_name}}
{% if review.reviewer.id == current_user.id %}
</strong>
{% endif %}
</td>
<td class="content-align-center">
{% if review.approved %}
<i class="fa fa-check success"></i>
{% else %}
<i class="fa fa-times danger"></i>
{% endif %}
</td>
</tr>
{% endfor %}
{% else %}
<tr>
<td class="danger">
<i class="fa fa-warning"></i> Tsk tsk! Nobody reviewed this yet.
</td>
<td></td>
</tr>
{% endif %}
</tbody>
</table>
</div>
</div>
</div>
{% if not review %}
<hr/>
<div class="row">
<div class="col-md-6">
<a href="{{url_for('applications.vote', approved=1, id=application.id)}}" class="btn btn-default btn-block btn-squishy btn-success">
<i class="fa fa-thumbs-up"></i> Approve
</a>
</div>
<div class="col-md-6">
<a href="{{url_for('applications.vote', approved=0, id=application.id)}}" class="btn btn-default btn-block btn-squishy btn-danger">
<i class="fa fa-thumbs-down"></i> Reject
</a>
</div>
</div>
{% endif %}
{% if current_user.has_role('admin') %}
<hr/>
<div class="row">
<div class="col-md-12">
<a href="{{url_for('applications.update_bfct_role', application_id=application.id)}}" class="btn btn-default btn-block btn-squishy btn-default">
<i class="fa fa-refresh"></i> Update BFCT Role
</a>
</div>
</div>
{% endif %}
<div class="row">
<div class="col-md-12">
<hr>
<h2>Comments
{% if application.comments %}
{% for comment in application.comments %}
{% if loop.first %}
<div class="pull-right">
({{ loop.length }})
</div>
{% endif %}
</h2>
<div class="box offset-bottom-2">
<span class="pull-right small"><p><small>{{comment.pretty_creation_date}} <i class="fa fa-clock-o"></i></small></p></span>
<span><h4 class="offset-top-3">{{comment.user.first_name}} {{comment.user.last_name}}</h4></span>
<hr class="offset-top-0 offset-bottom-0"/>
<p>{{comment.text}}</p>
</div>
{% endfor %}
{% else %}
</h2>
{% endif %}
<form class="form-horizontal" method="POST" action="{{url_for('applications.comment', application_id=application.id)}}">
<fieldset>
{{ comment_form.hidden_tag() }}
<div class="input-group input-group-lg width-full">
{{ comment_form.text(class="form-control") }}
<label class="control-label">Leave a comment</label>
</div>
<button class="btn btn-default btn-squishy btn-success width-half pull-right offset-top-2" type="submit" value="Go">
Submit Comment <i class="fa fa-send small"></i>
</button>
</fieldset>
</form>
</div>
</div>
</div>
{% if current_user.has_role('admin') %}
{% if not application.review_end_date %}
<div class="col-md-12"><hr/></div>
<div class="col-md-6">
<a href="{{url_for('applications.final_review', approved=1, id=application.id)}}" class="btn btn-default btn-block btn-squishy btn-success"><i class="fa fa-check"></i> Final Approval</a>
</div>
<div class="col-md-6">
<a href="{{url_for('applications.final_review', approved=0, id=application.id)}}" class="btn btn-default btn-block btn-squishy btn-danger"><i class="fa fa-times"></i> Final Rejection</a>
</div>
{% endif %}
{% endif %}
</div>
</div>
{% endblock %}