dnmgmt/templates/rrequests/request_detail.html

45 lines
1.5 KiB
HTML

{% extends "base.html" %}
{% load crispy_forms_tags %}
{% block content %}
<div class="row">
<div class="col-sm-12">
<div class="panel panel-default">
<div class="panel-heading">Resource Request - {{ request.subject }} - {{ request.applicant }} <span class="glyphicon glyphicon-arrow-right"></span> {{ request.provider }}</div>
<div class="panel-body">
<h3>{{ request.subject }}</h3>
<p>
{% for message in request.requestmessage_set.all %}
<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>
{% if message.statusChanged %}
<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>
{% endif %}
{% endfor %}
{% if request.grantedResources %}
<div role="alert" class="alert alert-info">
<span class="glyphicon glyphicon-ok"></span> Created resources: {{ request.grantedResources }}.
</div>
{% endif %}
</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 %}