SciPost Code Repository

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

add worklog indicator to fellowship details

parent a7a15ce7
No related branches found
No related tags found
No related merge requests found
...@@ -7,12 +7,14 @@ ...@@ -7,12 +7,14 @@
<span class="breadcrumb-item">Fellowship details</span> <span class="breadcrumb-item">Fellowship details</span>
{% endblock %} {% endblock %}
{% block pagetitle %}: Fellowship details{% endblock pagetitle %} {% block pagetitle %}
: Fellowship details
{% endblock pagetitle %}
{% block content %} {% block content %}
<h1 class="highlight">Fellowship details</h1> <h1 class="highlight">Fellowship details</h1>
<h2 class="text-primary">{{ fellowship }}</h2> <h2 class="text-primary">{{ fellowship }}</h2>
<br> <br />
<div class="row"> <div class="row">
<div class="col-md-6"> <div class="col-md-6">
...@@ -26,27 +28,36 @@ ...@@ -26,27 +28,36 @@
</tr> </tr>
<tr> <tr>
<th>Fellow</th> <th>Fellow</th>
<td><a href="{{ fellowship.contributor.profile.get_absolute_url }}">{{ fellowship.contributor }}</a></td> <td>
</tr> <a href="{{ fellowship.contributor.profile.get_absolute_url }}">{{ fellowship.contributor }}</a>
{% if "edadmin" in user_roles %}
<tr>
<th>Primary email</th>
<td><a href="mailto:{{ fellowship.contributor.profile.email }}?body=Dear%20{{ fellowship.contributor.formal_str }},%0A%0A"
class="text-primary">{{ fellowship.contributor.profile.email }}</a>
</td> </td>
</tr> </tr>
{% if "edadmin" in user_roles %}
<tr>
<th>Primary email</th>
<td>
<a href="mailto:{{ fellowship.contributor.profile.email }}?body=Dear%20{{ fellowship.contributor.formal_str }},%0A%0A"
class="text-primary">{{ fellowship.contributor.profile.email }}</a>
</td>
</tr>
{% endif %} {% endif %}
<tr> <tr>
<th>Academic field</th> <th>Academic field</th>
<td>{{ fellowship.contributor.profile.acad_field }}</td> <td>{{ fellowship.contributor.profile.acad_field }}</td>
</tr> </tr>
<tr> <tr>
<th>Start date</th> <th>Start date</th>
<td>{{ fellowship.start_date|default:'<i>No start date</i>' }}</td> <td>
{{ fellowship.start_date|default:'<i>No start date</i>' }}
</td>
</tr> </tr>
<tr> <tr>
<th>End date</th> <th>End date</th>
<td>{{ fellowship.until_date|default:'<i>No end date</i>' }}</td> <td>
{{ fellowship.until_date|default:'<i>No end date</i>' }}
</td>
</tr> </tr>
<tr> <tr>
<th>Pool size</th> <th>Pool size</th>
...@@ -55,30 +66,37 @@ ...@@ -55,30 +66,37 @@
<tr> <tr>
<th>Type</th> <th>Type</th>
<td> <td>
{% if fellowship.guest %}
<span class="text-warning">Guest</span> {% if fellowship.guest %}
{% elif fellowship.senior %} <span class="text-warning">Guest</span>
<span class="text-success">Senior</span> {% elif fellowship.senior %}
{% else %} <span class="text-success">Senior</span>
<span class="text-primary">Regular</span> {% else %}
{% endif %} <span class="text-primary">Regular</span>
` </td> {% endif %}
`
</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
<p> <p>
<a href="{% url 'colleges:fellowship_update' fellowship.id %}" class="btn btn-info ms-2">Update this Fellowship</a><br/> <a href="{% url 'colleges:fellowship_update' fellowship.id %}"
<small>[hint: to terminate it, just set the <em>until_date</em> to today]</small> class="btn btn-info ms-2">Update this Fellowship</a>
<br />
<small>[hint: to terminate it, just set the <em>until_date</em> to today]</small>
</p> </p>
</div> </div>
<div class="col-md-6"> <div class="col-md-6">
<div class="adminLinks"> <div class="adminLinks">
<h3>Admin actions</h3> <h3>Admin actions</h3>
<ul> <ul>
<li>After initial setup: <a href="{% url 'colleges:fellowship_email_start' pk=fellowship.id %}">send Fellowship start email</a></li> <li>
</ul> After initial setup: <a href="{% url 'colleges:fellowship_email_start' pk=fellowship.id %}">send Fellowship start email</a>
</li>
</ul>
</div> </div>
<h3>All fellowships of this fellow</h3> <h3>All fellowships of this fellow</h3>
...@@ -92,32 +110,42 @@ ...@@ -92,32 +110,42 @@
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
{% for fship in fellowship.sibling_fellowships %} {% for fship in fellowship.sibling_fellowships %}
<tr> <tr>
<td>{{ fship.id }}</td> <td>{{ fship.id }}</td>
<td> <td>
{% if fship.guest %}
<span class="text-warning">Guest</span> {% if fship.guest %}
{% elif fship.senior %} <span class="text-warning">Guest</span>
<span class="text-success">Senior</span> {% elif fship.senior %}
{% else %} <span class="text-success">Senior</span>
<span class="text-primary">Regular</span> {% else %}
{% endif %} <span class="text-primary">Regular</span>
</td>
<td>
{% if fship.start_date %}
from {{ fship.start_date }}
{% endif %}
{% if fship.until_date %}
until {{ fship.until_date }}
{% endif %} {% endif %}
{% if not fship.start_date and not fship.until_date %}
<i>Unlimited</i> </td>
<td>
{% if fship.start_date %}from {{ fship.start_date }}{% endif %}
{% if fship.until_date %}until {{ fship.until_date }}{% endif %}
{% if not fship.start_date and not fship.until_date %}<i>Unlimited</i>{% endif %}
</td>
<td>
{% if fship.id != fellowship.id %}
<a href="{{ fship.get_absolute_url }}">See details</a>
{% else %}
(this page)
{% endif %} {% endif %}
</td> </td>
<td>{% if fship.id != fellowship.id %}<a href="{{ fship.get_absolute_url }}">See details</a>{% else %}(this page){% endif %}</td>
</tr> </tr>
{% endfor %} {% endfor %}
</tbody> </tbody>
</table> </table>
<a href="{% url 'colleges:fellowship_create' contributor_id=fellowship.contributor.id %}">Add new Fellowship for {{ fellowship.contributor }}</a> <a href="{% url 'colleges:fellowship_create' contributor_id=fellowship.contributor.id %}">Add new Fellowship for {{ fellowship.contributor }}</a>
...@@ -138,30 +166,46 @@ ...@@ -138,30 +166,46 @@
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
{% for proceedings in fellowship.proceedings.all %} {% for proceedings in fellowship.proceedings.all %}
<tr> <tr>
<td>{{ proceedings.event_name }}</td> <td>{{ proceedings.event_name }}</td>
<td><a href="{{ proceedings.get_absolute_url }}">{{ proceedings.issue }}</a></td> <td>
<a href="{{ proceedings.get_absolute_url }}">{{ proceedings.issue }}</a>
</td>
<td>{{ proceedings.submissions_open }}</td> <td>{{ proceedings.submissions_open }}</td>
<td>{{ proceedings.submissions_deadline }}</td> <td>{{ proceedings.submissions_deadline }}</td>
<td>{{ proceedings.submissions_close }}</td> <td>{{ proceedings.submissions_close }}</td>
<td><a class="text-danger" href="{% url 'colleges:fellowship_remove_proceedings' fellowship.id proceedings.id %}">Remove Proceedings</a></td> <td>
<a class="text-danger"
href="{% url 'colleges:fellowship_remove_proceedings' fellowship.id proceedings.id %}">Remove Proceedings</a>
</td>
</tr> </tr>
{% endfor %} {% endfor %}
<tr> <tr>
<td colspan="6" class="py-3 text-center"><a href="{% url 'colleges:fellowship_add_proceedings' fellowship.id %}">Add Proceedings to Guest Fellowship</a></td> <td colspan="6" class="py-3 text-center">
<a href="{% url 'colleges:fellowship_add_proceedings' fellowship.id %}">Add Proceedings to Guest Fellowship</a>
</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
{% endif %} {% endif %}
<h3 class="highlight">Assignments</h3> <div class="highlight d-flex justify-content-between p-2">
<h3 class="m-0 ">Assignments</h3>
<h5 class="m-0 ms-3 pe-2">
Workload indicator
{% include "icons/reception.html" with value=fellowship.contributor.editorial_assignments.ongoing.count max=4 %}
</h5>
</div>
<div class="row"> <div class="row">
<div class="col-12"> <div class="col-12">
<h4>Ongoing:</h4> <h4>Ongoing:</h4>
</div> </div>
<div class="col-12"> <div class="col-12">
<ul class="list-group list-group-flush"> <ul class="list-group list-group-flush">
{% for assignment in fellowship.contributor.editorial_assignments.ongoing %} {% for assignment in fellowship.contributor.editorial_assignments.ongoing %}
<li class="list-group-item"> <li class="list-group-item">
<div class="card-body px-0"> <div class="card-body px-0">
...@@ -172,6 +216,7 @@ ...@@ -172,6 +216,7 @@
{% empty %} {% empty %}
<li class="list-group-item">No ongoing assignments</li> <li class="list-group-item">No ongoing assignments</li>
{% endfor %} {% endfor %}
</ul> </ul>
</div> </div>
...@@ -181,6 +226,7 @@ ...@@ -181,6 +226,7 @@
<div class="col-12"> <div class="col-12">
<ul class="list-group list-group-flush"> <ul class="list-group list-group-flush">
{% for assignment in fellowship.contributor.editorial_assignments.completed %} {% for assignment in fellowship.contributor.editorial_assignments.completed %}
<li class="list-group-item"> <li class="list-group-item">
<div class="card-body px-0"> <div class="card-body px-0">
...@@ -191,6 +237,7 @@ ...@@ -191,6 +237,7 @@
{% empty %} {% empty %}
<li class="list-group-item">No completed assignments</li> <li class="list-group-item">No completed assignments</li>
{% endfor %} {% endfor %}
</ul> </ul>
</div> </div>
</div> </div>
...@@ -204,6 +251,7 @@ ...@@ -204,6 +251,7 @@
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
{% for submission in fellowship.pool.all %} {% for submission in fellowship.pool.all %}
<tr> <tr>
<td> <td>
...@@ -211,16 +259,22 @@ ...@@ -211,16 +259,22 @@
</td> </td>
<td>{{ submission.get_status_display }}</td> <td>{{ submission.get_status_display }}</td>
<td> <td>
{% if submission.editor_in_charge == fellowship.contributor %} {% if submission.editor_in_charge == fellowship.contributor %}
<strong>Fellow is Editor-in-charge</strong> <strong>Fellow is Editor-in-charge</strong>
{% else %} {% else %}
<a class="text-danger" href="{% url 'colleges:fellowship_remove_submission' fellowship.id submission.preprint.identifier_w_vn_nr %}">Remove from this Fellowship's pool</a> <a class="text-danger"
href="{% url 'colleges:fellowship_remove_submission' fellowship.id submission.preprint.identifier_w_vn_nr %}">Remove from this Fellowship's pool</a>
{% endif %} {% endif %}
</td> </td>
</tr> </tr>
{% endfor %} {% endfor %}
<tr> <tr>
<td colspan="3" class="py-3 text-center"><a href="{% url 'colleges:fellowship_add_submission' fellowship.id %}">Add Submission to this Fellowship's pool</a></td> <td colspan="3" class="py-3 text-center">
<a href="{% url 'colleges:fellowship_add_submission' fellowship.id %}">Add Submission to this Fellowship's pool</a>
</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
......
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