Rearrange activity log
Add back comment form Add dummy comment log
This commit is contained in:
parent
f91c328d2b
commit
2dcc51c154
@ -32,7 +32,55 @@
|
||||
|
||||
</section>
|
||||
|
||||
{% if request.is_pending_ccpo_action %}
|
||||
<section class='internal-notes' id='ccpo-notes'>
|
||||
<form method="POST" action="{{ url_for('requests.create_internal_comment', request_id=request.id) }}">
|
||||
<div class='panel'>
|
||||
<div class='panel__heading panel__heading--divider'>
|
||||
<h2>CCPO Internal Comments</h2>
|
||||
</div>
|
||||
|
||||
<div class='comment-log'>
|
||||
{% if comments %}
|
||||
<ol>
|
||||
{% for comment in comments %}
|
||||
<li>
|
||||
<article class='comment-log__log-item'>
|
||||
<div>
|
||||
<h3 class='comment-log__log-item__header'>{{ comment.full_name_commenter }}</h3>
|
||||
<p>{{ comment.message }}</p>
|
||||
</div>
|
||||
{% set timestamp=comment.time_created | formattedDate("%Y-%m-%d %H:%M:%S %Z") %}
|
||||
<footer class='comment-log__log-item__timestamp'>
|
||||
<local-datetime timestamp='{{ timestamp }}'></local-datetime>
|
||||
</footer>
|
||||
</article>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ol>
|
||||
{% else %}
|
||||
<div class='panel__content'>
|
||||
<p class='h4'>No CCPO comments have been recorded yet.</p>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
|
||||
<div class='panel__heading internal-notes__add-comment__heading'>
|
||||
<h3 class='h3'>Add a comment</h2>
|
||||
</div>
|
||||
|
||||
<div class='panel__content'>
|
||||
{{ internal_comment_form.csrf_token }}
|
||||
{{ TextInput(internal_comment_form.text, paragraph=True, noMaxWidth=True) }}
|
||||
</div>
|
||||
</div>
|
||||
<div class='action-group action-group--tight'>
|
||||
<button class='usa-button' type="submit">Save Notes</button>
|
||||
</div>
|
||||
</form>
|
||||
</section>
|
||||
|
||||
|
||||
<section class='request-approval__review'>
|
||||
<form method="POST" action="{{ url_for("requests.submit_approval", request_id=request.id) }}" autocomplete="off">
|
||||
{{ f.csrf_token }}
|
||||
@ -40,8 +88,63 @@
|
||||
<ccpo-approval inline-template>
|
||||
<div>
|
||||
<div class='panel'>
|
||||
|
||||
<header class='panel__heading panel__heading--divider'>
|
||||
<h2 class='request-approval__columns__heading'>CCPO Review Activity</h2>
|
||||
</header>
|
||||
|
||||
<div class='approval-log'>
|
||||
{% if reviews %}
|
||||
<ol>
|
||||
{% for review in reviews %}
|
||||
<li>
|
||||
<article class='approval-log__log-item'>
|
||||
<div>
|
||||
{{ review.log_name }}
|
||||
<h3 class='approval-log__log-item__header'>{{ review.status.log_name }} by {{ review.full_name_reviewer }}</h3>
|
||||
{% if review.comment %}
|
||||
<p>{{ review.comment }}</p>
|
||||
{% endif %}
|
||||
|
||||
<div class='approval-log__behalfs'>
|
||||
{% if review.lname_mao %}
|
||||
<div class='approval-log__behalf'>
|
||||
<h3 class='approval-log__log-item__header'>Mission Owner approval on behalf of:</h3>
|
||||
<span>{{ review.full_name_mao }}</span>
|
||||
<span>{{ review.email_mao }}</span>
|
||||
<span>{{ review.phone_mao }}</span>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if review.lname_ccpo %}
|
||||
<div class='approval-log__behalf'>
|
||||
<h3 class='approval-log__log-item__header'>CCPO approval on behalf of:</h3>
|
||||
<span>{{ review.full_name_ccpo }}</span>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{% set timestamp=review.status.time_created | formattedDate("%Y-%m-%d %H:%M:%S %Z") %}
|
||||
<footer class='approval-log__log-item__timestamp'>
|
||||
<local-datetime timestamp='{{ timestamp }}'></local-datetime>
|
||||
</footer>
|
||||
</article>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ol>
|
||||
{% else %}
|
||||
<div class='panel__content'>
|
||||
<p class='h4'>No CCPO approvals or request changes have been recorded yet.</p>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
{% if request.is_pending_ccpo_action %}
|
||||
<div class='panel__heading request-approval__review__heading'>
|
||||
<h3 class='h3'>Review this Request</h2>
|
||||
</div>
|
||||
|
||||
<div class='panel__content'>
|
||||
<h2>Review this Request</h2>
|
||||
|
||||
<div class='usa-input'>
|
||||
<fieldset class='usa-input__choices usa-input__choices--inline'>
|
||||
@ -119,8 +222,11 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
|
||||
{% if request.is_pending_ccpo_action %}
|
||||
<div v-if='approving || denying' class='action-group' v-cloak>
|
||||
<button v-if='approving' type="submit" name="approved" class='usa-button usa-button-big'>Approve Request</button>
|
||||
<button v-if='denying' type="submit" name="denied" class='usa-button usa-button-big'>Request Revisions</button>
|
||||
@ -129,65 +235,12 @@
|
||||
<span>Cancel</span>
|
||||
</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
</ccpo-approval>
|
||||
</form>
|
||||
</section>
|
||||
{% endif %}
|
||||
|
||||
<section>
|
||||
<div class='panel'>
|
||||
<header class='panel__heading panel__heading--divider'>
|
||||
<h2 class='h3 request-approval__columns__heading'>CCPO Activity Log</h2>
|
||||
</header>
|
||||
|
||||
<div class='approval-log'>
|
||||
{% if reviews %}
|
||||
<ol>
|
||||
{% for review in reviews %}
|
||||
<li>
|
||||
<article class='approval-log__log-item'>
|
||||
<div>
|
||||
{{ review.log_name }}
|
||||
<h3 class='approval-log__log-item__header'>{{ review.status.log_name }} by {{ review.full_name_reviewer }}</h3>
|
||||
{% if review.comment %}
|
||||
<p>{{ review.comment }}</p>
|
||||
{% endif %}
|
||||
|
||||
<div class='approval-log__behalfs'>
|
||||
{% if review.lname_mao %}
|
||||
<div class='approval-log__behalf'>
|
||||
<h3 class='approval-log__log-item__header'>Mission Owner approval on behalf of:</h3>
|
||||
<span>{{ review.full_name_mao }}</span>
|
||||
<span>{{ review.email_mao }}</span>
|
||||
<span>{{ review.phone_mao }}</span>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if review.lname_ccpo %}
|
||||
<div class='approval-log__behalf'>
|
||||
<h3 class='approval-log__log-item__header'>CCPO approval on behalf of:</h3>
|
||||
<span>{{ review.full_name_ccpo }}</span>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{% set timestamp=review.status.time_created | formattedDate("%Y-%m-%d %H:%M:%S %Z") %}
|
||||
<footer class='approval-log__log-item__timestamp'>
|
||||
<local-datetime timestamp='{{ timestamp }}'></local-datetime>
|
||||
</footer>
|
||||
</article>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ol>
|
||||
{% else %}
|
||||
<div class='panel__content'>
|
||||
<p class='h4'>No CCPO approvals or request changes have been recorded yet.</p>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
</article>
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user