2017-03-14 20:18:57 +01:00
|
|
|
{% extends "base.html" %}
|
|
|
|
|
|
|
|
{% load crispy_forms_tags %}
|
|
|
|
|
|
|
|
{% block content %}
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-sm-12">
|
|
|
|
<div class="panel panel-default">
|
2017-03-20 00:16:33 +01:00
|
|
|
<div class="panel-heading">Resource Request - {{ request.subject }} - {{ request.applicant }} <span class="glyphicon glyphicon-arrow-right"></span> {{ request.provider }}</div>
|
2017-03-14 20:18:57 +01:00
|
|
|
<div class="panel-body">
|
2017-03-20 00:16:33 +01:00
|
|
|
<h3>{{ request.subject }}</h3>
|
2017-03-14 20:18:57 +01:00
|
|
|
<p>
|
|
|
|
{% for message in request.requestmessage_set.all %}
|
2017-03-20 00:16:33 +01:00
|
|
|
<div class="panel panel-default">
|
|
|
|
<div class="panel-heading">From {{message.creator }} at {{ message.created }}</div>
|
|
|
|
<div class="panel-body">
|
|
|
|
{{ message.message | linebreaks }}
|
|
|
|
</div>
|
|
|
|
</div>
|
2017-03-14 20:18:57 +01:00
|
|
|
|
|
|
|
{% if message.statusChanged %}
|
2017-03-20 00:16:33 +01:00
|
|
|
<div role="alert" class="alert alert-{% if message.statusChanged == "OPEN" %}info{% elif message.statusChanged == "RESOLVED" %}success{% elif message.statusChanged == "REJECTED" %}danger{% endif %}">
|
|
|
|
Status changed to {{ message.get_statusChanged_display }}.
|
|
|
|
</div>
|
2017-03-14 20:18:57 +01:00
|
|
|
{% endif %}
|
|
|
|
{% endfor %}
|
2017-04-15 16:57:19 +02:00
|
|
|
{% if request.grantedResources %}
|
|
|
|
<div role="alert" class="alert alert-info">
|
|
|
|
<span class="glyphicon glyphicon-ok"></span> Created resources: {{ request.grantedResources }}.
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
2017-03-14 20:18:57 +01:00
|
|
|
</p>
|
|
|
|
<h4>Add / change</h4>
|
|
|
|
<form method="post" action="#">
|
|
|
|
{% csrf_token %}
|
|
|
|
{{ form | crispy }}
|
|
|
|
<button class="btn btn-primary">Submit</button>
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{% endblock %}
|
|
|
|
|