SciPost Code Repository

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

add team timesheets nav link to production team

fix production team markup
parent 9a3b4438
No related branches found
No related tags found
No related merge requests found
{% extends 'production/base.html' %}
{% block pagetitle %}
: Production team
: Production team
{% endblock pagetitle %}
{% load scipost_extras %}
{% block content %}
{% if perms.scipost.can_promote_user_to_production_officer %}
<h2 class="highlight mb-4 d-flex flex-row">
Production Team
<div class="htmx-indicator ms-auto" id="production-team-indicator">
<button class="btn btn-sm btn-warning" type="button" disabled>
<strong>Loading...</strong>
<div class="spinner-grow spinner-grow-sm ms-2"
role="status"
aria-hidden="true"></div>
</button>
</div>
</h2>
<div class="row">
<div id="production-team-delete-officer"
class="col-12 col-md-6"
hx-get="{% url 'production:production_team_list' %}"
hx-trigger="load, submit from:body target:form delay:1000"
hx-indicator="#production-team-indicator"></div>
<div id="production-team-promote-user" class="col-12 col-md-6">
{% include 'production/_hx_team_promote_user.html' with form=new_officer_form %}
</div>
</div>
<h1 class="highlight d-flex flex-row">
Production Team
<div class="htmx-indicator ms-auto" id="production-team-indicator">
<button class="btn btn-sm btn-warning" type="button" disabled>
<strong>Loading...</strong>
<div class="spinner-grow spinner-grow-sm ms-2"
role="status"
aria-hidden="true"></div>
</button>
</div>
</h1>
<div class="row mt-3">
<div id="production-team-delete-officer"
class="col-12 col-md-6"
hx-get="{% url 'production:production_team_list' %}"
hx-trigger="load, submit from:body target:form delay:1000"
hx-indicator="#production-team-indicator"></div>
<div id="production-team-promote-user" class="col-12 col-md-6">
{% include 'production/_hx_team_promote_user.html' with form=new_officer_form %}
</div>
</div>
{% endif %}
{% endblock content %}
<h3>Current Production Team</h3>
<ul>
{% for officer in officers %}
<li id="production-team-officer-{{ officer.id }}">
{{ officer }}
<form class="d-inline px-1"
hx-post="{% url 'production:_hx_team_delete_officer' officer.id %}"
hx-target="#production-team-officer-{{ officer.id }}">
{% csrf_token %}
<input type="submit" class="btn btn-danger mb-1" value="Remove Officer">
</form>
</li>
{% endfor %}
{% for officer in officers %}
<li id="production-team-officer-{{ officer.id }}">
{{ officer }}
<form class="d-inline px-1"
hx-post="{% url 'production:_hx_team_delete_officer' officer.id %}"
hx-target="#production-team-officer-{{ officer.id }}">
{% csrf_token %}
<input type="submit" class="btn btn-danger mb-1" value="Remove Officer" />
</form>
</li>
{% endfor %}
</ul>
{% if perms.scipost.can_view_timesheets %}
<a href="{% url 'finances:timesheets' %}">See team timesheets</a>
{% endif %}
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