{% extends "layouts/base.html" %} {% block title %}{{ _('My Documents') }} - UdeS team manager{% endblock %} {% block page_title %}{{ _('My Documents') }}{% endblock %} {% block breadcrumb %}Home / Profile / {{ _('My Documents') }}{% endblock %} {% block content %} {% set kind_labels = { 'player': _('Player contract'), 'coach': _('Coach contract'), 'manager': _('Manager contract'), 'team': _('Team agreement'), 'code_of_conduct': _('Code of conduct'), 'ethics_code': _('Ethics code'), } %}

{{ _('Documents to sign or acknowledge') }}

{% if documents %}
{% for entry in documents %} {% endfor %}
{{ _('Document') }} {{ _('Type') }} {{ _('Version') }} {{ _('Status') }} {{ _('Actions') }}
{{ entry.document.title }} {{ kind_labels.get(entry.document.kind, entry.document.kind) }} {% if entry.document.current_version %} {{ _('Version %(number)s', number=entry.document.current_version.version) }} {% else %}—{% endif %} {% set assignment = entry.assignment %} {% if assignment is not none and assignment.status == 'signed' %} {{ _('Signed') }} {% elif assignment is not none and assignment.status == 'acknowledged' %} {{ _('Acknowledged') }} {% else %} {{ _('Pending') }} {% endif %}
{% if entry.document.current_version %} {{ _('Download') }} {% endif %} {% if assignment is not none and assignment.status == 'pending' %} {% if entry.document.requires_signature %} {% else %}
{% endif %} {% endif %}
{% elif not teams_progress %}

{{ _('No documents for now') }}

{{ _('Nothing has been published for you yet. Check back later.') }}

{% endif %}
{% if teams_progress %} {% for block in teams_progress %}

{{ _('Team progress') }} — {{ block.team.name }}

{% for doc in block.documents %}{% endfor %} {% for member in block.members %} {% for doc in block.documents %} {% set status = member.statuses.get(doc.id) %} {% endfor %} {% endfor %}
{{ _('Member') }} {{ _('Role') }}{{ doc.title }}
{{ member.user.username }} {{ member.user.role | capitalize }} {% if status == 'signed' %}{{ _('Signed') }} {% elif status == 'acknowledged' %}{{ _('Acknowledged') }} {% elif status == 'pending' %}{{ _('Pending') }} {% else %}{{ _('Not required') }}{% endif %}
{% endfor %} {% endif %} {% endblock %}