mirror of
https://codeberg.org/Mo8it/AdvLabDB.git
synced 2025-03-21 20:03:57 +00:00
Format templates
This commit is contained in:
parent
6edb47fed9
commit
8846a867f5
6 changed files with 93 additions and 82 deletions
advlabdb/templates
|
@ -1,20 +1,31 @@
|
|||
{% macro information(current_user, active_semester_str, role) %} User:
|
||||
{% macro information(current_user, active_semester_str, role) %}
|
||||
User:
|
||||
<a
|
||||
href="{{ url_for('main.index') }}{{ role }}/user/edit/?id={{ current_user.id }}"
|
||||
>{{ current_user }}</a
|
||||
>
|
||||
{{ current_user }}
|
||||
</a>
|
||||
| Active semester: {{ active_semester_str() }}
|
||||
{% if (role == "admin") and (current_user.has_role("assistant")) %}
|
||||
|
|
||||
<a
|
||||
href="{{ url_for('main.index') }}assistant"
|
||||
>
|
||||
Assistant space
|
||||
</a>.
|
||||
{% elif (role == "assistant") and (current_user.has_role("admin")) %}
|
||||
|
|
||||
<a
|
||||
href="{{ url_for('main.index') }}admin"
|
||||
>
|
||||
Admin space
|
||||
</a>.
|
||||
{% endif %}
|
||||
{% endmacro %}
|
||||
|
||||
| Active semester: {{ active_semester_str() }} {% if (role == "admin") and
|
||||
(current_user.has_role("assistant")) %} |
|
||||
<a href="{{ url_for('main.index') }}assistant">Assistant space</a>. {% elif
|
||||
(role == "assistant") and (current_user.has_role("admin")) %} |
|
||||
<a href="{{ url_for('main.index') }}admin">Admin space</a>. {% endif %} {%
|
||||
endmacro %} {% macro
|
||||
missing_final_experiment_marks(number_of_missing_final_experiment_marks,
|
||||
number_of_all_experiment_marks) %}
|
||||
{% macro missing_final_experiment_marks(number_of_missing_final_experiment_marks, number_of_all_experiment_marks) %}
|
||||
<p>
|
||||
Number of <strong>missing</strong> final experiment marks: {{
|
||||
number_of_missing_final_experiment_marks }} / {{
|
||||
number_of_all_experiment_marks }}
|
||||
Number of <strong>missing</strong> final experiment marks:
|
||||
{{ number_of_missing_final_experiment_marks }} / {{ number_of_all_experiment_marks }}
|
||||
</p>
|
||||
{% endmacro %}
|
||||
|
|
Loading…
Add table
Reference in a new issue