|
| 1 | +{% extends "base.html" %} |
| 2 | +{% load node_extras %} |
| 3 | + |
| 4 | +{% block content %} |
| 5 | +<div class="page-header"> |
| 6 | + <h1>Embargo Report</h1> |
| 7 | +</div> |
| 8 | + |
| 9 | +<h2>Upcoming Active Embargoes</h2> |
| 10 | +<table class="table table-striped table-bordered table-hover"> |
| 11 | + <thead> |
| 12 | + <tr> |
| 13 | + <th>Registration</th> |
| 14 | + <th>Embargo ID</th> |
| 15 | + <th>State</th> |
| 16 | + <th>Embargo Start</th> |
| 17 | + <th>Embargo End</th> |
| 18 | + <th>Initiated By</th> |
| 19 | + </tr> |
| 20 | + </thead> |
| 21 | + {% include "util/pagination.html" with items=upcoming_page status='' pagin=False order='' %} |
| 22 | + <tbody> |
| 23 | + {% for embargo in upcoming_embargoes %} |
| 24 | + {% with registration=embargo.registrations.first %} |
| 25 | + {% if registration %} |
| 26 | + <tr> |
| 27 | + <td> |
| 28 | + <a href="{{ registration | reverse_node }}"> |
| 29 | + {{ registration.title | truncatechars:30 }} |
| 30 | + </a> |
| 31 | + </td> |
| 32 | + <td>{{ embargo.id }}</td> |
| 33 | + <td>{{ embargo.state }}</td> |
| 34 | + <td>{{ embargo.initiation_date|date:"F j, Y P" }}</td> |
| 35 | + <td>{{ embargo.end_date|date:"F j, Y P" }}</td> |
| 36 | + <td> |
| 37 | + {% if embargo.initiated_by %} |
| 38 | + <a href="{{ embargo.initiated_by | reverse_user }}"> |
| 39 | + {{ embargo.initiated_by.fullname }} |
| 40 | + </a> |
| 41 | + {% else %} |
| 42 | + — |
| 43 | + {% endif %} |
| 44 | + </td> |
| 45 | + </tr> |
| 46 | + {% endif %} |
| 47 | + {% endwith %} |
| 48 | + {% empty %} |
| 49 | + <tr> |
| 50 | + <td colspan="6">No active embargoes found.</td> |
| 51 | + </tr> |
| 52 | + {% endfor %} |
| 53 | + </tbody> |
| 54 | +</table> |
| 55 | + |
| 56 | +<h2>Pending Embargoes Past Pending Window</h2> |
| 57 | +<p>These embargoes are still awaiting approval but have passed the automatic activation window.</p> |
| 58 | +<table class="table table-striped table-bordered table-hover"> |
| 59 | + <thead> |
| 60 | + <tr> |
| 61 | + <th>Registration</th> |
| 62 | + <th>Embargo ID</th> |
| 63 | + <th>State</th> |
| 64 | + <th>Embargo Initiation</th> |
| 65 | + <th>Embargo End</th> |
| 66 | + <th>Initiated By</th> |
| 67 | + </tr> |
| 68 | + </thead> |
| 69 | + <tbody> |
| 70 | + {% for embargo in pending_overdue_embargoes %} |
| 71 | + {% with registration=embargo.registrations.first %} |
| 72 | + {% if registration %} |
| 73 | + <tr> |
| 74 | + <td> |
| 75 | + <a href="{{ registration | reverse_node }}"> |
| 76 | + {{ registration.title | truncatechars:30 }} |
| 77 | + </a> |
| 78 | + </td> |
| 79 | + <td>{{ embargo.id }}</td> |
| 80 | + <td>{{ embargo.state }}</td> |
| 81 | + <td>{{ embargo.initiation_date|date:"F j, Y P" }}</td> |
| 82 | + <td>{{ embargo.end_date|date:"F j, Y P" }}</td> |
| 83 | + <td> |
| 84 | + {% if embargo.initiated_by %} |
| 85 | + <a href="{{ embargo.initiated_by | reverse_user }}"> |
| 86 | + {{ embargo.initiated_by.fullname }} |
| 87 | + </a> |
| 88 | + {% else %} |
| 89 | + — |
| 90 | + {% endif %} |
| 91 | + </td> |
| 92 | + </tr> |
| 93 | + {% endif %} |
| 94 | + {% endwith %} |
| 95 | + {% empty %} |
| 96 | + <tr> |
| 97 | + <td colspan="6">No pending embargoes past the pending window.</td> |
| 98 | + </tr> |
| 99 | + {% endfor %} |
| 100 | + </tbody> |
| 101 | +</table> |
| 102 | + |
| 103 | +<h2>Active Embargoes Past Pending Window</h2> |
| 104 | +<p>These embargoes have an end date in the past but the embargo is still marked as active.</p> |
| 105 | +<table class="table table-striped table-bordered table-hover"> |
| 106 | + <thead> |
| 107 | + <tr> |
| 108 | + <th>Registration</th> |
| 109 | + <th>Embargo ID</th> |
| 110 | + <th>State</th> |
| 111 | + <th>Embargo End</th> |
| 112 | + <th>Is Registration Public?</th> |
| 113 | + <th>Initiated By</th> |
| 114 | + </tr> |
| 115 | + </thead> |
| 116 | + <tbody> |
| 117 | + {% for embargo in overdue_embargoes %} |
| 118 | + {% with registration=embargo.registrations.first %} |
| 119 | + {% if registration %} |
| 120 | + <tr> |
| 121 | + <td> |
| 122 | + <a href="{{ registration | reverse_node }}"> |
| 123 | + {{ registration.title | truncatechars:30 }} |
| 124 | + </a> |
| 125 | + </td> |
| 126 | + <td>{{ embargo.id }}</td> |
| 127 | + <td>{{ embargo.state }}</td> |
| 128 | + <td>{{ embargo.end_date|date:"F j, Y P" }}</td> |
| 129 | + <td> |
| 130 | + {% if registration.is_public %} |
| 131 | + Yes |
| 132 | + {% else %} |
| 133 | + No |
| 134 | + {% endif %} |
| 135 | + </td> |
| 136 | + <td> |
| 137 | + {% if embargo.initiated_by %} |
| 138 | + <a href="{{ embargo.initiated_by | reverse_user }}"> |
| 139 | + {{ embargo.initiated_by.fullname }} |
| 140 | + </a> |
| 141 | + {% else %} |
| 142 | + — |
| 143 | + {% endif %} |
| 144 | + </td> |
| 145 | + </tr> |
| 146 | + {% endif %} |
| 147 | + {% endwith %} |
| 148 | + {% empty %} |
| 149 | + <tr> |
| 150 | + <td colspan="6">No overdue active embargoes found.</td> |
| 151 | + </tr> |
| 152 | + {% endfor %} |
| 153 | + </tbody> |
| 154 | +</table> |
| 155 | + |
| 156 | +{% endblock %} |
| 157 | + |
0 commit comments