SciPost Code Repository

Skip to content
Snippets Groups Projects
Commit d12c8a54 authored by George Katsikas's avatar George Katsikas :goat:
Browse files

separate assignee status on production page

parent a6d4f0b7
No related branches found
No related tags found
1 merge request!43Polish up new production page
<table class="table">
<tr>
<td>
<small class="text-muted">Latest activity</small>
</td>
<td>
{{ productionstream.latest_activity|timesince }} ago
<br>
<span class="text-muted">(opened {{ productionstream.opened|timesince }} ago)</span>
</td>
</tr>
<tr>
<td>
<small class="text-muted">Supervisor</small>
</td>
<td>
{% if productionstream.supervisor %}
<span class="text-success">{% include 'bi/check-circle-fill.html' %}</span>
{{ productionstream.supervisor }}
{% else %}
<span class="text-danger">{% include 'bi/x-circle-fill.html' %}</span>
{% endif %}
</td>
</tr>
<tr>
<td>
<small class="text-muted">Production officer</small>
</td>
<td>
{% if productionstream.officer %}
<span class="text-success">{% include 'bi/check-circle-fill.html' %}</span>
{{ productionstream.officer }}
{% else %}
<span class="text-danger">{% include 'bi/x-circle-fill.html' %}</span>
{% endif %}
</td>
</tr>
</table>
<div class="row mb-0"> <div class="row mb-0">
<div class="col col-md-8"> <div class="col col-md-8">
<table> <table>
<tbody> <tbody>
<tr>
<td><strong class="text-primary">{{ productionstream.submission.title }}</strong></td> <tr>
</tr> <td>
<tr class="mt-1"> <strong class="text-primary">{{ productionstream.submission.title }}</strong>
<td><strong><em>by {{ productionstream.submission.author_list }}</em></strong></td> </td>
</tr> </tr>
</tbody> <tr class="mt-1">
</table> <td>
<div class="row mt-2 mb-0"> <strong><em>by {{ productionstream.submission.author_list }}</em></strong>
<div class="col"> </td>
<small class="text-muted">To be published in</small><br> </tr>
{{ productionstream.submission.editorial_decision.for_journal }} </tbody>
</div> </table>
<div class="col">
<small class="text-muted">Acceptance date</small><br> <div class="row mt-2 mb-0">
{{ productionstream.submission.editorial_decision.taken_on|date:'Y-m-d' }} <div class="col">
</div> <small class="text-muted">To be published in</small>
<div class="col"> <br>
<small class="text-muted">Stream Status</small> {{ productionstream.submission.editorial_decision.for_journal }}
<br> </div>
<div class="p-2 label label-{% if stream.status == 'initiated' %}outline-danger{% else %}secondary{% endif %}">{{ productionstream.get_status_display }}</div> <div class="col">
{% if productionstream.submission.editorial_decision.status == productionstream.submission.editorial_decision.AWAITING_PUBOFFER_ACCEPTANCE %}<br><strong class="text-danger">Wait! author<br>acceptance of puboffer<br>required!</strong>{% endif %} <small class="text-muted">Acceptance date</small>
</div> <br>
</div> {{ productionstream.submission.editorial_decision.taken_on|date:'Y-m-d' }}
</div>
<div class="col">
<small class="text-muted">Stream Status</small>
<br>
<div class="p-2 label label-{% if stream.status == 'initiated' %}outline-danger{% else %}secondary{% endif %}">
{{ productionstream.get_status_display }}
</div>
{% if productionstream.submission.editorial_decision.status == productionstream.submission.editorial_decision.AWAITING_PUBOFFER_ACCEPTANCE %}
<br>
<strong class="text-danger">Wait! author
<br>
acceptance of puboffer
<br>
required!</strong>
{% endif %}
</div>
</div>
</div> </div>
<div class="col col-md-4 border-start"> <div id="productionstream-{{ productionstream.id }}-summary-assignees"
<table class="table"> class="col col-md-4 border-start"
<tr> hx-get="{% url 'production:render_stream_assignees_status' productionstream.id %}"
<td><small class="text-muted">Latest activity</small></td> hx-trigger="load"></div>
<td>
{{ productionstream.latest_activity|timesince }} ago
<br>
<span class="text-muted">(opened {{ productionstream.opened|timesince }} ago)</span>
</td>
</tr>
<tr>
<td><small class="text-muted">Supervisor</small></td>
<td>
{% if productionstream.supervisor %}
<span class="text-success">{% include 'bi/check-circle-fill.html' %}</span>
{{ productionstream.supervisor }}
{% else %}
<span class="text-danger">{% include 'bi/x-circle-fill.html' %}</span>
{% endif %}
</td>
</tr>
<tr>
<td><small class="text-muted">Production officer</small></td>
<td>
{% if productionstream.officer %}
<span class="text-success">{% include 'bi/check-circle-fill.html' %}</span>
{{ productionstream.officer }}
{% else %}
<span class="text-danger">{% include 'bi/x-circle-fill.html' %}</span>
{% endif %}
</td>
</tr>
</table>
</div>
</div> </div>
...@@ -197,6 +197,11 @@ urlpatterns = [ ...@@ -197,6 +197,11 @@ urlpatterns = [
production_views.render_action_buttons, production_views.render_action_buttons,
name="render_action_buttons", name="render_action_buttons",
), ),
path(
"render_stream_assignees_status",
production_views.render_stream_assignees_status,
name="render_stream_assignees_status",
),
] ]
), ),
), ),
......
...@@ -1118,3 +1118,17 @@ def render_action_buttons(request, stream_id, key): ...@@ -1118,3 +1118,17 @@ def render_action_buttons(request, stream_id, key):
"new_option": new_option_str, "new_option": new_option_str,
}, },
) )
def render_stream_assignees_status(request, stream_id):
productionstream = get_object_or_404(ProductionStream, pk=stream_id)
context = {
"productionstream": productionstream,
}
return render(
request,
"production/_hx_productionstream_summary_assignees_status.html",
context,
)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment