diff --git a/.gitignore b/.gitignore index f0ee47d9..e5651bb7 100644 --- a/.gitignore +++ b/.gitignore @@ -17,4 +17,6 @@ sith/settings_custom.py sith/search_indexes/ .coverage coverage_report/ -doc/_build + +# compiled documentation +site/ diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 8a98da0d..b81eaae6 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -7,4 +7,15 @@ repos: - id: ruff # actually fix the fixable errors, but print nothing args: ["--fix", "--silent"] # Run the formatter. - - id: ruff-format \ No newline at end of file + - id: ruff-format + - repo: https://github.com/rtts/djhtml + rev: 3.0.6 + hooks: + - id: djhtml + name: format templates + entry: djhtml --tabwidth 2 + types: ["jinja"] + - id: djcss + name: format scss files + entry: djcss --tabwidth 2 + types: ["scss"] diff --git a/accounting/templates/accounting/accountingtype_list.jinja b/accounting/templates/accounting/accountingtype_list.jinja index f04cc798..7ae54014 100644 --- a/accounting/templates/accounting/accountingtype_list.jinja +++ b/accounting/templates/accounting/accountingtype_list.jinja @@ -1,27 +1,27 @@ {% extends "core/base.jinja" %} {% block title %} -{% trans %}Accounting type list{% endtrans %} + {% trans %}Accounting type list{% endtrans %} {% endblock %} {% block content %} -
-

- {% trans %}Accounting{% endtrans %} > - {% trans %}Accounting types{% endtrans %} -

-
-

{% trans %}New accounting type{% endtrans %}

- {% if accountingtype_list %} -

{% trans %}Accounting type list{% endtrans %}

- - {% else %} - {% trans %}There is no types in this website.{% endtrans %} - {% endif %} -
+
+

+ {% trans %}Accounting{% endtrans %} > + {% trans %}Accounting types{% endtrans %} +

+
+

{% trans %}New accounting type{% endtrans %}

+ {% if accountingtype_list %} +

{% trans %}Accounting type list{% endtrans %}

+ + {% else %} + {% trans %}There is no types in this website.{% endtrans %} + {% endif %} +
{% endblock %} diff --git a/accounting/templates/accounting/bank_account_details.jinja b/accounting/templates/accounting/bank_account_details.jinja index eb7ac8b1..f1b1e056 100644 --- a/accounting/templates/accounting/bank_account_details.jinja +++ b/accounting/templates/accounting/bank_account_details.jinja @@ -1,37 +1,37 @@ {% extends "core/base.jinja" %} {% block title %} -{% trans %}Bank account: {% endtrans %}{{ object.name }} + {% trans %}Bank account: {% endtrans %}{{ object.name }} {% endblock %} {% block content %} -
-

- {% trans %}Accounting{% endtrans %} > - {{ object.name }} -

-
-

{% trans %}Bank account: {% endtrans %}{{ object.name }}

- {% if user.is_in_group(pk=settings.SITH_GROUP_ACCOUNTING_ADMIN_ID) and not object.club_accounts.exists() %} - {% trans %}Delete{% endtrans %} - {% endif %} -

{% trans %}Infos{% endtrans %}

- -

{% trans %}New club account{% endtrans %}

- -
+
+

+ {% trans %}Accounting{% endtrans %} > + {{ object.name }} +

+
+

{% trans %}Bank account: {% endtrans %}{{ object.name }}

+ {% if user.is_in_group(pk=settings.SITH_GROUP_ACCOUNTING_ADMIN_ID) and not object.club_accounts.exists() %} + {% trans %}Delete{% endtrans %} + {% endif %} +

{% trans %}Infos{% endtrans %}

+ +

{% trans %}New club account{% endtrans %}

+ +
{% endblock %} diff --git a/accounting/templates/accounting/bank_account_list.jinja b/accounting/templates/accounting/bank_account_list.jinja index 0bd654b8..bb47cfca 100644 --- a/accounting/templates/accounting/bank_account_list.jinja +++ b/accounting/templates/accounting/bank_account_list.jinja @@ -1,32 +1,32 @@ {% extends "core/base.jinja" %} {% block title %} -{% trans %}Bank account list{% endtrans %} + {% trans %}Bank account list{% endtrans %} {% endblock %} {% block content %} -
-

- {% trans %}Accounting{% endtrans %} -

- {% if user.is_in_group(pk=settings.SITH_GROUP_ACCOUNTING_ADMIN_ID) %} -

{% trans %}Manage simplified types{% endtrans %}

-

{% trans %}Manage accounting types{% endtrans %}

-

{% trans %}New bank account{% endtrans %}

- {% endif %} - {% if bankaccount_list %} -

{% trans %}Bank account list{% endtrans %}

- - {% else %} - {% trans %}There is no accounts in this website.{% endtrans %} - {% endif %} -
+
+

+ {% trans %}Accounting{% endtrans %} +

+ {% if user.is_in_group(pk=settings.SITH_GROUP_ACCOUNTING_ADMIN_ID) %} +

{% trans %}Manage simplified types{% endtrans %}

+

{% trans %}Manage accounting types{% endtrans %}

+

{% trans %}New bank account{% endtrans %}

+ {% endif %} + {% if bankaccount_list %} +

{% trans %}Bank account list{% endtrans %}

+ + {% else %} + {% trans %}There is no accounts in this website.{% endtrans %} + {% endif %} +
{% endblock %} diff --git a/accounting/templates/accounting/club_account_details.jinja b/accounting/templates/accounting/club_account_details.jinja index f9ceec23..b6df130e 100644 --- a/accounting/templates/accounting/club_account_details.jinja +++ b/accounting/templates/accounting/club_account_details.jinja @@ -1,68 +1,68 @@ {% extends "core/base.jinja" %} {% block title %} -{% trans %}Club account:{% endtrans %} {{ object.name }} + {% trans %}Club account:{% endtrans %} {{ object.name }} {% endblock %} {% block content %} -
-

- {% trans %}Accounting{% endtrans %} > - {{object.bank_account }} > - {{ object }} -

-
-

{% trans %}Club account:{% endtrans %} {{ object.name }}

- {% if user.is_root and not object.journals.exists() %} - {% trans %}Delete{% endtrans %} - {% endif %} - {% if user.is_in_group(pk=settings.SITH_GROUP_ACCOUNTING_ADMIN_ID) %} -

{% trans %}New label{% endtrans %}

- {% endif %} -

{% trans %}Label list{% endtrans %}

- {% if not object.has_open_journal() %} -

{% trans %}New journal{% endtrans %}

- {% else %} -

{% trans %}You can not create new journal while you still have one opened{% endtrans %}

- {% endif %} - - - - - - - - - - - - - - {% for j in object.journals.all() %} - - - - {% if j.end_date %} - - {% else %} - - {% endif %} - - - {% if j.closed %} - - {% else %} - - {% endif %} - - - {% endfor %} - -
{% trans %}Name{% endtrans %}{% trans %}Start{% endtrans %}{% trans %}End{% endtrans %}{% trans %}Amount{% endtrans %}{% trans %}Effective amount{% endtrans %}{% trans %}Closed{% endtrans %}{% trans %}Actions{% endtrans %}
{{ j.name }}{{ j.start_date }}{{ j.end_date }} - {{ j.amount }} €{{ j.effective_amount }} €{% trans %}Yes{% endtrans %}{% trans %}No{% endtrans %} {% trans %}View{% endtrans %} - {% trans %}Edit{% endtrans %} - {% if user.is_in_group(pk=settings.SITH_GROUP_ACCOUNTING_ADMIN_ID) and j.operations.count() == 0 %} - {% trans %}Delete{% endtrans %} - {% endif %} -
-
+
+

+ {% trans %}Accounting{% endtrans %} > + {{object.bank_account }} > + {{ object }} +

+
+

{% trans %}Club account:{% endtrans %} {{ object.name }}

+ {% if user.is_root and not object.journals.exists() %} + {% trans %}Delete{% endtrans %} + {% endif %} + {% if user.is_in_group(pk=settings.SITH_GROUP_ACCOUNTING_ADMIN_ID) %} +

{% trans %}New label{% endtrans %}

+ {% endif %} +

{% trans %}Label list{% endtrans %}

+ {% if not object.has_open_journal() %} +

{% trans %}New journal{% endtrans %}

+ {% else %} +

{% trans %}You can not create new journal while you still have one opened{% endtrans %}

+ {% endif %} + + + + + + + + + + + + + + {% for j in object.journals.all() %} + + + + {% if j.end_date %} + + {% else %} + + {% endif %} + + + {% if j.closed %} + + {% else %} + + {% endif %} + + + {% endfor %} + +
{% trans %}Name{% endtrans %}{% trans %}Start{% endtrans %}{% trans %}End{% endtrans %}{% trans %}Amount{% endtrans %}{% trans %}Effective amount{% endtrans %}{% trans %}Closed{% endtrans %}{% trans %}Actions{% endtrans %}
{{ j.name }}{{ j.start_date }}{{ j.end_date }} - {{ j.amount }} €{{ j.effective_amount }} €{% trans %}Yes{% endtrans %}{% trans %}No{% endtrans %} {% trans %}View{% endtrans %} + {% trans %}Edit{% endtrans %} + {% if user.is_in_group(pk=settings.SITH_GROUP_ACCOUNTING_ADMIN_ID) and j.operations.count() == 0 %} + {% trans %}Delete{% endtrans %} + {% endif %} +
+
{% endblock %} diff --git a/accounting/templates/accounting/co_list.jinja b/accounting/templates/accounting/co_list.jinja index 0cca32c6..1d357820 100644 --- a/accounting/templates/accounting/co_list.jinja +++ b/accounting/templates/accounting/co_list.jinja @@ -1,30 +1,30 @@ {% extends "core/base.jinja" %} {% block title %} -{% trans %}Company list{% endtrans %} + {% trans %}Company list{% endtrans %} {% endblock %} {% block content %} -
- {% if user.is_root - or user.is_in_group(pk=settings.SITH_GROUP_ACCOUNTING_ADMIN_ID) - %} -

{% trans %}Create new company{% endtrans %}

- {% endif %} -
- - - - - - - - {% for o in object_list %} - - - - {% endfor %} - -
{% trans %}Companies{% endtrans %}
{{ o.get_display_name() }}
-
+
+ {% if user.is_root + or user.is_in_group(pk=settings.SITH_GROUP_ACCOUNTING_ADMIN_ID) + %} +

{% trans %}Create new company{% endtrans %}

+{% endif %} +
+ + + + + + + + {% for o in object_list %} + + + + {% endfor %} + +
{% trans %}Companies{% endtrans %}
{{ o.get_display_name() }}
+
{% endblock %} diff --git a/accounting/templates/accounting/journal_details.jinja b/accounting/templates/accounting/journal_details.jinja index 274e678f..8393ca8b 100644 --- a/accounting/templates/accounting/journal_details.jinja +++ b/accounting/templates/accounting/journal_details.jinja @@ -1,103 +1,103 @@ {% extends "core/base.jinja" %} {% block title %} -{% trans %}General journal:{% endtrans %} {{ object.name }} + {% trans %}General journal:{% endtrans %} {{ object.name }} {% endblock %} {% block content %} -
-

- {% trans %}Accounting{% endtrans %} > - {{object.club_account.bank_account }} > - {{ object.club_account }} > - {{ object.name }} -

-
-

{% trans %}General journal:{% endtrans %} {{ object.name }}

-

{% trans %}New label{% endtrans %}

-

{% trans %}Label list{% endtrans %}

-

{% trans %}Company list{% endtrans %}

-

{% trans %}Amount: {% endtrans %}{{ object.amount }} € - - {% trans %}Effective amount: {% endtrans %}{{ object.effective_amount }} €

- {% if object.closed %} -

{% trans %}Journal is closed, you can not create operation{% endtrans %}

- {% else %} -

{% trans %}New operation{% endtrans %}

-
- {% endif %} -
- - +
+

+ {% trans %}Accounting{% endtrans %} > + {{object.club_account.bank_account }} > + {{ object.club_account }} > + {{ object.name }} +

+
+

{% trans %}General journal:{% endtrans %} {{ object.name }}

+

{% trans %}New label{% endtrans %}

+

{% trans %}Label list{% endtrans %}

+

{% trans %}Company list{% endtrans %}

+

{% trans %}Amount: {% endtrans %}{{ object.amount }} € - + {% trans %}Effective amount: {% endtrans %}{{ object.effective_amount }} €

+ {% if object.closed %} +

{% trans %}Journal is closed, you can not create operation{% endtrans %}

+ {% else %} +

{% trans %}New operation{% endtrans %}

+
+ {% endif %} +
+
+ + + + + + + + + + + + + + + + + + + {% for o in object.operations.all() %} - - - - - - - - - - - - - - - - - {% for o in object.operations.all() %} - - - - - {% if o.accounting_type.movement_type == "DEBIT" %} - - {% else %} - - {% endif %} - - {% if o.target_type == "OTHER" %} + + + + {% if o.accounting_type.movement_type == "DEBIT" %} + + {% else %} + + {% endif %} + + {% if o.target_type == "OTHER" %} - {% else %} + {% else %} - {% endif %} - - - {% if o.done %} + {% endif %} + + + {% if o.done %} - {% else %} + {% else %} - {% endif %} - - {% if o.invoice %} + + {% if o.invoice %} - {% else %} + {% else %} + {% endif %} + - - - {% endfor %} - -
{% trans %}Nb{% endtrans %}{% trans %}Date{% endtrans %}{% trans %}Label{% endtrans %}{% trans %}Amount{% endtrans %}{% trans %}Payment mode{% endtrans %}{% trans %}Target{% endtrans %}{% trans %}Code{% endtrans %}{% trans %}Nature{% endtrans %}{% trans %}Done{% endtrans %}{% trans %}Comment{% endtrans %}{% trans %}File{% endtrans %}{% trans %}Actions{% endtrans %}{% trans %}PDF{% endtrans %}
{% trans %}Nb{% endtrans %}{% trans %}Date{% endtrans %}{% trans %}Label{% endtrans %}{% trans %}Amount{% endtrans %}{% trans %}Payment mode{% endtrans %}{% trans %}Target{% endtrans %}{% trans %}Code{% endtrans %}{% trans %}Nature{% endtrans %}{% trans %}Done{% endtrans %}{% trans %}Comment{% endtrans %}{% trans %}File{% endtrans %}{% trans %}Actions{% endtrans %}{% trans %}PDF{% endtrans %}
{{ o.number }}{{ o.date }}{{ o.label or "" }} {{ o.amount }} € {{ o.amount }} €{{ o.get_mode_display() }}{{ o.number }}{{ o.date }}{{ o.label or "" }} {{ o.amount }} € {{ o.amount }} €{{ o.get_mode_display() }}{{ o.target_label }}{{ o.target.get_display_name() }}{{ o.accounting_type.code }}{{ o.accounting_type.label }}{{ o.accounting_type.code }}{{ o.accounting_type.label }}{% trans %}Yes{% endtrans %}{% trans %}No{% endtrans %}{{ o.remark }} + {% endif %} + {{ o.remark }} {% if not o.linked_operation and o.target_type == "ACCOUNT" and not o.target.has_open_journal() %} -

- {% trans %}Warning: this operation has no linked operation because the targeted club account has no opened journal.{% endtrans %} -

-

- {% trans url=o.target.get_absolute_url() %}Open a journal in this club account, then save this operation again to make the linked operation.{% endtrans %} -

+

+ {% trans %}Warning: this operation has no linked operation because the targeted club account has no opened journal.{% endtrans %} +

+

+ {% trans url=o.target.get_absolute_url() %}Open a journal in this club account, then save this operation again to make the linked operation.{% endtrans %} +

{% endif %} -
{{ o.invoice.name }}- + {% + if o.journal.club_account.bank_account.name not in ["AE TI", "TI"] + or user.is_in_group(pk=settings.SITH_GROUP_ACCOUNTING_ADMIN_ID) + %} + {% if not o.journal.closed %} + {% trans %}Edit{% endtrans %} {% endif %} - - {% - if o.journal.club_account.bank_account.name not in ["AE TI", "TI"] - or user.is_in_group(pk=settings.SITH_GROUP_ACCOUNTING_ADMIN_ID) - %} - {% if not o.journal.closed %} - {% trans %}Edit{% endtrans %} - {% endif %} - {% endif %} - {% trans %}Generate{% endtrans %}
-
-
+ {% endif %} + + {% trans %}Generate{% endtrans %} + +{% endfor %} + + + + {% endblock %} diff --git a/accounting/templates/accounting/journal_statement_accounting.jinja b/accounting/templates/accounting/journal_statement_accounting.jinja index 0661bbcf..5641e78b 100644 --- a/accounting/templates/accounting/journal_statement_accounting.jinja +++ b/accounting/templates/accounting/journal_statement_accounting.jinja @@ -1,33 +1,33 @@ {% extends "core/base.jinja" %} {% block title %} -{% trans %}General journal:{% endtrans %} {{ object.name }} + {% trans %}General journal:{% endtrans %} {{ object.name }} {% endblock %} {% block content %} -
+

{% trans %}Accounting statement: {% endtrans %} {{ object.name }}

- - - - - - - - {% for k,v in statement.items() %} - - - - - {% endfor %} - + + + + + + + + {% for k,v in statement.items() %} + + + + + {% endfor %} +
{% trans %}Operation type{% endtrans %}{% trans %}Sum{% endtrans %}
{{ k }}{{ "%.2f" % v }}
{% trans %}Operation type{% endtrans %}{% trans %}Sum{% endtrans %}
{{ k }}{{ "%.2f" % v }}

{% trans %}Amount: {% endtrans %}{{ "%.2f" % object.amount }} €

{% trans %}Effective amount: {% endtrans %}{{ "%.2f" %object.effective_amount }} €

-
+
{% endblock %} diff --git a/accounting/templates/accounting/journal_statement_nature.jinja b/accounting/templates/accounting/journal_statement_nature.jinja index a3aa1567..0a149326 100644 --- a/accounting/templates/accounting/journal_statement_nature.jinja +++ b/accounting/templates/accounting/journal_statement_nature.jinja @@ -1,57 +1,57 @@ {% extends "core/base.jinja" %} {% block title %} -{% trans %}General journal:{% endtrans %} {{ object.name }} + {% trans %}General journal:{% endtrans %} {{ object.name }} {% endblock %} {% macro display_tables(dict) %} -
+
{% trans %}Credit{% endtrans %}
- - - - - - - - {% for k,v in dict['CREDIT'].items() %} - - - - - {% endfor %} - + + + + + + + + {% for k,v in dict['CREDIT'].items() %} + + + + + {% endfor %} +
{% trans %}Nature of operation{% endtrans %}{% trans %}Sum{% endtrans %}
{{ k }}{{ "%.2f" % v }}
{% trans %}Nature of operation{% endtrans %}{% trans %}Sum{% endtrans %}
{{ k }}{{ "%.2f" % v }}
{% trans %}Total: {% endtrans %}{{ "%.2f" % dict['CREDIT_sum'] }}
{% trans %}Debit{% endtrans %}
- - - - - - - - {% for k,v in dict['DEBIT'].items() %} - - - - - {% endfor %} - + + + + + + + + {% for k,v in dict['DEBIT'].items() %} + + + + + {% endfor %} +
{% trans %}Nature of operation{% endtrans %}{% trans %}Sum{% endtrans %}
{{ k }}{{ "%.2f" % v }}
{% trans %}Nature of operation{% endtrans %}{% trans %}Sum{% endtrans %}
{{ k }}{{ "%.2f" % v }}
{% trans %}Total: {% endtrans %}{{ "%.2f" % dict['DEBIT_sum'] }} - {% endmacro %} +{% endmacro %} - {% block content %} -

{% trans %}Statement by nature: {% endtrans %} {{ object.name }}

+{% block content %} +

{% trans %}Statement by nature: {% endtrans %} {{ object.name }}

- {% for k,v in statement.items() %} -

{{ k }} : {{ "%.2f" % (v['CREDIT_sum'] - v['DEBIT_sum']) }}

+ {% for k,v in statement.items() %} +

{{ k }} : {{ "%.2f" % (v['CREDIT_sum'] - v['DEBIT_sum']) }}

{{ display_tables(v) }}
- {% endfor %} -
+ {% endfor %} +
{% endblock %} diff --git a/accounting/templates/accounting/journal_statement_person.jinja b/accounting/templates/accounting/journal_statement_person.jinja index 9a88e73f..76482647 100644 --- a/accounting/templates/accounting/journal_statement_person.jinja +++ b/accounting/templates/accounting/journal_statement_person.jinja @@ -1,37 +1,37 @@ {% extends "core/base.jinja" %} {% block title %} -{% trans %}General journal:{% endtrans %} {{ object.name }} + {% trans %}General journal:{% endtrans %} {{ object.name }} {% endblock %} {% block content %} -
+

{% trans %}Statement by person: {% endtrans %} {{ object.name }}

{% trans %}Credit{% endtrans %}

- - - - - - - - {% for key in credit_statement.keys() %} - - {% if key.target_type == "OTHER" %} - - {% elif key %} - - {% else %} - - {% endif %} - - - {% endfor %} - + + + + + + + + {% for key in credit_statement.keys() %} + + {% if key.target_type == "OTHER" %} + + {% elif key %} + + {% else %} + + {% endif %} + + + {% endfor %} +
{% trans %}Target of the operation{% endtrans %}{% trans %}Sum{% endtrans %}
{{ o.target_label }}{{ key.get_display_name() }}{{ "%.2f" % credit_statement[key] }}
{% trans %}Target of the operation{% endtrans %}{% trans %}Sum{% endtrans %}
{{ o.target_label }}{{ key.get_display_name() }}{{ "%.2f" % credit_statement[key] }}
@@ -40,29 +40,29 @@

{% trans %}Debit{% endtrans %}

- - - - - - - - {% for key in debit_statement.keys() %} - - {% if key.target_type == "OTHER" %} - - {% elif key %} - - {% else %} - - {% endif %} - - - {% endfor %} - + + + + + + + + {% for key in debit_statement.keys() %} + + {% if key.target_type == "OTHER" %} + + {% elif key %} + + {% else %} + + {% endif %} + + + {% endfor %} +
{% trans %}Target of the operation{% endtrans %}{% trans %}Sum{% endtrans %}
{{ o.target_label }}{{ key.get_display_name() }}{{ "%.2f" % debit_statement[key] }}
{% trans %}Target of the operation{% endtrans %}{% trans %}Sum{% endtrans %}
{{ o.target_label }}{{ key.get_display_name() }}{{ "%.2f" % debit_statement[key] }}

Total : {{ "%.2f" % total_debit }}

-
+
{% endblock %} diff --git a/accounting/templates/accounting/label_list.jinja b/accounting/templates/accounting/label_list.jinja index c15a9373..6b5a9b8b 100644 --- a/accounting/templates/accounting/label_list.jinja +++ b/accounting/templates/accounting/label_list.jinja @@ -1,36 +1,36 @@ {% extends "core/base.jinja" %} {% block title %} -{% trans %}Label list{% endtrans %} + {% trans %}Label list{% endtrans %} {% endblock %} {% block content %} -
-

- {% trans %}Accounting{% endtrans %} > - {{object.bank_account }} > - {{ object }} -

-
-

{% trans %}Back to club account{% endtrans %}

- {% if user.is_in_group(pk=settings.SITH_GROUP_ACCOUNTING_ADMIN_ID) %} -

{% trans %}New label{% endtrans %}

- {% endif %} - {% if object.labels.all() %} -

{% trans %}Label list{% endtrans %}

- + {% else %} + {% trans %}There is no label in this club account.{% endtrans %} + {% endif %} +
{% endblock %} diff --git a/accounting/templates/accounting/operation_edit.jinja b/accounting/templates/accounting/operation_edit.jinja index 33348968..e8c34364 100644 --- a/accounting/templates/accounting/operation_edit.jinja +++ b/accounting/templates/accounting/operation_edit.jinja @@ -1,123 +1,123 @@ {% extends "core/base.jinja" %} {% block title %} -{% trans %}Edit operation{% endtrans %} + {% trans %}Edit operation{% endtrans %} {% endblock %} {% block content %} -
+

- {% trans %}Accounting{% endtrans %} > - {{object.club_account.bank_account }} > - {{ object.club_account }} > - {{ object.name }} > - {% trans %}Edit operation{% endtrans %} + {% trans %}Accounting{% endtrans %} > + {{object.club_account.bank_account }} > + {{ object.club_account }} > + {{ object.name }} > + {% trans %}Edit operation{% endtrans %}


{% trans %}Edit operation{% endtrans %}

- {% csrf_token %} - {{ form.non_field_errors() }} - {{ form.journal }} - {{ form.target_id }} -

{{ form.amount.errors }} {{ form.amount }}

-

{{ form.remark.errors }} {{ form.remark }}

-
- {% trans %}Warning: if you select Account, the opposite operation will be created in the target account. If you don't want that, select Club instead of Account.{% endtrans %} -

{{ form.target_type.errors }} {{ form.target_type }}

- {{ form.user }} - {{ form.club }} - {{ form.club_account }} - {{ form.company }} - {{ form.target_label }} - {{ form.need_link }} -

{{ form.date.errors }} {{ form.date }}

-

{{ form.mode.errors }} {{ form.mode }}

-

{{ form.cheque_number.errors }} {{ + {% csrf_token %} + {{ form.non_field_errors() }} + {{ form.journal }} + {{ form.target_id }} +

{{ form.amount.errors }} {{ form.amount }}

+

{{ form.remark.errors }} {{ form.remark }}

+
+ {% trans %}Warning: if you select Account, the opposite operation will be created in the target account. If you don't want that, select Club instead of Account.{% endtrans %} +

{{ form.target_type.errors }} {{ form.target_type }}

+ {{ form.user }} + {{ form.club }} + {{ form.club_account }} + {{ form.company }} + {{ form.target_label }} + {{ form.need_link }} +

{{ form.date.errors }} {{ form.date }}

+

{{ form.mode.errors }} {{ form.mode }}

+

{{ form.cheque_number.errors }} {{ form.cheque_number }}

-

{{ form.invoice.errors }} {{ form.invoice }}

-

{{ form.simpleaccounting_type.errors }} {{ form.simpleaccounting_type }}

-

{{ form.accounting_type.errors }} {{ +

{{ form.invoice.errors }} {{ form.invoice }}

+

{{ form.simpleaccounting_type.errors }} {{ form.simpleaccounting_type }}

+

{{ form.accounting_type.errors }} {{ form.accounting_type }}

-

{{ form.label.errors }} {{ form.label }}

-

{{ form.done.errors }} {{ form.done }}

- {% if form.instance.linked_operation %} +

{{ form.label.errors }} {{ form.label }}

+

{{ form.done.errors }} {{ form.done }}

+ {% if form.instance.linked_operation %} {% set obj = form.instance.linked_operation %}

{% trans %}Linked operation:{% endtrans %}
- - {{obj.journal.club_account.bank_account }} > - {{ obj.journal.club_account }} > - {{ obj.journal }} > - n°{{ obj.number }} + + {{obj.journal.club_account.bank_account }} > + {{ obj.journal.club_account }} > + {{ obj.journal }} > + n°{{ obj.number }}

- {% endif %} -

+ {% endif %} +

- {% endblock %} +{% endblock %} - {% block script %} - {{ super() }} - -
+ var target_type = $('#id_target_type'); + var user = $('#id_user_wrapper'); + var club = $('#id_club_wrapper'); + var club_account = $('#id_club_account_wrapper'); + var company = $('#id_company_wrapper'); + var other = $('#id_target_label'); + var need_link = $('#id_need_link_full'); + function update_targets () { + if (target_type.val() == "USER") { + console.log(user); + user.show(); + club.hide(); + club_account.hide(); + company.hide(); + other.hide(); + need_link.hide(); + } else if (target_type.val() == "ACCOUNT") { + club_account.show(); + need_link.show(); + user.hide(); + club.hide(); + company.hide(); + other.hide(); + } else if (target_type.val() == "CLUB") { + club.show(); + user.hide(); + club_account.hide(); + company.hide(); + other.hide(); + need_link.hide(); + } else if (target_type.val() == "COMPANY") { + company.show(); + user.hide(); + club_account.hide(); + club.hide(); + other.hide(); + need_link.hide(); + } else if (target_type.val() == "OTHER") { + other.show(); + user.hide(); + club.hide(); + club_account.hide(); + company.hide(); + need_link.hide(); + } else { + company.hide(); + user.hide(); + club_account.hide(); + club.hide(); + other.hide(); + need_link.hide(); + } + } + update_targets(); + target_type.change(update_targets); + } ); + +
{% endblock %} diff --git a/accounting/templates/accounting/refound_account.jinja b/accounting/templates/accounting/refound_account.jinja index 2987c04b..9e726a24 100644 --- a/accounting/templates/accounting/refound_account.jinja +++ b/accounting/templates/accounting/refound_account.jinja @@ -1,16 +1,16 @@ {% extends "core/base.jinja" %} {% block title %} -{% trans %}Refound account{% endtrans %} + {% trans %}Refound account{% endtrans %} {% endblock %} {% block content %} -
-

{% trans %}Refound account{% endtrans %}

-
- {% csrf_token %} - {{ form.as_p() }} -

-
-
+
+

{% trans %}Refound account{% endtrans %}

+
+ {% csrf_token %} + {{ form.as_p() }} +

+
+
{% endblock %} \ No newline at end of file diff --git a/accounting/templates/accounting/simplifiedaccountingtype_list.jinja b/accounting/templates/accounting/simplifiedaccountingtype_list.jinja index 8e6bbc85..da72a370 100644 --- a/accounting/templates/accounting/simplifiedaccountingtype_list.jinja +++ b/accounting/templates/accounting/simplifiedaccountingtype_list.jinja @@ -1,27 +1,27 @@ {% extends "core/base.jinja" %} {% block title %} -{% trans %}Simplified type list{% endtrans %} + {% trans %}Simplified type list{% endtrans %} {% endblock %} {% block content %} -
-

- {% trans %}Accounting{% endtrans %} > - {% trans %}Simplified types{% endtrans %} -

-
-

{% trans %}New simplified type{% endtrans %}

- {% if simplifiedaccountingtype_list %} -

{% trans %}Simplified type list{% endtrans %}

- - {% else %} - {% trans %}There is no types in this website.{% endtrans %} - {% endif %} -
+
+

+ {% trans %}Accounting{% endtrans %} > + {% trans %}Simplified types{% endtrans %} +

+
+

{% trans %}New simplified type{% endtrans %}

+ {% if simplifiedaccountingtype_list %} +

{% trans %}Simplified type list{% endtrans %}

+ + {% else %} + {% trans %}There is no types in this website.{% endtrans %} + {% endif %} +
{% endblock %} diff --git a/accounting/tests.py b/accounting/tests.py index 610a574d..3630c0e2 100644 --- a/accounting/tests.py +++ b/accounting/tests.py @@ -264,33 +264,26 @@ class TestOperation(TestCase): ) self.assertContains(response, "Total : 5575.72", status_code=200) self.assertContains(response, "Total : 71.42") - self.assertContains( - response, - """ - S' Kia - - 3.00""", + content = response.content.decode() + self.assertInHTML( + """S' Kia3.00""", content ) - self.assertContains( - response, - """ - S' Kia - - 823.00""", + self.assertInHTML( + """S' Kia823.00""", content ) def test_accounting_statement(self): response = self.client.get( reverse("accounting:journal_accounting_statement", args=[self.journal.id]) ) - self.assertContains( - response, + assert response.status_code == 200 + self.assertInHTML( """ 443 - Crédit - Ce code n'existe pas 3.00 """, - status_code=200, + response.content.decode(), ) self.assertContains( response, diff --git a/club/templates/club/club_detail.jinja b/club/templates/club/club_detail.jinja index 6dbb62b2..42e93b81 100644 --- a/club/templates/club/club_detail.jinja +++ b/club/templates/club/club_detail.jinja @@ -2,16 +2,16 @@ {% from 'core/macros.jinja' import user_profile_link %} {% block content %} -
- {% if club.logo %} - - {% endif %} - {% if page_revision %} - {{ page_revision|markdown }} - {% else %} -

{% trans %}Club{% endtrans %}

- {% endif %} -
+
+ {% if club.logo %} + + {% endif %} + {% if page_revision %} + {{ page_revision|markdown }} + {% else %} +

{% trans %}Club{% endtrans %}

+ {% endif %} +
{% endblock %} diff --git a/club/templates/club/club_list.jinja b/club/templates/club/club_list.jinja index ba875c89..f914803e 100644 --- a/club/templates/club/club_list.jinja +++ b/club/templates/club/club_list.jinja @@ -1,48 +1,48 @@ {% extends "core/base.jinja" %} {% block title %} -{% trans %}Club list{% endtrans %} + {% trans %}Club list{% endtrans %} {% endblock %} {% macro display_club(club) -%} - {% if club.is_active or user.is_root %} - -
  • {{ club.name }} - - {% if not club.is_active %} - ({% trans %}inactive{% endtrans %}) - {% endif %} + {% if club.is_active or user.is_root %} - {% if club.president %} - {{ club.president.user }}{% endif %} - {% if club.short_description %}

    {{ club.short_description|markdown }}

    {% endif %} - - {% endif %} +
  • {{ club.name }} - {%- if club.children.all()|length != 0 %} - - {%- endif -%} -
  • + {% if not club.is_active %} + ({% trans %}inactive{% endtrans %}) + {% endif %} + + {% if club.president %} - {{ club.president.user }}{% endif %} + {% if club.short_description %}

    {{ club.short_description|markdown }}

    {% endif %} + + {% endif %} + + {%- if club.children.all()|length != 0 %} + + {%- endif -%} + {%- endmacro %} {% block content %} - {% if user.is_root %} + {% if user.is_root %}

    {% trans %}New club{% endtrans %}

    - {% endif %} - {% if club_list %} + {% endif %} + {% if club_list %}

    {% trans %}Club list{% endtrans %}

    - {% else %} + {% else %} {% trans %}There is no club in this website.{% endtrans %} - {% endif %} + {% endif %} {% endblock %} diff --git a/club/templates/club/club_members.jinja b/club/templates/club/club_members.jinja index 817b0170..a64d43ce 100644 --- a/club/templates/club/club_members.jinja +++ b/club/templates/club/club_members.jinja @@ -2,81 +2,81 @@ {% from 'core/macros.jinja' import user_profile_link, select_all_checkbox %} {% block content %} -

    {% trans %}Club members{% endtrans %}

    - {% if members %} +

    {% trans %}Club members{% endtrans %}

    + {% if members %}
    - {% csrf_token %} - {% set users_old = dict(form.users_old | groupby("choice_label")) %} - {% if users_old %} - {{ select_all_checkbox("users_old") }} -

    - {% endif %} - - - - - - - - {% if users_old %} - - {% endif %} - - - - {% for m in members %} - - - - - - {% if users_old %} - - {% endif %} - - {% endfor %} - -
    {% trans %}User{% endtrans %}{% trans %}Role{% endtrans %}{% trans %}Description{% endtrans %}{% trans %}Since{% endtrans %}{% trans %}Mark as old{% endtrans %}
    {{ user_profile_link(m.user) }}{{ settings.SITH_CLUB_ROLES[m.role] }}{{ m.description }}{{ m.start_date }} - {% set user_old = users_old[m.user.get_display_name()] %} - {% if user_old %} - {{ user_old[0].tag() }} - {% endif %} -
    - {{ form.users_old.errors }} - {% if users_old %} -

    - - {% endif %} + {% csrf_token %} + {% set users_old = dict(form.users_old | groupby("choice_label")) %} + {% if users_old %} + {{ select_all_checkbox("users_old") }} +

    + {% endif %} + + + + + + + + {% if users_old %} + + {% endif %} + + + + {% for m in members %} + + + + + + {% if users_old %} + + {% endif %} + + {% endfor %} + +
    {% trans %}User{% endtrans %}{% trans %}Role{% endtrans %}{% trans %}Description{% endtrans %}{% trans %}Since{% endtrans %}{% trans %}Mark as old{% endtrans %}
    {{ user_profile_link(m.user) }}{{ settings.SITH_CLUB_ROLES[m.role] }}{{ m.description }}{{ m.start_date }} + {% set user_old = users_old[m.user.get_display_name()] %} + {% if user_old %} + {{ user_old[0].tag() }} + {% endif %} +
    + {{ form.users_old.errors }} + {% if users_old %} +

    + + {% endif %}
    - {% else %} + {% else %}

    {% trans %}There are no members in this club.{% endtrans %}

    + {% endif %} +
    + {% csrf_token %} + {{ form.non_field_errors() }} +

    + {{ form.users.errors }} + + {{ form.users }} + {{ form.users.help_text }} +

    +

    + {{ form.role.errors }} + + {{ form.role }} +

    + {% if form.start_date %} +

    + {{ form.start_date.errors }} + + {{ form.start_date }} +

    {% endif %} - - {% csrf_token %} - {{ form.non_field_errors() }} -

    - {{ form.users.errors }} - - {{ form.users }} - {{ form.users.help_text }} -

    -

    - {{ form.role.errors }} - - {{ form.role }} -

    - {% if form.start_date %} -

    - {{ form.start_date.errors }} - - {{ form.start_date }} -

    - {% endif %} -

    - {{ form.description.errors }} - - {{ form.description }} -

    -

    -
    +

    + {{ form.description.errors }} + + {{ form.description }} +

    +

    + {% endblock %} diff --git a/club/templates/club/club_old_members.jinja b/club/templates/club/club_old_members.jinja index 4d024df6..887da079 100644 --- a/club/templates/club/club_old_members.jinja +++ b/club/templates/club/club_old_members.jinja @@ -2,27 +2,27 @@ {% from 'core/macros.jinja' import user_profile_link %} {% block content %} -

    {% trans %}Club old members{% endtrans %}

    - - - - - - - - - - {% for m in club.members.exclude(end_date=None).order_by('-role', 'description', '-end_date').all() %} - - - - - - - - {% endfor %} - -
    {% trans %}User{% endtrans %}{% trans %}Role{% endtrans %}{% trans %}Description{% endtrans %}{% trans %}From{% endtrans %}{% trans %}To{% endtrans %}
    {{ user_profile_link(m.user) }}{{ settings.SITH_CLUB_ROLES[m.role] }}{{ m.description }}{{ m.start_date }}{{ m.end_date }}
    +

    {% trans %}Club old members{% endtrans %}

    + + + + + + + + + + {% for m in club.members.exclude(end_date=None).order_by('-role', 'description', '-end_date').all() %} + + + + + + + + {% endfor %} + +
    {% trans %}User{% endtrans %}{% trans %}Role{% endtrans %}{% trans %}Description{% endtrans %}{% trans %}From{% endtrans %}{% trans %}To{% endtrans %}
    {{ user_profile_link(m.user) }}{{ settings.SITH_CLUB_ROLES[m.role] }}{{ m.description }}{{ m.start_date }}{{ m.end_date }}
    {% endblock %} diff --git a/club/templates/club/club_sellings.jinja b/club/templates/club/club_sellings.jinja index 6fdee86a..191d5fb2 100644 --- a/club/templates/club/club_sellings.jinja +++ b/club/templates/club/club_sellings.jinja @@ -2,65 +2,65 @@ {% from 'core/macros.jinja' import user_profile_link, paginate %} {% block content %} -

    {% trans %}Sales{% endtrans %}

    -
    +

    {% trans %}Sales{% endtrans %}

    + {% csrf_token %} {{ form }}

    -
    -

    -{% trans %}Quantity: {% endtrans %}{{ total_quantity }} {% trans %}units{% endtrans %}
    -{% trans %}Total: {% endtrans %}{{ total }} €
    -{% trans %}Benefit: {% endtrans %}{{ benefit }} € -

    - + +

    + {% trans %}Quantity: {% endtrans %}{{ total_quantity }} {% trans %}units{% endtrans %}
    + {% trans %}Total: {% endtrans %}{{ total }} €
    + {% trans %}Benefit: {% endtrans %}{{ benefit }} € +

    +
    - - - - - - - - - - + + + + + + + + + + - {% for s in paginated_result %} + {% for s in paginated_result %} - - - {% if s.seller %} + + + {% if s.seller %} - {% else %} + {% else %} - {% endif %} - {% if s.customer %} + {% endif %} + {% if s.customer %} - {% else %} + {% else %} - {% endif %} - - - - - {% if s.is_owned_by(user) %} - - {% endif %} + {% endif %} + + + + + {% if s.is_owned_by(user) %} + + {% endif %} - {% endfor %} + {% endfor %} -
    {% trans %}Date{% endtrans %}{% trans %}Counter{% endtrans %}{% trans %}Barman{% endtrans %}{% trans %}Customer{% endtrans %}{% trans %}Label{% endtrans %}{% trans %}Quantity{% endtrans %}{% trans %}Total{% endtrans %}{% trans %}Payment method{% endtrans %}
    {% trans %}Date{% endtrans %}{% trans %}Counter{% endtrans %}{% trans %}Barman{% endtrans %}{% trans %}Customer{% endtrans %}{% trans %}Label{% endtrans %}{% trans %}Quantity{% endtrans %}{% trans %}Total{% endtrans %}{% trans %}Payment method{% endtrans %}
    {{ s.date|localtime|date(DATETIME_FORMAT) }} {{ s.date|localtime|time(DATETIME_FORMAT) }}{{ s.counter }}{{ s.date|localtime|date(DATETIME_FORMAT) }} {{ s.date|localtime|time(DATETIME_FORMAT) }}{{ s.counter }}{{ s.seller.get_display_name() }}{{ s.customer.user.get_display_name() }}{{ s.label }}{{ s.quantity }}{{ s.quantity * s.unit_price }} €{{ s.get_payment_method_display() }}{% trans %}Delete{% endtrans %}{{ s.label }}{{ s.quantity }}{{ s.quantity * s.unit_price }} €{{ s.get_payment_method_display() }}{% trans %}Delete{% endtrans %}
    - -{{ paginate(paginated_result, paginator, "formPagination(this)") }} + + {{ paginate(paginated_result, paginator, "formPagination(this)") }} {% endblock %} diff --git a/club/templates/club/club_tools.jinja b/club/templates/club/club_tools.jinja index 49e2b0df..fa9584fa 100644 --- a/club/templates/club/club_tools.jinja +++ b/club/templates/club/club_tools.jinja @@ -1,46 +1,46 @@ {% extends "core/base.jinja" %} {% block content %} -

    {% trans %}Club tools{% endtrans %}

    -
    +

    {% trans %}Club tools{% endtrans %}

    +

    {% trans %}Communication:{% endtrans %}

    {% trans %}Counters:{% endtrans %}

    {% if object.club_account.exists() %} -

    {% trans %}Accounting: {% endtrans %}

    - {% endif %} {% if object.unix_name == settings.SITH_LAUNDERETTE_MANAGER['unix_name'] %} -
  • {% trans %}Manage launderettes{% endtrans %}
  • +
  • {% trans %}Manage launderettes{% endtrans %}
  • {% endif %} -
    +
    {% endblock %} diff --git a/club/templates/club/mailing.jinja b/club/templates/club/mailing.jinja index 8a364295..a7421602 100644 --- a/club/templates/club/mailing.jinja +++ b/club/templates/club/mailing.jinja @@ -2,107 +2,107 @@ {% from 'core/macros.jinja' import select_all_checkbox %} {% block title %} -{% trans %}Mailing lists{% endtrans %} + {% trans %}Mailing lists{% endtrans %} {% endblock %} {% block content %} - {% trans %}Remember : mailing lists need to be moderated, if your new created list is not shown wait until moderation takes action{% endtrans %} + {% trans %}Remember : mailing lists need to be moderated, if your new created list is not shown wait until moderation takes action{% endtrans %} - {% if mailings_not_moderated %} -

    {% trans %}Mailing lists waiting for moderation{% endtrans %}

    - - {% endif %} + {% if mailings_not_moderated %} +

    {% trans %}Mailing lists waiting for moderation{% endtrans %}

    + + {% endif %} - {% if mailings_moderated %} + {% if mailings_moderated %} {% for mailing in mailings_moderated %} -

    {% trans %}Mailing{% endtrans %} {{ mailing.email_full }} +

    {% trans %}Mailing{% endtrans %} {{ mailing.email_full }} {%- if user.is_owner(mailing) -%} - - {% trans %}Delete{% endtrans %} + - {% trans %}Delete{% endtrans %} {%- endif -%} -

    -
    + + -
    - {% set form_mailing_removal = form["removal_" + mailing.id|string] %} - {% if form_mailing_removal.field.choices %} - {% set ms = dict(mailing.subscriptions.all() | groupby('id')) %} -
    -

    {{ select_all_checkbox(form_mailing_removal.auto_id) }}

    - {% csrf_token %} - - + + {% set form_mailing_removal = form["removal_" + mailing.id|string] %} + {% if form_mailing_removal.field.choices %} + {% set ms = dict(mailing.subscriptions.all() | groupby('id')) %} + +

    {{ select_all_checkbox(form_mailing_removal.auto_id) }}

    + {% csrf_token %} + +
    - - - - - + + + + + - {% for widget in form_mailing_removal.subwidgets %} + {% for widget in form_mailing_removal.subwidgets %} {% set user = ms[widget.data.value.value][0] %} - - - + + + - {% endfor %} + {% endfor %} -
    {% trans %}User{% endtrans %}{% trans %}Email{% endtrans %}{% trans %}Delete{% endtrans %}
    {% trans %}User{% endtrans %}{% trans %}Email{% endtrans %}{% trans %}Delete{% endtrans %}
    {{ user.get_username }}{{ user.get_email }}{{ widget.tag() }}{{ user.get_username }}{{ user.get_email }}{{ widget.tag() }}
    - {{ form_mailing_removal.errors }} -

    - + + {{ form_mailing_removal.errors }} +

    + - {% else %} + {% else %}

    {% trans %}There is no subscriber for this mailing list{% endtrans %}

    - {% endif %} + {% endif %} {% endfor %} - {% else %} + {% else %}

    {% trans %}No mailing list existing for this club{% endtrans %}

    - {% endif %} + {% endif %} -

    {{ form.non_field_errors() }}

    - {% if mailings_moderated %} -

    {% trans %}New member{% endtrans %}

    -
    - {% csrf_token %} -

    - {{ form.subscription_mailing.errors }} - - {{ form.subscription_mailing }} -

    -

    - {{ form.subscription_users.errors }} - - {{ form.subscription_users }} - {{ form.subscription_users.help_text }} -

    -

    - {{ form.subscription_email.errors }} - - {{ form.subscription_email }} -

    - -

    -
    - {% endif %} - -

    {% trans %}New mailing{% endtrans %}

    +

    {{ form.non_field_errors() }}

    + {% if mailings_moderated %} +

    {% trans %}New member{% endtrans %}

    - {% csrf_token %} -

    - {{ form.mailing_email.errors }} - - {{ form.mailing_email }} -

    - -

    + {% csrf_token %} +

    + {{ form.subscription_mailing.errors }} + + {{ form.subscription_mailing }} +

    +

    + {{ form.subscription_users.errors }} + + {{ form.subscription_users }} + {{ form.subscription_users.help_text }} +

    +

    + {{ form.subscription_email.errors }} + + {{ form.subscription_email }} +

    + +

    + {% endif %} + +

    {% trans %}New mailing{% endtrans %}

    +
    + {% csrf_token %} +

    + {{ form.mailing_email.errors }} + + {{ form.mailing_email }} +

    + +

    +
    {% endblock %} diff --git a/club/templates/club/page_history.jinja b/club/templates/club/page_history.jinja index 766ef8a1..07c25146 100644 --- a/club/templates/club/page_history.jinja +++ b/club/templates/club/page_history.jinja @@ -2,11 +2,11 @@ {% from 'core/macros_pages.jinja' import page_history %} {% block content %} - {% if club.page %} - {{ page_history(club.page) }} - {% else %} - {% trans %}No page existing for this club{% endtrans %} - {% endif %} + {% if club.page %} + {{ page_history(club.page) }} + {% else %} + {% trans %}No page existing for this club{% endtrans %} + {% endif %} {% endblock %} diff --git a/club/templates/club/pagerev_edit.jinja b/club/templates/club/pagerev_edit.jinja index 91a26b4e..5253805d 100644 --- a/club/templates/club/pagerev_edit.jinja +++ b/club/templates/club/pagerev_edit.jinja @@ -2,7 +2,7 @@ {% from 'core/macros_pages.jinja' import page_edit_form %} {% block content %} -{{ page_edit_form(page, form, url('club:club_edit_page', club_id=page.club.id), csrf_token) }} + {{ page_edit_form(page, form, url('club:club_edit_page', club_id=page.club.id), csrf_token) }} {% endblock %} diff --git a/club/templates/club/stats.jinja b/club/templates/club/stats.jinja index cf6c3358..43488be0 100644 --- a/club/templates/club/stats.jinja +++ b/club/templates/club/stats.jinja @@ -1,48 +1,48 @@ {% extends "core/base.jinja" %} {% block title %} -{% trans %}Club stats{% endtrans %} + {% trans %}Club stats{% endtrans %} {% endblock %} {% block content %} - {% if club_list %} + {% if club_list %}

    {% trans %}Club stats{% endtrans %}

    - {% csrf_token %} -

    + {% csrf_token %} +

    -

    -

    +

    +

    - - - - - - - - + + + + + + + + {% for c in club_list.order_by('id') %} - {% set members = c.members.all() %} - {% if request.GET['branch'] %} + {% set members = c.members.all() %} + {% if request.GET['branch'] %} {% set members = members.filter(user__department=request.GET['branch']) %} - {% endif %} - - - - - + {% endif %} + + + + + {% endfor %} - +
    ClubMember numberOld member number
    ClubMember numberOld member number
    {{ c.get_display_name() }}{{ members.filter(end_date=None, role__gt=settings.SITH_MAXIMUM_FREE_ROLE).count() }}{{ members.exclude(end_date=None, role__gt=settings.SITH_MAXIMUM_FREE_ROLE).count() }}
    {{ c.get_display_name() }}{{ members.filter(end_date=None, role__gt=settings.SITH_MAXIMUM_FREE_ROLE).count() }}{{ members.exclude(end_date=None, role__gt=settings.SITH_MAXIMUM_FREE_ROLE).count() }}
    - {% else %} + {% else %} {% trans %}There is no club in this website.{% endtrans %} - {% endif %} + {% endif %} {% endblock %} diff --git a/com/templates/com/mailing_admin.jinja b/com/templates/com/mailing_admin.jinja index 75d098bc..3096e435 100644 --- a/com/templates/com/mailing_admin.jinja +++ b/com/templates/com/mailing_admin.jinja @@ -1,43 +1,43 @@ {% extends "core/base.jinja" %} {% block title %} -{% trans %}Mailing lists administration{% endtrans %} + {% trans %}Mailing lists administration{% endtrans %} {% endblock %} {% macro display_mailings(list) %} - - - - - - - {% for mailing in list %} - - - - - - {% endfor %} -
    {% trans %}Email{% endtrans %}{% trans %}Club{%endtrans%}{% trans %}Actions{% endtrans %}
    {{ mailing.email_full }}{{ mailing.club }} - {% trans %}Delete{% endtrans %} - {% if not mailing.is_moderated %}{% trans %}Moderate{% endtrans %}{% else %}{% trans user=mailing.moderator %}Moderated by {{ user }}{% endtrans %}{% endif %} -
    - + + + + + + + {% for mailing in list %} + + + + + + {% endfor %} +
    {% trans %}Email{% endtrans %}{% trans %}Club{%endtrans%}{% trans %}Actions{% endtrans %}
    {{ mailing.email_full }}{{ mailing.club }} + {% trans %}Delete{% endtrans %} - {% if not mailing.is_moderated %}{% trans %}Moderate{% endtrans %}{% else %}{% trans user=mailing.moderator %}Moderated by {{ user }}{% endtrans %}{% endif %} +
    + {% endmacro %} {% block content %} -

    {% trans %}This page lists all mailing lists{% endtrans %}

    +

    {% trans %}This page lists all mailing lists{% endtrans %}

    - {% if has_unmoderated %} + {% if has_unmoderated %}

    {% trans %}Not moderated mailing lists{% endtrans %}

    {{ display_mailings(unmoderated) }} - {% endif %} + {% endif %} -

    {% trans %}Moderated mailing lists{% endtrans %}

    - {% if has_moderated %} - {{ display_mailings(moderated) }} - {% else %} +

    {% trans %}Moderated mailing lists{% endtrans %}

    + {% if has_moderated %} + {{ display_mailings(moderated) }} + {% else %}

    {% trans %}No mailing list existing{% endtrans %}

    - {% endif %} + {% endif %} {% endblock %} diff --git a/com/templates/com/news_admin_list.jinja b/com/templates/com/news_admin_list.jinja index 5f7e3b1f..3214ffd5 100644 --- a/com/templates/com/news_admin_list.jinja +++ b/com/templates/com/news_admin_list.jinja @@ -2,317 +2,317 @@ {% from 'core/macros.jinja' import user_profile_link %} {% block title %} -{% trans %}News admin{% endtrans %} + {% trans %}News admin{% endtrans %} {% endblock %} {% block content %} -

    {% trans %}News{% endtrans %}

    +

    {% trans %}News{% endtrans %}

    -

    {% trans %}Create news{% endtrans %}

    +

    {% trans %}Create news{% endtrans %}

    -
    -

    {% trans %}Notices{% endtrans %}

    - {% set notices = object_list.filter(type="NOTICE").distinct().order_by('id') %} -
    {% trans %}Displayed notices{% endtrans %}
    - - - - - - - - - - - - - - {% for news in notices.filter(is_moderated=True) %} - - - - - - - - - - {% endfor %} - -
    {% trans %}Type{% endtrans %}{% trans %}Title{% endtrans %}{% trans %}Summary{% endtrans %}{% trans %}Club{% endtrans %}{% trans %}Author{% endtrans %}{% trans %}Moderator{% endtrans %}{% trans %}Actions{% endtrans %}
    {{ news.get_type_display() }}{{ news.title }}{{ news.summary|markdown }}{{ news.club }}{{ user_profile_link(news.author) }}{{ user_profile_link(news.moderator) }}{% trans %}View{% endtrans %} - {% trans %}Edit{% endtrans %} - {% trans %}Remove{% endtrans %} - {% trans %}Delete{% endtrans %} -
    -
    {% trans %}Notices to moderate{% endtrans %}
    - - - - - - - - - - - - - {% for news in notices.filter(is_moderated=False) %} - - - - - - - - - {% endfor %} - -
    {% trans %}Type{% endtrans %}{% trans %}Title{% endtrans %}{% trans %}Summary{% endtrans %}{% trans %}Club{% endtrans %}{% trans %}Author{% endtrans %}{% trans %}Actions{% endtrans %}
    {{ news.get_type_display() }}{{ news.title }}{{ news.summary|markdown }}{{ news.club }}{{ user_profile_link(news.author) }}{% trans %}View{% endtrans %} - {% trans %}Edit{% endtrans %} - {% trans %}Moderate{% endtrans %} - {% trans %}Delete{% endtrans %} -
    +
    +

    {% trans %}Notices{% endtrans %}

    + {% set notices = object_list.filter(type="NOTICE").distinct().order_by('id') %} +
    {% trans %}Displayed notices{% endtrans %}
    + + + + + + + + + + + + + + {% for news in notices.filter(is_moderated=True) %} + + + + + + + + + + {% endfor %} + +
    {% trans %}Type{% endtrans %}{% trans %}Title{% endtrans %}{% trans %}Summary{% endtrans %}{% trans %}Club{% endtrans %}{% trans %}Author{% endtrans %}{% trans %}Moderator{% endtrans %}{% trans %}Actions{% endtrans %}
    {{ news.get_type_display() }}{{ news.title }}{{ news.summary|markdown }}{{ news.club }}{{ user_profile_link(news.author) }}{{ user_profile_link(news.moderator) }}{% trans %}View{% endtrans %} + {% trans %}Edit{% endtrans %} + {% trans %}Remove{% endtrans %} + {% trans %}Delete{% endtrans %} +
    +
    {% trans %}Notices to moderate{% endtrans %}
    + + + + + + + + + + + + + {% for news in notices.filter(is_moderated=False) %} + + + + + + + + + {% endfor %} + +
    {% trans %}Type{% endtrans %}{% trans %}Title{% endtrans %}{% trans %}Summary{% endtrans %}{% trans %}Club{% endtrans %}{% trans %}Author{% endtrans %}{% trans %}Actions{% endtrans %}
    {{ news.get_type_display() }}{{ news.title }}{{ news.summary|markdown }}{{ news.club }}{{ user_profile_link(news.author) }}{% trans %}View{% endtrans %} + {% trans %}Edit{% endtrans %} + {% trans %}Moderate{% endtrans %} + {% trans %}Delete{% endtrans %} +
    -
    -

    {% trans %}Weeklies{% endtrans %}

    - {% set weeklies = object_list.filter(type="WEEKLY", dates__end_date__gte=timezone.now()).distinct().order_by('id') %} -
    {% trans %}Displayed weeklies{% endtrans %}
    - - - - - - - - - - - - - - - {% for news in weeklies.filter(is_moderated=True) %} - - - - - - - - - - - {% endfor %} - -
    {% trans %}Type{% endtrans %}{% trans %}Title{% endtrans %}{% trans %}Summary{% endtrans %}{% trans %}Club{% endtrans %}{% trans %}Author{% endtrans %}{% trans %}Moderator{% endtrans %}{% trans %}Dates{% endtrans %}{% trans %}Actions{% endtrans %}
    {{ news.get_type_display() }}{{ news.title }}{{ news.summary|markdown }}{{ news.club }}{{ user_profile_link(news.author) }}{{ user_profile_link(news.moderator) }} -
      - {% for d in news.dates.all() %} -
    • {{ d.start_date|localtime|date(DATETIME_FORMAT) }} - {{ d.start_date|localtime|time(DATETIME_FORMAT) }} - - {{ d.end_date|localtime|date(DATETIME_FORMAT) }} - {{ d.end_date|localtime|time(DATETIME_FORMAT) }} -
    • - {% endfor %} -
    -
    {% trans %}View{% endtrans %} - {% trans %}Edit{% endtrans %} - {% trans %}Remove{% endtrans %} - {% trans %}Delete{% endtrans %} -
    -
    {% trans %}Weeklies to moderate{% endtrans %}
    - - - - - - - - - - - - - - {% for news in weeklies.filter(is_moderated=False) %} - - - - - - - - - - {% endfor %} - -
    {% trans %}Type{% endtrans %}{% trans %}Title{% endtrans %}{% trans %}Summary{% endtrans %}{% trans %}Club{% endtrans %}{% trans %}Author{% endtrans %}{% trans %}Dates{% endtrans %}{% trans %}Actions{% endtrans %}
    {{ news.get_type_display() }}{{ news.title }}{{ news.summary|markdown }}{{ news.club }}{{ user_profile_link(news.author) }} -
      - {% for d in news.dates.all() %} -
    • {{ d.start_date|localtime|date(DATETIME_FORMAT) }} - {{ d.start_date|localtime|time(DATETIME_FORMAT) }} - - {{ d.end_date|localtime|date(DATETIME_FORMAT) }} - {{ d.end_date|localtime|time(DATETIME_FORMAT) }} -
    • - {% endfor %} -
    -
    {% trans %}View{% endtrans %} - {% trans %}Edit{% endtrans %} - {% trans %}Moderate{% endtrans %} - {% trans %}Delete{% endtrans %} -
    +
    +

    {% trans %}Weeklies{% endtrans %}

    + {% set weeklies = object_list.filter(type="WEEKLY", dates__end_date__gte=timezone.now()).distinct().order_by('id') %} +
    {% trans %}Displayed weeklies{% endtrans %}
    + + + + + + + + + + + + + + + {% for news in weeklies.filter(is_moderated=True) %} + + + + + + + + + + + {% endfor %} + +
    {% trans %}Type{% endtrans %}{% trans %}Title{% endtrans %}{% trans %}Summary{% endtrans %}{% trans %}Club{% endtrans %}{% trans %}Author{% endtrans %}{% trans %}Moderator{% endtrans %}{% trans %}Dates{% endtrans %}{% trans %}Actions{% endtrans %}
    {{ news.get_type_display() }}{{ news.title }}{{ news.summary|markdown }}{{ news.club }}{{ user_profile_link(news.author) }}{{ user_profile_link(news.moderator) }} +
      + {% for d in news.dates.all() %} +
    • {{ d.start_date|localtime|date(DATETIME_FORMAT) }} + {{ d.start_date|localtime|time(DATETIME_FORMAT) }} - + {{ d.end_date|localtime|date(DATETIME_FORMAT) }} + {{ d.end_date|localtime|time(DATETIME_FORMAT) }} +
    • + {% endfor %} +
    +
    {% trans %}View{% endtrans %} + {% trans %}Edit{% endtrans %} + {% trans %}Remove{% endtrans %} + {% trans %}Delete{% endtrans %} +
    +
    {% trans %}Weeklies to moderate{% endtrans %}
    + + + + + + + + + + + + + + {% for news in weeklies.filter(is_moderated=False) %} + + + + + + + + + + {% endfor %} + +
    {% trans %}Type{% endtrans %}{% trans %}Title{% endtrans %}{% trans %}Summary{% endtrans %}{% trans %}Club{% endtrans %}{% trans %}Author{% endtrans %}{% trans %}Dates{% endtrans %}{% trans %}Actions{% endtrans %}
    {{ news.get_type_display() }}{{ news.title }}{{ news.summary|markdown }}{{ news.club }}{{ user_profile_link(news.author) }} +
      + {% for d in news.dates.all() %} +
    • {{ d.start_date|localtime|date(DATETIME_FORMAT) }} + {{ d.start_date|localtime|time(DATETIME_FORMAT) }} - + {{ d.end_date|localtime|date(DATETIME_FORMAT) }} + {{ d.end_date|localtime|time(DATETIME_FORMAT) }} +
    • + {% endfor %} +
    +
    {% trans %}View{% endtrans %} + {% trans %}Edit{% endtrans %} + {% trans %}Moderate{% endtrans %} + {% trans %}Delete{% endtrans %} +
    -
    -

    {% trans %}Calls{% endtrans %}

    - {% set calls = object_list.filter(type="CALL", dates__end_date__gte=timezone.now()).distinct().order_by('id') %} -
    {% trans %}Displayed calls{% endtrans %}
    - - - - - - - - - - - - - - - - {% for news in calls.filter(is_moderated=True) %} - - - - - - - - - - - - {% endfor %} - -
    {% trans %}Type{% endtrans %}{% trans %}Title{% endtrans %}{% trans %}Summary{% endtrans %}{% trans %}Club{% endtrans %}{% trans %}Author{% endtrans %}{% trans %}Moderator{% endtrans %}{% trans %}Start{% endtrans %}{% trans %}End{% endtrans %}{% trans %}Actions{% endtrans %}
    {{ news.get_type_display() }}{{ news.title }}{{ news.summary|markdown }}{{ news.club }}{{ user_profile_link(news.author) }}{{ user_profile_link(news.moderator) }}{{ news.dates.first().start_date|localtime|date(DATETIME_FORMAT) }} - {{ news.dates.first().start_date|localtime|time(DATETIME_FORMAT) }}{{ news.dates.first().end_date|localtime|date(DATETIME_FORMAT) }} - {{ news.dates.first().end_date|localtime|time(DATETIME_FORMAT) }}{% trans %}View{% endtrans %} - {% trans %}Edit{% endtrans %} - {% trans %}Remove{% endtrans %} - {% trans %}Delete{% endtrans %} -
    -
    {% trans %}Calls to moderate{% endtrans %}
    - - - - - - - - - - - - - - - {% for news in calls.filter(is_moderated=False) %} - - - - - - - - - - - {% endfor %} - -
    {% trans %}Type{% endtrans %}{% trans %}Title{% endtrans %}{% trans %}Summary{% endtrans %}{% trans %}Club{% endtrans %}{% trans %}Author{% endtrans %}{% trans %}Start{% endtrans %}{% trans %}End{% endtrans %}{% trans %}Actions{% endtrans %}
    {{ news.get_type_display() }}{{ news.title }}{{ news.summary|markdown }}{{ news.club }}{{ user_profile_link(news.author) }}{{ news.dates.first().start_date|localtime|date(DATETIME_FORMAT) }} - {{ news.dates.first().start_date|localtime|time(DATETIME_FORMAT) }}{{ news.dates.first().end_date|localtime|date(DATETIME_FORMAT) }} - {{ news.dates.first().end_date|localtime|time(DATETIME_FORMAT) }}{% trans %}View{% endtrans %} - {% trans %}Edit{% endtrans %} - {% trans %}Moderate{% endtrans %} - {% trans %}Delete{% endtrans %} -
    +
    +

    {% trans %}Calls{% endtrans %}

    + {% set calls = object_list.filter(type="CALL", dates__end_date__gte=timezone.now()).distinct().order_by('id') %} +
    {% trans %}Displayed calls{% endtrans %}
    + + + + + + + + + + + + + + + + {% for news in calls.filter(is_moderated=True) %} + + + + + + + + + + + + {% endfor %} + +
    {% trans %}Type{% endtrans %}{% trans %}Title{% endtrans %}{% trans %}Summary{% endtrans %}{% trans %}Club{% endtrans %}{% trans %}Author{% endtrans %}{% trans %}Moderator{% endtrans %}{% trans %}Start{% endtrans %}{% trans %}End{% endtrans %}{% trans %}Actions{% endtrans %}
    {{ news.get_type_display() }}{{ news.title }}{{ news.summary|markdown }}{{ news.club }}{{ user_profile_link(news.author) }}{{ user_profile_link(news.moderator) }}{{ news.dates.first().start_date|localtime|date(DATETIME_FORMAT) }} + {{ news.dates.first().start_date|localtime|time(DATETIME_FORMAT) }}{{ news.dates.first().end_date|localtime|date(DATETIME_FORMAT) }} + {{ news.dates.first().end_date|localtime|time(DATETIME_FORMAT) }}{% trans %}View{% endtrans %} + {% trans %}Edit{% endtrans %} + {% trans %}Remove{% endtrans %} + {% trans %}Delete{% endtrans %} +
    +
    {% trans %}Calls to moderate{% endtrans %}
    + + + + + + + + + + + + + + + {% for news in calls.filter(is_moderated=False) %} + + + + + + + + + + + {% endfor %} + +
    {% trans %}Type{% endtrans %}{% trans %}Title{% endtrans %}{% trans %}Summary{% endtrans %}{% trans %}Club{% endtrans %}{% trans %}Author{% endtrans %}{% trans %}Start{% endtrans %}{% trans %}End{% endtrans %}{% trans %}Actions{% endtrans %}
    {{ news.get_type_display() }}{{ news.title }}{{ news.summary|markdown }}{{ news.club }}{{ user_profile_link(news.author) }}{{ news.dates.first().start_date|localtime|date(DATETIME_FORMAT) }} + {{ news.dates.first().start_date|localtime|time(DATETIME_FORMAT) }}{{ news.dates.first().end_date|localtime|date(DATETIME_FORMAT) }} + {{ news.dates.first().end_date|localtime|time(DATETIME_FORMAT) }}{% trans %}View{% endtrans %} + {% trans %}Edit{% endtrans %} + {% trans %}Moderate{% endtrans %} + {% trans %}Delete{% endtrans %} +
    -
    -

    {% trans %}Events{% endtrans %}

    - {% set events = object_list.filter(type="EVENT", dates__end_date__gte=timezone.now()).distinct().order_by('id') %} -
    {% trans %}Displayed events{% endtrans %}
    - - - - - - - - - - - - - - - - {% for news in events.filter(is_moderated=True) %} - - - - - - - - - - - - {% endfor %} - -
    {% trans %}Type{% endtrans %}{% trans %}Title{% endtrans %}{% trans %}Summary{% endtrans %}{% trans %}Club{% endtrans %}{% trans %}Author{% endtrans %}{% trans %}Moderator{% endtrans %}{% trans %}Start{% endtrans %}{% trans %}End{% endtrans %}{% trans %}Actions{% endtrans %}
    {{ news.get_type_display() }}{{ news.title }}{{ news.summary|markdown }}{{ news.club }}{{ user_profile_link(news.author) }}{{ user_profile_link(news.moderator) }}{{ news.dates.first().start_date|localtime|date(DATETIME_FORMAT) }} - {{ news.dates.first().start_date|localtime|time(DATETIME_FORMAT) }}{{ news.dates.first().end_date|localtime|date(DATETIME_FORMAT) }} - {{ news.dates.first().end_date|localtime|time(DATETIME_FORMAT) }}{% trans %}View{% endtrans %} - {% trans %}Edit{% endtrans %} - {% trans %}Remove{% endtrans %} - {% trans %}Delete{% endtrans %} -
    -
    {% trans %}Events to moderate{% endtrans %}
    - - - - - - - - - - - - - - - {% for news in events.filter(is_moderated=False) %} - - - - - - - - - - - {% endfor %} - -
    {% trans %}Type{% endtrans %}{% trans %}Title{% endtrans %}{% trans %}Summary{% endtrans %}{% trans %}Club{% endtrans %}{% trans %}Author{% endtrans %}{% trans %}Start{% endtrans %}{% trans %}End{% endtrans %}{% trans %}Actions{% endtrans %}
    {{ news.get_type_display() }}{{ news.title }}{{ news.summary|markdown }}{{ news.club }}{{ user_profile_link(news.author) }}{{ news.dates.first().start_date|localtime|date(DATETIME_FORMAT) }} - {{ news.dates.first().start_date|localtime|time(DATETIME_FORMAT) }}{{ news.dates.first().end_date|localtime|date(DATETIME_FORMAT) }} - {{ news.dates.first().end_date|localtime|time(DATETIME_FORMAT) }}{% trans %}View{% endtrans %} - {% trans %}Edit{% endtrans %} - {% trans %}Moderate{% endtrans %} - {% trans %}Delete{% endtrans %} -
    +
    +

    {% trans %}Events{% endtrans %}

    + {% set events = object_list.filter(type="EVENT", dates__end_date__gte=timezone.now()).distinct().order_by('id') %} +
    {% trans %}Displayed events{% endtrans %}
    + + + + + + + + + + + + + + + + {% for news in events.filter(is_moderated=True) %} + + + + + + + + + + + + {% endfor %} + +
    {% trans %}Type{% endtrans %}{% trans %}Title{% endtrans %}{% trans %}Summary{% endtrans %}{% trans %}Club{% endtrans %}{% trans %}Author{% endtrans %}{% trans %}Moderator{% endtrans %}{% trans %}Start{% endtrans %}{% trans %}End{% endtrans %}{% trans %}Actions{% endtrans %}
    {{ news.get_type_display() }}{{ news.title }}{{ news.summary|markdown }}{{ news.club }}{{ user_profile_link(news.author) }}{{ user_profile_link(news.moderator) }}{{ news.dates.first().start_date|localtime|date(DATETIME_FORMAT) }} + {{ news.dates.first().start_date|localtime|time(DATETIME_FORMAT) }}{{ news.dates.first().end_date|localtime|date(DATETIME_FORMAT) }} + {{ news.dates.first().end_date|localtime|time(DATETIME_FORMAT) }}{% trans %}View{% endtrans %} + {% trans %}Edit{% endtrans %} + {% trans %}Remove{% endtrans %} + {% trans %}Delete{% endtrans %} +
    +
    {% trans %}Events to moderate{% endtrans %}
    + + + + + + + + + + + + + + + {% for news in events.filter(is_moderated=False) %} + + + + + + + + + + + {% endfor %} + +
    {% trans %}Type{% endtrans %}{% trans %}Title{% endtrans %}{% trans %}Summary{% endtrans %}{% trans %}Club{% endtrans %}{% trans %}Author{% endtrans %}{% trans %}Start{% endtrans %}{% trans %}End{% endtrans %}{% trans %}Actions{% endtrans %}
    {{ news.get_type_display() }}{{ news.title }}{{ news.summary|markdown }}{{ news.club }}{{ user_profile_link(news.author) }}{{ news.dates.first().start_date|localtime|date(DATETIME_FORMAT) }} + {{ news.dates.first().start_date|localtime|time(DATETIME_FORMAT) }}{{ news.dates.first().end_date|localtime|date(DATETIME_FORMAT) }} + {{ news.dates.first().end_date|localtime|time(DATETIME_FORMAT) }}{% trans %}View{% endtrans %} + {% trans %}Edit{% endtrans %} + {% trans %}Moderate{% endtrans %} + {% trans %}Delete{% endtrans %} +
    {% endblock %} diff --git a/com/templates/com/news_detail.jinja b/com/templates/com/news_detail.jinja index 18fc633f..cbfa596c 100644 --- a/com/templates/com/news_detail.jinja +++ b/com/templates/com/news_detail.jinja @@ -2,48 +2,48 @@ {% from 'core/macros.jinja' import user_profile_link, facebook_share, tweet, link_news_logo, gen_news_metatags %} {% block title %} -{% trans %}News{% endtrans %} - -{{ object.title }} + {% trans %}News{% endtrans %} - + {{ object.title }} {% endblock %} {% block head %} -{{ super() }} -{{ gen_news_metatags(news) }} + {{ super() }} + {{ gen_news_metatags(news) }} {% endblock %} {% block content %} -

    {% trans %}Back to news{% endtrans %}

    -
    - -

    {{ news.title }}

    -

    - {{ news.dates.first().start_date|localtime|date(DATETIME_FORMAT) }} - {{ news.dates.first().start_date|localtime|time(DATETIME_FORMAT) }} - - {{ news.dates.first().end_date|localtime|date(DATETIME_FORMAT) }} - {{ news.dates.first().end_date|localtime|time(DATETIME_FORMAT) }} -

    -
    -
    {{ news.summary|markdown }}
    -
    -
    {{ news.content|markdown }}
    - {{ facebook_share(news) }} - {{ tweet(news) }} -
    +

    {% trans %}Back to news{% endtrans %}

    +
    + +

    {{ news.title }}

    +

    + {{ news.dates.first().start_date|localtime|date(DATETIME_FORMAT) }} + {{ news.dates.first().start_date|localtime|time(DATETIME_FORMAT) }} - + {{ news.dates.first().end_date|localtime|date(DATETIME_FORMAT) }} + {{ news.dates.first().end_date|localtime|time(DATETIME_FORMAT) }} +

    +
    +
    {{ news.summary|markdown }}
    +
    +
    {{ news.content|markdown }}
    + {{ facebook_share(news) }} + {{ tweet(news) }} +

    {% trans %}Author: {% endtrans %}{{ user_profile_link(news.author) }}

    {% if news.moderator %} -

    {% trans %}Moderator: {% endtrans %}{{ user_profile_link(news.moderator) }}

    +

    {% trans %}Moderator: {% endtrans %}{{ user_profile_link(news.moderator) }}

    {% elif user.is_com_admin %} -

    {% trans %}Moderate{% endtrans %}

    +

    {% trans %}Moderate{% endtrans %}

    {% endif %} {% if user.can_edit(news) %} -

    {% trans %}Edit (will be moderated again){% endtrans %}

    +

    {% trans %}Edit (will be moderated again){% endtrans %}

    {% endif %} -
    -
    -
    +
    +
    +
    {% endblock %} diff --git a/com/templates/com/news_edit.jinja b/com/templates/com/news_edit.jinja index dd86f544..858ec9a8 100644 --- a/com/templates/com/news_edit.jinja +++ b/com/templates/com/news_edit.jinja @@ -2,46 +2,46 @@ {% from 'core/macros.jinja' import user_profile_link %} {% block title %} -{% if object %} -{% trans %}Edit news{% endtrans %} -{% else %} -{% trans %}Create news{% endtrans %} -{% endif %} + {% if object %} + {% trans %}Edit news{% endtrans %} + {% else %} + {% trans %}Create news{% endtrans %} + {% endif %} {% endblock %} {% block content %} -{% if 'preview' in request.POST.keys() %} -
    -

    {{ form.instance.title }}

    -

    + {% if 'preview' in request.POST.keys() %} +

    +

    {{ form.instance.title }}

    +

    {{ form.instance.dates.first().start_date|localtime|date(DATETIME_FORMAT) }} - {{ form.instance.dates.first().start_date|localtime|time(DATETIME_FORMAT) }} - + {{ form.instance.dates.first().start_date|localtime|time(DATETIME_FORMAT) }} - {{ form.instance.dates.first().end_date|localtime|date(DATETIME_FORMAT) }} - {{ form.instance.dates.first().end_date|localtime|time(DATETIME_FORMAT) }} -

    -

    {{ form.instance.club or "Club" }}

    -
    {{ form.instance.summary|markdown }}
    -
    {{ form.instance.content|markdown }}
    -

    {% trans %}Author: {% endtrans %} {{ user_profile_link(form.instance.author) }}

    -
    -{% endif %} -{% if object %} -

    {% trans %}Edit news{% endtrans %}

    -{% else %} -

    {% trans %}Create news{% endtrans %}

    -{% endif %} -
    + {{ form.instance.dates.first().end_date|localtime|time(DATETIME_FORMAT) }} +

    +

    {{ form.instance.club or "Club" }}

    +
    {{ form.instance.summary|markdown }}
    +
    {{ form.instance.content|markdown }}
    +

    {% trans %}Author: {% endtrans %} {{ user_profile_link(form.instance.author) }}

    +
    + {% endif %} + {% if object %} +

    {% trans %}Edit news{% endtrans %}

    + {% else %} +

    {% trans %}Create news{% endtrans %}

    + {% endif %} + {% csrf_token %} {{ form.non_field_errors() }} {{ form.author }}

    {{ form.type.errors }} -

    + {{ form.type }}

    {{ form.start_date.errors }} {{ form.start_date }}

    {{ form.end_date.errors }} {{ form.end_date }}

    {{ form.until.errors }} {{ form.until }}

    @@ -50,38 +50,38 @@

    {{ form.summary.errors }} {{ form.summary }}

    {{ form.content.errors }} {{ form.content }}

    {% if user.is_com_admin %} -

    {{ form.automoderation.errors }} +

    {{ form.automoderation.errors }} {{ form.automoderation }}

    {% endif %}

    - + {% endblock %} {% block script %} - {{ super() }} - + } + update_targets(); + type.change(update_targets); + } ); + {% endblock %} diff --git a/com/templates/com/news_list.jinja b/com/templates/com/news_list.jinja index ba811403..bcb0eb6e 100644 --- a/com/templates/com/news_list.jinja +++ b/com/templates/com/news_list.jinja @@ -2,162 +2,162 @@ {% from 'core/macros.jinja' import tweet_quick, fb_quick %} {% block title %} -{% trans %}News{% endtrans %} + {% trans %}News{% endtrans %} {% endblock %} {% block content %} -{% if user.is_com_admin %} -
    - {% trans %}Administrate news{% endtrans %} -
    -
    -{% endif %} + {% if user.is_com_admin %} +
    + {% trans %}Administrate news{% endtrans %} +
    +
    + {% endif %} -
    +
    - {% for news in object_list.filter(type="NOTICE") %} -
    -

    {{ news.title }}

    -
    {{ news.summary|markdown }}
    -
    - {% endfor %} + {% for news in object_list.filter(type="NOTICE") %} +
    +

    {{ news.title }}

    +
    {{ news.summary|markdown }}
    +
    + {% endfor %} - {% for news in object_list.filter(dates__start_date__lte=timezone.now(), dates__end_date__gte=timezone.now(), type="CALL") %} -
    + {% for news in object_list.filter(dates__start_date__lte=timezone.now(), dates__end_date__gte=timezone.now(), type="CALL") %} +
    +

    {{ news.title }}

    +
    + {{ news.dates.first().start_date|localtime|date(DATETIME_FORMAT) }} + {{ news.dates.first().start_date|localtime|time(DATETIME_FORMAT) }} - + {{ news.dates.first().end_date|localtime|date(DATETIME_FORMAT) }} + {{ news.dates.first().end_date|localtime|time(DATETIME_FORMAT) }} +
    +
    {{ news.summary|markdown }}
    +
    + {% endfor %} + + {% set events_dates = NewsDate.objects.filter(end_date__gte=timezone.now(), start_date__lte=timezone.now()+timedelta(days=5), news__type="EVENT", news__is_moderated=True).datetimes('start_date', 'day') %} +

    {% trans %}Events today and the next few days{% endtrans %}

    + {% if events_dates %} + {% for d in events_dates %} +
    +
    +
    +
    {{ d|localtime|date('D') }}
    +
    {{ d|localtime|date('d') }}
    +
    {{ d|localtime|date('b') }}
    +
    +
    +
    + {% for news in object_list.filter(dates__start_date__gte=d, + dates__start_date__lte=d+timedelta(days=1), + type="EVENT").exclude(dates__end_date__lt=timezone.now()) + .order_by('dates__start_date') %} +
    +

    {{ news.title }}

    +
    - {{ news.dates.first().start_date|localtime|date(DATETIME_FORMAT) }} - {{ news.dates.first().start_date|localtime|time(DATETIME_FORMAT) }} - - {{ news.dates.first().end_date|localtime|date(DATETIME_FORMAT) }} - {{ news.dates.first().end_date|localtime|time(DATETIME_FORMAT) }} + {{ news.dates.first().start_date|localtime|time(DATETIME_FORMAT) }} - + {{ news.dates.first().end_date|localtime|time(DATETIME_FORMAT) }}
    -
    {{ news.summary|markdown }}
    -
    +
    {{ news.summary|markdown }} +
    + {{ fb_quick(news) }} + {{ tweet_quick(news) }} +
    +
    +
    {% endfor %} - - {% set events_dates = NewsDate.objects.filter(end_date__gte=timezone.now(), start_date__lte=timezone.now()+timedelta(days=5), news__type="EVENT", news__is_moderated=True).datetimes('start_date', 'day') %} -

    {% trans %}Events today and the next few days{% endtrans %}

    - {% if events_dates %} - {% for d in events_dates %} -
    -
    -
    -
    {{ d|localtime|date('D') }}
    -
    {{ d|localtime|date('d') }}
    -
    {{ d|localtime|date('b') }}
    -
    -
    -
    - {% for news in object_list.filter(dates__start_date__gte=d, - dates__start_date__lte=d+timedelta(days=1), - type="EVENT").exclude(dates__end_date__lt=timezone.now()) - .order_by('dates__start_date') %} -
    - -

    {{ news.title }}

    - -
    - {{ news.dates.first().start_date|localtime|time(DATETIME_FORMAT) }} - - {{ news.dates.first().end_date|localtime|time(DATETIME_FORMAT) }} -
    -
    {{ news.summary|markdown }} -
    - {{ fb_quick(news) }} - {{ tweet_quick(news) }} -
    -
    -
    - {% endfor %} -
    -
    - {% endfor %} - {% else %} -
    - {% trans %}Nothing to come...{% endtrans %} -
    - {% endif %} - - {% set coming_soon = object_list.filter(dates__start_date__gte=timezone.now()+timedelta(days=5), - type="EVENT").order_by('dates__start_date') %} - {% if coming_soon %} -

    {% trans %}Coming soon... don't miss!{% endtrans %}

    - {% for news in coming_soon %} -
    - {{ news.title }} - {{ news.dates.first().start_date|localtime|date(DATETIME_FORMAT) }} - {{ news.dates.first().start_date|localtime|time(DATETIME_FORMAT) }} - - {{ news.dates.first().end_date|localtime|date(DATETIME_FORMAT) }} - {{ news.dates.first().end_date|localtime|time(DATETIME_FORMAT) }} -
    - {% endfor %} - {% endif %} - -

    {% trans %}All coming events{% endtrans %}

    - -
    - -
    -
    -
    {% trans %}Agenda{% endtrans %}
    -
    - {% for d in NewsDate.objects.filter(end_date__gte=timezone.now(), - news__is_moderated=True, news__type__in=["WEEKLY", - "EVENT"]).order_by('start_date', 'end_date') %} -
    -
    - {{ d.start_date|localtime|date('D d M Y') }} -
    -
    - {{ d.start_date|localtime|time(DATETIME_FORMAT) }} - - {{ d.end_date|localtime|time(DATETIME_FORMAT) }} -
    - -
    {{ d.news.summary|markdown }}
    -
    - {% endfor %} -
    +
    + {% endfor %} +{% else %} +
    + {% trans %}Nothing to come...{% endtrans %} +
    +{% endif %} -
    -
    {% trans %}Birthdays{% endtrans %}
    -
    - {% if user.is_subscribed %} +{% set coming_soon = object_list.filter(dates__start_date__gte=timezone.now()+timedelta(days=5), +type="EVENT").order_by('dates__start_date') %} +{% if coming_soon %} +

    {% trans %}Coming soon... don't miss!{% endtrans %}

    + {% for news in coming_soon %} +
    + {{ news.title }} + {{ news.dates.first().start_date|localtime|date(DATETIME_FORMAT) }} + {{ news.dates.first().start_date|localtime|time(DATETIME_FORMAT) }} - + {{ news.dates.first().end_date|localtime|date(DATETIME_FORMAT) }} + {{ news.dates.first().end_date|localtime|time(DATETIME_FORMAT) }} +
    + {% endfor %} +{% endif %} + +

    {% trans %}All coming events{% endtrans %}

    + +
    + +
    +
    +
    {% trans %}Agenda{% endtrans %}
    +
    + {% for d in NewsDate.objects.filter(end_date__gte=timezone.now(), + news__is_moderated=True, news__type__in=["WEEKLY", + "EVENT"]).order_by('start_date', 'end_date') %} +
    +
    + {{ d.start_date|localtime|date('D d M Y') }} +
    +
    + {{ d.start_date|localtime|time(DATETIME_FORMAT) }} - + {{ d.end_date|localtime|time(DATETIME_FORMAT) }} +
    + +
    {{ d.news.summary|markdown }}
    +
    + {% endfor %} +
    +
    + +
    +
    {% trans %}Birthdays{% endtrans %}
    +
    + {% if user.is_subscribed %} {# Cache request for 1 hour #} - {% cache 3600 "birthdays" %} -
      - {% for d in birthdays.dates('date_of_birth', 'year', 'DESC') %} -
    • - {% trans age=timezone.now().year - d.year %}{{ age }} year old{% endtrans %} - -
    • - {% endfor %} -
    - {% endcache %} - {% else %} -

    {% trans %}You need an up to date subscription to access this content{% endtrans %}

    - {% endif %} -
    -
    + {% cache 3600 "birthdays" %} +
      + {% for d in birthdays.dates('date_of_birth', 'year', 'DESC') %} +
    • + {% trans age=timezone.now().year - d.year %}{{ age }} year old{% endtrans %} + +
    • + {% endfor %} +
    + {% endcache %} + {% else %} +

    {% trans %}You need an up to date subscription to access this content{% endtrans %}

    + {% endif %}
    +
    +
    {% endblock %} diff --git a/com/templates/com/poster_edit.jinja b/com/templates/com/poster_edit.jinja index 5e7f15cb..3c5bf39d 100644 --- a/com/templates/com/poster_edit.jinja +++ b/com/templates/com/poster_edit.jinja @@ -1,42 +1,42 @@ {% extends "core/base.jinja" %} {% block title %} -{% trans %}Poster{% endtrans %} + {% trans %}Poster{% endtrans %} {% endblock %} {% block content %} -
    +
    - -

    {% trans %}Posters - edit{% endtrans %}

    - + +

    {% trans %}Posters - edit{% endtrans %}

    +
    -
    - {% csrf_token %} - {{ form.as_p() }} -

    -
    +
    + {% csrf_token %} + {{ form.as_p() }} +

    +
    -
    +
    {% endblock %} diff --git a/com/templates/com/poster_list.jinja b/com/templates/com/poster_list.jinja index f752013e..9ff3add4 100644 --- a/com/templates/com/poster_list.jinja +++ b/com/templates/com/poster_list.jinja @@ -1,66 +1,66 @@ {% extends "core/base.jinja" %} {% block script %} -{{ super() }} - + {{ super() }} + {% endblock %} {% block title %} -{% trans %}Poster{% endtrans %} + {% trans %}Poster{% endtrans %} {% endblock %} {% block content %} -
    +
    -

    {% trans %}Posters{% endtrans %}

    - +

    {% trans %}Posters{% endtrans %}

    +
    - {% if poster_list.count() == 0 %} -
    {% trans %}No posters{% endtrans %}
    - {% else %} + {% if poster_list.count() == 0 %} +
    {% trans %}No posters{% endtrans %}
    + {% else %} - {% for poster in poster_list %} -
    -
    {{ poster.name }}
    -
    -
    -
    {{ poster.date_begin | localtime | date("d/M/Y H:m") }}
    -
    {{ poster.date_end | localtime | date("d/M/Y H:m") }}
    -
    - {% if app == "com" %} - {% trans %}Edit{% endtrans %} - {% elif app == "club" %} - {% trans %}Edit{% endtrans %} - {% endif %} -
    -
      - {% for screen in poster.screens.all() %} -
    • {{ screen }}
    • - {% endfor %} -
    -
    -
    - {% endfor %} + {% for poster in poster_list %} +
    +
    {{ poster.name }}
    +
    +
    +
    {{ poster.date_begin | localtime | date("d/M/Y H:m") }}
    +
    {{ poster.date_end | localtime | date("d/M/Y H:m") }}
    +
    + {% if app == "com" %} + {% trans %}Edit{% endtrans %} + {% elif app == "club" %} + {% trans %}Edit{% endtrans %} + {% endif %} +
    +
      + {% for screen in poster.screens.all() %} +
    • {{ screen }}
    • + {% endfor %} +
    +
    +
    + {% endfor %} - {% endif %} + {% endif %}
    -
    +
    {% endblock %} diff --git a/com/templates/com/poster_moderate.jinja b/com/templates/com/poster_moderate.jinja index d9b34082..36e3dae7 100644 --- a/com/templates/com/poster_moderate.jinja +++ b/com/templates/com/poster_moderate.jinja @@ -1,39 +1,39 @@ {% extends "core/base.jinja" %} {% block script %} -{{ super() }} - + {{ super() }} + {% endblock %} {% block content %} -
    +
    - -

    {% trans %}Posters - moderation{% endtrans %}

    + +

    {% trans %}Posters - moderation{% endtrans %}

    - {% if object_list.count == 0 %} -
    {% trans %}No objects{% endtrans %}
    - {% else %} + {% if object_list.count == 0 %} +
    {% trans %}No objects{% endtrans %}
    + {% else %} - {% for poster in object_list %} -
    -
    {{ poster.name }}
    -
    - Moderate -
    - {% endfor %} + {% for poster in object_list %} +
    +
    {{ poster.name }}
    +
    + Moderate +
    + {% endfor %} - {% endif %} + {% endif %}
    -
    +
    {% endblock %} diff --git a/com/templates/com/screen_edit.jinja b/com/templates/com/screen_edit.jinja index 70aa2b6c..73e13876 100644 --- a/com/templates/com/screen_edit.jinja +++ b/com/templates/com/screen_edit.jinja @@ -1,33 +1,33 @@ {% extends "core/base.jinja" %} {% block title %} -{% trans %}Screen{% endtrans %} + {% trans %}Screen{% endtrans %} {% endblock %} {% block content %} -
    +
    - -

    {% trans %}Screen - edit{% endtrans %}

    - + +

    {% trans %}Screen - edit{% endtrans %}

    +
    -
    - {% csrf_token %} - {{ form.as_p() }} -

    -
    +
    + {% csrf_token %} + {{ form.as_p() }} +

    +
    -
    +
    {% endblock %} diff --git a/com/templates/com/screen_list.jinja b/com/templates/com/screen_list.jinja index 27ff7354..237873d9 100644 --- a/com/templates/com/screen_list.jinja +++ b/com/templates/com/screen_list.jinja @@ -1,38 +1,38 @@ {% extends "core/base.jinja" %} {% block title %} -{% trans %}Screens{% endtrans %} + {% trans %}Screens{% endtrans %} {% endblock %} {% block content %} -
    +
    -

    {% trans %}Screens{% endtrans %}

    - +

    {% trans %}Screens{% endtrans %}

    +
    - {% if screen_list.count() == 0 %} -
    {% trans %}No screens{% endtrans %}
    - {% else %} + {% if screen_list.count() == 0 %} +
    {% trans %}No screens{% endtrans %}
    + {% else %} - {% for screen in screen_list %} - - {% endfor %} + {% for screen in screen_list %} + + {% endfor %} - {% endif %} + {% endif %}
    -
    +
    {% endblock %} diff --git a/com/templates/com/screen_slideshow.jinja b/com/templates/com/screen_slideshow.jinja index da429b6b..9e386fcf 100644 --- a/com/templates/com/screen_slideshow.jinja +++ b/com/templates/com/screen_slideshow.jinja @@ -1,30 +1,30 @@ - + {% trans %}Slideshow{% endtrans %} - - + +
    -
    +
    {% for poster in posters %} -
    - -
    +
    + +
    {% endfor %} -
    +
    -
    +
    {% for poster in posters %} -
    +
    {% endfor %} -
    +
    -
    +
    - + diff --git a/com/templates/com/weekmail.jinja b/com/templates/com/weekmail.jinja index f524fc3b..f8b37cbf 100644 --- a/com/templates/com/weekmail.jinja +++ b/com/templates/com/weekmail.jinja @@ -2,77 +2,77 @@ {% from 'core/macros.jinja' import user_profile_link %} {% block title %} -{% trans %}Weekmail{% endtrans %} + {% trans %}Weekmail{% endtrans %} {% endblock %} {% block content %} -

    {% trans %}Weekmail{% endtrans %} {{ object.id }}

    -

    {% trans %}Preview{% endtrans %}

    -

    {% trans %}Send{% endtrans %}

    -

    {% trans %}New article{% endtrans %}

    -

    {% trans %}Articles in no weekmail yet{% endtrans %}

    - +

    {% trans %}Weekmail{% endtrans %} {{ object.id }}

    +

    {% trans %}Preview{% endtrans %}

    +

    {% trans %}Send{% endtrans %}

    +

    {% trans %}New article{% endtrans %}

    +

    {% trans %}Articles in no weekmail yet{% endtrans %}

    +
    - - - - - - - + + + + + + + - {% for a in orphans.all() %} + {% for a in orphans.all() %} - - - - - + + + + + - {% endfor %} + {% endfor %} -
    {% trans %}Author{% endtrans %}{% trans %}Club{% endtrans %}{% trans %}Title{% endtrans %}{% trans %}Content{% endtrans %}{% trans %}Actions{% endtrans %}
    {% trans %}Author{% endtrans %}{% trans %}Club{% endtrans %}{% trans %}Title{% endtrans %}{% trans %}Content{% endtrans %}{% trans %}Actions{% endtrans %}
    {{ user_profile_link(a.author) }}{{ a.club }}{{ a.title }}{{ a.content|markdown }} - {% trans %}Edit{% endtrans %} | - {% trans %}Delete{% endtrans %} | - {% trans %}Add to weekmail{% endtrans %} | - {% trans %}Up{% endtrans %} | - {% trans %}Down{% endtrans %} - {{ user_profile_link(a.author) }}{{ a.club }}{{ a.title }}{{ a.content|markdown }} + {% trans %}Edit{% endtrans %} | + {% trans %}Delete{% endtrans %} | + {% trans %}Add to weekmail{% endtrans %} | + {% trans %}Up{% endtrans %} | + {% trans %}Down{% endtrans %} +
    -

    {% trans %}Articles included the next weekmail{% endtrans %}

    - +
    +

    {% trans %}Articles included the next weekmail{% endtrans %}

    + - - - - - - - + + + + + + + - {% for a in object.articles.order_by('rank') %} + {% for a in object.articles.order_by('rank') %} - - - - - + + + + + - {% endfor %} + {% endfor %} -
    {% trans %}Author{% endtrans %}{% trans %}Club{% endtrans %}{% trans %}Title{% endtrans %}{% trans %}Content{% endtrans %}{% trans %}Actions{% endtrans %}
    {% trans %}Author{% endtrans %}{% trans %}Club{% endtrans %}{% trans %}Title{% endtrans %}{% trans %}Content{% endtrans %}{% trans %}Actions{% endtrans %}
    {{ user_profile_link(a.author) }}{{ a.club }}{{ a.title }}{{ a.content|markdown }} - {% trans %}Edit{% endtrans %} | - {% trans %}Delete{% endtrans %} | - {% trans %}Delete from weekmail{% endtrans %} | - {% trans %}Up{% endtrans %} | - {% trans %}Down{% endtrans %} - {{ user_profile_link(a.author) }}{{ a.club }}{{ a.title }}{{ a.content|markdown }} + {% trans %}Edit{% endtrans %} | + {% trans %}Delete{% endtrans %} | + {% trans %}Delete from weekmail{% endtrans %} | + {% trans %}Up{% endtrans %} | + {% trans %}Down{% endtrans %} +
    -
    + + {% csrf_token %} {{ form.as_p() }}

    -
    + {% endblock %} diff --git a/com/templates/com/weekmail_preview.jinja b/com/templates/com/weekmail_preview.jinja index 44c4da0a..067eb95d 100644 --- a/com/templates/com/weekmail_preview.jinja +++ b/com/templates/com/weekmail_preview.jinja @@ -2,41 +2,41 @@ {% from 'core/macros.jinja' import user_profile_link %} {% block title %} -{{ weekmail.title }} + {{ weekmail.title }} {% endblock %} {% block content %} -{% trans %}Back{% endtrans %} -{% if bad_recipients %} + {% trans %}Back{% endtrans %} + {% if bad_recipients %}

    - + {% trans %}The following recipients were refused by the SMTP:{% endtrans %} - -

    + +

    - {% csrf_token %} - + {% csrf_token %} +
    -{% else %} + {% else %} {% if request.GET['send'] %} -

    {% trans %}Are you sure you want to send this weekmail?{% endtrans %}

    - {% if request.LANGUAGE_CODE != settings.LANGUAGE_CODE[:2] %} -

    {% trans %}Warning: you are sending the weekmail in another language than the default one!{% endtrans %}

    - {% endif %} -
    - {% csrf_token %} - -
    +

    {% trans %}Are you sure you want to send this weekmail?{% endtrans %}

    + {% if request.LANGUAGE_CODE != settings.LANGUAGE_CODE[:2] %} +

    {% trans %}Warning: you are sending the weekmail in another language than the default one!{% endtrans %}

    + {% endif %} +
    + {% csrf_token %} + +
    {% endif %} -{% endif %} -
    -{{ weekmail_rendered|safe }} + {% endif %} +
    + {{ weekmail_rendered|safe }} {% endblock %} diff --git a/com/templates/com/weekmail_renderer_html.jinja b/com/templates/com/weekmail_renderer_html.jinja index c3e865be..50bef937 100644 --- a/com/templates/com/weekmail_renderer_html.jinja +++ b/com/templates/com/weekmail_renderer_html.jinja @@ -1,52 +1,52 @@
    -
    -

    {{ weekmail.title }}

    - - {% if weekmail.intro %} -

    {% trans %}Intro{% endtrans %}

    - {{ weekmail.intro|markdown }} - {% endif %} +
    +

    {{ weekmail.title }}

    + + {% if weekmail.intro %} +

    {% trans %}Intro{% endtrans %}

    + {{ weekmail.intro|markdown }} + {% endif %} -

    {% trans %}Table of content{% endtrans %}

    -
      - {% for a in weekmail.articles.all() %} -
    • [{{ a.club }}] {{ a.title }}
    • - {%- endfor %} -
    +

    {% trans %}Table of content{% endtrans %}

    +
      + {% for a in weekmail.articles.all() %} +
    • [{{ a.club }}] {{ a.title }}
    • + {%- endfor %} +
    - {%- for a in weekmail.articles.all() %} -

    [{{ a.club }}] {{ a.title }}

    - {{ a.content|markdown }} - {%- endfor -%} + {%- for a in weekmail.articles.all() %} +

    [{{ a.club }}] {{ a.title }}

    + {{ a.content|markdown }} + {%- endfor -%} - {%- if weekmail.joke %} -

    {% trans %}Joke{% endtrans %}

    - {{ weekmail.joke|markdown }} - {% endif -%} + {%- if weekmail.joke %} +

    {% trans %}Joke{% endtrans %}

    + {{ weekmail.joke|markdown }} + {% endif -%} - {%- if weekmail.protip %} -

    {% trans %}Pro tip{% endtrans %}

    - {{ weekmail.protip|markdown }} - {% endif -%} + {%- if weekmail.protip %} +

    {% trans %}Pro tip{% endtrans %}

    + {{ weekmail.protip|markdown }} + {% endif -%} - {%- if weekmail.conclusion %} -

    {% trans %}Final word{% endtrans %}

    - {{ weekmail.conclusion|markdown }} - {% endif -%} - + {%- if weekmail.conclusion %} +

    {% trans %}Final word{% endtrans %}

    + {{ weekmail.conclusion|markdown }} + {% endif -%} + -
    +
    diff --git a/com/templates/com/weekmail_renderer_text.jinja b/com/templates/com/weekmail_renderer_text.jinja index 82c6b813..b07ef8e7 100644 --- a/com/templates/com/weekmail_renderer_text.jinja +++ b/com/templates/com/weekmail_renderer_text.jinja @@ -1,8 +1,8 @@ # {{ weekmail.title }} {%- if weekmail.intro %} -## {% trans %}Intro{% endtrans %} -{{ weekmail.intro }} + ## {% trans %}Intro{% endtrans %} + {{ weekmail.intro }} {% endif %} ## {% trans %}Table of content{% endtrans %} @@ -11,22 +11,22 @@ {% endfor -%} {% for a in weekmail.articles.all() %} -## [{{ a.club }}] {{ a.title }} -{{ a.content }} + ## [{{ a.club }}] {{ a.title }} + {{ a.content }} {% endfor -%} {%- if weekmail.joke %} -## {% trans %}Joke{% endtrans %} -{{ weekmail.joke }} + ## {% trans %}Joke{% endtrans %} + {{ weekmail.joke }} {% endif -%} {%- if weekmail.protip %} -## {% trans %}Pro tip{% endtrans %} -{{ weekmail.protip }} + ## {% trans %}Pro tip{% endtrans %} + {{ weekmail.protip }} {% endif -%} {%- if weekmail.conclusion %} -## {% trans %}Final word{% endtrans %} -{{ weekmail.conclusion }} + ## {% trans %}Final word{% endtrans %} + {{ weekmail.conclusion }} {% endif -%} diff --git a/com/tests.py b/com/tests.py index bc00ea48..1ca29a08 100644 --- a/com/tests.py +++ b/com/tests.py @@ -69,11 +69,11 @@ class TestCom(TestCase): }, ) r = self.client.get(reverse("core:index")) - self.assertContains( - r, - """
    -

    ALERTE!

    -

    Caaaataaaapuuuulte!!!!

    """, + assert r.status_code == 200 + self.assertInHTML( + """

    ALERTE!

    +

    Caaaataaaapuuuulte!!!!

    """, + r.content.decode(), ) def test_info_msg(self): @@ -86,10 +86,12 @@ class TestCom(TestCase): }, ) r = self.client.get(reverse("core:index")) - self.assertContains( - r, - """
    -

    INFO: Caaaataaaapuuuulte!!!!

    """, + + assert r.status_code == 200 + self.assertInHTML( + """
    +

    INFO: Caaaataaaapuuuulte!!!!

    """, + r.content.decode(), ) def test_birthday_non_subscribed_user(self): diff --git a/core/static/com/slideshow.scss b/core/static/com/slideshow.scss index 82d63a4d..9ea4fa52 100644 --- a/core/static/com/slideshow.scss +++ b/core/static/com/slideshow.scss @@ -1,149 +1,149 @@ body{ - position: absolute; - width: 100vw; - height: 100vh; + position: absolute; + width: 100vw; + height: 100vh; - padding: 0; - margin: 0; + padding: 0; + margin: 0; } #slideshow{ - position: relative; - background-color: lightgrey; + position: relative; + background-color: lightgrey; + height: 100%; + + *{ + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + } + + &:hover{ + + &::before{ + + position: absolute; + width: 100%; + height: 100%; + + display: flex; + justify-content: center; + align-items: center; + + z-index: 10; + + content: "Click to expand"; + + color: white; + background-color: rgba(black, 0.5); + + } + + } + + &.fullscreen{ + position: fixed; + width: 100%; height: 100%; + top: 0; + left: 0; + background: none; - *{ - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; - } - - &:hover{ - - &::before{ - - position: absolute; - width: 100%; - height: 100%; - - display: flex; - justify-content: center; - align-items: center; - - z-index: 10; - - content: "Click to expand"; - - color: white; - background-color: rgba(black, 0.5); - - } - - } - - &.fullscreen{ - position: fixed; - width: 100%; - height: 100%; - top: 0; - left: 0; - background: none; - - &:before{ - display:none; - } - - #slides{ - height: 100vh; - } - + &:before{ + display:none; } #slides{ - position: relative; - height: 100%; - overflow: hidden; - - .slide{ - position: absolute; - width: 100%; - height: 100%; - - display: inline-flex; - justify-content: center; - - top: 0px; - - background-color: grey; - transition: left 1s ease-out; - - img{ - max-width: 100%; - max-height: 100%; - object-fit: contain; - } - } - - .slide.left{ - left: -100%; - } - - .slide.center{ - left: 0px; - } - - .slide.right{ - left: 100%; - transition: none; - } + height: 100vh; } + } - #progress_bullets{ - position: absolute; - bottom: 10px; - width: 100%; - height: 10px; + #slides{ + position: relative; + height: 100%; + overflow: hidden; - display: flex; - justify-content: center; + .slide{ + position: absolute; + width: 100%; + height: 100%; - margin-bottom: 10px; + display: inline-flex; + justify-content: center; - .bullet{ - height: 10px; - width: 10px; + top: 0px; - margin-left: 5px; - margin-right: 5px; + background-color: grey; + transition: left 1s ease-out; - border-radius: 50%; - - background-color: grey; - - &.active{ - background-color: #c99836; - } - } + img{ + max-width: 100%; + max-height: 100%; + object-fit: contain; + } } - #progress_bar{ - position: absolute; - bottom: 0px; - height: 10px; - background-color: #304c83; - - &.init{ - width: 0px; - transition: none; - } - - &.progress{ - width: 100%; - transition: width 10s linear; - } + .slide.left{ + left: -100%; } + + .slide.center{ + left: 0px; + } + + .slide.right{ + left: 100%; + transition: none; + } + } + + + #progress_bullets{ + position: absolute; + bottom: 10px; + width: 100%; + height: 10px; + + display: flex; + justify-content: center; + + margin-bottom: 10px; + + .bullet{ + height: 10px; + width: 10px; + + margin-left: 5px; + margin-right: 5px; + + border-radius: 50%; + + background-color: grey; + + &.active{ + background-color: #c99836; + } + } + } + + #progress_bar{ + position: absolute; + bottom: 0px; + height: 10px; + background-color: #304c83; + + &.init{ + width: 0px; + transition: none; + } + + &.progress{ + width: 100%; + transition: width 10s linear; + } + } } diff --git a/core/static/core/markdown.scss b/core/static/core/markdown.scss index 55e3bed6..86778e46 100644 --- a/core/static/core/markdown.scss +++ b/core/static/core/markdown.scss @@ -21,9 +21,9 @@ overflow: auto; max-width: 100%; font-family: Consolas, "Andale Mono WT", "Andale Mono", "Lucida Console", - "Lucida Sans Typewriter", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", - "Liberation Mono", "Nimbus Mono L", Monaco, "Courier New", Courier, - monospace; + "Lucida Sans Typewriter", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", + "Liberation Mono", "Nimbus Mono L", Monaco, "Courier New", Courier, + monospace; font-size: 14px; tab-size: 4; border-radius: 4px; diff --git a/core/static/core/navbar.scss b/core/static/core/navbar.scss index a3b4209c..5b5e0653 100644 --- a/core/static/core/navbar.scss +++ b/core/static/core/navbar.scss @@ -43,7 +43,7 @@ nav.navbar { justify-content: center; display: flex !important; } - + > .menu, > .link { box-sizing: border-box; @@ -146,5 +146,5 @@ nav.navbar { } } } - } + } } \ No newline at end of file diff --git a/core/static/core/style.scss b/core/static/core/style.scss index a2596986..f169c88b 100644 --- a/core/static/core/style.scss +++ b/core/static/core/style.scss @@ -170,7 +170,7 @@ a:not(.button) { .shadow { box-shadow: rgba(60, 64, 67, 0.3) 0 1px 3px 0, - rgba(60, 64, 67, 0.15) 0 4px 8px 3px; + rgba(60, 64, 67, 0.15) 0 4px 8px 3px; } .w_big { @@ -246,7 +246,7 @@ a:not(.button) { #page { width: 90%; margin: 20px auto 0; - /*---------------------------------NAV---------------------------------*/ +/*---------------------------------NAV---------------------------------*/ .btn { font-size: 15px; @@ -278,7 +278,7 @@ a:not(.button) { } } - /*--------------------------------CONTENT------------------------------*/ +/*--------------------------------CONTENT------------------------------*/ #quick_notif { width: 100%; margin: 0 auto; @@ -357,7 +357,7 @@ a:not(.button) { } } - /*---------------------------------NEWS--------------------------------*/ +/*---------------------------------NEWS--------------------------------*/ #news { display: flex; @@ -385,11 +385,11 @@ a:not(.button) { background: $second-color; box-shadow: $shadow-color 1px 1px 1px; padding: 0.4em; - margin: 0em 0em 0.5em 0em; + margin: 0 0 0.5em 0; text-transform: uppercase; font-size: 1.1em; &:not(:first-of-type) { - margin: 2em 0em 1em 0em; + margin: 2em 0 1em 0; } } } @@ -400,7 +400,7 @@ a:not(.button) { } } - /* AGENDA/BIRTHDAYS */ +/* AGENDA/BIRTHDAYS */ #agenda, #birthdays { display: block; @@ -410,7 +410,7 @@ a:not(.button) { margin-bottom: 1em; #agenda_title, #birthdays_title { - margin: 0em; + margin: 0; border-radius: 5px 5px 0 0; box-shadow: $shadow-color 1px 1px 1px; padding: 0.5em; @@ -444,7 +444,7 @@ a:not(.button) { } } ul.birthdays_year { - margin: 0em; + margin: 0; list-style-type: none; font-weight: bold; > li { @@ -454,7 +454,7 @@ a:not(.button) { } } ul { - margin: 0em; + margin: 0; margin-left: 1em; list-style-type: square; list-style-position: inside; @@ -463,9 +463,9 @@ a:not(.button) { } } } - /* END AGENDA/BIRTHDAYS */ +/* END AGENDA/BIRTHDAYS */ - /* EVENTS TODAY AND NEXT FEW DAYS */ +/* EVENTS TODAY AND NEXT FEW DAYS */ .news_events_group { box-shadow: $shadow-color 1px 1px 1px; margin-left: 1em; @@ -516,14 +516,14 @@ a:not(.button) { float: left; min-width: 7em; max-width: 9em; - margin: 0em; + margin: 0; margin-right: 1em; margin-top: 0.8em; img { max-height: 6em; max-width: 8em; display: block; - margin: 0em auto; + margin: 0 auto; } } .news_date { @@ -544,15 +544,15 @@ a:not(.button) { } } } - /* END EVENTS TODAY AND NEXT FEW DAYS */ +/* END EVENTS TODAY AND NEXT FEW DAYS */ - /* COMING SOON */ +/* COMING SOON */ .news_coming_soon { display: list-item; list-style-type: square; list-style-position: inside; margin-left: 1em; - padding-left: 0em; + padding-left: 0; a { font-weight: bold; text-transform: uppercase; @@ -561,35 +561,35 @@ a:not(.button) { font-size: 0.9em; } } - /* END COMING SOON */ +/* END COMING SOON */ - /* NOTICES */ +/* NOTICES */ .news_notice { - margin: 0em 0em 1em 1em; + margin: 0 0 1em 1em; padding: 0.4em; padding-left: 1em; background: $secondary-neutral-light-color; box-shadow: $shadow-color 0 0 2px; border-radius: 18px 5px 18px 5px; h4 { - margin: 0em; + margin: 0; } .news_content { margin-left: 1em; } } - /* END NOTICES */ +/* END NOTICES */ - /* CALLS */ +/* CALLS */ .news_call { - margin: 0em 0em 1em 1em; + margin: 0 0 1em 1em; padding: 0.4em; padding-left: 1em; background: $secondary-neutral-light-color; border: 1px solid grey; box-shadow: $shadow-color 1px 1px 1px; h4 { - margin: 0em; + margin: 0; } .news_date { font-size: 0.9em; @@ -598,7 +598,7 @@ a:not(.button) { margin-left: 1em; } } - /* END CALLS */ +/* END CALLS */ .news_empty { margin-left: 1em; @@ -631,12 +631,12 @@ a:not(.button) { width: 19%; float: left; min-width: 15em; - margin: 0em; + margin: 0; img { max-height: 15em; max-width: 12em; display: block; - margin: 0em auto; + margin: 0 auto; margin-bottom: 10px; } } @@ -646,7 +646,6 @@ a:not(.button) { padding: 0.5em 1em; text-align: center; text-decoration: none; - display: inline-block; font-size: 1.2em; border-radius: 2px; float: right; @@ -978,7 +977,7 @@ table { -moz-border-radius: 5px; overflow: hidden; box-shadow: rgba(60, 64, 67, 0.3) 0 1px 3px 0, - rgba(60, 64, 67, 0.15) 0 4px 8px 3px; + rgba(60, 64, 67, 0.15) 0 4px 8px 3px; } @media screen and (max-width: 500px) { @@ -1198,8 +1197,8 @@ u, color: $primary-neutral-dark-color; height: 100%; width: 100%; - margin: 0em; - padding: 0em; + margin: 0; + padding: 0; display: block; } } @@ -1393,7 +1392,7 @@ footer { text-align: center; vertical-align: middle; div { - margin: 0.6em 0em; + margin: 0.6em 0; color: $white-color; border-radius: 5px; display: flex; @@ -1573,10 +1572,10 @@ $pedagogy-white-text: #f0f0f0; grid-template-columns: auto auto; grid-template-rows: auto auto auto; grid-template-areas: - "action-bar action-bar" - "search-bar search-bar" - "radio-department radio-department" - "radio-credit-type radio-semester"; + "action-bar action-bar" + "search-bar search-bar" + "radio-department radio-department" + "radio-credit-type radio-semester"; } .action-bar { @@ -1668,8 +1667,8 @@ $pedagogy-white-text: #f0f0f0; grid-template-columns: 20% 20% 20% 20% auto; grid-template-rows: auto auto; grid-template-areas: - "hours-cm hours-td hours-tp hours-te hours-the" - "department credit-type semester . ."; + "hours-cm hours-td hours-tp hours-te hours-the" + "department credit-type semester . ."; } .department { @@ -1722,8 +1721,8 @@ $pedagogy-white-text: #f0f0f0; grid-template-columns: 100%; grid-template-rows: auto auto; grid-template-areas: - "stars" - "comment"; + "stars" + "comment"; } } @@ -1770,15 +1769,15 @@ $pedagogy-white-text: #f0f0f0; grid-template-columns: 150px 100px auto; grid-template-rows: 156px 1fr; grid-template-areas: - "grade grade-stars uv-infos" - ". . uv-infos"; + "grade grade-stars uv-infos" + ". . uv-infos"; @media screen and (max-width: $large-devices) { grid-template-columns: 50% 50%; grid-template-rows: auto auto; grid-template-areas: - "grade grade-stars" - "uv-infos uv-infos"; + "grade grade-stars" + "uv-infos uv-infos"; } } @@ -1811,9 +1810,9 @@ $pedagogy-white-text: #f0f0f0; grid-template-columns: 300px auto; grid-template-rows: auto auto auto; grid-template-areas: - "grade-block comment" - "grade-block info" - "comment-end-bar comment-end-bar"; + "grade-block comment" + "grade-block info" + "comment-end-bar comment-end-bar"; margin-bottom: 30px; margin-top: 10px; @@ -1821,10 +1820,10 @@ $pedagogy-white-text: #f0f0f0; grid-template-columns: auto; grid-template-rows: auto auto auto auto; grid-template-areas: - "grade-block" - "comment" - "info" - "comment-end-bar"; + "grade-block" + "comment" + "info" + "comment-end-bar"; } .grade-block { @@ -1835,8 +1834,8 @@ $pedagogy-white-text: #f0f0f0; grid-template-columns: 150px 150px; grid-template-rows: 156px auto; grid-template-areas: - "grade-type grade-stars" - "grade-extension grade-extension"; + "grade-type grade-stars" + "grade-extension grade-extension"; grid-gap: 15px; clip-path: polygon(0 0, 0 100%, 100% 100%, 100% 30px, 270px 0); @@ -1881,8 +1880,8 @@ $pedagogy-white-text: #f0f0f0; grid-template-columns: auto; grid-template-rows: auto auto; grid-template-areas: - "anchor" - "markdown"; + "anchor" + "markdown"; @media screen and (max-width: $large-devices) { border-left: solid; @@ -1944,9 +1943,9 @@ $pedagogy-white-text: #f0f0f0; grid-template-columns: auto; grid-template-rows: auto auto auto; grid-template-areas: - "report" - "date" - "author"; + "report" + "date" + "author"; margin-top: 0; text-align: center; } diff --git a/core/static/election/election.scss b/core/static/election/election.scss index c6f7cc26..ab12078d 100644 --- a/core/static/election/election.scss +++ b/core/static/election/election.scss @@ -5,287 +5,287 @@ $border: .01rem solid black; $min_col_width: 100px; .error { - color: red !important; + color: red !important; } .radio-btn { - display: flex; - flex-direction: row; - gap: $gap; + display: flex; + flex-direction: row; + gap: $gap; - > input, - > label { - margin: 0; - } + > input, + > label { + margin: 0; + } - &:hover { - cursor: pointer; - } + &:hover { + cursor: pointer; + } } .election_vote { - overflow-x: scroll !important; + overflow-x: scroll !important; } .election_table { - width: 100%; + width: 100%; - >.lists { + >.lists { + display: flex; + flex-direction: row; + + >tr { + display: flex; + flex-direction: row; + width: 100%; + + >.column { + display: flex; + flex-direction: column-reverse; + align-items: center; + justify-content: center; + padding: $padding; + border: $border; + border-collapse: collapse; + position: relative; + min-width: $min_col_width; + + >a{ + margin-left: $padding; + width: 20px; + height: 20px; + text-align: center; + padding: 5px; + border-radius: 25%; + margin: 0; + display: flex; + align-items: center; + justify-content: center; + position: absolute; + right: $gap; + top: $gap; + + &:hover { + background-color: #ddd; + } + } + } + } + } + + >.role { + display: flex; + flex-direction: column; + + >tr { + display: flex; + flex-direction: row; + background-color: lightgrey; + + &:hover { + background-color: lightgrey; + } + + >.role_title { display: flex; flex-direction: row; + align-items: center; + justify-content: space-between; + margin: 0; + padding: $padding; + width: 100%; - >tr { - display: flex; - flex-direction: row; - width: 100%; - >.column { - display: flex; - flex-direction: column-reverse; - align-items: center; - justify-content: center; - padding: $padding; - border: $border; - border-collapse: collapse; - position: relative; - min-width: $min_col_width; - - >a{ - margin-left: $padding; - width: 20px; - height: 20px; - text-align: center; - padding: 5px; - border-radius: 25%; - margin: 0; - display: flex; - align-items: center; - justify-content: center; - position: absolute; - right: $gap; - top: $gap; - - &:hover { - background-color: #ddd; - } - } - } + >.role_text { + >h4 { + margin: 0; + } + >p { + margin-top: .5em; + } } - } - >.role { + >.role_buttons { + display: flex; + flex-direction: row; + align-items: center; + gap: $gap; + + > button, + > button > i, + > a { + width: 20px; + height: 20px; + background-color: #e9e9e9; + text-align: center; + padding: 5px; + border-radius: 25%; + margin: 0; + display: flex; + align-items: center; + justify-content: center; + + &:hover, + &:hover > i { + background-color: #fff; + } + } + + > button { + width: 30px; + height: 30px; + } + + > button[disabled] { + background-color: #eee; + cursor: not-allowed; + + >i, + &:hover, + &:hover > i { + background-color: #eee; + } + } + } + } + + >.list_per_role { display: flex; - flex-direction: column; + flex-direction: row; + justify-content: center; + border: $border; + border-collapse: collapse; + background-color: #fff; + padding: $padding_smaller; + margin: 0; + min-width: $min_col_width; - >tr { + >.candidates { + margin: 0; + display: flex; + flex-direction: row; + flex-wrap: wrap; + justify-content: center; + width: 100%; + gap: $gap; + + >.candidate { display: flex; - flex-direction: row; - background-color: lightgrey; + flex-direction: column; + align-items: center; + list-style-type: none; + width: 100%; + gap: $gap; - &:hover { - background-color: lightgrey; - } + >input[type="radio"]:checked + label, + >input[type="checkbox"]:checked + label { + background-color: lightgray; + border-radius: 10px; - >.role_title { - display: flex; - flex-direction: row; - align-items: center; - justify-content: space-between; - margin: 0; - padding: $padding; - width: 100%; - - - >.role_text { - >h4 { - margin: 0; - } - >p { - margin-top: .5em; - } - } - - >.role_buttons { - display: flex; - flex-direction: row; - align-items: center; - gap: $gap; - - > button, - > button > i, - > a { - width: 20px; - height: 20px; - background-color: #e9e9e9; - text-align: center; - padding: 5px; - border-radius: 25%; - margin: 0; - display: flex; - align-items: center; - justify-content: center; - - &:hover, - &:hover > i { - background-color: #fff; - } - } - - > button { - width: 30px; - height: 30px; - } - - > button[disabled] { - background-color: #eee; - cursor: not-allowed; - - >i, - &:hover, - &:hover > i { - background-color: #eee; - } - } - } - } - - >.list_per_role { - display: flex; - flex-direction: row; - justify-content: center; - border: $border; - border-collapse: collapse; + >figure>.edit_btns>a:hover{ background-color: #fff; - padding: $padding_smaller; - margin: 0; - min-width: $min_col_width; - - >.candidates { - margin: 0; - display: flex; - flex-direction: row; - flex-wrap: wrap; - justify-content: center; - width: 100%; - gap: $gap; - - >.candidate { - display: flex; - flex-direction: column; - align-items: center; - list-style-type: none; - width: 100%; - gap: $gap; - - >input[type="radio"]:checked + label, - >input[type="checkbox"]:checked + label { - background-color: lightgray; - border-radius: 10px; - - >figure>.edit_btns>a:hover{ - background-color: #fff; - } - } - - >label { - width: 100%; - } - - >label>figure, - >figure { - position: relative; - display: flex; - flex-direction: column; - align-items: center; - gap: $gap; - padding: 10px; - max-width: 100%; - - >img { - max-width: 100% !important; - } - - >figcaption { - width: 100%; - max-width: inherit !important; - overflow: hidden; - - h5 { - margin: 0; - text-align: center; - } - .candidate_program { - margin: 5px 0; - } - } - - >.edit_btns { - position: absolute; - display: flex; - flex-direction: column; - top: $gap; - right: $gap; - gap: $gap; - - > a { - width: 20px; - height: 20px; - background-color: #e9e9e9; - text-align: center; - padding: 5px; - border-radius: 25%; - margin: 0; - display: flex; - align-items: center; - justify-content: center; - - &:hover { - background-color: #d8d8d8; - } - } - } - } - } - } + } } + + >label { + width: 100%; + } + + >label>figure, + >figure { + position: relative; + display: flex; + flex-direction: column; + align-items: center; + gap: $gap; + padding: 10px; + max-width: 100%; + + >img { + max-width: 100% !important; + } + + >figcaption { + width: 100%; + max-width: inherit !important; + overflow: hidden; + + h5 { + margin: 0; + text-align: center; + } + .candidate_program { + margin: 5px 0; + } + } + + >.edit_btns { + position: absolute; + display: flex; + flex-direction: column; + top: $gap; + right: $gap; + gap: $gap; + + > a { + width: 20px; + height: 20px; + background-color: #e9e9e9; + text-align: center; + padding: 5px; + border-radius: 25%; + margin: 0; + display: flex; + align-items: center; + justify-content: center; + + &:hover { + background-color: #d8d8d8; + } + } + } + } + } } + } } + } } .election_details { - margin: .5em 0; + margin: .5em 0; } .buttons { - display: flex; - flex-direction: row; - flex-wrap: wrap; - align-items: center; - justify-content: center; - gap: $gap; + display: flex; + flex-direction: row; + flex-wrap: wrap; + align-items: center; + justify-content: center; + gap: $gap; } .button { - border: none; + border: none; + color: black; + text-decoration: none; + background-color: #f2f2f2; + padding: 0.4em; + margin: 0.1em; + font-size: 1.18em; + border-radius: 5px; + box-shadow: #dfdfdf 0px 0px 1px; + cursor: pointer; + + &:hover { color: black; - text-decoration: none; - background-color: #f2f2f2; - padding: 0.4em; - margin: 0.1em; - font-size: 1.18em; - border-radius: 5px; - box-shadow: #dfdfdf 0px 0px 1px; - cursor: pointer; + background: #d4d4d4; + } + &_send { + background-color: #59aee2; &:hover { - color: black; - background: #d4d4d4; - } - - &_send { - background-color: #59aee2; - &:hover { - background-color: rgb(130, 186, 235); - } + background-color: rgb(130, 186, 235); } + } } \ No newline at end of file diff --git a/core/static/user/user_godfathers.scss b/core/static/user/user_godfathers.scss index e49e63c9..1075c8b8 100644 --- a/core/static/user/user_godfathers.scss +++ b/core/static/user/user_godfathers.scss @@ -50,7 +50,7 @@ align-items: flex-start; max-height: 65px; } - + > span { height: 150px; width: 100%; @@ -66,14 +66,14 @@ max-height: 100%; height: auto; object-fit: contain; - + @media (max-width: 375px) { max-width: 100%; max-height: 65px; } } } - + > em { box-sizing: border-box; padding: 0 5px; diff --git a/core/static/user/user_tools.scss b/core/static/user/user_tools.scss index 82cb5cbf..268e3371 100644 --- a/core/static/user/user_tools.scss +++ b/core/static/user/user_tools.scss @@ -35,7 +35,7 @@ main { > span { margin-top: 5px; } - + > span > span, > span { display: flex; @@ -43,7 +43,7 @@ main { flex-wrap: wrap; gap: 5px; width: 100%; - + >.button { font-size: smaller; width: 100%; diff --git a/core/templates/core/403.jinja b/core/templates/core/403.jinja index 194109a8..33a1a084 100644 --- a/core/templates/core/403.jinja +++ b/core/templates/core/403.jinja @@ -2,9 +2,9 @@ {% block content %} -

    {% trans %}403, Forbidden{% endtrans %}

    +

    {% trans %}403, Forbidden{% endtrans %}

    -{{ super() }} + {{ super() }} {% endblock %} diff --git a/core/templates/core/404.jinja b/core/templates/core/404.jinja index a777cea6..9560fb27 100644 --- a/core/templates/core/404.jinja +++ b/core/templates/core/404.jinja @@ -2,9 +2,9 @@ {% block content %} -
    -

    {% trans %}404, Not Found{% endtrans %}

    -
    +
    +

    {% trans %}404, Not Found{% endtrans %}

    +
    {% endblock %} diff --git a/core/templates/core/500.jinja b/core/templates/core/500.jinja index 67962e0d..4b6ad883 100644 --- a/core/templates/core/500.jinja +++ b/core/templates/core/500.jinja @@ -1,27 +1,27 @@ {% extends "core/base.jinja" %} {% block head %} -{{ super() }} - + {{ super() }} + {% endblock head %} {% block content %} -

    {% trans %}500, Server Error{% endtrans %}

    - {% if settings.SENTRY_DSN %} - -{% endif %} +

    {% trans %}500, Server Error{% endtrans %}

    + {% if settings.SENTRY_DSN %} + + {% endif %} {% endblock content %} diff --git a/core/templates/core/base.jinja b/core/templates/core/base.jinja index 0a243994..30d157ba 100644 --- a/core/templates/core/base.jinja +++ b/core/templates/core/base.jinja @@ -1,319 +1,321 @@ - - {% block head %} - {% block title %}{% trans %}Welcome!{% endtrans %}{% endblock %} - Association des Étudiants UTBM - - - - - - - - + + {% block head %} + {% block title %}{% trans %}Welcome!{% endtrans %}{% endblock %} - Association des Étudiants UTBM + + + + + + + + - {% block jquery_css %} + {% block jquery_css %} {# Thile file is quite heavy (around 250kb), so declaring it in a block allows easy removal #} - - {% endblock %} - - - + + {% endblock %} + + + - + - + - {% block additional_css %}{% endblock %} - {% block additional_js %}{% endblock %} - {% endblock %} - + {% block additional_css %}{% endblock %} + {% block additional_js %}{% endblock %} + {% endblock %} + - + - {% csrf_token %} + {% csrf_token %} - {% block header %} - {% if not popup %} -
    - - {% if not user.is_authenticated %} - - {% else %} -
    -
    - - +
    +
    +
    +
    +
    +
    + {% endif %} +
    + {% for language in LANGUAGES %} +
    + {% csrf_token %} + + + +
    + {% endfor %} +
    + - {% block info_boxes %} -
    - {% set sith = get_sith() %} - {% if sith.alert_msg %} -
    - {{ sith.alert_msg|markdown }} -
    - {% endif %} - {% if sith.info_msg %} -
    - {{ sith.info_msg|markdown }} -
    - {% endif %} -
    - {% endblock %} - - {% else %} -
    {{ user.get_display_name() }}
    + {% block info_boxes %} +
    + {% set sith = get_sith() %} + {% if sith.alert_msg %} +
    + {{ sith.alert_msg|markdown }} +
    {% endif %} - + {% if sith.info_msg %} +
    + {{ sith.info_msg|markdown }} +
    + {% endif %} +
    {% endblock %} + + {% else %} +
    {{ user.get_display_name() }}
    + {% endif %} + + {% endblock %} - {% block nav %} - {% if not popup %} - - {% endif %} - {% endblock %} - -
    - -
      - {% for n in quick_notifs %} -
    • {{ n }}
    • - {% endfor %} -
    - -
    - {% if list_of_tabs %} -
    -
    - {% for t in list_of_tabs -%} - {{ t.name }} - {%- endfor %} -
    + {% block nav %} + {% if not popup %} +
    + + {% endif %} + {% endblock %} - {% if not popup %} - +
    + +
      + {% for n in quick_notifs %} +
    • {{ n }}
    • + {% endfor %} +
    + +
    + {% if list_of_tabs %} +
    +
    + {% for t in list_of_tabs -%} + {{ t.name }} + {%- endfor %} +
    +
    {% endif %} - {% block script %} - - - - + + {% if error %} + {{ error }} + {% endif %} + {% block content %} {% endblock %} - +
    +
    + + {% if not popup %} + + {% endif %} + + {% block script %} + + + + + {% endblock %} + diff --git a/core/templates/core/create.jinja b/core/templates/core/create.jinja index 04d8f866..332bb94b 100644 --- a/core/templates/core/create.jinja +++ b/core/templates/core/create.jinja @@ -1,16 +1,16 @@ {% extends "core/base.jinja" %} {% block title %} -{% trans name=form.instance.__class__._meta.verbose_name %}Create {{ name }}{% endtrans %} + {% trans name=form.instance.__class__._meta.verbose_name %}Create {{ name }}{% endtrans %} {% endblock %} {% block content %} -

    {% trans name=form.instance.__class__._meta.verbose_name %}Create {{ name }}{% endtrans %}

    -
    +

    {% trans name=form.instance.__class__._meta.verbose_name %}Create {{ name }}{% endtrans %}

    + {% csrf_token %} {{ form.as_p() }}

    -
    + {% endblock %} diff --git a/core/templates/core/delete_confirm.jinja b/core/templates/core/delete_confirm.jinja index a439c9e0..3a393b67 100644 --- a/core/templates/core/delete_confirm.jinja +++ b/core/templates/core/delete_confirm.jinja @@ -1,7 +1,7 @@ {% extends "core/base.jinja" %} {% block title %} -{% trans %}Delete confirmation{% endtrans %} + {% trans %}Delete confirmation{% endtrans %} {% endblock %} {% block info_boxes %} @@ -11,14 +11,14 @@ {% endblock %} {% block content %} -

    {% trans %}Delete confirmation{% endtrans %}

    -
    {% csrf_token %} +

    {% trans %}Delete confirmation{% endtrans %}

    + {% csrf_token %}

    {% trans obj=object %}Are you sure you want to delete "{{ obj }}"?{% endtrans %}

    -
    -
    +
    +
    -
    + {% endblock %} diff --git a/core/templates/core/edit.jinja b/core/templates/core/edit.jinja index a6fe7a40..25c6bd74 100644 --- a/core/templates/core/edit.jinja +++ b/core/templates/core/edit.jinja @@ -1,24 +1,24 @@ {% extends "core/base.jinja" %} {% block title %} -{% if object %} -{% trans obj=object %}Edit {{ obj }}{% endtrans %} -{% else %} -{% trans %}Save{% endtrans %} -{% endif %} + {% if object %} + {% trans obj=object %}Edit {{ obj }}{% endtrans %} + {% else %} + {% trans %}Save{% endtrans %} + {% endif %} {% endblock %} {% block content %} -{% if object %} -

    {% trans obj=object %}Edit {{ obj }}{% endtrans %}

    -{% else %} -

    {% trans %}Save{% endtrans %}

    -{% endif %} -
    + {% if object %} +

    {% trans obj=object %}Edit {{ obj }}{% endtrans %}

    + {% else %} +

    {% trans %}Save{% endtrans %}

    + {% endif %} + {% csrf_token %} {{ form.as_p() }}

    -
    + {% endblock %} diff --git a/core/templates/core/file.jinja b/core/templates/core/file.jinja index f6e2d856..f8f42990 100644 --- a/core/templates/core/file.jinja +++ b/core/templates/core/file.jinja @@ -1,62 +1,62 @@ {% extends "core/base.jinja" %} {% block title %} -{% if file %} -{{ file.get_display_name() }} -{% elif file_list %} -{% trans %}File list{% endtrans %} -{% elif new_file %} -{% trans %}New file{% endtrans %} -{% else %} -{% trans %}Not found{% endtrans %} -{% endif %} + {% if file %} + {{ file.get_display_name() }} + {% elif file_list %} + {% trans %}File list{% endtrans %} + {% elif new_file %} + {% trans %}New file{% endtrans %} + {% else %} + {% trans %}Not found{% endtrans %} + {% endif %} {% endblock %} {% macro print_file_name(file) %} -{% if file %} -{{ print_file_name(file.parent) }} > -{{ file.get_display_name() }} -{% else %} -{% trans %}Files{% endtrans %} -{% endif %} + {% if file %} + {{ print_file_name(file.parent) }} > + {{ file.get_display_name() }} + {% else %} + {% trans %}Files{% endtrans %} + {% endif %} {% endmacro %} {% block content %} -{{ print_file_name(file) }} + {{ print_file_name(file) }} -
    +
    -
    - {% set home = user.home %} - {% if home %} - {% trans %}My files{% endtrans %} - {% endif %} -
    - {% if file %} +
    + {% set home = user.home %} + {% if home %} + {% trans %}My files{% endtrans %} + {% endif %} +
    + {% if file %} {% trans %}View{% endtrans %} {% if can_edit(file, user) %} - {% trans %}Edit{% endtrans %} + {% trans %}Edit{% endtrans %} {% endif %} {% if can_edit_prop(file, user) %} - {% trans %}Prop{% endtrans %} - {% endif %} + {% trans %}Prop{% endtrans %} {% endif %} + {% endif %}
    -
    -
    +
    +
    -{% if file %} -{% block file %} -{% endblock %} -{% endif %} + {% if file %} + {% block file %} + {% endblock %} + {% endif %} -{% block script %} -{{ super() }} -{% if popup %} - -{% endif %} -{% endblock %} + {% block script %} + {{ super() }} + {% if popup %} + + {% endif %} + {% endblock %} {% endblock %} diff --git a/core/templates/core/file_delete_confirm.jinja b/core/templates/core/file_delete_confirm.jinja index 3efd2bd7..521413e2 100644 --- a/core/templates/core/file_delete_confirm.jinja +++ b/core/templates/core/file_delete_confirm.jinja @@ -1,18 +1,18 @@ {% extends "core/file.jinja" %} {% block title %} -{% trans %}Delete confirmation{% endtrans %} + {% trans %}Delete confirmation{% endtrans %} {% endblock %} {% block file %} -

    {% trans %}Delete confirmation{% endtrans %}

    -
    {% csrf_token %} +

    {% trans %}Delete confirmation{% endtrans %}

    + {% csrf_token %}

    {% trans obj=object %}Are you sure you want to delete "{{ obj }}"?{% endtrans %}

    -
    -
    +
    +
    -
    + {% endblock %} diff --git a/core/templates/core/file_detail.jinja b/core/templates/core/file_detail.jinja index 4d0a2887..b8b5c18b 100644 --- a/core/templates/core/file_detail.jinja +++ b/core/templates/core/file_detail.jinja @@ -2,78 +2,78 @@ {% block file %} -

    -{% if file.is_folder %} - -{% else %} - -{% endif %} -{{ file.get_display_name() }} -

    -

    {% trans %}Owner: {% endtrans %}{{ file.owner.get_display_name() }}

    -{% if file.is_folder %} -{% if user.can_edit(file) %} -
    - {% csrf_token %} - {{ form.as_p() }} -

    -
    -{% endif %} -
    - {% csrf_token %} -

    +

    + {% if file.is_folder %} + + {% else %} + + {% endif %} + {{ file.get_display_name() }} +

    +

    {% trans %}Owner: {% endtrans %}{{ file.owner.get_display_name() }}

    + {% if file.is_folder %} + {% if user.can_edit(file) %} + + {% csrf_token %} + {{ form.as_p() }} +

    +
    + {% endif %} +
    + {% csrf_token %} +

    | | | -

    - {% if clipboard %} -

    {% trans %}Clipboard: {% endtrans %} -

      - {% for f in clipboard %} -
    • {{ f.get_full_path() }}
    • - {% endfor %} -
    -

    - {% endif %} -
      +

      + {% if clipboard %} +

      {% trans %}Clipboard: {% endtrans %} +

        + {% for f in clipboard %} +
      • {{ f.get_full_path() }}
      • + {% endfor %} +
      +

      + {% endif %} +
        {% for f in file.children.order_by('-is_folder', 'name').all() %} -
      • +
      • {% if f.is_folder %} - + {% else %} - + {% endif %} {{ f.get_display_name() }}
      • {% endfor %} -
      - -{% else %} -

      {% trans %}Real name: {% endtrans %}{{ file.file.name.split('/')[-1] }}

      -

      {% trans %}Date: {% endtrans %}{{ file.date|localtime|date(DATETIME_FORMAT) }} - -{{ file.date|localtime|time(DATETIME_FORMAT) }}

      -

      {% trans %}Type: {% endtrans %}{{ file.mime_type }}

      -

      {% trans %}Size: {% endtrans %}{{ file.size }} {% trans %}bytes{% endtrans %}

      +
    + + {% else %} +

    {% trans %}Real name: {% endtrans %}{{ file.file.name.split('/')[-1] }}

    +

    {% trans %}Date: {% endtrans %}{{ file.date|localtime|date(DATETIME_FORMAT) }} - + {{ file.date|localtime|time(DATETIME_FORMAT) }}

    +

    {% trans %}Type: {% endtrans %}{{ file.mime_type }}

    +

    {% trans %}Size: {% endtrans %}{{ file.size }} {% trans %}bytes{% endtrans %}

    -

    {% trans %}Download{% endtrans %}

    -{% endif %} -{% if not file.home_of and not file.home_of_club and file.parent %} -

    {% trans %}Delete{% endtrans %}

    -{% endif %} -{% if user.is_com_admin %} -

    {% trans %}Moderate{% endtrans %}

    -{% endif %} +

    {% trans %}Download{% endtrans %}

    + {% endif %} + {% if not file.home_of and not file.home_of_club and file.parent %} +

    {% trans %}Delete{% endtrans %}

    + {% endif %} + {% if user.is_com_admin %} +

    {% trans %}Moderate{% endtrans %}

    + {% endif %} {% endblock %} {% block script %} -{{ super() }} - + {{ super() }} + {% endblock %} diff --git a/core/templates/core/file_edit.jinja b/core/templates/core/file_edit.jinja index 38d74695..338fa2b9 100644 --- a/core/templates/core/file_edit.jinja +++ b/core/templates/core/file_edit.jinja @@ -1,12 +1,12 @@ {% extends "core/file.jinja" %} {% block file %} -

    {% trans obj=object %}Edit {{ obj }}{% endtrans %}

    -
    +

    {% trans obj=object %}Edit {{ obj }}{% endtrans %}

    + {% csrf_token %} {{ form.as_p() }}

    -
    + {% endblock %} diff --git a/core/templates/core/file_list.jinja b/core/templates/core/file_list.jinja index b8b28261..077a2bf9 100644 --- a/core/templates/core/file_list.jinja +++ b/core/templates/core/file_list.jinja @@ -1,23 +1,23 @@ {% extends "core/file.jinja" %} {% block content %} -{{ super() }} -{% if file_list %} -

    {% trans %}File list{% endtrans %}

    -
      - {% for f in file_list %} -
    • - {% if f.is_folder %} - - {% else %} - - {% endif %} - {{ f.name }}
    • - {% endfor %} -
    -{% else %} -

    {% trans %}There is no file in this website.{% endtrans %}

    -{% endif %} + {{ super() }} + {% if file_list %} +

    {% trans %}File list{% endtrans %}

    +
      + {% for f in file_list %} +
    • + {% if f.is_folder %} + + {% else %} + + {% endif %} + {{ f.name }}
    • + {% endfor %} +
    + {% else %} +

    {% trans %}There is no file in this website.{% endtrans %}

    + {% endif %} {% endblock %} diff --git a/core/templates/core/file_moderation.jinja b/core/templates/core/file_moderation.jinja index ba46d806..f8fd255e 100644 --- a/core/templates/core/file_moderation.jinja +++ b/core/templates/core/file_moderation.jinja @@ -1,28 +1,28 @@ {% extends "core/base.jinja" %} {% block title %} -{% trans %}File moderation{% endtrans %} + {% trans %}File moderation{% endtrans %} {% endblock %} {% block content %} -

    {% trans %}File moderation{% endtrans %}

    -
    +

    {% trans %}File moderation{% endtrans %}

    +
    {% for f in files %} -
    +
    {% if f.is_folder %} - Folder + Folder {% else %} - File + File {% endif %}

    - {{ f.name }}
    - {% trans %}Full name: {% endtrans %}{{ f.get_parent_path()+'/'+f.name }}
    - {% trans %}Owner: {% endtrans %}{{ f.owner.get_display_name() }}
    - {% trans %}Date: {% endtrans %}{{ f.date|date(DATE_FORMAT) }} {{ f.date|time(TIME_FORMAT) }}
    + {{ f.name }}
    + {% trans %}Full name: {% endtrans %}{{ f.get_parent_path()+'/'+f.name }}
    + {% trans %}Owner: {% endtrans %}{{ f.owner.get_display_name() }}
    + {% trans %}Date: {% endtrans %}{{ f.date|date(DATE_FORMAT) }} {{ f.date|time(TIME_FORMAT) }}

    {% trans %}Moderate{% endtrans %} - - {% trans %}Delete{% endtrans %}

    -
    + {% trans %}Delete{% endtrans %}

    +
    {% endfor %} -
    +
    {% endblock %} diff --git a/core/templates/core/group_detail.jinja b/core/templates/core/group_detail.jinja index 3e9dfe45..0c9ebb53 100644 --- a/core/templates/core/group_detail.jinja +++ b/core/templates/core/group_detail.jinja @@ -2,38 +2,38 @@ {% from "core/macros.jinja" import select_all_checkbox %} {% block title %} - {% trans %}Group detail{% endtrans %} + {% trans %}Group detail{% endtrans %} {% endblock title %} {% block content %} -

    {{ object }}

    -

    {% trans %}Back to list{% endtrans %}

    - {% if form.users_removed | length <= 0 %} -

    {% trans %}No user in this group{% endtrans %}

    - {% else %} -
    - {{ select_all_checkbox("add_users") }} -
    - {% csrf_token %} - - {{ form.users_removed.errors }} - {% for user in form.users_removed %} - - {% endfor %} - -
    - {% endif %} +

    {{ object }}

    +

    {% trans %}Back to list{% endtrans %}

    + {% if form.users_removed | length <= 0 %} +

    {% trans %}No user in this group{% endtrans %}

    + {% else %}
    - {% csrf_token %} -

    - {{ form.users_added.errors }} - - {{ form.users_added }} - {{ form.users_added.help_text }} -

    - + {{ select_all_checkbox("add_users") }} +
    + {% csrf_token %} + + {{ form.users_removed.errors }} + {% for user in form.users_removed %} + + {% endfor %} +
    + {% endif %} +
    + {% csrf_token %} +

    + {{ form.users_added.errors }} + + {{ form.users_added }} + {{ form.users_added.help_text }} +

    + +
    {% endblock content %} \ No newline at end of file diff --git a/core/templates/core/group_edit.jinja b/core/templates/core/group_edit.jinja index 44ad2d1c..081cf303 100644 --- a/core/templates/core/group_edit.jinja +++ b/core/templates/core/group_edit.jinja @@ -1,13 +1,13 @@ {% extends "core/base.jinja" %} {% block content %} -

    {% trans %}Back to list{% endtrans %}

    -

    {% trans %}Edit group{% endtrans %}

    -
    +

    {% trans %}Back to list{% endtrans %}

    +

    {% trans %}Edit group{% endtrans %}

    + {% csrf_token %} {{ form.as_p() }}

    -
    + {% endblock %} diff --git a/core/templates/core/group_list.jinja b/core/templates/core/group_list.jinja index e655335d..1cf9cab9 100644 --- a/core/templates/core/group_list.jinja +++ b/core/templates/core/group_list.jinja @@ -1,31 +1,31 @@ {% extends "core/base.jinja" %} {% block title %} -{% trans %}Group list{% endtrans %} + {% trans %}Group list{% endtrans %} {% endblock %} {% block content %} -

    {% trans %}Group list{% endtrans %}

    -

    {% trans %}New group{% endtrans %}

    - - - - - - - - - - {% for group in object_list %} - - - - - - - - {% endfor %} - -
    {% trans %}ID{% endtrans %}{% trans %}Group{% endtrans %}{% trans %}Description{% endtrans %}
    {{ group.id }}{{ group }}{{ group.description }}{% trans %}Edit{% endtrans %}{% trans %}Delete{% endtrans %}
    +

    {% trans %}Group list{% endtrans %}

    +

    {% trans %}New group{% endtrans %}

    + + + + + + + + + + {% for group in object_list %} + + + + + + + + {% endfor %} + +
    {% trans %}ID{% endtrans %}{% trans %}Group{% endtrans %}{% trans %}Description{% endtrans %}
    {{ group.id }}{{ group }}{{ group.description }}{% trans %}Edit{% endtrans %}{% trans %}Delete{% endtrans %}
    {% endblock %} diff --git a/core/templates/core/login.jinja b/core/templates/core/login.jinja index 4e56613d..5e94a304 100644 --- a/core/templates/core/login.jinja +++ b/core/templates/core/login.jinja @@ -1,11 +1,11 @@ {% extends "core/base.jinja" %} {%- block additional_css -%} - + {%- endblock -%} {% block title %} - {% trans %}Login{% endtrans %} + {% trans %}Login{% endtrans %} {% endblock %} {% block info_boxes %} @@ -15,48 +15,48 @@ {% endblock %} {% block content %} -

    {% trans %}Login{% endtrans %}

    +

    {% trans %}Login{% endtrans %}

    - {% if next %} - {% if user.is_authenticated %} -

    {% trans %}Your account doesn't have access to this page. To proceed, + {% if next %} + {% if user.is_authenticated %} +

    {% trans %}Your account doesn't have access to this page. To proceed, please login with an account that has access.{% endtrans %}

    - {% else %} -

    {% trans %}Please login or create an account to see this page.{% endtrans %}

    - {% endif %} + {% else %} +

    {% trans %}Please login or create an account to see this page.{% endtrans %}

    + {% endif %} + {% endif %} + +
    + {% if form.errors %} +

    {% trans %}Your username and password didn't match. Please try again.{% endtrans %}

    +
    {% endif %} - - {% if form.errors %} -

    {% trans %}Your username and password didn't match. Please try again.{% endtrans %}

    -
    - {% endif %} + {% csrf_token %} + {% render_honeypot_field %} - {% csrf_token %} - {% render_honeypot_field %} +
    + + + {{ form.username.errors }} +
    -
    - - - {{ form.username.errors }} -
    +
    + + {{ form.password }} + {{ form.password.errors }} +
    -
    - - {{ form.password }} - {{ form.password.errors }} -
    - - - + + {# Assumes you setup the password_reset view in your URLconf #} -

    - {% trans %}Lost password?{% endtrans %} -    - {% trans %}Create account{% endtrans %} -

    -
    +

    + {% trans %}Lost password?{% endtrans %} +    + {% trans %}Create account{% endtrans %} +

    + {% endblock %} diff --git a/core/templates/core/macros.jinja b/core/templates/core/macros.jinja index 02a3ceae..2344de37 100644 --- a/core/templates/core/macros.jinja +++ b/core/templates/core/macros.jinja @@ -1,155 +1,155 @@ {% macro user_profile_link(user) -%} -{{ user.get_display_name() }} + {{ user.get_display_name() }} {%- endmacro %} {% macro user_profile_link_short_name(user) -%} -{{ user.get_short_name() }} + {{ user.get_short_name() }} {%- endmacro %} {% macro user_link_with_pict(user) -%} - + {{ user.get_mini_item()|safe }} - + {%- endmacro %} {% macro link_news_logo(news) -%} - {% if news.club.logo -%} - {{ news.club.logo.url }} - {% else -%} - {{ static("com/img/news.png") }} - {% endif %} + {% if news.club.logo -%} + {{ news.club.logo.url }} + {% else -%} + {{ static("com/img/news.png") }} + {% endif %} {%- endmacro %} {% macro gen_news_metatags(news) -%} - - - - - - - - + + + + + + + + {%- endmacro %} {% macro facebook_share(news) -%} - + {%- endmacro %} {% macro tweet(news) -%} - + {%- endmacro %} {% macro fb_quick(news) -%} - + {%- endmacro %} {% macro tweet_quick(news) -%} - + {%- endmacro %} {% macro user_mini_profile(user) %} -
    +
    -
    -
    {{ user.get_full_name() }}
    - {% if user.nick_name %} -
    « {{ user.nick_name }} »
    - {% endif %} - {% if user.pronouns %} -
    {{ user.pronouns }}
    - {% endif %} - {% if user.date_of_birth %} -
    - {{ user.date_of_birth|date("d/m/Y") }} ({{ user.get_age() }}) -
    - {% endif %} -
    - {% if user.promo %} -
    - Promo {{ user.promo }} -
    +
    +
    {{ user.get_full_name() }}
    + {% if user.nick_name %} +
    « {{ user.nick_name }} »
    {% endif %} + {% if user.pronouns %} +
    {{ user.pronouns }}
    + {% endif %} + {% if user.date_of_birth %} +
    + {{ user.date_of_birth|date("d/m/Y") }} ({{ user.get_age() }}) +
    + {% endif %} +
    + {% if user.promo %} +
    + Promo {{ user.promo }} +
    + {% endif %}
    - {% if user.profile_pict %} + {% if user.profile_pict %} {% trans %}Profile{% endtrans %} - {% else %} + {% else %} {% trans %}Profile{% endtrans %} - {% endif %} + title="{% trans %}Profile{% endtrans %}" /> + {% endif %}
    -
    +
    {%- endmacro %} {% macro user_subscription(user) %} - {% trans subscription_end=user.subscriptions.order_by('subscription_end').last().subscription_end %}Subscribed until {{ subscription_end }}{% endtrans %}
    - {% trans %}Account number: {% endtrans %}{{ user.customer.account_id }}
    + {% trans subscription_end=user.subscriptions.order_by('subscription_end').last().subscription_end %}Subscribed until {{ subscription_end }}{% endtrans %}
    + {% trans %}Account number: {% endtrans %}{{ user.customer.account_id }}
    {%- endmacro %} {% macro show_slots(user) %} - {% if user.slots.filter(start_date__gte=timezone.now()).exists() %} -
    {% trans %}Slot{% endtrans %}
    -
      - {% for i in user.slots.filter(start_date__gte=timezone.now().replace(tzinfo=None)).all() %} -
    • {{ i.get_type_display() }} - {{i.machine.launderette }}, {{ i.start_date|date("l j") }} : - {{ i.start_date|time(DATETIME_FORMAT) }} | - {% trans %}Delete{% endtrans %}
    • - {% endfor %} -
    - {% endif %} + {% if user.slots.filter(start_date__gte=timezone.now()).exists() %} +
    {% trans %}Slot{% endtrans %}
    +
      + {% for i in user.slots.filter(start_date__gte=timezone.now().replace(tzinfo=None)).all() %} +
    • {{ i.get_type_display() }} - {{i.machine.launderette }}, {{ i.start_date|date("l j") }} : + {{ i.start_date|time(DATETIME_FORMAT) }} | + {% trans %}Delete{% endtrans %}
    • + {% endfor %} +
    + {% endif %} {% endmacro %} {% macro show_tokens(user) %} - {% if user.tokens.exists() %} -
    {% trans %}Tokens{% endtrans %}
    -
      - {% for i in user.tokens.all() %} -
    • {{ i }}
    • - {% endfor %} -
    - {% endif %} + {% if user.tokens.exists() %} +
    {% trans %}Tokens{% endtrans %}
    +
      + {% for i in user.tokens.all() %} +
    • {{ i }}
    • + {% endfor %} +
    + {% endif %} {% endmacro %} {% macro delete_godfather(user, profile, godfather, is_father) %} - {% if user == profile or user.is_root or user.is_board_member %} + {% if user == profile or user.is_root or user.is_board_member %} {% trans %}Delete{% endtrans %} - {% endif %} + {% endif %} {% endmacro %} {% macro paginate(page_obj, paginator, js_action) %} - {% set js = js_action|default('') %} - {% if page_obj.has_previous() or page_obj.has_next() %} - {% if page_obj.has_previous() %} - {% trans %}Previous{% endtrans %} - {% else %} - {% trans %}Previous{% endtrans %} - {% endif %} - {% for i in paginator.page_range %} - {% if page_obj.number == i %} - {{ i }} ({% trans %}current{% endtrans %}) - {% else %} - {{ i }} - {% endif %} - {% endfor %} - {% if page_obj.has_next() %} - {% trans %}Next{% endtrans %} - {% else %} - {% trans %}Next{% endtrans %} - {% endif %} + {% set js = js_action|default('') %} + {% if page_obj.has_previous() or page_obj.has_next() %} + {% if page_obj.has_previous() %} + {% trans %}Previous{% endtrans %} + {% else %} + {% trans %}Previous{% endtrans %} {% endif %} + {% for i in paginator.page_range %} + {% if page_obj.number == i %} + {{ i }} ({% trans %}current{% endtrans %}) + {% else %} + {{ i }} + {% endif %} + {% endfor %} + {% if page_obj.has_next() %} + {% trans %}Next{% endtrans %} + {% else %} + {% trans %}Next{% endtrans %} + {% endif %} + {% endif %} {% endmacro %} {% macro select_all_checkbox(form_id) %} - - - + } + } + + + {% endmacro %} diff --git a/core/templates/core/macros_pages.jinja b/core/templates/core/macros_pages.jinja index 4f486a2f..c18bfe31 100644 --- a/core/templates/core/macros_pages.jinja +++ b/core/templates/core/macros_pages.jinja @@ -1,27 +1,27 @@ {% from "core/macros.jinja" import user_profile_link %} {% macro page_history(page) %} -

    {% trans page_name=page.name %}You're seeing the history of page "{{ page_name }}"{% endtrans %}

    -
      +

      {% trans page_name=page.name %}You're seeing the history of page "{{ page_name }}"{% endtrans %}

      +
        {% for r in (page.revisions.all()|sort(attribute='date', reverse=True)) %} - {% if loop.index < 2 %} + {% if loop.index < 2 %}
      • {% trans %}last{% endtrans %} - - {{ user_profile_link(page.revisions.last().author) }} - - {{ page.revisions.last().date|localtime|date(DATETIME_FORMAT) }} {{ page.revisions.last().date|localtime|time(DATETIME_FORMAT) }}
      • - {% else %} + {{ user_profile_link(page.revisions.last().author) }} - + {{ page.revisions.last().date|localtime|date(DATETIME_FORMAT) }} {{ page.revisions.last().date|localtime|time(DATETIME_FORMAT) }} + {% else %}
      • {{ r.revision }} - - {{ user_profile_link(r.author) }} - - {{ r.date|localtime|date(DATETIME_FORMAT) }} {{ r.date|localtime|time(DATETIME_FORMAT) }}
      • - {% endif %} + {{ user_profile_link(r.author) }} - + {{ r.date|localtime|date(DATETIME_FORMAT) }} {{ r.date|localtime|time(DATETIME_FORMAT) }} + {% endif %} {% endfor %} -
      +
    {% endmacro %} {% macro page_edit_form(page, form, url, token) %} -

    {% trans %}Edit page{% endtrans %}

    -
    +

    {% trans %}Edit page{% endtrans %}

    + {{ form.as_p() }}

    -
    + {% endmacro %} diff --git a/core/templates/core/new_user_email.jinja b/core/templates/core/new_user_email.jinja index e23c6b16..6dff5b3c 100644 --- a/core/templates/core/new_user_email.jinja +++ b/core/templates/core/new_user_email.jinja @@ -1,17 +1,17 @@ {% autoescape off %} -{% trans %}You're receiving this email because you subscribed to the UTBM student association.{% endtrans %} + {% trans %}You're receiving this email because you subscribed to the UTBM student association.{% endtrans %} -{% trans %}Please go to the following page and choose a new password:{% endtrans %} -{% block reset_link %} -{{ protocol }}://{{ domain }}{{ url('core:password_reset_confirm', uidb64=uid, token=token) }} -{% endblock %} -{% trans %}Your username, in case it was not given to you: {% endtrans %} {{ user.get_username() }} -{% trans %}You also got a new account that will be useful to purchase products in the living areas and on the Eboutic.{% endtrans %} -{% trans account=user.customer.account_id %}Here is your account number: {{ account }}{% endtrans %} + {% trans %}Please go to the following page and choose a new password:{% endtrans %} + {% block reset_link %} + {{ protocol }}://{{ domain }}{{ url('core:password_reset_confirm', uidb64=uid, token=token) }} + {% endblock %} + {% trans %}Your username, in case it was not given to you: {% endtrans %} {{ user.get_username() }} + {% trans %}You also got a new account that will be useful to purchase products in the living areas and on the Eboutic.{% endtrans %} + {% trans account=user.customer.account_id %}Here is your account number: {{ account }}{% endtrans %} -{% trans %}Thanks for subscribing! {% endtrans %} + {% trans %}Thanks for subscribing! {% endtrans %} -{% trans %}The AE team{% endtrans %} + {% trans %}The AE team{% endtrans %} {% endautoescape %} diff --git a/core/templates/core/new_user_email_subject.jinja b/core/templates/core/new_user_email_subject.jinja index 103149c4..f992d0a7 100644 --- a/core/templates/core/new_user_email_subject.jinja +++ b/core/templates/core/new_user_email_subject.jinja @@ -1,3 +1,3 @@ {% autoescape off %} -{% trans %}New subscription to the UTBM student association{% endtrans %} + {% trans %}New subscription to the UTBM student association{% endtrans %} {% endautoescape %} diff --git a/core/templates/core/notification_list.jinja b/core/templates/core/notification_list.jinja index 412d79f4..3b8f2a6b 100644 --- a/core/templates/core/notification_list.jinja +++ b/core/templates/core/notification_list.jinja @@ -1,24 +1,24 @@ {% extends "core/base.jinja" %} {% block title %} -{% trans %}Notification list{% endtrans %} + {% trans %}Notification list{% endtrans %} {% endblock %} {% block content %} -

    {% trans %}Notification list{% endtrans %}

    - {% endblock %} diff --git a/core/templates/core/page.jinja b/core/templates/core/page.jinja index 73a58676..620839aa 100644 --- a/core/templates/core/page.jinja +++ b/core/templates/core/page.jinja @@ -1,53 +1,53 @@ {% extends "core/base.jinja" %} {% block title %} -{% if page %} -{{ page.get_display_name() }} -{% elif page_list %} -{% trans %}Page list{% endtrans %} -{% elif new_page %} -{% trans %}Create page{% endtrans %} -{% else %} -{% trans %}Not found{% endtrans %} -{% endif %} + {% if page %} + {{ page.get_display_name() }} + {% elif page_list %} + {% trans %}Page list{% endtrans %} + {% elif new_page %} + {% trans %}Create page{% endtrans %} + {% else %} + {% trans %}Not found{% endtrans %} + {% endif %} {% endblock %} {% macro print_page_name(page) %} -{% if page %} -{{ print_page_name(page.parent) }} > -{{ page.get_display_name() }} -{% endif %} + {% if page %} + {{ print_page_name(page.parent) }} > + {{ page.get_display_name() }} + {% endif %} {% endmacro %} {% block content %} -{{ print_page_name(page) }} + {{ print_page_name(page) }} -
    +
    - {% if page %} + {% if page %} {% if page.club %} - {% trans %}Return to club management{% endtrans %} + {% trans %}Return to club management{% endtrans %} {% else %} - {% trans %}View{% endtrans %} + {% trans %}View{% endtrans %} {% endif %} {% trans %}History{% endtrans %} {% if can_edit(page, user) %} - {% trans %}Edit{% endtrans %} + {% trans %}Edit{% endtrans %} {% endif %} {% if can_edit_prop(page, user) and not page.is_club_page %} - {% trans %}Prop{% endtrans %} - {% endif %} + {% trans %}Prop{% endtrans %} {% endif %} + {% endif %}
    -
    -
    +
    +
    -{% if page %} -{% block page %} -{% endblock %} -{% else %} -

    {% trans %}Page does not exist{% endtrans %}

    -

    - {% trans %}Create it?{% endtrans %}

    -{% endif %} + {% if page %} + {% block page %} + {% endblock %} + {% else %} +

    {% trans %}Page does not exist{% endtrans %}

    +

    + {% trans %}Create it?{% endtrans %}

    + {% endif %} {% endblock %} diff --git a/core/templates/core/page_detail.jinja b/core/templates/core/page_detail.jinja index afa5d3ca..054ee612 100644 --- a/core/templates/core/page_detail.jinja +++ b/core/templates/core/page_detail.jinja @@ -1,16 +1,16 @@ {% extends "core/page.jinja" %} {% block page %} -{% if rev %} -

    {% trans rev_id=rev.revision %}This may not be the last update, you are seeing revision {{ rev_id }}!{% endtrans %}

    -

    {{ rev.title }}

    -
    {{ rev.content|markdown }}
    -{% else %} -{% if page.revisions.last() %} -

    {{ page.revisions.last().title }}

    -
    {{ page.revisions.last().content|markdown }}
    -{% endif %} -{% endif %} + {% if rev %} +

    {% trans rev_id=rev.revision %}This may not be the last update, you are seeing revision {{ rev_id }}!{% endtrans %}

    +

    {{ rev.title }}

    +
    {{ rev.content|markdown }}
    + {% else %} + {% if page.revisions.last() %} +

    {{ page.revisions.last().title }}

    +
    {{ page.revisions.last().content|markdown }}
    + {% endif %} + {% endif %} {% endblock %} diff --git a/core/templates/core/page_hist.jinja b/core/templates/core/page_hist.jinja index 6f363f7b..4aac13b1 100644 --- a/core/templates/core/page_hist.jinja +++ b/core/templates/core/page_hist.jinja @@ -3,8 +3,8 @@ {% from "core/macros_pages.jinja" import page_history %} {% block page %} -

    {% trans %}Page history{% endtrans %}

    -{{ page_history(page) }} +

    {% trans %}Page history{% endtrans %}

    + {{ page_history(page) }} {% endblock %} diff --git a/core/templates/core/page_list.jinja b/core/templates/core/page_list.jinja index 39e9b69f..dfb8ea48 100644 --- a/core/templates/core/page_list.jinja +++ b/core/templates/core/page_list.jinja @@ -1,20 +1,20 @@ {% extends "core/base.jinja" %} {% block title %} -{% trans %}Page list{% endtrans %} + {% trans %}Page list{% endtrans %} {% endblock %} {% block content %} -{% if page_list %} -

    {% trans %}Page list{% endtrans %}

    - -{% else %} -{% trans %}There is no page in this website.{% endtrans %} -{% endif %} + {% if page_list %} +

    {% trans %}Page list{% endtrans %}

    + + {% else %} + {% trans %}There is no page in this website.{% endtrans %} + {% endif %} {% endblock %} diff --git a/core/templates/core/page_prop.jinja b/core/templates/core/page_prop.jinja index 9207f52c..978ec385 100644 --- a/core/templates/core/page_prop.jinja +++ b/core/templates/core/page_prop.jinja @@ -1,18 +1,18 @@ {% extends "core/page.jinja" %} {% block content %} -{% if page %} -{{ super() }} -{% endif %} -

    {% trans %}Page properties{% endtrans %}

    -
    + {% if page %} + {{ super() }} + {% endif %} +

    {% trans %}Page properties{% endtrans %}

    + {% csrf_token %} {{ form.as_p() }}

    -
    -{% if page %} -{% trans %}Delete{% endtrans %} -{% endif %} + + {% if page %} + {% trans %}Delete{% endtrans %} + {% endif %} {% endblock %} diff --git a/core/templates/core/pagerev_edit.jinja b/core/templates/core/pagerev_edit.jinja index 9e188d4f..2d1bb6a0 100644 --- a/core/templates/core/pagerev_edit.jinja +++ b/core/templates/core/pagerev_edit.jinja @@ -2,7 +2,7 @@ {% from 'core/macros_pages.jinja' import page_edit_form %} {% block page %} -{{ page_edit_form(page, form, url('core:page_edit', page_name=page.get_full_name()), csrf_token) }} + {{ page_edit_form(page, form, url('core:page_edit', page_name=page.get_full_name()), csrf_token) }} {% endblock %} diff --git a/core/templates/core/password_change.jinja b/core/templates/core/password_change.jinja index a81baf55..7cd27b1e 100644 --- a/core/templates/core/password_change.jinja +++ b/core/templates/core/password_change.jinja @@ -2,12 +2,12 @@ {% block content %} -{% if target %} + {% if target %}

    {% trans user=target.get_display_name() %}Change password for {{ user }}{% endtrans %}

    -{% endif %} -
    -{% csrf_token %} -{{ form.as_p() }} - -
    + {% endif %} +
    + {% csrf_token %} + {{ form.as_p() }} + +
    {% endblock %} diff --git a/core/templates/core/password_change_done.jinja b/core/templates/core/password_change_done.jinja index fbb570da..86ce1407 100644 --- a/core/templates/core/password_change_done.jinja +++ b/core/templates/core/password_change_done.jinja @@ -1,6 +1,6 @@ {% extends "core/base.jinja" %} {% block content %} -

    {% trans %}You successfully changed your password!{% endtrans %}

    +

    {% trans %}You successfully changed your password!{% endtrans %}

    {% endblock %} diff --git a/core/templates/core/password_reset.jinja b/core/templates/core/password_reset.jinja index b0a63fc3..3f141d71 100644 --- a/core/templates/core/password_reset.jinja +++ b/core/templates/core/password_reset.jinja @@ -1,10 +1,10 @@ {% extends "core/base.jinja" %} {% block content %} -
    -{% csrf_token %} -{% render_honeypot_field %} -{{ form.as_p() }} - -
    +
    + {% csrf_token %} + {% render_honeypot_field %} + {{ form.as_p() }} + +
    {% endblock %} diff --git a/core/templates/core/password_reset_complete.jinja b/core/templates/core/password_reset_complete.jinja index fdd79b48..30898d71 100644 --- a/core/templates/core/password_reset_complete.jinja +++ b/core/templates/core/password_reset_complete.jinja @@ -1,8 +1,8 @@ {% extends "core/base.jinja" %} {% block content %} -

    {% trans %}You successfully reset your password!{% endtrans %}

    -{% trans %}Login{% endtrans %} +

    {% trans %}You successfully reset your password!{% endtrans %}

    + {% trans %}Login{% endtrans %} {% endblock %} diff --git a/core/templates/core/password_reset_confirm.jinja b/core/templates/core/password_reset_confirm.jinja index e90c9f36..fe172f1f 100644 --- a/core/templates/core/password_reset_confirm.jinja +++ b/core/templates/core/password_reset_confirm.jinja @@ -1,14 +1,14 @@ {% extends "core/base.jinja" %} {% block content %} -{% if form %} -
    -{% csrf_token %} -{{ form.as_p() }} - -
    -{% else %} -{% trans %}It seems that this link has expired. To generate a new link, you can follow this link: {% endtrans %}{% trans %}lost password{% endtrans %}. -{% endif %} + {% if form %} +
    + {% csrf_token %} + {{ form.as_p() }} + +
    + {% else %} + {% trans %}It seems that this link has expired. To generate a new link, you can follow this link: {% endtrans %}{% trans %}lost password{% endtrans %}. + {% endif %} {% endblock %} diff --git a/core/templates/core/password_reset_done.jinja b/core/templates/core/password_reset_done.jinja index 2f56cac1..f2743e8a 100644 --- a/core/templates/core/password_reset_done.jinja +++ b/core/templates/core/password_reset_done.jinja @@ -1,15 +1,15 @@ {% extends "core/base.jinja" %} {% block content %} -

    {% trans %}Password reset sent{% endtrans %}

    +

    {% trans %}Password reset sent{% endtrans %}

    -

    -{% trans %}We've emailed you instructions for setting your password, if an account exists with the email you entered. You should -receive them shortly.{% endtrans %} -

    +

    + {% trans %}We've emailed you instructions for setting your password, if an account exists with the email you entered. You should + receive them shortly.{% endtrans %} +

    -

    -{% trans %}If you don't receive an email, please make sure you've entered the address you registered with, and check your spam -folder.{% endtrans %} -

    +

    + {% trans %}If you don't receive an email, please make sure you've entered the address you registered with, and check your spam + folder.{% endtrans %} +

    {% endblock %} diff --git a/core/templates/core/password_reset_email.jinja b/core/templates/core/password_reset_email.jinja index 65532865..6e0f6f63 100644 --- a/core/templates/core/password_reset_email.jinja +++ b/core/templates/core/password_reset_email.jinja @@ -1,15 +1,15 @@ {% autoescape off %} -{% trans %}You're receiving this email because you requested a password reset for your user account at {{ site_name }}.{% endtrans %} + {% trans %}You're receiving this email because you requested a password reset for your user account at {{ site_name }}.{% endtrans %} -{% trans %}Please go to the following page and choose a new password:{% endtrans %} -{% block reset_link %} -{{ protocol }}://{{ domain }}{{ url('core:password_reset_confirm', uidb64=uid, token=token) }} -{% endblock %} -{% trans %}Your username, in case you've forgotten: {% endtrans %} {{ user.get_username() }} + {% trans %}Please go to the following page and choose a new password:{% endtrans %} + {% block reset_link %} + {{ protocol }}://{{ domain }}{{ url('core:password_reset_confirm', uidb64=uid, token=token) }} + {% endblock %} + {% trans %}Your username, in case you've forgotten: {% endtrans %} {{ user.get_username() }} -{% trans %}Thanks for using our site! {% endtrans %} + {% trans %}Thanks for using our site! {% endtrans %} -{% trans %}The {{ site_name }} team{% endtrans %} + {% trans %}The {{ site_name }} team{% endtrans %} {% endautoescape %} diff --git a/core/templates/core/poster_list.jinja b/core/templates/core/poster_list.jinja index 816c8332..fe65658c 100644 --- a/core/templates/core/poster_list.jinja +++ b/core/templates/core/poster_list.jinja @@ -1,53 +1,53 @@ {% extends "core/base.jinja" %} {% block script %} -{{ super() }} - + {{ super() }} + {% endblock %} {% block title %} -{% trans %}Poster{% endtrans %} + {% trans %}Poster{% endtrans %} {% endblock %} {% block content %} -
    +
    -

    {% trans %}Posters{% endtrans %}

    - +

    {% trans %}Posters{% endtrans %}

    +
    - {% if poster_list.count() == 0 %} -
    {% trans %}No posters{% endtrans %}
    - {% else %} + {% if poster_list.count() == 0 %} +
    {% trans %}No posters{% endtrans %}
    + {% else %} - {% for poster in poster_list %} -
    -
    {{ poster.name }}
    -
    -
    -
    {{ poster.date_begin | date("d/M/Y H:m") }}
    -
    {{ poster.date_end | date("d/M/Y H:m") }}
    -
    - {% trans %}Edit{% endtrans %} -
    - {% endfor %} + {% for poster in poster_list %} +
    +
    {{ poster.name }}
    +
    +
    +
    {{ poster.date_begin | date("d/M/Y H:m") }}
    +
    {{ poster.date_end | date("d/M/Y H:m") }}
    +
    + {% trans %}Edit{% endtrans %} +
    + {% endfor %} - {% endif %} + {% endif %}
    -
    +
    {% endblock %} diff --git a/core/templates/core/register.jinja b/core/templates/core/register.jinja index c80d2f98..2ad7d4c1 100644 --- a/core/templates/core/register.jinja +++ b/core/templates/core/register.jinja @@ -1,7 +1,7 @@ {% extends "core/base.jinja" %} {%- block additional_css -%} - + {%- endblock -%} {% block title %}{% trans %}Register{% endtrans %}{% endblock %} @@ -13,13 +13,12 @@ {% endblock %} {% block content %} -

    {% trans %}Register{% endtrans %}

    +

    {% trans %}Register{% endtrans %}

    -
    - {% csrf_token %} - {% render_honeypot_field %} - {{ form }} - -
    +
    + {% csrf_token %} + {% render_honeypot_field %} + {{ form }} + +
    {% endblock %} - \ No newline at end of file diff --git a/core/templates/core/register_confirm_mail.jinja b/core/templates/core/register_confirm_mail.jinja index 9b313035..2bc321b0 100644 --- a/core/templates/core/register_confirm_mail.jinja +++ b/core/templates/core/register_confirm_mail.jinja @@ -1,17 +1,17 @@ {% autoescape off %} -{% trans %}You're receiving this email because you created an account on the AE website.{% endtrans %} + {% trans %}You're receiving this email because you created an account on the AE website.{% endtrans %} -{% trans %}Your username, in case it was not given to you: {% endtrans %} {{ username }} + {% trans %}Your username, in case it was not given to you: {% endtrans %} {{ username }} -{% trans %} -As this is the website of the students of the AE, by the students of the AE, -for the students of the AE, you won't be able to do many things without subscribing to the AE. -To make a contribution, contact a member of the association's board, either directly or by email at ae@utbm.fr. -{% endtrans %} + {% trans %} + As this is the website of the students of the AE, by the students of the AE, + for the students of the AE, you won't be able to do many things without subscribing to the AE. + To make a contribution, contact a member of the association's board, either directly or by email at ae@utbm.fr. + {% endtrans %} -{% trans %}Wishing you a good experience among us! {% endtrans %} + {% trans %}Wishing you a good experience among us! {% endtrans %} -{% trans %}The AE team{% endtrans %} + {% trans %}The AE team{% endtrans %} {% endautoescape %} diff --git a/core/templates/core/screen_slideshow.jinja b/core/templates/core/screen_slideshow.jinja index 4dd63884..9e386fcf 100644 --- a/core/templates/core/screen_slideshow.jinja +++ b/core/templates/core/screen_slideshow.jinja @@ -1,30 +1,30 @@ - + {% trans %}Slideshow{% endtrans %} - - + +
    -
    +
    {% for poster in posters %} -
    - -
    +
    + +
    {% endfor %} -
    +
    -
    +
    {% for poster in posters %} -
    +
    {% endfor %} -
    +
    -
    +
    - + diff --git a/core/templates/core/search.jinja b/core/templates/core/search.jinja index bd38874e..f413debb 100644 --- a/core/templates/core/search.jinja +++ b/core/templates/core/search.jinja @@ -3,24 +3,24 @@ {% from "core/macros.jinja" import user_link_with_pict %} {% block title %} - {% trans %}Search result{% endtrans %} + {% trans %}Search result{% endtrans %} {% endblock %} {% block content %} -

    {% trans %}Users{% endtrans %}

    -
      +

      {% trans %}Users{% endtrans %}

      +
        {% for i in result.users %} -
      • +
      • {{ user_link_with_pict(i) }} -
      • + {% endfor %} -
      -

      {% trans %}Clubs{% endtrans %}

      -
        +
      +

      {% trans %}Clubs{% endtrans %}

      +
        {% for i in result.clubs %} -
      • +
      • {{ i }} -
      • + {% endfor %} -
      +
    {% endblock %} diff --git a/core/templates/core/to_markdown.jinja b/core/templates/core/to_markdown.jinja index 85ef0a71..06318d59 100644 --- a/core/templates/core/to_markdown.jinja +++ b/core/templates/core/to_markdown.jinja @@ -1,28 +1,28 @@ {% extends "core/base.jinja" %} {% block title %} -{% trans %}To Markdown{% endtrans %} + {% trans %}To Markdown{% endtrans %} {% endblock %} {% block content %} -
    + {% csrf_token %} Doku BBCode

    -
    -
    -
    {% trans %}Markdown{% endtrans %}
    -
    {{- text_md -}}
    -
    -
    -
    {% trans %}Render{% endtrans %}
    -
    -{{ text_md|markdown }} -
    + +
    +
    {% trans %}Markdown{% endtrans %}
    +
    {{- text_md -}}
    +
    +
    +
    {% trans %}Render{% endtrans %}
    +
    + {{ text_md|markdown }} +
    {% endblock %} diff --git a/core/templates/core/user_account.jinja b/core/templates/core/user_account.jinja index 2f9cfb31..c1a8b742 100644 --- a/core/templates/core/user_account.jinja +++ b/core/templates/core/user_account.jinja @@ -1,83 +1,83 @@ {% extends "core/base.jinja" %} {% macro monthly(obj) %} -
    +
    - - - - - - - - + + + + + + + + {% for array in obj %} - {% for dict in array %} - {% if dict['sum'] != 0 %} - {% set link=url('core:user_account_detail', user_id=profile.id, year=dict['date'].year, month=dict['date'].month) %} - - - - - - {% endif %} - {% endfor %} + {% for dict in array %} + {% if dict['sum'] != 0 %} + {% set link=url('core:user_account_detail', user_id=profile.id, year=dict['date'].year, month=dict['date'].month) %} + + + + + + {% endif %} + {% endfor %} {% endfor %} - +
    {% trans %}Year{% endtrans %}{% trans %}Month{% endtrans %}{% trans %}Total{% endtrans %}
    {% trans %}Year{% endtrans %}{% trans %}Month{% endtrans %}{% trans %}Total{% endtrans %}
    {{ dict['date'].year }}{{ dict['date']|date("E") }}{{ dict['sum'] }} €
    {{ dict['date'].year }}{{ dict['date']|date("E") }}{{ dict['sum'] }} €
    -
    +
    {% endmacro %} {% block title %} -{% trans user_name=profile.get_display_name() %}{{ user_name }}'s account{% endtrans %} + {% trans user_name=profile.get_display_name() %}{{ user_name }}'s account{% endtrans %} {% endblock %} {% block content %} -{% if customer %} -

    {% trans %}User account{% endtrans %}

    -

    {% trans %}Amount: {% endtrans %}{{ customer.amount }} €

    -
    -{% set bought = customer.buyings.exists() %} -{% set refilled = customer.refillings.exists() %} -{% if bought or refilled %} - {% if bought %} -
    {% trans %}Account purchases{% endtrans %}
    - {{ monthly(buyings_month) }} - {% endif %} - {% if refilled %} -
    {% trans %}Reloads{% endtrans %}
    - {{ monthly(refilling_month) }} - {% endif %} -{% endif %} - {% if customer.user.invoices.exists() %} -
    {% trans %}Eboutic invoices{% endtrans %}
    + {% if customer %} +

    {% trans %}User account{% endtrans %}

    +

    {% trans %}Amount: {% endtrans %}{{ customer.amount }} €

    +
    + {% set bought = customer.buyings.exists() %} + {% set refilled = customer.refillings.exists() %} + {% if bought or refilled %} + {% if bought %} +
    {% trans %}Account purchases{% endtrans %}
    + {{ monthly(buyings_month) }} + {% endif %} + {% if refilled %} +
    {% trans %}Reloads{% endtrans %}
    + {{ monthly(refilling_month) }} + {% endif %} + {% endif %} + {% if customer.user.invoices.exists() %} +
    {% trans %}Eboutic invoices{% endtrans %}
    {{ monthly(invoices_month) }} - {% endif %} - {% if etickets %} -

    {% trans %}Etickets{% endtrans %}

    -
    - + {% endif %} + {% if etickets %} +

    {% trans %}Etickets{% endtrans %}

    +
    + +
    + {% endif %}
    - {% endif %} -
    -{% else %} -

    {% trans %}User has no account{% endtrans %}

    -{% endif %} + {% else %} +

    {% trans %}User has no account{% endtrans %}

    + {% endif %} {% endblock %} {% block script %} -{{ super() }} - + {% endblock %} diff --git a/core/templates/core/user_account_detail.jinja b/core/templates/core/user_account_detail.jinja index ccb35f38..8c9b3c3c 100644 --- a/core/templates/core/user_account_detail.jinja +++ b/core/templates/core/user_account_detail.jinja @@ -1,19 +1,19 @@ {% extends "core/base.jinja" %} {% block title %} -{% trans user_name=profile.get_display_name() %}{{ user_name }}'s account{% endtrans %} + {% trans user_name=profile.get_display_name() %}{{ user_name }}'s account{% endtrans %} {% endblock %} {% block content %} -{% if customer %} -

    {% trans %}User account{% endtrans %}

    -

    {% trans %}Amount: {% endtrans %}{{ customer.amount }} €

    -

    {% trans %}Back{% endtrans %}

    -{% if customer.buyings.exists() %} -

    {% trans %}Account purchases{% endtrans %}

    - - - + {% if customer %} +

    {% trans %}User account{% endtrans %}

    +

    {% trans %}Amount: {% endtrans %}{{ customer.amount }} €

    +

    {% trans %}Back{% endtrans %}

    + {% if customer.buyings.exists() %} +

    {% trans %}Account purchases{% endtrans %}

    +
    + + @@ -21,85 +21,85 @@ + + + + {% for i in customer.buyings.order_by('-date').all().filter( + date__year=year, date__month=month) %} + + + + + + + + + {% if i.is_owned_by(user) %} + + {% endif %} + + {% endfor %} + +
    {% trans %}Date{% endtrans %} {% trans %}Counter{% endtrans %} {% trans %}Barman{% endtrans %}{% trans %}Quantity{% endtrans %} {% trans %}Total{% endtrans %} {% trans %}Payment method{% endtrans %}
    {{ i.date|localtime|date(DATETIME_FORMAT) }} - {{ i.date|localtime|time(DATETIME_FORMAT) }}{{ i.counter }}{{ i.seller.get_display_name() }}{{ i.label }}{{ i.quantity }}{{ i.quantity * i.unit_price }} €{{ i.get_payment_method_display() }}{% trans %}Delete{% endtrans %}
    + {% endif %} + {% if customer.refillings.exists() %} +

    {% trans %}Reloads{% endtrans %}

    + + + + + + + + - - - {% for i in customer.buyings.order_by('-date').all().filter( + + + {% for i in customer.refillings.order_by('-date').filter( date__year=year, date__month=month) %} + + + + + + + {% if i.is_owned_by(user) %} + + {% endif %} + + {% endfor %} + +
    {% trans %}Date{% endtrans %}{% trans %}Counter{% endtrans %}{% trans %}Barman{% endtrans %}{% trans %}Amount{% endtrans %}{% trans %}Payment method{% endtrans %}
    {{ i.date|localtime|date(DATETIME_FORMAT) }} - {{ i.date|localtime|time(DATETIME_FORMAT) }}{{ i.counter }}{{ i.operator.get_display_name() }}{{ i.amount }} €{{ i.get_payment_method_display() }}{% trans %}Delete{% endtrans %}
    + {% endif %} + {% if customer.user.invoices.exists() %} +

    {% trans %}Eboutic invoices{% endtrans %}

    + + + + + + + + + + {% for i in customer.user.invoices.order_by('-date').all().filter( date__year=year, date__month=month) %} - - - - - - - - {% if i.is_owned_by(user) %} - - {% endif %} - -{% endfor %} - -
    {% trans %}Date{% endtrans %}{% trans %}Items{% endtrans %}{% trans %}Amount{% endtrans %}
    {{ i.date|localtime|date(DATETIME_FORMAT) }} - {{ i.date|localtime|time(DATETIME_FORMAT) }}{{ i.counter }}{{ i.seller.get_display_name() }}{{ i.label }}{{ i.quantity }}{{ i.quantity * i.unit_price }} €{{ i.get_payment_method_display() }}{% trans %}Delete{% endtrans %}
    -{% endif %} -{% if customer.refillings.exists() %} -

    {% trans %}Reloads{% endtrans %}

    - - - - - - - - - - - - {% for i in customer.refillings.order_by('-date').filter( date__year=year, date__month=month) %} - - - - - - - {% if i.is_owned_by(user) %} - - {% endif %} - -{% endfor %} - -
    {% trans %}Date{% endtrans %}{% trans %}Counter{% endtrans %}{% trans %}Barman{% endtrans %}{% trans %}Amount{% endtrans %}{% trans %}Payment method{% endtrans %}
    {{ i.date|localtime|date(DATETIME_FORMAT) }} - {{ i.date|localtime|time(DATETIME_FORMAT) }}{{ i.counter }}{{ i.operator.get_display_name() }}{{ i.amount }} €{{ i.get_payment_method_display() }}{% trans %}Delete{% endtrans %}
    -{% endif %} -{% if customer.user.invoices.exists() %} -

    {% trans %}Eboutic invoices{% endtrans %}

    - - - - - - - - - - {% for i in customer.user.invoices.order_by('-date').all().filter( - date__year=year, date__month=month) %} - - - + - - -{% endfor %} - -
    {% trans %}Date{% endtrans %}{% trans %}Items{% endtrans %}{% trans %}Amount{% endtrans %}
    {{ i.date|localtime|date(DATETIME_FORMAT) }} - {{ i.date|localtime|time(DATETIME_FORMAT) }} + {{ i.date|localtime|date(DATETIME_FORMAT) }} - {{ i.date|localtime|time(DATETIME_FORMAT) }}
      - {% for it in i.items.all() %} + {% for it in i.items.all() %}
    • {{ it.quantity }} x {{ it.product_name }} - {{ it.product_unit_price }} €
    • - {% endfor %} + {% endfor %}
    -
    {{ i.get_total() }} €
    + + {{ i.get_total() }} € + + {% endfor %} + + {% endif %} {% else %} -

    {% trans %}User has no account{% endtrans %}

    +

    {% trans %}User has no account{% endtrans %}

    {% endif %}

    {% trans %}Back{% endtrans %}

    {% endblock %} diff --git a/core/templates/core/user_clubs.jinja b/core/templates/core/user_clubs.jinja index f6e96b9a..324f8389 100644 --- a/core/templates/core/user_clubs.jinja +++ b/core/templates/core/user_clubs.jinja @@ -1,80 +1,80 @@ {% extends "core/base.jinja" %} {% block title %} - {% trans user_name=profile.get_display_name() %}{{ user_name }}'s club(s){% endtrans %} + {% trans user_name=profile.get_display_name() %}{{ user_name }}'s club(s){% endtrans %} {% endblock %} {% block content %} -

    {% trans%}Club(s){% endtrans %}

    -
    -

    {% trans%}Current club(s) :{% endtrans %}

    -
    - +

    {% trans%}Club(s){% endtrans %}

    +
    +

    {% trans%}Current club(s) :{% endtrans %}

    +
    +
    - - - - - - - - + + + + + + + + - {% for m in profile.memberships.filter(end_date=None).all() %} + {% for m in profile.memberships.filter(end_date=None).all() %} - - - - - {% if m.can_be_edited_by(user) %} + + + + + {% if m.can_be_edited_by(user) %} - {% endif %} - {% if user.is_root %} - - {% endif %} + {% endif %} + {% if user.is_root %} + + {% endif %} - {% endfor %} + {% endfor %} -
    {% trans %}Club{% endtrans %}{% trans %}Role{% endtrans %}{% trans %}Description{% endtrans %}{% trans %}Since{% endtrans %}
    {% trans %}Club{% endtrans %}{% trans %}Role{% endtrans %}{% trans %}Description{% endtrans %}{% trans %}Since{% endtrans %}
    {{ m.club }}{{ settings.SITH_CLUB_ROLES[m.role] }}{{ m.description }}{{ m.start_date }}{{ m.club }}{{ settings.SITH_CLUB_ROLES[m.role] }}{{ m.description }}{{ m.start_date }}{% trans %}Mark as old{% endtrans %}{% trans %}Delete{% endtrans %}{% trans %}Delete{% endtrans %}
    -
    -

    {% trans%}Old club(s) :{% endtrans %}

    -
    - +
    +
    +

    {% trans%}Old club(s) :{% endtrans %}

    +
    + - - - - - - + + + + + + - + - {% for m in profile.memberships.exclude(end_date=None).all() %} + {% for m in profile.memberships.exclude(end_date=None).all() %} - - - - - - {% if user.is_root %} - - {% endif %} + + + + + + {% if user.is_root %} + + {% endif %} - {% endfor %} + {% endfor %} -
    {% trans %}Club{% endtrans %}{% trans %}Role{% endtrans %}{% trans %}Description{% endtrans %}{% trans %}From{% endtrans %}{% trans %}To{% endtrans %}
    {% trans %}Club{% endtrans %}{% trans %}Role{% endtrans %}{% trans %}Description{% endtrans %}{% trans %}From{% endtrans %}{% trans %}To{% endtrans %}
    {{ m.club }}{{ settings.SITH_CLUB_ROLES[m.role] }}{{ m.description }}{{ m.start_date }}{{ m.end_date }}{% trans %}Delete{% endtrans %}{{ m.club }}{{ settings.SITH_CLUB_ROLES[m.role] }}{{ m.description }}{{ m.start_date }}{{ m.end_date }}{% trans %}Delete{% endtrans %}
    + -{% if - profile.mailing_subscriptions.exists() - and (profile.id == user.id or user.is_root or user.is_com_admin) -%} -

    {% trans %}Subscribed mailing lists{% endtrans %}

    - {% for sub in profile.mailing_subscriptions.all() %} -

    {{ sub.mailing.email }} {% trans %}Unsubscribe{% endtrans %}

    - {% endfor %} + {% if + profile.mailing_subscriptions.exists() + and (profile.id == user.id or user.is_root or user.is_com_admin) + %} +

    {% trans %}Subscribed mailing lists{% endtrans %}

    + {% for sub in profile.mailing_subscriptions.all() %} +

    {{ sub.mailing.email }} {% trans %}Unsubscribe{% endtrans %}

    + {% endfor %} {% endif %} {% endblock %} diff --git a/core/templates/core/user_detail.jinja b/core/templates/core/user_detail.jinja index b7651b88..9f5824fc 100644 --- a/core/templates/core/user_detail.jinja +++ b/core/templates/core/user_detail.jinja @@ -2,279 +2,279 @@ {% from "core/macros.jinja" import show_slots, show_tokens, user_subscription %} {%- block additional_css -%} - + {%- endblock -%} {% block title %} -{% trans user_name=profile.get_display_name() %}{{ user_name }}'s profile{% endtrans %} + {% trans user_name=profile.get_display_name() %}{{ user_name }}'s profile{% endtrans %} {% endblock %} {% block additional_js %} - + {% endblock %} {% block content %} -