|
9 | 9 |
|
10 | 10 | {% block content %}
|
11 | 11 | {{ block.super }}
|
12 |
| - |
13 |
| - {% if responsible_list %} |
14 |
| - <div class="d-flex mb-3"> |
15 |
| - <div class="me-auto"> |
16 |
| - |
| 12 | + <h3> |
| 13 | + {% translate 'Preparation reminder' %} ({{ semester.name }}) |
| 14 | + </h3> |
| 15 | + <div class="d-flex mb-3"> |
| 16 | + <div class="me-auto"> |
| 17 | + {% if responsible_list and interactive %} |
17 | 18 | <form reload-on-success method="POST" action="{% url 'staff:semester_preparation_reminder' semester_id=semester.id %}">
|
18 | 19 | {% csrf_token %}
|
19 | 20 |
|
|
27 | 28 | <button slot="show-button" type="button" id="remindAllButton" class="btn btn-sm btn-light">{% translate 'Remind all' %}</button>
|
28 | 29 | </confirmation-modal>
|
29 | 30 | </form>
|
| 31 | + {% endif %} |
| 32 | + </div> |
| 33 | + <div class="btn-switch btn-switch-light ms-2 d-print-none h-"> |
| 34 | + <div class="btn-switch-label">{% translate 'View' %}</div> |
| 35 | + <div class="btn-switch btn-group"> |
| 36 | + <a href="{% url 'staff:semester_preparation_reminder' semester_id=semester.id %}" role="button" class="btn btn-sm btn-light {% if interactive %} active{% endif %}"> |
| 37 | + {% translate 'Interactive' %} |
| 38 | + </a> |
| 39 | + <a href="{% url 'staff:semester_preparation_reminder' semester_id=semester.id %}?mode=text" role="button" class="btn btn-sm btn-light{% if not interactive %} active{% endif %}"> |
| 40 | + {% translate 'Text' %} |
| 41 | + </a> |
30 | 42 | </div>
|
31 | 43 | </div>
|
32 |
| - {% endif %} |
| 44 | + </div> |
33 | 45 |
|
34 |
| - {% for responsible, evaluations, delegates in responsible_list %} |
35 |
| - <div class="card{% if not forloop.last %} mb-3{% endif %}"> |
36 |
| - <div class="card-header d-flex"> |
37 |
| - <span class="ps-1 me-auto"> |
38 |
| - <a href="{% url 'staff:user_edit' responsible.id %}">{{ responsible.full_name }}</a>, {% translate 'Delegates' %}: |
39 |
| - {% for delegate in delegates %} |
40 |
| - <a href="{% url 'staff:user_edit' delegate.id %}">{{ delegate.full_name }}</a>{% if not forloop.last %},{% endif %} |
41 |
| - {% empty %} |
42 |
| - — |
43 |
| - {% endfor %} |
44 |
| - </span> |
45 |
| - <div> |
46 |
| - <a href="{% url 'staff:send_reminder' semester.id responsible.id %}" class="btn btn-sm btn-light">{% translate 'Send reminder' %}</a> |
| 46 | + {% if interactive %} |
| 47 | + {% for responsible, evaluations, delegates in responsible_list %} |
| 48 | + <div class="card{% if not forloop.last %} mb-3{% endif %}"> |
| 49 | + <div class="card-header d-flex"> |
| 50 | + <span class="ps-1 me-auto"> |
| 51 | + <a href="{% url 'staff:user_edit' responsible.id %}">{{ responsible.full_name }}</a>, {% translate 'Delegates' %}: |
| 52 | + {% for delegate in delegates %} |
| 53 | + <a href="{% url 'staff:user_edit' delegate.id %}">{{ delegate.full_name }}</a>{% if not forloop.last %},{% endif %} |
| 54 | + {% empty %} |
| 55 | + — |
| 56 | + {% endfor %} |
| 57 | + </span> |
| 58 | + <div> |
| 59 | + <a href="{% url 'staff:send_reminder' semester.id responsible.id %}" class="btn btn-sm btn-light">{% translate 'Send reminder' %}</a> |
| 60 | + </div> |
47 | 61 | </div>
|
48 |
| - </div> |
49 |
| - <div class="card-body"> |
50 |
| - <table class="table table-striped"> |
51 |
| - <thead> |
| 62 | + <div class="card-body"> |
| 63 | + <table class="table table-striped"> |
| 64 | + <thead> |
52 | 65 | <tr>
|
53 | 66 | <th class="width-percent-57">{% translate 'Name' %}</th>
|
54 | 67 | <th class="width-percent-18">{% translate 'Start of evaluation' %}</th>
|
55 | 68 | <th class="width-percent-25">{% translate 'Last modified by' %}</th>
|
56 |
| - </tr> |
57 |
| - </thead> |
58 |
| - <tbody> |
| 69 | + </tr> |
| 70 | + </thead> |
| 71 | + <tbody> |
59 | 72 | {% for evaluation in evaluations %}
|
60 | 73 | <tr{% if evaluation.state != evaluation.State.PREPARED %} class="deactivate"{% endif %}>
|
61 | 74 | <th scope="row">
|
|
75 | 88 | </td>
|
76 | 89 | </tr>
|
77 | 90 | {% endfor %}
|
78 |
| - </tbody> |
79 |
| - </table> |
| 91 | + </tbody> |
| 92 | + </table> |
| 93 | + </div> |
| 94 | + </div> |
| 95 | + {% endfor %} |
| 96 | + {% else %} |
| 97 | + <div class="card"> |
| 98 | + <div class="card-body"> |
| 99 | + {% for responsible, evaluations, _ in responsible_list %} |
| 100 | + <b>{{ responsible.full_name }}</b><br /> |
| 101 | + {% for evaluation in evaluations %} |
| 102 | + - {{ evaluation.full_name }} (<span class="fst-italic">{{ evaluation.course.type }}</span>)<br /> |
| 103 | + {% endfor %} |
| 104 | + {% if not forloop.last %} |
| 105 | + <br /> |
| 106 | + {% endif %} |
| 107 | + {% endfor %} |
80 | 108 | </div>
|
81 | 109 | </div>
|
82 |
| - {% endfor %} |
83 |
| - |
| 110 | + {% endif %} |
84 | 111 | {% endblock %}
|
0 commit comments