no need for an alert when no history present

This commit is contained in:
Andrew Croce 2018-09-13 14:46:44 -04:00 committed by dandds
parent b473a87eea
commit 5018ff39fe
2 changed files with 47 additions and 48 deletions

View File

@ -49,7 +49,7 @@
border-top: 1px dashed $color-gray-light; border-top: 1px dashed $color-gray-light;
&:first-child { &:first-child {
border-top-style: solid; border-top: none;
} }
@include media($medium-screen) { @include media($medium-screen) {

View File

@ -154,58 +154,57 @@
</section> </section>
<section> <section>
{% if reviews %} <div class='panel'>
<div class='panel'> <header class='panel__heading panel__heading--divider'>
<header class='panel__heading'> <h2 class='h3 request-approval__columns__heading'>CCPO Activity Log</h2>
<h2 class='h3 request-approval__columns__heading'>CCPO Activity Log</h2> </header>
</header>
<div class='approval-log'> <div class='approval-log'>
<ol> {% if reviews %}
{% for review in reviews %} <ol>
<li> {% for review in reviews %}
<article class='approval-log__log-item'> <li>
<div> <article class='approval-log__log-item'>
{{ review.log_name }} <div>
<h3 class='approval-log__log-item__header'>{{ review.status.log_name }} by {{ review.full_name_reviewer }}</h3> {{ review.log_name }}
{% if review.comment %} <h3 class='approval-log__log-item__header'>{{ review.status.log_name }} by {{ review.full_name_reviewer }}</h3>
<p>{{ review.comment }}</p> {% 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 %} {% endif %}
<div class='approval-log__behalfs'> {% if review.lname_ccpo %}
{% if review.lname_mao %} <div class='approval-log__behalf'>
<div class='approval-log__behalf'> <h3 class='approval-log__log-item__header'>CCPO approval on behalf of:</h3>
<h3 class='approval-log__log-item__header'>Mission Owner approval on behalf of:</h3> <span>{{ review.full_name_ccpo }}</span>
<span>{{ review.full_name_mao }}</span> </div>
<span>{{ review.email_mao }}</span> {% endif %}
<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> </div>
{% set timestamp=review.status.time_created | formattedDate("%Y-%m-%d %H:%M:%S %Z") %} </div>
<footer class='approval-log__log-item__timestamp'> {% set timestamp=review.status.time_created | formattedDate("%Y-%m-%d %H:%M:%S %Z") %}
<local-datetime timestamp='{{ timestamp }}'></local-datetime> <footer class='approval-log__log-item__timestamp'>
</footer> <local-datetime timestamp='{{ timestamp }}'></local-datetime>
</article> </footer>
</li> </article>
{% endfor %} </li>
</ol> {% endfor %}
</div> </ol>
{% else %}
<div class='panel__content'>
<p class='h4'>No CCPO approvals or request changes have been recorded yet.</p>
</div>
{% endif %}
</div> </div>
{% else %} </div>
{{ Alert('CCPO Activity Log',
message='No CCPO approvals or request changes have been recorded yet.',
level='warning'
) }}
{% endif %}
</section> </section>
</article> </article>