mirror of
https://github.com/ae-utbm/sith.git
synced 2024-11-24 10:04:34 +00:00
introduce djhtml as jinja+scss formater
This commit is contained in:
parent
13d0d2a300
commit
b25805e0a1
4
.gitignore
vendored
4
.gitignore
vendored
@ -17,4 +17,6 @@ sith/settings_custom.py
|
|||||||
sith/search_indexes/
|
sith/search_indexes/
|
||||||
.coverage
|
.coverage
|
||||||
coverage_report/
|
coverage_report/
|
||||||
doc/_build
|
|
||||||
|
# compiled documentation
|
||||||
|
site/
|
||||||
|
@ -7,4 +7,15 @@ repos:
|
|||||||
- id: ruff # actually fix the fixable errors, but print nothing
|
- id: ruff # actually fix the fixable errors, but print nothing
|
||||||
args: ["--fix", "--silent"]
|
args: ["--fix", "--silent"]
|
||||||
# Run the formatter.
|
# Run the formatter.
|
||||||
- id: ruff-format
|
- 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"]
|
||||||
|
@ -1,27 +1,27 @@
|
|||||||
{% extends "core/base.jinja" %}
|
{% extends "core/base.jinja" %}
|
||||||
|
|
||||||
{% block title %}
|
{% block title %}
|
||||||
{% trans %}Accounting type list{% endtrans %}
|
{% trans %}Accounting type list{% endtrans %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div id="accounting">
|
<div id="accounting">
|
||||||
<p>
|
<p>
|
||||||
<a href="{{ url('accounting:bank_list') }}">{% trans %}Accounting{% endtrans %}</a> >
|
<a href="{{ url('accounting:bank_list') }}">{% trans %}Accounting{% endtrans %}</a> >
|
||||||
{% trans %}Accounting types{% endtrans %}
|
{% trans %}Accounting types{% endtrans %}
|
||||||
</p>
|
</p>
|
||||||
<hr>
|
<hr>
|
||||||
<p><a href="{{ url('accounting:type_new') }}">{% trans %}New accounting type{% endtrans %}</a></p>
|
<p><a href="{{ url('accounting:type_new') }}">{% trans %}New accounting type{% endtrans %}</a></p>
|
||||||
{% if accountingtype_list %}
|
{% if accountingtype_list %}
|
||||||
<h3>{% trans %}Accounting type list{% endtrans %}</h3>
|
<h3>{% trans %}Accounting type list{% endtrans %}</h3>
|
||||||
<ul>
|
<ul>
|
||||||
{% for a in accountingtype_list %}
|
{% for a in accountingtype_list %}
|
||||||
<li><a href="{{ url('accounting:type_edit', type_id=a.id) }}">{{ a }}</a></li>
|
<li><a href="{{ url('accounting:type_edit', type_id=a.id) }}">{{ a }}</a></li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
{% else %}
|
{% else %}
|
||||||
{% trans %}There is no types in this website.{% endtrans %}
|
{% trans %}There is no types in this website.{% endtrans %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
@ -1,37 +1,37 @@
|
|||||||
{% extends "core/base.jinja" %}
|
{% extends "core/base.jinja" %}
|
||||||
|
|
||||||
{% block title %}
|
{% block title %}
|
||||||
{% trans %}Bank account: {% endtrans %}{{ object.name }}
|
{% trans %}Bank account: {% endtrans %}{{ object.name }}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div id="accounting">
|
<div id="accounting">
|
||||||
<p>
|
<p>
|
||||||
<a href="{{ url('accounting:bank_list') }}">{% trans %}Accounting{% endtrans %}</a> >
|
<a href="{{ url('accounting:bank_list') }}">{% trans %}Accounting{% endtrans %}</a> >
|
||||||
{{ object.name }}
|
{{ object.name }}
|
||||||
</p>
|
</p>
|
||||||
<hr>
|
<hr>
|
||||||
<h2>{% trans %}Bank account: {% endtrans %}{{ object.name }}</h2>
|
<h2>{% trans %}Bank account: {% endtrans %}{{ object.name }}</h2>
|
||||||
{% if user.is_in_group(pk=settings.SITH_GROUP_ACCOUNTING_ADMIN_ID) and not object.club_accounts.exists() %}
|
{% if user.is_in_group(pk=settings.SITH_GROUP_ACCOUNTING_ADMIN_ID) and not object.club_accounts.exists() %}
|
||||||
<a href="{{ url('accounting:bank_delete', b_account_id=object.id) }}">{% trans %}Delete{% endtrans %}</a>
|
<a href="{{ url('accounting:bank_delete', b_account_id=object.id) }}">{% trans %}Delete{% endtrans %}</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<h4>{% trans %}Infos{% endtrans %}</h4>
|
<h4>{% trans %}Infos{% endtrans %}</h4>
|
||||||
<ul>
|
<ul>
|
||||||
<li><strong>{% trans %}IBAN: {% endtrans %}</strong>{{ object.iban }}</li>
|
<li><strong>{% trans %}IBAN: {% endtrans %}</strong>{{ object.iban }}</li>
|
||||||
<li><strong>{% trans %}Number: {% endtrans %}</strong>{{ object.number }}</li>
|
<li><strong>{% trans %}Number: {% endtrans %}</strong>{{ object.number }}</li>
|
||||||
</ul>
|
</ul>
|
||||||
<p><a href="{{ url('accounting:club_new') }}?parent={{ object.id }}">{% trans %}New club account{% endtrans %}</a></p>
|
<p><a href="{{ url('accounting:club_new') }}?parent={{ object.id }}">{% trans %}New club account{% endtrans %}</a></p>
|
||||||
<ul>
|
<ul>
|
||||||
{% for c in object.club_accounts.all() %}
|
{% for c in object.club_accounts.all() %}
|
||||||
<li><a href="{{ url('accounting:club_details', c_account_id=c.id) }}">{{ c }}</a>
|
<li><a href="{{ url('accounting:club_details', c_account_id=c.id) }}">{{ c }}</a>
|
||||||
- <a href="{{ url('accounting:club_edit', c_account_id=c.id) }}">{% trans %}Edit{% endtrans %}</a>
|
- <a href="{{ url('accounting:club_edit', c_account_id=c.id) }}">{% trans %}Edit{% endtrans %}</a>
|
||||||
{% if c.journals.count() == 0 %}
|
{% if c.journals.count() == 0 %}
|
||||||
- <a href="{{ url('accounting:club_delete', c_account_id=c.id) }}">{% trans %}Delete{% endtrans %}</a>
|
- <a href="{{ url('accounting:club_delete', c_account_id=c.id) }}">{% trans %}Delete{% endtrans %}</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</li>
|
</li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,32 +1,32 @@
|
|||||||
{% extends "core/base.jinja" %}
|
{% extends "core/base.jinja" %}
|
||||||
|
|
||||||
{% block title %}
|
{% block title %}
|
||||||
{% trans %}Bank account list{% endtrans %}
|
{% trans %}Bank account list{% endtrans %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div id="accounting">
|
<div id="accounting">
|
||||||
<h4>
|
<h4>
|
||||||
{% trans %}Accounting{% endtrans %}
|
{% trans %}Accounting{% endtrans %}
|
||||||
</h4>
|
</h4>
|
||||||
{% if user.is_in_group(pk=settings.SITH_GROUP_ACCOUNTING_ADMIN_ID) %}
|
{% if user.is_in_group(pk=settings.SITH_GROUP_ACCOUNTING_ADMIN_ID) %}
|
||||||
<p><a href="{{ url('accounting:simple_type_list') }}">{% trans %}Manage simplified types{% endtrans %}</a></p>
|
<p><a href="{{ url('accounting:simple_type_list') }}">{% trans %}Manage simplified types{% endtrans %}</a></p>
|
||||||
<p><a href="{{ url('accounting:type_list') }}">{% trans %}Manage accounting types{% endtrans %}</a></p>
|
<p><a href="{{ url('accounting:type_list') }}">{% trans %}Manage accounting types{% endtrans %}</a></p>
|
||||||
<p><a href="{{ url('accounting:bank_new') }}">{% trans %}New bank account{% endtrans %}</a></p>
|
<p><a href="{{ url('accounting:bank_new') }}">{% trans %}New bank account{% endtrans %}</a></p>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if bankaccount_list %}
|
{% if bankaccount_list %}
|
||||||
<h3>{% trans %}Bank account list{% endtrans %}</h3>
|
<h3>{% trans %}Bank account list{% endtrans %}</h3>
|
||||||
<ul>
|
<ul>
|
||||||
{% for a in object_list %}
|
{% for a in object_list %}
|
||||||
<li><a href="{{ url('accounting:bank_details', b_account_id=a.id) }}">{{ a }}</a>
|
<li><a href="{{ url('accounting:bank_details', b_account_id=a.id) }}">{{ a }}</a>
|
||||||
- <a href="{{ url('accounting:bank_edit', b_account_id=a.id) }}">{% trans %}Edit{% endtrans %}</a>
|
- <a href="{{ url('accounting:bank_edit', b_account_id=a.id) }}">{% trans %}Edit{% endtrans %}</a>
|
||||||
</li>
|
</li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
{% else %}
|
{% else %}
|
||||||
{% trans %}There is no accounts in this website.{% endtrans %}
|
{% trans %}There is no accounts in this website.{% endtrans %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,68 +1,68 @@
|
|||||||
{% extends "core/base.jinja" %}
|
{% extends "core/base.jinja" %}
|
||||||
|
|
||||||
{% block title %}
|
{% block title %}
|
||||||
{% trans %}Club account:{% endtrans %} {{ object.name }}
|
{% trans %}Club account:{% endtrans %} {{ object.name }}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div id="accounting">
|
<div id="accounting">
|
||||||
<p>
|
<p>
|
||||||
<a href="{{ url('accounting:bank_list') }}">{% trans %}Accounting{% endtrans %}</a> >
|
<a href="{{ url('accounting:bank_list') }}">{% trans %}Accounting{% endtrans %}</a> >
|
||||||
<a href="{{ url('accounting:bank_details', b_account_id=object.bank_account.id) }}">{{object.bank_account }}</a> >
|
<a href="{{ url('accounting:bank_details', b_account_id=object.bank_account.id) }}">{{object.bank_account }}</a> >
|
||||||
{{ object }}
|
{{ object }}
|
||||||
</p>
|
</p>
|
||||||
<hr>
|
<hr>
|
||||||
<h2>{% trans %}Club account:{% endtrans %} {{ object.name }}</h2>
|
<h2>{% trans %}Club account:{% endtrans %} {{ object.name }}</h2>
|
||||||
{% if user.is_root and not object.journals.exists() %}
|
{% if user.is_root and not object.journals.exists() %}
|
||||||
<a href="{{ url('accounting:club_delete', c_account_id=object.id) }}">{% trans %}Delete{% endtrans %}</a>
|
<a href="{{ url('accounting:club_delete', c_account_id=object.id) }}">{% trans %}Delete{% endtrans %}</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if user.is_in_group(pk=settings.SITH_GROUP_ACCOUNTING_ADMIN_ID) %}
|
{% if user.is_in_group(pk=settings.SITH_GROUP_ACCOUNTING_ADMIN_ID) %}
|
||||||
<p><a href="{{ url('accounting:label_new') }}?parent={{ object.id }}">{% trans %}New label{% endtrans %}</a></p>
|
<p><a href="{{ url('accounting:label_new') }}?parent={{ object.id }}">{% trans %}New label{% endtrans %}</a></p>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<p><a href="{{ url('accounting:label_list', clubaccount_id=object.id) }}">{% trans %}Label list{% endtrans %}</a></p>
|
<p><a href="{{ url('accounting:label_list', clubaccount_id=object.id) }}">{% trans %}Label list{% endtrans %}</a></p>
|
||||||
{% if not object.has_open_journal() %}
|
{% if not object.has_open_journal() %}
|
||||||
<p><a href="{{ url('accounting:journal_new') }}?parent={{ object.id }}">{% trans %}New journal{% endtrans %}</a></p>
|
<p><a href="{{ url('accounting:journal_new') }}?parent={{ object.id }}">{% trans %}New journal{% endtrans %}</a></p>
|
||||||
{% else %}
|
{% else %}
|
||||||
<p>{% trans %}You can not create new journal while you still have one opened{% endtrans %}</p>
|
<p>{% trans %}You can not create new journal while you still have one opened{% endtrans %}</p>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<table>
|
<table>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<td>{% trans %}Name{% endtrans %}</td>
|
<td>{% trans %}Name{% endtrans %}</td>
|
||||||
<td>{% trans %}Start{% endtrans %}</td>
|
<td>{% trans %}Start{% endtrans %}</td>
|
||||||
<td>{% trans %}End{% endtrans %}</td>
|
<td>{% trans %}End{% endtrans %}</td>
|
||||||
<td>{% trans %}Amount{% endtrans %}</td>
|
<td>{% trans %}Amount{% endtrans %}</td>
|
||||||
<td>{% trans %}Effective amount{% endtrans %}</td>
|
<td>{% trans %}Effective amount{% endtrans %}</td>
|
||||||
<td>{% trans %}Closed{% endtrans %}</td>
|
<td>{% trans %}Closed{% endtrans %}</td>
|
||||||
<td>{% trans %}Actions{% endtrans %}</td>
|
<td>{% trans %}Actions{% endtrans %}</td>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
{% for j in object.journals.all() %}
|
{% for j in object.journals.all() %}
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{ j.name }}</td>
|
<td>{{ j.name }}</td>
|
||||||
<td>{{ j.start_date }}</td>
|
<td>{{ j.start_date }}</td>
|
||||||
{% if j.end_date %}
|
{% if j.end_date %}
|
||||||
<td>{{ j.end_date }}</td>
|
<td>{{ j.end_date }}</td>
|
||||||
{% else %}
|
{% else %}
|
||||||
<td> - </td>
|
<td> - </td>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<td>{{ j.amount }} €</td>
|
<td>{{ j.amount }} €</td>
|
||||||
<td>{{ j.effective_amount }} €</td>
|
<td>{{ j.effective_amount }} €</td>
|
||||||
{% if j.closed %}
|
{% if j.closed %}
|
||||||
<td>{% trans %}Yes{% endtrans %}</td>
|
<td>{% trans %}Yes{% endtrans %}</td>
|
||||||
{% else %}
|
{% else %}
|
||||||
<td>{% trans %}No{% endtrans %}</td>
|
<td>{% trans %}No{% endtrans %}</td>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<td> <a href="{{ url('accounting:journal_details', j_id=j.id) }}">{% trans %}View{% endtrans %}</a>
|
<td> <a href="{{ url('accounting:journal_details', j_id=j.id) }}">{% trans %}View{% endtrans %}</a>
|
||||||
<a href="{{ url('accounting:journal_edit', j_id=j.id) }}">{% trans %}Edit{% endtrans %}</a>
|
<a href="{{ url('accounting:journal_edit', j_id=j.id) }}">{% trans %}Edit{% endtrans %}</a>
|
||||||
{% if user.is_in_group(pk=settings.SITH_GROUP_ACCOUNTING_ADMIN_ID) and j.operations.count() == 0 %}
|
{% if user.is_in_group(pk=settings.SITH_GROUP_ACCOUNTING_ADMIN_ID) and j.operations.count() == 0 %}
|
||||||
<a href="{{ url('accounting:journal_delete', j_id=j.id) }}">{% trans %}Delete{% endtrans %}</a>
|
<a href="{{ url('accounting:journal_delete', j_id=j.id) }}">{% trans %}Delete{% endtrans %}</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@ -1,30 +1,30 @@
|
|||||||
{% extends "core/base.jinja" %}
|
{% extends "core/base.jinja" %}
|
||||||
|
|
||||||
{% block title %}
|
{% block title %}
|
||||||
{% trans %}Company list{% endtrans %}
|
{% trans %}Company list{% endtrans %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div id="accounting">
|
<div id="accounting">
|
||||||
{% if user.is_root
|
{% if user.is_root
|
||||||
or user.is_in_group(pk=settings.SITH_GROUP_ACCOUNTING_ADMIN_ID)
|
or user.is_in_group(pk=settings.SITH_GROUP_ACCOUNTING_ADMIN_ID)
|
||||||
%}
|
%}
|
||||||
<p><a href="{{ url('accounting:co_new') }}">{% trans %}Create new company{% endtrans %}</a></p>
|
<p><a href="{{ url('accounting:co_new') }}">{% trans %}Create new company{% endtrans %}</a></p>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<br/>
|
<br/>
|
||||||
<table>
|
<table>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<td>{% trans %}Companies{% endtrans %}</td>
|
<td>{% trans %}Companies{% endtrans %}</td>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
{% for o in object_list %}
|
{% for o in object_list %}
|
||||||
<tr>
|
<tr>
|
||||||
<td><a href="{{ url('accounting:co_edit', co_id=o.id) }}">{{ o.get_display_name() }}</a></td>
|
<td><a href="{{ url('accounting:co_edit', co_id=o.id) }}">{{ o.get_display_name() }}</a></td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@ -1,103 +1,103 @@
|
|||||||
{% extends "core/base.jinja" %}
|
{% extends "core/base.jinja" %}
|
||||||
|
|
||||||
{% block title %}
|
{% block title %}
|
||||||
{% trans %}General journal:{% endtrans %} {{ object.name }}
|
{% trans %}General journal:{% endtrans %} {{ object.name }}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div id="accounting">
|
<div id="accounting">
|
||||||
<p>
|
<p>
|
||||||
<a href="{{ url('accounting:bank_list') }}">{% trans %}Accounting{% endtrans %}</a> >
|
<a href="{{ url('accounting:bank_list') }}">{% trans %}Accounting{% endtrans %}</a> >
|
||||||
<a href="{{ url('accounting:bank_details', b_account_id=object.club_account.bank_account.id) }}">{{object.club_account.bank_account }}</a> >
|
<a href="{{ url('accounting:bank_details', b_account_id=object.club_account.bank_account.id) }}">{{object.club_account.bank_account }}</a> >
|
||||||
<a href="{{ url('accounting:club_details', c_account_id=object.club_account.id) }}">{{ object.club_account }}</a> >
|
<a href="{{ url('accounting:club_details', c_account_id=object.club_account.id) }}">{{ object.club_account }}</a> >
|
||||||
{{ object.name }}
|
{{ object.name }}
|
||||||
</p>
|
</p>
|
||||||
<hr>
|
<hr>
|
||||||
<h2>{% trans %}General journal:{% endtrans %} {{ object.name }}</h2>
|
<h2>{% trans %}General journal:{% endtrans %} {{ object.name }}</h2>
|
||||||
<p><a href="{{ url('accounting:label_new') }}?parent={{ object.club_account.id }}">{% trans %}New label{% endtrans %}</a></p>
|
<p><a href="{{ url('accounting:label_new') }}?parent={{ object.club_account.id }}">{% trans %}New label{% endtrans %}</a></p>
|
||||||
<p><a href="{{ url('accounting:label_list', clubaccount_id=object.club_account.id) }}">{% trans %}Label list{% endtrans %}</a></p>
|
<p><a href="{{ url('accounting:label_list', clubaccount_id=object.club_account.id) }}">{% trans %}Label list{% endtrans %}</a></p>
|
||||||
<p><a href="{{ url('accounting:co_list') }}">{% trans %}Company list{% endtrans %}</a></p>
|
<p><a href="{{ url('accounting:co_list') }}">{% trans %}Company list{% endtrans %}</a></p>
|
||||||
<p><strong>{% trans %}Amount: {% endtrans %}</strong>{{ object.amount }} € -
|
<p><strong>{% trans %}Amount: {% endtrans %}</strong>{{ object.amount }} € -
|
||||||
<strong>{% trans %}Effective amount: {% endtrans %}</strong>{{ object.effective_amount }} €</p>
|
<strong>{% trans %}Effective amount: {% endtrans %}</strong>{{ object.effective_amount }} €</p>
|
||||||
{% if object.closed %}
|
{% if object.closed %}
|
||||||
<p>{% trans %}Journal is closed, you can not create operation{% endtrans %}</p>
|
<p>{% trans %}Journal is closed, you can not create operation{% endtrans %}</p>
|
||||||
{% else %}
|
{% else %}
|
||||||
<p><a href="{{ url('accounting:op_new', j_id=object.id) }}">{% trans %}New operation{% endtrans %}</a></p>
|
<p><a href="{{ url('accounting:op_new', j_id=object.id) }}">{% trans %}New operation{% endtrans %}</a></p>
|
||||||
</br>
|
</br>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<div class="journal-table">
|
<div class="journal-table">
|
||||||
<table>
|
<table>
|
||||||
<thead>
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<td>{% trans %}Nb{% endtrans %}</td>
|
||||||
|
<td>{% trans %}Date{% endtrans %}</td>
|
||||||
|
<td>{% trans %}Label{% endtrans %}</td>
|
||||||
|
<td>{% trans %}Amount{% endtrans %}</td>
|
||||||
|
<td>{% trans %}Payment mode{% endtrans %}</td>
|
||||||
|
<td>{% trans %}Target{% endtrans %}</td>
|
||||||
|
<td>{% trans %}Code{% endtrans %}</td>
|
||||||
|
<td>{% trans %}Nature{% endtrans %}</td>
|
||||||
|
<td>{% trans %}Done{% endtrans %}</td>
|
||||||
|
<td>{% trans %}Comment{% endtrans %}</td>
|
||||||
|
<td>{% trans %}File{% endtrans %}</td>
|
||||||
|
<td>{% trans %}Actions{% endtrans %}</td>
|
||||||
|
<td>{% trans %}PDF{% endtrans %}</td>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
{% for o in object.operations.all() %}
|
||||||
<tr>
|
<tr>
|
||||||
<td>{% trans %}Nb{% endtrans %}</td>
|
<td>{{ o.number }}</td>
|
||||||
<td>{% trans %}Date{% endtrans %}</td>
|
<td>{{ o.date }}</td>
|
||||||
<td>{% trans %}Label{% endtrans %}</td>
|
<td>{{ o.label or "" }}</td>
|
||||||
<td>{% trans %}Amount{% endtrans %}</td>
|
{% if o.accounting_type.movement_type == "DEBIT" %}
|
||||||
<td>{% trans %}Payment mode{% endtrans %}</td>
|
<td class="neg-amount"> {{ o.amount }} €</td>
|
||||||
<td>{% trans %}Target{% endtrans %}</td>
|
{% else %}
|
||||||
<td>{% trans %}Code{% endtrans %}</td>
|
<td class="pos-amount"> {{ o.amount }} €</td>
|
||||||
<td>{% trans %}Nature{% endtrans %}</td>
|
{% endif %}
|
||||||
<td>{% trans %}Done{% endtrans %}</td>
|
<td>{{ o.get_mode_display() }}</td>
|
||||||
<td>{% trans %}Comment{% endtrans %}</td>
|
{% if o.target_type == "OTHER" %}
|
||||||
<td>{% trans %}File{% endtrans %}</td>
|
|
||||||
<td>{% trans %}Actions{% endtrans %}</td>
|
|
||||||
<td>{% trans %}PDF{% endtrans %}</td>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
{% for o in object.operations.all() %}
|
|
||||||
<tr>
|
|
||||||
<td>{{ o.number }}</td>
|
|
||||||
<td>{{ o.date }}</td>
|
|
||||||
<td>{{ o.label or "" }}</td>
|
|
||||||
{% if o.accounting_type.movement_type == "DEBIT" %}
|
|
||||||
<td class="neg-amount"> {{ o.amount }} €</td>
|
|
||||||
{% else %}
|
|
||||||
<td class="pos-amount"> {{ o.amount }} €</td>
|
|
||||||
{% endif %}
|
|
||||||
<td>{{ o.get_mode_display() }}</td>
|
|
||||||
{% if o.target_type == "OTHER" %}
|
|
||||||
<td>{{ o.target_label }}</td>
|
<td>{{ o.target_label }}</td>
|
||||||
{% else %}
|
{% else %}
|
||||||
<td><a href="{{ o.target.get_absolute_url() }}">{{ o.target.get_display_name() }}</a></td>
|
<td><a href="{{ o.target.get_absolute_url() }}">{{ o.target.get_display_name() }}</a></td>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<td>{{ o.accounting_type.code }}</td>
|
<td>{{ o.accounting_type.code }}</td>
|
||||||
<td>{{ o.accounting_type.label }}</td>
|
<td>{{ o.accounting_type.label }}</td>
|
||||||
{% if o.done %}
|
{% if o.done %}
|
||||||
<td>{% trans %}Yes{% endtrans %}</td>
|
<td>{% trans %}Yes{% endtrans %}</td>
|
||||||
{% else %}
|
{% else %}
|
||||||
<td>{% trans %}No{% endtrans %}</td>
|
<td>{% trans %}No{% endtrans %}</td>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<td>{{ o.remark }}
|
<td>{{ o.remark }}
|
||||||
{% if not o.linked_operation and o.target_type == "ACCOUNT" and not o.target.has_open_journal() %}
|
{% if not o.linked_operation and o.target_type == "ACCOUNT" and not o.target.has_open_journal() %}
|
||||||
<p><strong>
|
<p><strong>
|
||||||
{% trans %}Warning: this operation has no linked operation because the targeted club account has no opened journal.{% endtrans %}
|
{% trans %}Warning: this operation has no linked operation because the targeted club account has no opened journal.{% endtrans %}
|
||||||
</strong></p>
|
</strong></p>
|
||||||
<p><strong>
|
<p><strong>
|
||||||
{% trans url=o.target.get_absolute_url() %}Open a journal in <a href="{{ url }}">this club account</a>, then save this operation again to make the linked operation.{% endtrans %}
|
{% trans url=o.target.get_absolute_url() %}Open a journal in <a href="{{ url }}">this club account</a>, then save this operation again to make the linked operation.{% endtrans %}
|
||||||
</strong></p>
|
</strong></p>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</td>
|
</td>
|
||||||
{% if o.invoice %}
|
{% if o.invoice %}
|
||||||
<td><a href="{{ url('core:download', file_id=o.invoice.id) }}">{{ o.invoice.name }}</a></td>
|
<td><a href="{{ url('core:download', file_id=o.invoice.id) }}">{{ o.invoice.name }}</a></td>
|
||||||
{% else %}
|
{% else %}
|
||||||
<td>-</td>
|
<td>-</td>
|
||||||
|
{% endif %}
|
||||||
|
<td>
|
||||||
|
{%
|
||||||
|
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 %}
|
||||||
|
<a href="{{ url('accounting:op_edit', op_id=o.id) }}">{% trans %}Edit{% endtrans %}</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<td>
|
{% endif %}
|
||||||
{%
|
</td>
|
||||||
if o.journal.club_account.bank_account.name not in ["AE TI", "TI"]
|
<td><a href="{{ url('accounting:op_pdf', op_id=o.id) }}">{% trans %}Generate{% endtrans %}</a></td>
|
||||||
or user.is_in_group(pk=settings.SITH_GROUP_ACCOUNTING_ADMIN_ID)
|
</tr>
|
||||||
%}
|
{% endfor %}
|
||||||
{% if not o.journal.closed %}
|
</tbody>
|
||||||
<a href="{{ url('accounting:op_edit', op_id=o.id) }}">{% trans %}Edit{% endtrans %}</a>
|
</table>
|
||||||
{% endif %}
|
</div>
|
||||||
{% endif %}
|
</div>
|
||||||
</td>
|
|
||||||
<td><a href="{{ url('accounting:op_pdf', op_id=o.id) }}">{% trans %}Generate{% endtrans %}</a></td>
|
|
||||||
</tr>
|
|
||||||
{% endfor %}
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@ -1,33 +1,33 @@
|
|||||||
{% extends "core/base.jinja" %}
|
{% extends "core/base.jinja" %}
|
||||||
|
|
||||||
{% block title %}
|
{% block title %}
|
||||||
{% trans %}General journal:{% endtrans %} {{ object.name }}
|
{% trans %}General journal:{% endtrans %} {{ object.name }}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div id="accounting">
|
<div id="accounting">
|
||||||
<h3>{% trans %}Accounting statement: {% endtrans %} {{ object.name }}</h3>
|
<h3>{% trans %}Accounting statement: {% endtrans %} {{ object.name }}</h3>
|
||||||
|
|
||||||
<table>
|
<table>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<td>{% trans %}Operation type{% endtrans %}</td>
|
<td>{% trans %}Operation type{% endtrans %}</td>
|
||||||
<td>{% trans %}Sum{% endtrans %}</td>
|
<td>{% trans %}Sum{% endtrans %}</td>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
{% for k,v in statement.items() %}
|
{% for k,v in statement.items() %}
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{ k }}</td>
|
<td>{{ k }}</td>
|
||||||
<td>{{ "%.2f" % v }}</td>
|
<td>{{ "%.2f" % v }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</tbody>
|
</tbody>
|
||||||
|
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<p><strong>{% trans %}Amount: {% endtrans %}</strong>{{ "%.2f" % object.amount }} €</p>
|
<p><strong>{% trans %}Amount: {% endtrans %}</strong>{{ "%.2f" % object.amount }} €</p>
|
||||||
<p><strong>{% trans %}Effective amount: {% endtrans %}</strong>{{ "%.2f" %object.effective_amount }} €</p>
|
<p><strong>{% trans %}Effective amount: {% endtrans %}</strong>{{ "%.2f" %object.effective_amount }} €</p>
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@ -1,57 +1,57 @@
|
|||||||
{% extends "core/base.jinja" %}
|
{% extends "core/base.jinja" %}
|
||||||
|
|
||||||
{% block title %}
|
{% block title %}
|
||||||
{% trans %}General journal:{% endtrans %} {{ object.name }}
|
{% trans %}General journal:{% endtrans %} {{ object.name }}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% macro display_tables(dict) %}
|
{% macro display_tables(dict) %}
|
||||||
<div id="accounting">
|
<div id="accounting">
|
||||||
<h6>{% trans %}Credit{% endtrans %}</h6>
|
<h6>{% trans %}Credit{% endtrans %}</h6>
|
||||||
<table>
|
<table>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<td>{% trans %}Nature of operation{% endtrans %}</td>
|
<td>{% trans %}Nature of operation{% endtrans %}</td>
|
||||||
<td>{% trans %}Sum{% endtrans %}</td>
|
<td>{% trans %}Sum{% endtrans %}</td>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
{% for k,v in dict['CREDIT'].items() %}
|
{% for k,v in dict['CREDIT'].items() %}
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{ k }}</td>
|
<td>{{ k }}</td>
|
||||||
<td>{{ "%.2f" % v }}</td>
|
<td>{{ "%.2f" % v }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
{% trans %}Total: {% endtrans %}{{ "%.2f" % dict['CREDIT_sum'] }}
|
{% trans %}Total: {% endtrans %}{{ "%.2f" % dict['CREDIT_sum'] }}
|
||||||
|
|
||||||
<h6>{% trans %}Debit{% endtrans %}</h6>
|
<h6>{% trans %}Debit{% endtrans %}</h6>
|
||||||
<table>
|
<table>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<td>{% trans %}Nature of operation{% endtrans %}</td>
|
<td>{% trans %}Nature of operation{% endtrans %}</td>
|
||||||
<td>{% trans %}Sum{% endtrans %}</td>
|
<td>{% trans %}Sum{% endtrans %}</td>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
{% for k,v in dict['DEBIT'].items() %}
|
{% for k,v in dict['DEBIT'].items() %}
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{ k }}</td>
|
<td>{{ k }}</td>
|
||||||
<td>{{ "%.2f" % v }}</td>
|
<td>{{ "%.2f" % v }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
{% trans %}Total: {% endtrans %}{{ "%.2f" % dict['DEBIT_sum'] }}
|
{% trans %}Total: {% endtrans %}{{ "%.2f" % dict['DEBIT_sum'] }}
|
||||||
{% endmacro %}
|
{% endmacro %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<h3>{% trans %}Statement by nature: {% endtrans %} {{ object.name }}</h3>
|
<h3>{% trans %}Statement by nature: {% endtrans %} {{ object.name }}</h3>
|
||||||
|
|
||||||
{% for k,v in statement.items() %}
|
{% for k,v in statement.items() %}
|
||||||
<h4 style="background: lightblue; padding: 4px;">{{ k }} : {{ "%.2f" % (v['CREDIT_sum'] - v['DEBIT_sum']) }}</h4>
|
<h4 style="background: lightblue; padding: 4px;">{{ k }} : {{ "%.2f" % (v['CREDIT_sum'] - v['DEBIT_sum']) }}</h4>
|
||||||
{{ display_tables(v) }}
|
{{ display_tables(v) }}
|
||||||
<hr>
|
<hr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@ -1,37 +1,37 @@
|
|||||||
{% extends "core/base.jinja" %}
|
{% extends "core/base.jinja" %}
|
||||||
|
|
||||||
{% block title %}
|
{% block title %}
|
||||||
{% trans %}General journal:{% endtrans %} {{ object.name }}
|
{% trans %}General journal:{% endtrans %} {{ object.name }}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div id="accounting">
|
<div id="accounting">
|
||||||
<h3>{% trans %}Statement by person: {% endtrans %} {{ object.name }}</h3>
|
<h3>{% trans %}Statement by person: {% endtrans %} {{ object.name }}</h3>
|
||||||
|
|
||||||
<h4>{% trans %}Credit{% endtrans %}</h4>
|
<h4>{% trans %}Credit{% endtrans %}</h4>
|
||||||
|
|
||||||
<table>
|
<table>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<td>{% trans %}Target of the operation{% endtrans %}</td>
|
<td>{% trans %}Target of the operation{% endtrans %}</td>
|
||||||
<td>{% trans %}Sum{% endtrans %}</td>
|
<td>{% trans %}Sum{% endtrans %}</td>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
{% for key in credit_statement.keys() %}
|
{% for key in credit_statement.keys() %}
|
||||||
<tr>
|
<tr>
|
||||||
{% if key.target_type == "OTHER" %}
|
{% if key.target_type == "OTHER" %}
|
||||||
<td>{{ o.target_label }}</td>
|
<td>{{ o.target_label }}</td>
|
||||||
{% elif key %}
|
{% elif key %}
|
||||||
<td><a href="{{ key.get_absolute_url() }}">{{ key.get_display_name() }}</a></td>
|
<td><a href="{{ key.get_absolute_url() }}">{{ key.get_display_name() }}</a></td>
|
||||||
{% else %}
|
{% else %}
|
||||||
<td></td>
|
<td></td>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<td>{{ "%.2f" % credit_statement[key] }}</td>
|
<td>{{ "%.2f" % credit_statement[key] }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</tbody>
|
</tbody>
|
||||||
|
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
@ -40,29 +40,29 @@
|
|||||||
<h4>{% trans %}Debit{% endtrans %}</h4>
|
<h4>{% trans %}Debit{% endtrans %}</h4>
|
||||||
|
|
||||||
<table>
|
<table>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<td>{% trans %}Target of the operation{% endtrans %}</td>
|
<td>{% trans %}Target of the operation{% endtrans %}</td>
|
||||||
<td>{% trans %}Sum{% endtrans %}</td>
|
<td>{% trans %}Sum{% endtrans %}</td>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
{% for key in debit_statement.keys() %}
|
{% for key in debit_statement.keys() %}
|
||||||
<tr>
|
<tr>
|
||||||
{% if key.target_type == "OTHER" %}
|
{% if key.target_type == "OTHER" %}
|
||||||
<td>{{ o.target_label }}</td>
|
<td>{{ o.target_label }}</td>
|
||||||
{% elif key %}
|
{% elif key %}
|
||||||
<td><a href="{{ key.get_absolute_url() }}">{{ key.get_display_name() }}</a></td>
|
<td><a href="{{ key.get_absolute_url() }}">{{ key.get_display_name() }}</a></td>
|
||||||
{% else %}
|
{% else %}
|
||||||
<td></td>
|
<td></td>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<td>{{ "%.2f" % debit_statement[key] }}</td>
|
<td>{{ "%.2f" % debit_statement[key] }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</tbody>
|
</tbody>
|
||||||
|
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<p>Total : {{ "%.2f" % total_debit }}</p>
|
<p>Total : {{ "%.2f" % total_debit }}</p>
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@ -1,36 +1,36 @@
|
|||||||
{% extends "core/base.jinja" %}
|
{% extends "core/base.jinja" %}
|
||||||
|
|
||||||
{% block title %}
|
{% block title %}
|
||||||
{% trans %}Label list{% endtrans %}
|
{% trans %}Label list{% endtrans %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div id="accounting">
|
<div id="accounting">
|
||||||
<p>
|
<p>
|
||||||
<a href="{{ url('accounting:bank_list') }}">{% trans %}Accounting{% endtrans %}</a> >
|
<a href="{{ url('accounting:bank_list') }}">{% trans %}Accounting{% endtrans %}</a> >
|
||||||
<a href="{{ url('accounting:bank_details', b_account_id=object.bank_account.id) }}">{{object.bank_account }}</a> >
|
<a href="{{ url('accounting:bank_details', b_account_id=object.bank_account.id) }}">{{object.bank_account }}</a> >
|
||||||
<a href="{{ url('accounting:club_details', c_account_id=object.id) }}">{{ object }}</a>
|
<a href="{{ url('accounting:club_details', c_account_id=object.id) }}">{{ object }}</a>
|
||||||
</p>
|
</p>
|
||||||
<hr>
|
<hr>
|
||||||
<p><a href="{{ url('accounting:club_details', c_account_id=object.id) }}">{% trans %}Back to club account{% endtrans %}</a></p>
|
<p><a href="{{ url('accounting:club_details', c_account_id=object.id) }}">{% trans %}Back to club account{% endtrans %}</a></p>
|
||||||
{% if user.is_in_group(pk=settings.SITH_GROUP_ACCOUNTING_ADMIN_ID) %}
|
{% if user.is_in_group(pk=settings.SITH_GROUP_ACCOUNTING_ADMIN_ID) %}
|
||||||
<p><a href="{{ url('accounting:label_new') }}?parent={{ object.id }}">{% trans %}New label{% endtrans %}</a></p>
|
<p><a href="{{ url('accounting:label_new') }}?parent={{ object.id }}">{% trans %}New label{% endtrans %}</a></p>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if object.labels.all() %}
|
{% if object.labels.all() %}
|
||||||
<h3>{% trans %}Label list{% endtrans %}</h3>
|
<h3>{% trans %}Label list{% endtrans %}</h3>
|
||||||
<ul>
|
<ul>
|
||||||
{% for l in object.labels.all() %}
|
{% for l in object.labels.all() %}
|
||||||
<li><a href="{{ url('accounting:label_edit', label_id=l.id) }}">{{ l }}</a>
|
<li><a href="{{ url('accounting:label_edit', label_id=l.id) }}">{{ l }}</a>
|
||||||
{% if user.is_in_group(pk=settings.SITH_GROUP_ACCOUNTING_ADMIN_ID) %}
|
{% if user.is_in_group(pk=settings.SITH_GROUP_ACCOUNTING_ADMIN_ID) %}
|
||||||
-
|
-
|
||||||
<a href="{{ url('accounting:label_delete', label_id=l.id) }}">{% trans %}Delete{% endtrans %}</a>
|
<a href="{{ url('accounting:label_delete', label_id=l.id) }}">{% trans %}Delete{% endtrans %}</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</li>
|
</li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
{% else %}
|
{% else %}
|
||||||
{% trans %}There is no label in this club account.{% endtrans %}
|
{% trans %}There is no label in this club account.{% endtrans %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
@ -1,123 +1,123 @@
|
|||||||
{% extends "core/base.jinja" %}
|
{% extends "core/base.jinja" %}
|
||||||
|
|
||||||
{% block title %}
|
{% block title %}
|
||||||
{% trans %}Edit operation{% endtrans %}
|
{% trans %}Edit operation{% endtrans %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div id="accounting">
|
<div id="accounting">
|
||||||
<p>
|
<p>
|
||||||
<a href="{{ url('accounting:bank_list') }}">{% trans %}Accounting{% endtrans %}</a> >
|
<a href="{{ url('accounting:bank_list') }}">{% trans %}Accounting{% endtrans %}</a> >
|
||||||
<a href="{{ url('accounting:bank_details', b_account_id=object.club_account.bank_account.id) }}">{{object.club_account.bank_account }}</a> >
|
<a href="{{ url('accounting:bank_details', b_account_id=object.club_account.bank_account.id) }}">{{object.club_account.bank_account }}</a> >
|
||||||
<a href="{{ url('accounting:club_details', c_account_id=object.club_account.id) }}">{{ object.club_account }}</a> >
|
<a href="{{ url('accounting:club_details', c_account_id=object.club_account.id) }}">{{ object.club_account }}</a> >
|
||||||
<a href="{{ url('accounting:journal_details', j_id=object.id) }}">{{ object.name }}</a> >
|
<a href="{{ url('accounting:journal_details', j_id=object.id) }}">{{ object.name }}</a> >
|
||||||
{% trans %}Edit operation{% endtrans %}
|
{% trans %}Edit operation{% endtrans %}
|
||||||
</p>
|
</p>
|
||||||
<hr>
|
<hr>
|
||||||
<h2>{% trans %}Edit operation{% endtrans %}</h2>
|
<h2>{% trans %}Edit operation{% endtrans %}</h2>
|
||||||
<form action="" method="post">
|
<form action="" method="post">
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
{{ form.non_field_errors() }}
|
{{ form.non_field_errors() }}
|
||||||
{{ form.journal }}
|
{{ form.journal }}
|
||||||
{{ form.target_id }}
|
{{ form.target_id }}
|
||||||
<p>{{ form.amount.errors }}<label for="{{ form.amount.name }}">{{ form.amount.label }}</label> {{ form.amount }}</p>
|
<p>{{ form.amount.errors }}<label for="{{ form.amount.name }}">{{ form.amount.label }}</label> {{ form.amount }}</p>
|
||||||
<p>{{ form.remark.errors }}<label for="{{ form.remark.name }}">{{ form.remark.label }}</label> {{ form.remark }}</p>
|
<p>{{ form.remark.errors }}<label for="{{ form.remark.name }}">{{ form.remark.label }}</label> {{ form.remark }}</p>
|
||||||
<br />
|
<br />
|
||||||
<strong>{% trans %}Warning: if you select <em>Account</em>, the opposite operation will be created in the target account. If you don't want that, select <em>Club</em> instead of <em>Account</em>.{% endtrans %}</strong>
|
<strong>{% trans %}Warning: if you select <em>Account</em>, the opposite operation will be created in the target account. If you don't want that, select <em>Club</em> instead of <em>Account</em>.{% endtrans %}</strong>
|
||||||
<p>{{ form.target_type.errors }}<label for="{{ form.target_type.name }}">{{ form.target_type.label }}</label> {{ form.target_type }}</p>
|
<p>{{ form.target_type.errors }}<label for="{{ form.target_type.name }}">{{ form.target_type.label }}</label> {{ form.target_type }}</p>
|
||||||
{{ form.user }}
|
{{ form.user }}
|
||||||
{{ form.club }}
|
{{ form.club }}
|
||||||
{{ form.club_account }}
|
{{ form.club_account }}
|
||||||
{{ form.company }}
|
{{ form.company }}
|
||||||
{{ form.target_label }}
|
{{ form.target_label }}
|
||||||
<span id="id_need_link_full"><label>{{ form.need_link.label }}</label> {{ form.need_link }}</span>
|
<span id="id_need_link_full"><label>{{ form.need_link.label }}</label> {{ form.need_link }}</span>
|
||||||
<p>{{ form.date.errors }}<label for="{{ form.date.name }}">{{ form.date.label }}</label> {{ form.date }}</p>
|
<p>{{ form.date.errors }}<label for="{{ form.date.name }}">{{ form.date.label }}</label> {{ form.date }}</p>
|
||||||
<p>{{ form.mode.errors }}<label for="{{ form.mode.name }}">{{ form.mode.label }}</label> {{ form.mode }}</p>
|
<p>{{ form.mode.errors }}<label for="{{ form.mode.name }}">{{ form.mode.label }}</label> {{ form.mode }}</p>
|
||||||
<p>{{ form.cheque_number.errors }}<label for="{{ form.cheque_number.name }}">{{ form.cheque_number.label }}</label> {{
|
<p>{{ form.cheque_number.errors }}<label for="{{ form.cheque_number.name }}">{{ form.cheque_number.label }}</label> {{
|
||||||
form.cheque_number }}</p>
|
form.cheque_number }}</p>
|
||||||
<p>{{ form.invoice.errors }}<label for="{{ form.invoice.name }}">{{ form.invoice.label }}</label> {{ form.invoice }}</p>
|
<p>{{ form.invoice.errors }}<label for="{{ form.invoice.name }}">{{ form.invoice.label }}</label> {{ form.invoice }}</p>
|
||||||
<p>{{ form.simpleaccounting_type.errors }}<label for="{{ form.simpleaccounting_type.name }}">{{
|
<p>{{ form.simpleaccounting_type.errors }}<label for="{{ form.simpleaccounting_type.name }}">{{
|
||||||
form.simpleaccounting_type.label }}</label> {{ form.simpleaccounting_type }}</p>
|
form.simpleaccounting_type.label }}</label> {{ form.simpleaccounting_type }}</p>
|
||||||
<p>{{ form.accounting_type.errors }}<label for="{{ form.accounting_type.name }}">{{ form.accounting_type.label }}</label> {{
|
<p>{{ form.accounting_type.errors }}<label for="{{ form.accounting_type.name }}">{{ form.accounting_type.label }}</label> {{
|
||||||
form.accounting_type }}</p>
|
form.accounting_type }}</p>
|
||||||
<p>{{ form.label.errors }}<label for="{{ form.label.name }}">{{ form.label.label }}</label> {{ form.label }}</p>
|
<p>{{ form.label.errors }}<label for="{{ form.label.name }}">{{ form.label.label }}</label> {{ form.label }}</p>
|
||||||
<p>{{ form.done.errors }}<label for="{{ form.done.name }}">{{ form.done.label }}</label> {{ form.done }}</p>
|
<p>{{ form.done.errors }}<label for="{{ form.done.name }}">{{ form.done.label }}</label> {{ form.done }}</p>
|
||||||
{% if form.instance.linked_operation %}
|
{% if form.instance.linked_operation %}
|
||||||
{% set obj = form.instance.linked_operation %}
|
{% set obj = form.instance.linked_operation %}
|
||||||
<p><strong>{% trans %}Linked operation:{% endtrans %}</strong><br>
|
<p><strong>{% trans %}Linked operation:{% endtrans %}</strong><br>
|
||||||
<a href="{{ url('accounting:bank_details', b_account_id=obj.journal.club_account.bank_account.id) }}">
|
<a href="{{ url('accounting:bank_details', b_account_id=obj.journal.club_account.bank_account.id) }}">
|
||||||
{{obj.journal.club_account.bank_account }}</a> >
|
{{obj.journal.club_account.bank_account }}</a> >
|
||||||
<a href="{{ url('accounting:club_details', c_account_id=obj.journal.club_account.id) }}">{{ obj.journal.club_account }}</a> >
|
<a href="{{ url('accounting:club_details', c_account_id=obj.journal.club_account.id) }}">{{ obj.journal.club_account }}</a> >
|
||||||
<a href="{{ url('accounting:journal_details', j_id=obj.journal.id) }}">{{ obj.journal }}</a> >
|
<a href="{{ url('accounting:journal_details', j_id=obj.journal.id) }}">{{ obj.journal }}</a> >
|
||||||
n°{{ obj.number }}
|
n°{{ obj.number }}
|
||||||
</p>
|
</p>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<p><input type="submit" value="{% trans %}Save{% endtrans %}" /></p>
|
<p><input type="submit" value="{% trans %}Save{% endtrans %}" /></p>
|
||||||
</form>
|
</form>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block script %}
|
{% block script %}
|
||||||
{{ super() }}
|
{{ super() }}
|
||||||
<script>
|
<script>
|
||||||
$( function() {
|
$( function() {
|
||||||
var target_type = $('#id_target_type');
|
var target_type = $('#id_target_type');
|
||||||
var user = $('#id_user_wrapper');
|
var user = $('#id_user_wrapper');
|
||||||
var club = $('#id_club_wrapper');
|
var club = $('#id_club_wrapper');
|
||||||
var club_account = $('#id_club_account_wrapper');
|
var club_account = $('#id_club_account_wrapper');
|
||||||
var company = $('#id_company_wrapper');
|
var company = $('#id_company_wrapper');
|
||||||
var other = $('#id_target_label');
|
var other = $('#id_target_label');
|
||||||
var need_link = $('#id_need_link_full');
|
var need_link = $('#id_need_link_full');
|
||||||
function update_targets () {
|
function update_targets () {
|
||||||
if (target_type.val() == "USER") {
|
if (target_type.val() == "USER") {
|
||||||
console.log(user);
|
console.log(user);
|
||||||
user.show();
|
user.show();
|
||||||
club.hide();
|
club.hide();
|
||||||
club_account.hide();
|
club_account.hide();
|
||||||
company.hide();
|
company.hide();
|
||||||
other.hide();
|
other.hide();
|
||||||
need_link.hide();
|
need_link.hide();
|
||||||
} else if (target_type.val() == "ACCOUNT") {
|
} else if (target_type.val() == "ACCOUNT") {
|
||||||
club_account.show();
|
club_account.show();
|
||||||
need_link.show();
|
need_link.show();
|
||||||
user.hide();
|
user.hide();
|
||||||
club.hide();
|
club.hide();
|
||||||
company.hide();
|
company.hide();
|
||||||
other.hide();
|
other.hide();
|
||||||
} else if (target_type.val() == "CLUB") {
|
} else if (target_type.val() == "CLUB") {
|
||||||
club.show();
|
club.show();
|
||||||
user.hide();
|
user.hide();
|
||||||
club_account.hide();
|
club_account.hide();
|
||||||
company.hide();
|
company.hide();
|
||||||
other.hide();
|
other.hide();
|
||||||
need_link.hide();
|
need_link.hide();
|
||||||
} else if (target_type.val() == "COMPANY") {
|
} else if (target_type.val() == "COMPANY") {
|
||||||
company.show();
|
company.show();
|
||||||
user.hide();
|
user.hide();
|
||||||
club_account.hide();
|
club_account.hide();
|
||||||
club.hide();
|
club.hide();
|
||||||
other.hide();
|
other.hide();
|
||||||
need_link.hide();
|
need_link.hide();
|
||||||
} else if (target_type.val() == "OTHER") {
|
} else if (target_type.val() == "OTHER") {
|
||||||
other.show();
|
other.show();
|
||||||
user.hide();
|
user.hide();
|
||||||
club.hide();
|
club.hide();
|
||||||
club_account.hide();
|
club_account.hide();
|
||||||
company.hide();
|
company.hide();
|
||||||
need_link.hide();
|
need_link.hide();
|
||||||
} else {
|
} else {
|
||||||
company.hide();
|
company.hide();
|
||||||
user.hide();
|
user.hide();
|
||||||
club_account.hide();
|
club_account.hide();
|
||||||
club.hide();
|
club.hide();
|
||||||
other.hide();
|
other.hide();
|
||||||
need_link.hide();
|
need_link.hide();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
update_targets();
|
update_targets();
|
||||||
target_type.change(update_targets);
|
target_type.change(update_targets);
|
||||||
} );
|
} );
|
||||||
</script>
|
</script>
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,16 +1,16 @@
|
|||||||
{% extends "core/base.jinja" %}
|
{% extends "core/base.jinja" %}
|
||||||
|
|
||||||
{% block title %}
|
{% block title %}
|
||||||
{% trans %}Refound account{% endtrans %}
|
{% trans %}Refound account{% endtrans %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div id="accounting">
|
<div id="accounting">
|
||||||
<h3>{% trans %}Refound account{% endtrans %}</h3>
|
<h3>{% trans %}Refound account{% endtrans %}</h3>
|
||||||
<form action="" method="post">
|
<form action="" method="post">
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
{{ form.as_p() }}
|
{{ form.as_p() }}
|
||||||
<p><input type="submit" value="{% trans %}Refound{% endtrans %}" /></p>
|
<p><input type="submit" value="{% trans %}Refound{% endtrans %}" /></p>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
@ -1,27 +1,27 @@
|
|||||||
{% extends "core/base.jinja" %}
|
{% extends "core/base.jinja" %}
|
||||||
|
|
||||||
{% block title %}
|
{% block title %}
|
||||||
{% trans %}Simplified type list{% endtrans %}
|
{% trans %}Simplified type list{% endtrans %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div id="accounting">
|
<div id="accounting">
|
||||||
<p>
|
<p>
|
||||||
<a href="{{ url('accounting:bank_list') }}">{% trans %}Accounting{% endtrans %}</a> >
|
<a href="{{ url('accounting:bank_list') }}">{% trans %}Accounting{% endtrans %}</a> >
|
||||||
{% trans %}Simplified types{% endtrans %}
|
{% trans %}Simplified types{% endtrans %}
|
||||||
</p>
|
</p>
|
||||||
<hr>
|
<hr>
|
||||||
<p><a href="{{ url('accounting:simple_type_new') }}">{% trans %}New simplified type{% endtrans %}</a></p>
|
<p><a href="{{ url('accounting:simple_type_new') }}">{% trans %}New simplified type{% endtrans %}</a></p>
|
||||||
{% if simplifiedaccountingtype_list %}
|
{% if simplifiedaccountingtype_list %}
|
||||||
<h3>{% trans %}Simplified type list{% endtrans %}</h3>
|
<h3>{% trans %}Simplified type list{% endtrans %}</h3>
|
||||||
<ul>
|
<ul>
|
||||||
{% for a in simplifiedaccountingtype_list %}
|
{% for a in simplifiedaccountingtype_list %}
|
||||||
<li><a href="{{ url('accounting:simple_type_edit', type_id=a.id) }}">{{ a }}</a></li>
|
<li><a href="{{ url('accounting:simple_type_edit', type_id=a.id) }}">{{ a }}</a></li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
{% else %}
|
{% else %}
|
||||||
{% trans %}There is no types in this website.{% endtrans %}
|
{% trans %}There is no types in this website.{% endtrans %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
@ -264,33 +264,26 @@ class TestOperation(TestCase):
|
|||||||
)
|
)
|
||||||
self.assertContains(response, "Total : 5575.72", status_code=200)
|
self.assertContains(response, "Total : 5575.72", status_code=200)
|
||||||
self.assertContains(response, "Total : 71.42")
|
self.assertContains(response, "Total : 71.42")
|
||||||
self.assertContains(
|
content = response.content.decode()
|
||||||
response,
|
self.assertInHTML(
|
||||||
"""
|
"""<td><a href="/user/1/">S' Kia</a></td><td>3.00</td>""", content
|
||||||
<td><a href="/user/1/">S' Kia</a></td>
|
|
||||||
|
|
||||||
<td>3.00</td>""",
|
|
||||||
)
|
)
|
||||||
self.assertContains(
|
self.assertInHTML(
|
||||||
response,
|
"""<td><a href="/user/1/">S' Kia</a></td><td>823.00</td>""", content
|
||||||
"""
|
|
||||||
<td><a href="/user/1/">S' Kia</a></td>
|
|
||||||
|
|
||||||
<td>823.00</td>""",
|
|
||||||
)
|
)
|
||||||
|
|
||||||
def test_accounting_statement(self):
|
def test_accounting_statement(self):
|
||||||
response = self.client.get(
|
response = self.client.get(
|
||||||
reverse("accounting:journal_accounting_statement", args=[self.journal.id])
|
reverse("accounting:journal_accounting_statement", args=[self.journal.id])
|
||||||
)
|
)
|
||||||
self.assertContains(
|
assert response.status_code == 200
|
||||||
response,
|
self.assertInHTML(
|
||||||
"""
|
"""
|
||||||
<tr>
|
<tr>
|
||||||
<td>443 - Crédit - Ce code n'existe pas</td>
|
<td>443 - Crédit - Ce code n'existe pas</td>
|
||||||
<td>3.00</td>
|
<td>3.00</td>
|
||||||
</tr>""",
|
</tr>""",
|
||||||
status_code=200,
|
response.content.decode(),
|
||||||
)
|
)
|
||||||
self.assertContains(
|
self.assertContains(
|
||||||
response,
|
response,
|
||||||
|
@ -2,16 +2,16 @@
|
|||||||
{% from 'core/macros.jinja' import user_profile_link %}
|
{% from 'core/macros.jinja' import user_profile_link %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div id="club_detail">
|
<div id="club_detail">
|
||||||
{% if club.logo %}
|
{% if club.logo %}
|
||||||
<div class="club_logo"><img src="{{ club.logo.url }}" alt="{{ club.unix_name }}"></div>
|
<div class="club_logo"><img src="{{ club.logo.url }}" alt="{{ club.unix_name }}"></div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if page_revision %}
|
{% if page_revision %}
|
||||||
{{ page_revision|markdown }}
|
{{ page_revision|markdown }}
|
||||||
{% else %}
|
{% else %}
|
||||||
<h3>{% trans %}Club{% endtrans %}</h3>
|
<h3>{% trans %}Club{% endtrans %}</h3>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,48 +1,48 @@
|
|||||||
{% extends "core/base.jinja" %}
|
{% extends "core/base.jinja" %}
|
||||||
|
|
||||||
{% block title %}
|
{% block title %}
|
||||||
{% trans %}Club list{% endtrans %}
|
{% trans %}Club list{% endtrans %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% macro display_club(club) -%}
|
{% macro display_club(club) -%}
|
||||||
|
|
||||||
{% if club.is_active or user.is_root %}
|
{% if club.is_active or user.is_root %}
|
||||||
|
|
||||||
<li><a href="{{ url('club:club_view', club_id=club.id) }}">{{ club.name }}</a>
|
|
||||||
|
|
||||||
{% if not club.is_active %}
|
|
||||||
({% trans %}inactive{% endtrans %})
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
{% if club.president %} - <a href="{{ url('core:user_profile', user_id=club.president.user.id) }}">{{ club.president.user }}</a>{% endif %}
|
<li><a href="{{ url('club:club_view', club_id=club.id) }}">{{ club.name }}</a>
|
||||||
{% if club.short_description %}<p>{{ club.short_description|markdown }}</p>{% endif %}
|
|
||||||
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
{%- if club.children.all()|length != 0 %}
|
{% if not club.is_active %}
|
||||||
<ul>
|
({% trans %}inactive{% endtrans %})
|
||||||
{%- for c in club.children.order_by('name') %}
|
{% endif %}
|
||||||
{{ display_club(c) }}
|
|
||||||
{%- endfor %}
|
{% if club.president %} - <a href="{{ url('core:user_profile', user_id=club.president.user.id) }}">{{ club.president.user }}</a>{% endif %}
|
||||||
</ul>
|
{% if club.short_description %}<p>{{ club.short_description|markdown }}</p>{% endif %}
|
||||||
{%- endif -%}
|
|
||||||
</li>
|
{% endif %}
|
||||||
|
|
||||||
|
{%- if club.children.all()|length != 0 %}
|
||||||
|
<ul>
|
||||||
|
{%- for c in club.children.order_by('name') %}
|
||||||
|
{{ display_club(c) }}
|
||||||
|
{%- endfor %}
|
||||||
|
</ul>
|
||||||
|
{%- endif -%}
|
||||||
|
</li>
|
||||||
{%- endmacro %}
|
{%- endmacro %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
{% if user.is_root %}
|
{% if user.is_root %}
|
||||||
<p><a href="{{ url('club:club_new') }}">{% trans %}New club{% endtrans %}</a></p>
|
<p><a href="{{ url('club:club_new') }}">{% trans %}New club{% endtrans %}</a></p>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if club_list %}
|
{% if club_list %}
|
||||||
<h3>{% trans %}Club list{% endtrans %}</h3>
|
<h3>{% trans %}Club list{% endtrans %}</h3>
|
||||||
<ul>
|
<ul>
|
||||||
{%- for c in club_list.all().order_by('name') if c.parent is none %}
|
{%- for c in club_list.all().order_by('name') if c.parent is none %}
|
||||||
{{ display_club(c) }}
|
{{ display_club(c) }}
|
||||||
{%- endfor %}
|
{%- endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
{% else %}
|
{% else %}
|
||||||
{% trans %}There is no club in this website.{% endtrans %}
|
{% trans %}There is no club in this website.{% endtrans %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
|
||||||
|
@ -2,81 +2,81 @@
|
|||||||
{% from 'core/macros.jinja' import user_profile_link, select_all_checkbox %}
|
{% from 'core/macros.jinja' import user_profile_link, select_all_checkbox %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<h2>{% trans %}Club members{% endtrans %}</h2>
|
<h2>{% trans %}Club members{% endtrans %}</h2>
|
||||||
{% if members %}
|
{% if members %}
|
||||||
<form action="{{ url('club:club_members', club_id=club.id) }}" id="users_old" method="post">
|
<form action="{{ url('club:club_members', club_id=club.id) }}" id="users_old" method="post">
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
{% set users_old = dict(form.users_old | groupby("choice_label")) %}
|
{% set users_old = dict(form.users_old | groupby("choice_label")) %}
|
||||||
{% if users_old %}
|
{% if users_old %}
|
||||||
{{ select_all_checkbox("users_old") }}
|
{{ select_all_checkbox("users_old") }}
|
||||||
<p></p>
|
<p></p>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<table>
|
<table>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<td>{% trans %}User{% endtrans %}</td>
|
<td>{% trans %}User{% endtrans %}</td>
|
||||||
<td>{% trans %}Role{% endtrans %}</td>
|
<td>{% trans %}Role{% endtrans %}</td>
|
||||||
<td>{% trans %}Description{% endtrans %}</td>
|
<td>{% trans %}Description{% endtrans %}</td>
|
||||||
<td>{% trans %}Since{% endtrans %}</td>
|
<td>{% trans %}Since{% endtrans %}</td>
|
||||||
{% if users_old %}
|
{% if users_old %}
|
||||||
<td>{% trans %}Mark as old{% endtrans %}</td>
|
<td>{% trans %}Mark as old{% endtrans %}</td>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
{% for m in members %}
|
{% for m in members %}
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{ user_profile_link(m.user) }}</td>
|
<td>{{ user_profile_link(m.user) }}</td>
|
||||||
<td>{{ settings.SITH_CLUB_ROLES[m.role] }}</td>
|
<td>{{ settings.SITH_CLUB_ROLES[m.role] }}</td>
|
||||||
<td>{{ m.description }}</td>
|
<td>{{ m.description }}</td>
|
||||||
<td>{{ m.start_date }}</td>
|
<td>{{ m.start_date }}</td>
|
||||||
{% if users_old %}
|
{% if users_old %}
|
||||||
<td>
|
<td>
|
||||||
{% set user_old = users_old[m.user.get_display_name()] %}
|
{% set user_old = users_old[m.user.get_display_name()] %}
|
||||||
{% if user_old %}
|
{% if user_old %}
|
||||||
{{ user_old[0].tag() }}
|
{{ user_old[0].tag() }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</td>
|
</td>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
{{ form.users_old.errors }}
|
{{ form.users_old.errors }}
|
||||||
{% if users_old %}
|
{% if users_old %}
|
||||||
<p></p>
|
<p></p>
|
||||||
<input type="submit" name="submit" value="{% trans %}Mark as old{% endtrans %}">
|
<input type="submit" name="submit" value="{% trans %}Mark as old{% endtrans %}">
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</form>
|
</form>
|
||||||
{% else %}
|
{% else %}
|
||||||
<p>{% trans %}There are no members in this club.{% endtrans %}</p>
|
<p>{% trans %}There are no members in this club.{% endtrans %}</p>
|
||||||
|
{% endif %}
|
||||||
|
<form action="{{ url('club:club_members', club_id=club.id) }}" id="add_users" method="post">
|
||||||
|
{% csrf_token %}
|
||||||
|
{{ form.non_field_errors() }}
|
||||||
|
<p>
|
||||||
|
{{ form.users.errors }}
|
||||||
|
<label for="{{ form.users.id_for_label }}">{{ form.users.label }} :</label>
|
||||||
|
{{ form.users }}
|
||||||
|
<span class="helptext">{{ form.users.help_text }}</span>
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
{{ form.role.errors }}
|
||||||
|
<label for="{{ form.role.id_for_label }}">{{ form.role.label }} :</label>
|
||||||
|
{{ form.role }}
|
||||||
|
</p>
|
||||||
|
{% if form.start_date %}
|
||||||
|
<p>
|
||||||
|
{{ form.start_date.errors }}
|
||||||
|
<label for="{{ form.start_date.id_for_label }}">{{ form.start_date.label }} :</label>
|
||||||
|
{{ form.start_date }}
|
||||||
|
</p>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<form action="{{ url('club:club_members', club_id=club.id) }}" id="add_users" method="post">
|
<p>
|
||||||
{% csrf_token %}
|
{{ form.description.errors }}
|
||||||
{{ form.non_field_errors() }}
|
<label for="{{ form.description.id_for_label }}">{{ form.description.label }} :</label>
|
||||||
<p>
|
{{ form.description }}
|
||||||
{{ form.users.errors }}
|
</p>
|
||||||
<label for="{{ form.users.id_for_label }}">{{ form.users.label }} :</label>
|
<p><input type="submit" value="{% trans %}Add{% endtrans %}" /></p>
|
||||||
{{ form.users }}
|
</form>
|
||||||
<span class="helptext">{{ form.users.help_text }}</span>
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
{{ form.role.errors }}
|
|
||||||
<label for="{{ form.role.id_for_label }}">{{ form.role.label }} :</label>
|
|
||||||
{{ form.role }}
|
|
||||||
</p>
|
|
||||||
{% if form.start_date %}
|
|
||||||
<p>
|
|
||||||
{{ form.start_date.errors }}
|
|
||||||
<label for="{{ form.start_date.id_for_label }}">{{ form.start_date.label }} :</label>
|
|
||||||
{{ form.start_date }}
|
|
||||||
</p>
|
|
||||||
{% endif %}
|
|
||||||
<p>
|
|
||||||
{{ form.description.errors }}
|
|
||||||
<label for="{{ form.description.id_for_label }}">{{ form.description.label }} :</label>
|
|
||||||
{{ form.description }}
|
|
||||||
</p>
|
|
||||||
<p><input type="submit" value="{% trans %}Add{% endtrans %}" /></p>
|
|
||||||
</form>
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@ -2,27 +2,27 @@
|
|||||||
{% from 'core/macros.jinja' import user_profile_link %}
|
{% from 'core/macros.jinja' import user_profile_link %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<h2>{% trans %}Club old members{% endtrans %}</h2>
|
<h2>{% trans %}Club old members{% endtrans %}</h2>
|
||||||
<table>
|
<table>
|
||||||
<thead>
|
<thead>
|
||||||
<td>{% trans %}User{% endtrans %}</td>
|
<td>{% trans %}User{% endtrans %}</td>
|
||||||
<td>{% trans %}Role{% endtrans %}</td>
|
<td>{% trans %}Role{% endtrans %}</td>
|
||||||
<td>{% trans %}Description{% endtrans %}</td>
|
<td>{% trans %}Description{% endtrans %}</td>
|
||||||
<td>{% trans %}From{% endtrans %}</td>
|
<td>{% trans %}From{% endtrans %}</td>
|
||||||
<td>{% trans %}To{% endtrans %}</td>
|
<td>{% trans %}To{% endtrans %}</td>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
{% for m in club.members.exclude(end_date=None).order_by('-role', 'description', '-end_date').all() %}
|
{% for m in club.members.exclude(end_date=None).order_by('-role', 'description', '-end_date').all() %}
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{ user_profile_link(m.user) }}</td>
|
<td>{{ user_profile_link(m.user) }}</td>
|
||||||
<td>{{ settings.SITH_CLUB_ROLES[m.role] }}</td>
|
<td>{{ settings.SITH_CLUB_ROLES[m.role] }}</td>
|
||||||
<td>{{ m.description }}</td>
|
<td>{{ m.description }}</td>
|
||||||
<td>{{ m.start_date }}</td>
|
<td>{{ m.start_date }}</td>
|
||||||
<td>{{ m.end_date }}</td>
|
<td>{{ m.end_date }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
|
||||||
|
@ -2,65 +2,65 @@
|
|||||||
{% from 'core/macros.jinja' import user_profile_link, paginate %}
|
{% from 'core/macros.jinja' import user_profile_link, paginate %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<h3>{% trans %}Sales{% endtrans %}</h3>
|
<h3>{% trans %}Sales{% endtrans %}</h3>
|
||||||
<form id="form" action="?page=1" method="post">
|
<form id="form" action="?page=1" method="post">
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
{{ form }}
|
{{ form }}
|
||||||
<p><input type="submit" value="{% trans %}Show{% endtrans %}" /></p>
|
<p><input type="submit" value="{% trans %}Show{% endtrans %}" /></p>
|
||||||
<p><input type="submit" value="{% trans %}Download as cvs{% endtrans %}" formaction="{{ url('club:sellings_csv', club_id=object.id) }}"/></p>
|
<p><input type="submit" value="{% trans %}Download as cvs{% endtrans %}" formaction="{{ url('club:sellings_csv', club_id=object.id) }}"/></p>
|
||||||
</form>
|
</form>
|
||||||
<p>
|
<p>
|
||||||
{% trans %}Quantity: {% endtrans %}{{ total_quantity }} {% trans %}units{% endtrans %}<br/>
|
{% trans %}Quantity: {% endtrans %}{{ total_quantity }} {% trans %}units{% endtrans %}<br/>
|
||||||
{% trans %}Total: {% endtrans %}{{ total }} €<br/>
|
{% trans %}Total: {% endtrans %}{{ total }} €<br/>
|
||||||
{% trans %}Benefit: {% endtrans %}{{ benefit }} €
|
{% trans %}Benefit: {% endtrans %}{{ benefit }} €
|
||||||
</p>
|
</p>
|
||||||
<table>
|
<table>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<td>{% trans %}Date{% endtrans %}</td>
|
<td>{% trans %}Date{% endtrans %}</td>
|
||||||
<td>{% trans %}Counter{% endtrans %}</td>
|
<td>{% trans %}Counter{% endtrans %}</td>
|
||||||
<td>{% trans %}Barman{% endtrans %}</td>
|
<td>{% trans %}Barman{% endtrans %}</td>
|
||||||
<td>{% trans %}Customer{% endtrans %}</td>
|
<td>{% trans %}Customer{% endtrans %}</td>
|
||||||
<td>{% trans %}Label{% endtrans %}</td>
|
<td>{% trans %}Label{% endtrans %}</td>
|
||||||
<td>{% trans %}Quantity{% endtrans %}</td>
|
<td>{% trans %}Quantity{% endtrans %}</td>
|
||||||
<td>{% trans %}Total{% endtrans %}</td>
|
<td>{% trans %}Total{% endtrans %}</td>
|
||||||
<td>{% trans %}Payment method{% endtrans %}</td>
|
<td>{% trans %}Payment method{% endtrans %}</td>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
{% for s in paginated_result %}
|
{% for s in paginated_result %}
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{ s.date|localtime|date(DATETIME_FORMAT) }} {{ s.date|localtime|time(DATETIME_FORMAT) }}</td>
|
<td>{{ s.date|localtime|date(DATETIME_FORMAT) }} {{ s.date|localtime|time(DATETIME_FORMAT) }}</td>
|
||||||
<td>{{ s.counter }}</td>
|
<td>{{ s.counter }}</td>
|
||||||
{% if s.seller %}
|
{% if s.seller %}
|
||||||
<td><a href="{{ s.seller.get_absolute_url() }}">{{ s.seller.get_display_name() }}</a></td>
|
<td><a href="{{ s.seller.get_absolute_url() }}">{{ s.seller.get_display_name() }}</a></td>
|
||||||
{% else %}
|
{% else %}
|
||||||
<td></td>
|
<td></td>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if s.customer %}
|
{% if s.customer %}
|
||||||
<td><a href="{{ s.customer.user.get_absolute_url() }}">{{ s.customer.user.get_display_name() }}</a></td>
|
<td><a href="{{ s.customer.user.get_absolute_url() }}">{{ s.customer.user.get_display_name() }}</a></td>
|
||||||
{% else %}
|
{% else %}
|
||||||
<td></td>
|
<td></td>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<td>{{ s.label }}</td>
|
<td>{{ s.label }}</td>
|
||||||
<td>{{ s.quantity }}</td>
|
<td>{{ s.quantity }}</td>
|
||||||
<td>{{ s.quantity * s.unit_price }} €</td>
|
<td>{{ s.quantity * s.unit_price }} €</td>
|
||||||
<td>{{ s.get_payment_method_display() }}</td>
|
<td>{{ s.get_payment_method_display() }}</td>
|
||||||
{% if s.is_owned_by(user) %}
|
{% if s.is_owned_by(user) %}
|
||||||
<td><a href="{{ url('counter:selling_delete', selling_id=s.id) }}">{% trans %}Delete{% endtrans %}</a></td>
|
<td><a href="{{ url('counter:selling_delete', selling_id=s.id) }}">{% trans %}Delete{% endtrans %}</a></td>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
function formPagination(link){
|
function formPagination(link){
|
||||||
$("form").attr("action", link.href);
|
$("form").attr("action", link.href);
|
||||||
link.href = "javascript:void(0)"; // block link action
|
link.href = "javascript:void(0)"; // block link action
|
||||||
$("form").submit();
|
$("form").submit();
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
{{ paginate(paginated_result, paginator, "formPagination(this)") }}
|
{{ paginate(paginated_result, paginator, "formPagination(this)") }}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,46 +1,46 @@
|
|||||||
{% extends "core/base.jinja" %}
|
{% extends "core/base.jinja" %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<h3>{% trans %}Club tools{% endtrans %}</h3>
|
<h3>{% trans %}Club tools{% endtrans %}</h3>
|
||||||
<div>
|
<div>
|
||||||
<h4>{% trans %}Communication:{% endtrans %}</h4>
|
<h4>{% trans %}Communication:{% endtrans %}</h4>
|
||||||
<ul>
|
<ul>
|
||||||
<li> <a href="{{ url('com:news_new') }}?club={{ object.id }}">{% trans %}Create a news{% endtrans %}</a></li>
|
<li> <a href="{{ url('com:news_new') }}?club={{ object.id }}">{% trans %}Create a news{% endtrans %}</a></li>
|
||||||
<li> <a href="{{ url('com:weekmail_article') }}?club={{ object.id }}">{% trans %}Post in the Weekmail{% endtrans %}</a></li>
|
<li> <a href="{{ url('com:weekmail_article') }}?club={{ object.id }}">{% trans %}Post in the Weekmail{% endtrans %}</a></li>
|
||||||
{% if object.trombi %}
|
{% if object.trombi %}
|
||||||
<li> <a href="{{ url('trombi:detail', trombi_id=object.trombi.id) }}">{% trans %}Edit Trombi{% endtrans %}</a></li>
|
<li> <a href="{{ url('trombi:detail', trombi_id=object.trombi.id) }}">{% trans %}Edit Trombi{% endtrans %}</a></li>
|
||||||
{% else %}
|
{% else %}
|
||||||
<li> <a href="{{ url('trombi:create', club_id=object.id) }}">{% trans %}New Trombi{% endtrans %}</a></li>
|
<li> <a href="{{ url('trombi:create', club_id=object.id) }}">{% trans %}New Trombi{% endtrans %}</a></li>
|
||||||
<li> <a href="{{ url('club:poster_list', club_id=object.id) }}">{% trans %}Posters{% endtrans %}</a></li>
|
<li> <a href="{{ url('club:poster_list', club_id=object.id) }}">{% trans %}Posters{% endtrans %}</a></li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</ul>
|
</ul>
|
||||||
<h4>{% trans %}Counters:{% endtrans %}</h4>
|
<h4>{% trans %}Counters:{% endtrans %}</h4>
|
||||||
<ul>
|
<ul>
|
||||||
{% if object.unix_name == settings.SITH_LAUNDERETTE_MANAGER['unix_name'] %}
|
{% if object.unix_name == settings.SITH_LAUNDERETTE_MANAGER['unix_name'] %}
|
||||||
{% for l in Launderette.objects.all() %}
|
{% for l in Launderette.objects.all() %}
|
||||||
<li><a href="{{ url('launderette:main_click', launderette_id=l.id) }}">{{ l }}</a></li>
|
<li><a href="{{ url('launderette:main_click', launderette_id=l.id) }}">{{ l }}</a></li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% elif object.counters.filter(type="OFFICE")|count > 0 %}
|
{% elif object.counters.filter(type="OFFICE")|count > 0 %}
|
||||||
{% for c in object.counters.filter(type="OFFICE") %}
|
{% for c in object.counters.filter(type="OFFICE") %}
|
||||||
<li>{{ c }}:
|
<li>{{ c }}:
|
||||||
<a href="{{ url('counter:details', counter_id=c.id) }}">View</a>
|
<a href="{{ url('counter:details', counter_id=c.id) }}">View</a>
|
||||||
<a href="{{ url('counter:admin', counter_id=c.id) }}">Edit</a>
|
<a href="{{ url('counter:admin', counter_id=c.id) }}">Edit</a>
|
||||||
</li>
|
</li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</ul>
|
</ul>
|
||||||
{% if object.club_account.exists() %}
|
{% if object.club_account.exists() %}
|
||||||
<h4>{% trans %}Accounting: {% endtrans %}</h4>
|
<h4>{% trans %}Accounting: {% endtrans %}</h4>
|
||||||
<ul>
|
<ul>
|
||||||
{% for ca in object.club_account.all() %}
|
{% for ca in object.club_account.all() %}
|
||||||
<li><a href="{{ url('accounting:club_details', c_account_id=ca.id) }}">{{ ca.get_display_name() }}</a></li>
|
<li><a href="{{ url('accounting:club_details', c_account_id=ca.id) }}">{{ ca.get_display_name() }}</a></li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if object.unix_name == settings.SITH_LAUNDERETTE_MANAGER['unix_name'] %}
|
{% if object.unix_name == settings.SITH_LAUNDERETTE_MANAGER['unix_name'] %}
|
||||||
<li><a href="{{ url('launderette:launderette_list') }}">{% trans %}Manage launderettes{% endtrans %}</a></li>
|
<li><a href="{{ url('launderette:launderette_list') }}">{% trans %}Manage launderettes{% endtrans %}</a></li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
|
||||||
|
@ -2,107 +2,107 @@
|
|||||||
{% from 'core/macros.jinja' import select_all_checkbox %}
|
{% from 'core/macros.jinja' import select_all_checkbox %}
|
||||||
|
|
||||||
{% block title %}
|
{% block title %}
|
||||||
{% trans %}Mailing lists{% endtrans %}
|
{% trans %}Mailing lists{% endtrans %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
|
|
||||||
<b>{% trans %}Remember : mailing lists need to be moderated, if your new created list is not shown wait until moderation takes action{% endtrans %}</b>
|
<b>{% trans %}Remember : mailing lists need to be moderated, if your new created list is not shown wait until moderation takes action{% endtrans %}</b>
|
||||||
|
|
||||||
{% if mailings_not_moderated %}
|
{% if mailings_not_moderated %}
|
||||||
<p>{% trans %}Mailing lists waiting for moderation{% endtrans %}</p>
|
<p>{% trans %}Mailing lists waiting for moderation{% endtrans %}</p>
|
||||||
<ul>
|
<ul>
|
||||||
{% for mailing in mailings_not_moderated %}
|
{% for mailing in mailings_not_moderated %}
|
||||||
<li>{{ mailing.email_full }}<a href="{{ url('club:mailing_delete', mailing_id=mailing.id) }}"> - {% trans %}Delete{% endtrans %}</a></li>
|
<li>{{ mailing.email_full }}<a href="{{ url('club:mailing_delete', mailing_id=mailing.id) }}"> - {% trans %}Delete{% endtrans %}</a></li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if mailings_moderated %}
|
{% if mailings_moderated %}
|
||||||
{% for mailing in mailings_moderated %}
|
{% for mailing in mailings_moderated %}
|
||||||
<h2>{% trans %}Mailing{% endtrans %} {{ mailing.email_full }}
|
<h2>{% trans %}Mailing{% endtrans %} {{ mailing.email_full }}
|
||||||
{%- if user.is_owner(mailing) -%}
|
{%- if user.is_owner(mailing) -%}
|
||||||
<a href="{{ url('club:mailing_delete', mailing_id=mailing.id) }}"> - {% trans %}Delete{% endtrans %}</a>
|
<a href="{{ url('club:mailing_delete', mailing_id=mailing.id) }}"> - {% trans %}Delete{% endtrans %}</a>
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
</h2>
|
</h2>
|
||||||
<form method="GET" action="{{ url('club:mailing_generate', mailing_id=mailing.id) }}" style="display:inline-block;">
|
<form method="GET" action="{{ url('club:mailing_generate', mailing_id=mailing.id) }}" style="display:inline-block;">
|
||||||
<input type="submit" name="generateMalingList" value="{% trans %}Generate mailing list{% endtrans %}">
|
<input type="submit" name="generateMalingList" value="{% trans %}Generate mailing list{% endtrans %}">
|
||||||
</form>
|
</form>
|
||||||
{% set form_mailing_removal = form["removal_" + mailing.id|string] %}
|
{% set form_mailing_removal = form["removal_" + mailing.id|string] %}
|
||||||
{% if form_mailing_removal.field.choices %}
|
{% if form_mailing_removal.field.choices %}
|
||||||
{% set ms = dict(mailing.subscriptions.all() | groupby('id')) %}
|
{% set ms = dict(mailing.subscriptions.all() | groupby('id')) %}
|
||||||
<form action="{{ url('club:mailing', club_id=club.id) }}" id="{{ form_mailing_removal.auto_id }}" method="post" enctype="multipart/form-data">
|
<form action="{{ url('club:mailing', club_id=club.id) }}" id="{{ form_mailing_removal.auto_id }}" method="post" enctype="multipart/form-data">
|
||||||
<p style="margin-bottom: 1em;">{{ select_all_checkbox(form_mailing_removal.auto_id) }}</p>
|
<p style="margin-bottom: 1em;">{{ select_all_checkbox(form_mailing_removal.auto_id) }}</p>
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
<input hidden type="number" name="{{ form.action.name }}" value="{{ form_actions.REMOVE_SUBSCRIPTION }}" />
|
<input hidden type="number" name="{{ form.action.name }}" value="{{ form_actions.REMOVE_SUBSCRIPTION }}" />
|
||||||
<table>
|
<table>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<td>{% trans %}User{% endtrans %}</td>
|
<td>{% trans %}User{% endtrans %}</td>
|
||||||
<td>{% trans %}Email{% endtrans %}</td>
|
<td>{% trans %}Email{% endtrans %}</td>
|
||||||
<td>{% trans %}Delete{% endtrans %}</td>
|
<td>{% trans %}Delete{% endtrans %}</td>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
{% for widget in form_mailing_removal.subwidgets %}
|
{% for widget in form_mailing_removal.subwidgets %}
|
||||||
{% set user = ms[widget.data.value.value][0] %}
|
{% set user = ms[widget.data.value.value][0] %}
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{ user.get_username }}</td>
|
<td>{{ user.get_username }}</td>
|
||||||
<td>{{ user.get_email }}</td>
|
<td>{{ user.get_email }}</td>
|
||||||
<td>{{ widget.tag() }}</td>
|
<td>{{ widget.tag() }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
{{ form_mailing_removal.errors }}
|
{{ form_mailing_removal.errors }}
|
||||||
<p><input type="submit" value="{% trans %}Remove from mailing list{% endtrans %}" /></p>
|
<p><input type="submit" value="{% trans %}Remove from mailing list{% endtrans %}" /></p>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
{% else %}
|
{% else %}
|
||||||
<p><b>{% trans %}There is no subscriber for this mailing list{% endtrans %}</b></p>
|
<p><b>{% trans %}There is no subscriber for this mailing list{% endtrans %}</b></p>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
{% else %}
|
{% else %}
|
||||||
<p>{% trans %}No mailing list existing for this club{% endtrans %}</p>
|
<p>{% trans %}No mailing list existing for this club{% endtrans %}</p>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<p>{{ form.non_field_errors() }}</p>
|
<p>{{ form.non_field_errors() }}</p>
|
||||||
{% if mailings_moderated %}
|
{% if mailings_moderated %}
|
||||||
<h2>{% trans %}New member{% endtrans %}</h2>
|
<h2>{% trans %}New member{% endtrans %}</h2>
|
||||||
<form action="{{ url('club:mailing', club_id=club.id) }}" method="post" enctype="multipart/form-data">
|
|
||||||
{% csrf_token %}
|
|
||||||
<p>
|
|
||||||
{{ form.subscription_mailing.errors }}
|
|
||||||
<label for="{{ form.subscription_mailing.id_for_label }}">{{ form.subscription_mailing.label }}</label>
|
|
||||||
{{ form.subscription_mailing }}
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
{{ form.subscription_users.errors }}
|
|
||||||
<label for="{{ form.subscription_users.id_for_label }}">{{ form.subscription_users.label }}</label>
|
|
||||||
{{ form.subscription_users }}
|
|
||||||
<span class="helptext">{{ form.subscription_users.help_text }}</span>
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
{{ form.subscription_email.errors }}
|
|
||||||
<label for="{{ form.subscription_email.id_for_label }}">{{ form.subscription_email.label }}</label>
|
|
||||||
{{ form.subscription_email }}
|
|
||||||
</p>
|
|
||||||
<input hidden type="number" name="{{ form.action.name }}" value="{{ form_actions.NEW_SUBSCRIPTION }}" />
|
|
||||||
<p><input type="submit" value="{% trans %}Add to mailing list{% endtrans %}" /></p>
|
|
||||||
</form>
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
<h2>{% trans %}New mailing{% endtrans %}</h2>
|
|
||||||
<form action="{{ url('club:mailing', club_id=club.id) }}" method="post" enctype="multipart/form-data">
|
<form action="{{ url('club:mailing', club_id=club.id) }}" method="post" enctype="multipart/form-data">
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
<p>
|
<p>
|
||||||
{{ form.mailing_email.errors }}
|
{{ form.subscription_mailing.errors }}
|
||||||
<label for="{{ form.mailing_email.id_for_label }}">{{ form.mailing_email.label }}</label>
|
<label for="{{ form.subscription_mailing.id_for_label }}">{{ form.subscription_mailing.label }}</label>
|
||||||
{{ form.mailing_email }}
|
{{ form.subscription_mailing }}
|
||||||
</p>
|
</p>
|
||||||
<input hidden type="number" name="{{ form.action.name }}" value="{{ form_actions.NEW_MALING }}" />
|
<p>
|
||||||
<p><input type="submit" value="{% trans %}Create mailing list{% endtrans %}" /></p>
|
{{ form.subscription_users.errors }}
|
||||||
|
<label for="{{ form.subscription_users.id_for_label }}">{{ form.subscription_users.label }}</label>
|
||||||
|
{{ form.subscription_users }}
|
||||||
|
<span class="helptext">{{ form.subscription_users.help_text }}</span>
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
{{ form.subscription_email.errors }}
|
||||||
|
<label for="{{ form.subscription_email.id_for_label }}">{{ form.subscription_email.label }}</label>
|
||||||
|
{{ form.subscription_email }}
|
||||||
|
</p>
|
||||||
|
<input hidden type="number" name="{{ form.action.name }}" value="{{ form_actions.NEW_SUBSCRIPTION }}" />
|
||||||
|
<p><input type="submit" value="{% trans %}Add to mailing list{% endtrans %}" /></p>
|
||||||
</form>
|
</form>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
<h2>{% trans %}New mailing{% endtrans %}</h2>
|
||||||
|
<form action="{{ url('club:mailing', club_id=club.id) }}" method="post" enctype="multipart/form-data">
|
||||||
|
{% csrf_token %}
|
||||||
|
<p>
|
||||||
|
{{ form.mailing_email.errors }}
|
||||||
|
<label for="{{ form.mailing_email.id_for_label }}">{{ form.mailing_email.label }}</label>
|
||||||
|
{{ form.mailing_email }}
|
||||||
|
</p>
|
||||||
|
<input hidden type="number" name="{{ form.action.name }}" value="{{ form_actions.NEW_MALING }}" />
|
||||||
|
<p><input type="submit" value="{% trans %}Create mailing list{% endtrans %}" /></p>
|
||||||
|
</form>
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@ -2,11 +2,11 @@
|
|||||||
{% from 'core/macros_pages.jinja' import page_history %}
|
{% from 'core/macros_pages.jinja' import page_history %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
{% if club.page %}
|
{% if club.page %}
|
||||||
{{ page_history(club.page) }}
|
{{ page_history(club.page) }}
|
||||||
{% else %}
|
{% else %}
|
||||||
{% trans %}No page existing for this club{% endtrans %}
|
{% trans %}No page existing for this club{% endtrans %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
{% from 'core/macros_pages.jinja' import page_edit_form %}
|
{% from 'core/macros_pages.jinja' import page_edit_form %}
|
||||||
|
|
||||||
{% block content %}
|
{% 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 %}
|
{% endblock %}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,48 +1,48 @@
|
|||||||
{% extends "core/base.jinja" %}
|
{% extends "core/base.jinja" %}
|
||||||
|
|
||||||
{% block title %}
|
{% block title %}
|
||||||
{% trans %}Club stats{% endtrans %}
|
{% trans %}Club stats{% endtrans %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
{% if club_list %}
|
{% if club_list %}
|
||||||
<h3>{% trans %}Club stats{% endtrans %}</h3>
|
<h3>{% trans %}Club stats{% endtrans %}</h3>
|
||||||
<form action="" method="GET">
|
<form action="" method="GET">
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
<p>
|
<p>
|
||||||
<select name="branch">
|
<select name="branch">
|
||||||
{% for b in settings.SITH_PROFILE_DEPARTMENTS %}
|
{% for b in settings.SITH_PROFILE_DEPARTMENTS %}
|
||||||
<option value="{{ b[0] }}">{{ b[0] }}</option>
|
<option value="{{ b[0] }}">{{ b[0] }}</option>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</select>
|
</select>
|
||||||
</p>
|
</p>
|
||||||
<p><input type="submit" value="{% trans %}Show{% endtrans %}" /></p>
|
<p><input type="submit" value="{% trans %}Show{% endtrans %}" /></p>
|
||||||
</form>
|
</form>
|
||||||
<table>
|
<table>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Club</td>
|
<td>Club</td>
|
||||||
<td>Member number</td>
|
<td>Member number</td>
|
||||||
<td>Old member number</td>
|
<td>Old member number</td>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
{% for c in club_list.order_by('id') %}
|
{% for c in club_list.order_by('id') %}
|
||||||
{% set members = c.members.all() %}
|
{% set members = c.members.all() %}
|
||||||
{% if request.GET['branch'] %}
|
{% if request.GET['branch'] %}
|
||||||
{% set members = members.filter(user__department=request.GET['branch']) %}
|
{% set members = members.filter(user__department=request.GET['branch']) %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{ c.get_display_name() }}</td>
|
<td>{{ c.get_display_name() }}</td>
|
||||||
<td>{{ members.filter(end_date=None, role__gt=settings.SITH_MAXIMUM_FREE_ROLE).count() }}</td>
|
<td>{{ members.filter(end_date=None, role__gt=settings.SITH_MAXIMUM_FREE_ROLE).count() }}</td>
|
||||||
<td>{{ members.exclude(end_date=None, role__gt=settings.SITH_MAXIMUM_FREE_ROLE).count() }}</td>
|
<td>{{ members.exclude(end_date=None, role__gt=settings.SITH_MAXIMUM_FREE_ROLE).count() }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
{% else %}
|
{% else %}
|
||||||
{% trans %}There is no club in this website.{% endtrans %}
|
{% trans %}There is no club in this website.{% endtrans %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,43 +1,43 @@
|
|||||||
{% extends "core/base.jinja" %}
|
{% extends "core/base.jinja" %}
|
||||||
|
|
||||||
{% block title %}
|
{% block title %}
|
||||||
{% trans %}Mailing lists administration{% endtrans %}
|
{% trans %}Mailing lists administration{% endtrans %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% macro display_mailings(list) %}
|
{% macro display_mailings(list) %}
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
<th>{% trans %}Email{% endtrans %}</th>
|
<th>{% trans %}Email{% endtrans %}</th>
|
||||||
<th>{% trans %}Club{%endtrans%}</th>
|
<th>{% trans %}Club{%endtrans%}</th>
|
||||||
<th>{% trans %}Actions{% endtrans %}</th>
|
<th>{% trans %}Actions{% endtrans %}</th>
|
||||||
</tr>
|
</tr>
|
||||||
{% for mailing in list %}
|
{% for mailing in list %}
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{ mailing.email_full }}</td>
|
<td>{{ mailing.email_full }}</td>
|
||||||
<td><a href="{{ url('club:mailing', club_id=mailing.club.id) }}">{{ mailing.club }}</a></td>
|
<td><a href="{{ url('club:mailing', club_id=mailing.club.id) }}">{{ mailing.club }}</a></td>
|
||||||
<td>
|
<td>
|
||||||
<a href="{{ url('com:mailing_delete', mailing_id=mailing.id) }}">{% trans %}Delete{% endtrans %}</a> - {% if not mailing.is_moderated %}<a href="{{ url('com:mailing_moderate', mailing_id=mailing.id) }}">{% trans %}Moderate{% endtrans %}</a>{% else %}{% trans user=mailing.moderator %}Moderated by {{ user }}{% endtrans %}{% endif %}
|
<a href="{{ url('com:mailing_delete', mailing_id=mailing.id) }}">{% trans %}Delete{% endtrans %}</a> - {% if not mailing.is_moderated %}<a href="{{ url('com:mailing_moderate', mailing_id=mailing.id) }}">{% trans %}Moderate{% endtrans %}</a>{% else %}{% trans user=mailing.moderator %}Moderated by {{ user }}{% endtrans %}{% endif %}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
{% endmacro %}
|
{% endmacro %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<h1>{% trans %}This page lists all mailing lists{% endtrans %}</h1>
|
<h1>{% trans %}This page lists all mailing lists{% endtrans %}</h1>
|
||||||
|
|
||||||
{% if has_unmoderated %}
|
{% if has_unmoderated %}
|
||||||
<h2>{% trans %}Not moderated mailing lists{% endtrans %}</h2>
|
<h2>{% trans %}Not moderated mailing lists{% endtrans %}</h2>
|
||||||
{{ display_mailings(unmoderated) }}
|
{{ display_mailings(unmoderated) }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<h2>{% trans %}Moderated mailing lists{% endtrans %}</h2>
|
<h2>{% trans %}Moderated mailing lists{% endtrans %}</h2>
|
||||||
{% if has_moderated %}
|
{% if has_moderated %}
|
||||||
{{ display_mailings(moderated) }}
|
{{ display_mailings(moderated) }}
|
||||||
{% else %}
|
{% else %}
|
||||||
<p>{% trans %}No mailing list existing{% endtrans %}</p>
|
<p>{% trans %}No mailing list existing{% endtrans %}</p>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
@ -2,317 +2,317 @@
|
|||||||
{% from 'core/macros.jinja' import user_profile_link %}
|
{% from 'core/macros.jinja' import user_profile_link %}
|
||||||
|
|
||||||
{% block title %}
|
{% block title %}
|
||||||
{% trans %}News admin{% endtrans %}
|
{% trans %}News admin{% endtrans %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<h3>{% trans %}News{% endtrans %}</h3>
|
<h3>{% trans %}News{% endtrans %}</h3>
|
||||||
|
|
||||||
<p><a href="{{ url('com:news_new') }}">{% trans %}Create news{% endtrans %}</a></p>
|
<p><a href="{{ url('com:news_new') }}">{% trans %}Create news{% endtrans %}</a></p>
|
||||||
|
|
||||||
<hr />
|
<hr />
|
||||||
<h4>{% trans %}Notices{% endtrans %}</h4>
|
<h4>{% trans %}Notices{% endtrans %}</h4>
|
||||||
{% set notices = object_list.filter(type="NOTICE").distinct().order_by('id') %}
|
{% set notices = object_list.filter(type="NOTICE").distinct().order_by('id') %}
|
||||||
<h5>{% trans %}Displayed notices{% endtrans %}</h5>
|
<h5>{% trans %}Displayed notices{% endtrans %}</h5>
|
||||||
<table>
|
<table>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<td>{% trans %}Type{% endtrans %}</td>
|
<td>{% trans %}Type{% endtrans %}</td>
|
||||||
<td>{% trans %}Title{% endtrans %}</td>
|
<td>{% trans %}Title{% endtrans %}</td>
|
||||||
<td>{% trans %}Summary{% endtrans %}</td>
|
<td>{% trans %}Summary{% endtrans %}</td>
|
||||||
<td>{% trans %}Club{% endtrans %}</td>
|
<td>{% trans %}Club{% endtrans %}</td>
|
||||||
<td>{% trans %}Author{% endtrans %}</td>
|
<td>{% trans %}Author{% endtrans %}</td>
|
||||||
<td>{% trans %}Moderator{% endtrans %}</td>
|
<td>{% trans %}Moderator{% endtrans %}</td>
|
||||||
<td>{% trans %}Actions{% endtrans %}</td>
|
<td>{% trans %}Actions{% endtrans %}</td>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
{% for news in notices.filter(is_moderated=True) %}
|
{% for news in notices.filter(is_moderated=True) %}
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{ news.get_type_display() }}</td>
|
<td>{{ news.get_type_display() }}</td>
|
||||||
<td>{{ news.title }}</td>
|
<td>{{ news.title }}</td>
|
||||||
<td>{{ news.summary|markdown }}</td>
|
<td>{{ news.summary|markdown }}</td>
|
||||||
<td><a href="{{ news.club.get_absolute_url() }}">{{ news.club }}</a></td>
|
<td><a href="{{ news.club.get_absolute_url() }}">{{ news.club }}</a></td>
|
||||||
<td>{{ user_profile_link(news.author) }}</td>
|
<td>{{ user_profile_link(news.author) }}</td>
|
||||||
<td>{{ user_profile_link(news.moderator) }}</td>
|
<td>{{ user_profile_link(news.moderator) }}</td>
|
||||||
<td><a href="{{ url('com:news_detail', news_id=news.id) }}">{% trans %}View{% endtrans %}</a>
|
<td><a href="{{ url('com:news_detail', news_id=news.id) }}">{% trans %}View{% endtrans %}</a>
|
||||||
<a href="{{ url('com:news_edit', news_id=news.id) }}">{% trans %}Edit{% endtrans %}</a>
|
<a href="{{ url('com:news_edit', news_id=news.id) }}">{% trans %}Edit{% endtrans %}</a>
|
||||||
<a href="{{ url('com:news_moderate', news_id=news.id) }}?remove">{% trans %}Remove{% endtrans %}</a>
|
<a href="{{ url('com:news_moderate', news_id=news.id) }}?remove">{% trans %}Remove{% endtrans %}</a>
|
||||||
<a href="{{ url('com:news_delete', news_id=news.id) }}">{% trans %}Delete{% endtrans %}</a>
|
<a href="{{ url('com:news_delete', news_id=news.id) }}">{% trans %}Delete{% endtrans %}</a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
<h5>{% trans %}Notices to moderate{% endtrans %}</h5>
|
<h5>{% trans %}Notices to moderate{% endtrans %}</h5>
|
||||||
<table>
|
<table>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<td>{% trans %}Type{% endtrans %}</td>
|
<td>{% trans %}Type{% endtrans %}</td>
|
||||||
<td>{% trans %}Title{% endtrans %}</td>
|
<td>{% trans %}Title{% endtrans %}</td>
|
||||||
<td>{% trans %}Summary{% endtrans %}</td>
|
<td>{% trans %}Summary{% endtrans %}</td>
|
||||||
<td>{% trans %}Club{% endtrans %}</td>
|
<td>{% trans %}Club{% endtrans %}</td>
|
||||||
<td>{% trans %}Author{% endtrans %}</td>
|
<td>{% trans %}Author{% endtrans %}</td>
|
||||||
<td>{% trans %}Actions{% endtrans %}</td>
|
<td>{% trans %}Actions{% endtrans %}</td>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
{% for news in notices.filter(is_moderated=False) %}
|
{% for news in notices.filter(is_moderated=False) %}
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{ news.get_type_display() }}</td>
|
<td>{{ news.get_type_display() }}</td>
|
||||||
<td>{{ news.title }}</td>
|
<td>{{ news.title }}</td>
|
||||||
<td>{{ news.summary|markdown }}</td>
|
<td>{{ news.summary|markdown }}</td>
|
||||||
<td><a href="{{ news.club.get_absolute_url() }}">{{ news.club }}</a></td>
|
<td><a href="{{ news.club.get_absolute_url() }}">{{ news.club }}</a></td>
|
||||||
<td>{{ user_profile_link(news.author) }}</td>
|
<td>{{ user_profile_link(news.author) }}</td>
|
||||||
<td><a href="{{ url('com:news_detail', news_id=news.id) }}">{% trans %}View{% endtrans %}</a>
|
<td><a href="{{ url('com:news_detail', news_id=news.id) }}">{% trans %}View{% endtrans %}</a>
|
||||||
<a href="{{ url('com:news_edit', news_id=news.id) }}">{% trans %}Edit{% endtrans %}</a>
|
<a href="{{ url('com:news_edit', news_id=news.id) }}">{% trans %}Edit{% endtrans %}</a>
|
||||||
<a href="{{ url('com:news_moderate', news_id=news.id) }}">{% trans %}Moderate{% endtrans %}</a>
|
<a href="{{ url('com:news_moderate', news_id=news.id) }}">{% trans %}Moderate{% endtrans %}</a>
|
||||||
<a href="{{ url('com:news_delete', news_id=news.id) }}">{% trans %}Delete{% endtrans %}</a>
|
<a href="{{ url('com:news_delete', news_id=news.id) }}">{% trans %}Delete{% endtrans %}</a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<hr />
|
<hr />
|
||||||
<h4>{% trans %}Weeklies{% endtrans %}</h4>
|
<h4>{% trans %}Weeklies{% endtrans %}</h4>
|
||||||
{% set weeklies = object_list.filter(type="WEEKLY", dates__end_date__gte=timezone.now()).distinct().order_by('id') %}
|
{% set weeklies = object_list.filter(type="WEEKLY", dates__end_date__gte=timezone.now()).distinct().order_by('id') %}
|
||||||
<h5>{% trans %}Displayed weeklies{% endtrans %}</h5>
|
<h5>{% trans %}Displayed weeklies{% endtrans %}</h5>
|
||||||
<table>
|
<table>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<td>{% trans %}Type{% endtrans %}</td>
|
<td>{% trans %}Type{% endtrans %}</td>
|
||||||
<td>{% trans %}Title{% endtrans %}</td>
|
<td>{% trans %}Title{% endtrans %}</td>
|
||||||
<td>{% trans %}Summary{% endtrans %}</td>
|
<td>{% trans %}Summary{% endtrans %}</td>
|
||||||
<td>{% trans %}Club{% endtrans %}</td>
|
<td>{% trans %}Club{% endtrans %}</td>
|
||||||
<td>{% trans %}Author{% endtrans %}</td>
|
<td>{% trans %}Author{% endtrans %}</td>
|
||||||
<td>{% trans %}Moderator{% endtrans %}</td>
|
<td>{% trans %}Moderator{% endtrans %}</td>
|
||||||
<td>{% trans %}Dates{% endtrans %}</td>
|
<td>{% trans %}Dates{% endtrans %}</td>
|
||||||
<td>{% trans %}Actions{% endtrans %}</td>
|
<td>{% trans %}Actions{% endtrans %}</td>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
{% for news in weeklies.filter(is_moderated=True) %}
|
{% for news in weeklies.filter(is_moderated=True) %}
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{ news.get_type_display() }}</td>
|
<td>{{ news.get_type_display() }}</td>
|
||||||
<td>{{ news.title }}</td>
|
<td>{{ news.title }}</td>
|
||||||
<td>{{ news.summary|markdown }}</td>
|
<td>{{ news.summary|markdown }}</td>
|
||||||
<td><a href="{{ news.club.get_absolute_url() }}">{{ news.club }}</a></td>
|
<td><a href="{{ news.club.get_absolute_url() }}">{{ news.club }}</a></td>
|
||||||
<td>{{ user_profile_link(news.author) }}</td>
|
<td>{{ user_profile_link(news.author) }}</td>
|
||||||
<td>{{ user_profile_link(news.moderator) }}</td>
|
<td>{{ user_profile_link(news.moderator) }}</td>
|
||||||
<td>
|
<td>
|
||||||
<ul>
|
<ul>
|
||||||
{% for d in news.dates.all() %}
|
{% for d in news.dates.all() %}
|
||||||
<li>{{ d.start_date|localtime|date(DATETIME_FORMAT) }}
|
<li>{{ d.start_date|localtime|date(DATETIME_FORMAT) }}
|
||||||
{{ d.start_date|localtime|time(DATETIME_FORMAT) }} -
|
{{ d.start_date|localtime|time(DATETIME_FORMAT) }} -
|
||||||
{{ d.end_date|localtime|date(DATETIME_FORMAT) }}
|
{{ d.end_date|localtime|date(DATETIME_FORMAT) }}
|
||||||
{{ d.end_date|localtime|time(DATETIME_FORMAT) }}
|
{{ d.end_date|localtime|time(DATETIME_FORMAT) }}
|
||||||
</li>
|
</li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
</td>
|
</td>
|
||||||
<td><a href="{{ url('com:news_detail', news_id=news.id) }}">{% trans %}View{% endtrans %}</a>
|
<td><a href="{{ url('com:news_detail', news_id=news.id) }}">{% trans %}View{% endtrans %}</a>
|
||||||
<a href="{{ url('com:news_edit', news_id=news.id) }}">{% trans %}Edit{% endtrans %}</a>
|
<a href="{{ url('com:news_edit', news_id=news.id) }}">{% trans %}Edit{% endtrans %}</a>
|
||||||
<a href="{{ url('com:news_moderate', news_id=news.id) }}?remove">{% trans %}Remove{% endtrans %}</a>
|
<a href="{{ url('com:news_moderate', news_id=news.id) }}?remove">{% trans %}Remove{% endtrans %}</a>
|
||||||
<a href="{{ url('com:news_delete', news_id=news.id) }}">{% trans %}Delete{% endtrans %}</a>
|
<a href="{{ url('com:news_delete', news_id=news.id) }}">{% trans %}Delete{% endtrans %}</a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
<h5>{% trans %}Weeklies to moderate{% endtrans %}</h5>
|
<h5>{% trans %}Weeklies to moderate{% endtrans %}</h5>
|
||||||
<table>
|
<table>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<td>{% trans %}Type{% endtrans %}</td>
|
<td>{% trans %}Type{% endtrans %}</td>
|
||||||
<td>{% trans %}Title{% endtrans %}</td>
|
<td>{% trans %}Title{% endtrans %}</td>
|
||||||
<td>{% trans %}Summary{% endtrans %}</td>
|
<td>{% trans %}Summary{% endtrans %}</td>
|
||||||
<td>{% trans %}Club{% endtrans %}</td>
|
<td>{% trans %}Club{% endtrans %}</td>
|
||||||
<td>{% trans %}Author{% endtrans %}</td>
|
<td>{% trans %}Author{% endtrans %}</td>
|
||||||
<td>{% trans %}Dates{% endtrans %}</td>
|
<td>{% trans %}Dates{% endtrans %}</td>
|
||||||
<td>{% trans %}Actions{% endtrans %}</td>
|
<td>{% trans %}Actions{% endtrans %}</td>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
{% for news in weeklies.filter(is_moderated=False) %}
|
{% for news in weeklies.filter(is_moderated=False) %}
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{ news.get_type_display() }}</td>
|
<td>{{ news.get_type_display() }}</td>
|
||||||
<td>{{ news.title }}</td>
|
<td>{{ news.title }}</td>
|
||||||
<td>{{ news.summary|markdown }}</td>
|
<td>{{ news.summary|markdown }}</td>
|
||||||
<td><a href="{{ news.club.get_absolute_url() }}">{{ news.club }}</a></td>
|
<td><a href="{{ news.club.get_absolute_url() }}">{{ news.club }}</a></td>
|
||||||
<td>{{ user_profile_link(news.author) }}</td>
|
<td>{{ user_profile_link(news.author) }}</td>
|
||||||
<td>
|
<td>
|
||||||
<ul>
|
<ul>
|
||||||
{% for d in news.dates.all() %}
|
{% for d in news.dates.all() %}
|
||||||
<li>{{ d.start_date|localtime|date(DATETIME_FORMAT) }}
|
<li>{{ d.start_date|localtime|date(DATETIME_FORMAT) }}
|
||||||
{{ d.start_date|localtime|time(DATETIME_FORMAT) }} -
|
{{ d.start_date|localtime|time(DATETIME_FORMAT) }} -
|
||||||
{{ d.end_date|localtime|date(DATETIME_FORMAT) }}
|
{{ d.end_date|localtime|date(DATETIME_FORMAT) }}
|
||||||
{{ d.end_date|localtime|time(DATETIME_FORMAT) }}
|
{{ d.end_date|localtime|time(DATETIME_FORMAT) }}
|
||||||
</li>
|
</li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
</td>
|
</td>
|
||||||
<td><a href="{{ url('com:news_detail', news_id=news.id) }}">{% trans %}View{% endtrans %}</a>
|
<td><a href="{{ url('com:news_detail', news_id=news.id) }}">{% trans %}View{% endtrans %}</a>
|
||||||
<a href="{{ url('com:news_edit', news_id=news.id) }}">{% trans %}Edit{% endtrans %}</a>
|
<a href="{{ url('com:news_edit', news_id=news.id) }}">{% trans %}Edit{% endtrans %}</a>
|
||||||
<a href="{{ url('com:news_moderate', news_id=news.id) }}">{% trans %}Moderate{% endtrans %}</a>
|
<a href="{{ url('com:news_moderate', news_id=news.id) }}">{% trans %}Moderate{% endtrans %}</a>
|
||||||
<a href="{{ url('com:news_delete', news_id=news.id) }}">{% trans %}Delete{% endtrans %}</a>
|
<a href="{{ url('com:news_delete', news_id=news.id) }}">{% trans %}Delete{% endtrans %}</a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<hr />
|
<hr />
|
||||||
<h4>{% trans %}Calls{% endtrans %}</h4>
|
<h4>{% trans %}Calls{% endtrans %}</h4>
|
||||||
{% set calls = object_list.filter(type="CALL", dates__end_date__gte=timezone.now()).distinct().order_by('id') %}
|
{% set calls = object_list.filter(type="CALL", dates__end_date__gte=timezone.now()).distinct().order_by('id') %}
|
||||||
<h5>{% trans %}Displayed calls{% endtrans %}</h5>
|
<h5>{% trans %}Displayed calls{% endtrans %}</h5>
|
||||||
<table>
|
<table>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<td>{% trans %}Type{% endtrans %}</td>
|
<td>{% trans %}Type{% endtrans %}</td>
|
||||||
<td>{% trans %}Title{% endtrans %}</td>
|
<td>{% trans %}Title{% endtrans %}</td>
|
||||||
<td>{% trans %}Summary{% endtrans %}</td>
|
<td>{% trans %}Summary{% endtrans %}</td>
|
||||||
<td>{% trans %}Club{% endtrans %}</td>
|
<td>{% trans %}Club{% endtrans %}</td>
|
||||||
<td>{% trans %}Author{% endtrans %}</td>
|
<td>{% trans %}Author{% endtrans %}</td>
|
||||||
<td>{% trans %}Moderator{% endtrans %}</td>
|
<td>{% trans %}Moderator{% endtrans %}</td>
|
||||||
<td>{% trans %}Start{% endtrans %}</td>
|
<td>{% trans %}Start{% endtrans %}</td>
|
||||||
<td>{% trans %}End{% endtrans %}</td>
|
<td>{% trans %}End{% endtrans %}</td>
|
||||||
<td>{% trans %}Actions{% endtrans %}</td>
|
<td>{% trans %}Actions{% endtrans %}</td>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
{% for news in calls.filter(is_moderated=True) %}
|
{% for news in calls.filter(is_moderated=True) %}
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{ news.get_type_display() }}</td>
|
<td>{{ news.get_type_display() }}</td>
|
||||||
<td>{{ news.title }}</td>
|
<td>{{ news.title }}</td>
|
||||||
<td>{{ news.summary|markdown }}</td>
|
<td>{{ news.summary|markdown }}</td>
|
||||||
<td><a href="{{ news.club.get_absolute_url() }}">{{ news.club }}</a></td>
|
<td><a href="{{ news.club.get_absolute_url() }}">{{ news.club }}</a></td>
|
||||||
<td>{{ user_profile_link(news.author) }}</td>
|
<td>{{ user_profile_link(news.author) }}</td>
|
||||||
<td>{{ user_profile_link(news.moderator) }}</td>
|
<td>{{ user_profile_link(news.moderator) }}</td>
|
||||||
<td>{{ news.dates.first().start_date|localtime|date(DATETIME_FORMAT) }}
|
<td>{{ news.dates.first().start_date|localtime|date(DATETIME_FORMAT) }}
|
||||||
{{ news.dates.first().start_date|localtime|time(DATETIME_FORMAT) }}</td>
|
{{ news.dates.first().start_date|localtime|time(DATETIME_FORMAT) }}</td>
|
||||||
<td>{{ news.dates.first().end_date|localtime|date(DATETIME_FORMAT) }}
|
<td>{{ news.dates.first().end_date|localtime|date(DATETIME_FORMAT) }}
|
||||||
{{ news.dates.first().end_date|localtime|time(DATETIME_FORMAT) }}</td>
|
{{ news.dates.first().end_date|localtime|time(DATETIME_FORMAT) }}</td>
|
||||||
<td><a href="{{ url('com:news_detail', news_id=news.id) }}">{% trans %}View{% endtrans %}</a>
|
<td><a href="{{ url('com:news_detail', news_id=news.id) }}">{% trans %}View{% endtrans %}</a>
|
||||||
<a href="{{ url('com:news_edit', news_id=news.id) }}">{% trans %}Edit{% endtrans %}</a>
|
<a href="{{ url('com:news_edit', news_id=news.id) }}">{% trans %}Edit{% endtrans %}</a>
|
||||||
<a href="{{ url('com:news_moderate', news_id=news.id) }}?remove">{% trans %}Remove{% endtrans %}</a>
|
<a href="{{ url('com:news_moderate', news_id=news.id) }}?remove">{% trans %}Remove{% endtrans %}</a>
|
||||||
<a href="{{ url('com:news_delete', news_id=news.id) }}">{% trans %}Delete{% endtrans %}</a>
|
<a href="{{ url('com:news_delete', news_id=news.id) }}">{% trans %}Delete{% endtrans %}</a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
<h5>{% trans %}Calls to moderate{% endtrans %}</h5>
|
<h5>{% trans %}Calls to moderate{% endtrans %}</h5>
|
||||||
<table>
|
<table>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<td>{% trans %}Type{% endtrans %}</td>
|
<td>{% trans %}Type{% endtrans %}</td>
|
||||||
<td>{% trans %}Title{% endtrans %}</td>
|
<td>{% trans %}Title{% endtrans %}</td>
|
||||||
<td>{% trans %}Summary{% endtrans %}</td>
|
<td>{% trans %}Summary{% endtrans %}</td>
|
||||||
<td>{% trans %}Club{% endtrans %}</td>
|
<td>{% trans %}Club{% endtrans %}</td>
|
||||||
<td>{% trans %}Author{% endtrans %}</td>
|
<td>{% trans %}Author{% endtrans %}</td>
|
||||||
<td>{% trans %}Start{% endtrans %}</td>
|
<td>{% trans %}Start{% endtrans %}</td>
|
||||||
<td>{% trans %}End{% endtrans %}</td>
|
<td>{% trans %}End{% endtrans %}</td>
|
||||||
<td>{% trans %}Actions{% endtrans %}</td>
|
<td>{% trans %}Actions{% endtrans %}</td>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
{% for news in calls.filter(is_moderated=False) %}
|
{% for news in calls.filter(is_moderated=False) %}
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{ news.get_type_display() }}</td>
|
<td>{{ news.get_type_display() }}</td>
|
||||||
<td>{{ news.title }}</td>
|
<td>{{ news.title }}</td>
|
||||||
<td>{{ news.summary|markdown }}</td>
|
<td>{{ news.summary|markdown }}</td>
|
||||||
<td><a href="{{ news.club.get_absolute_url() }}">{{ news.club }}</a></td>
|
<td><a href="{{ news.club.get_absolute_url() }}">{{ news.club }}</a></td>
|
||||||
<td>{{ user_profile_link(news.author) }}</td>
|
<td>{{ user_profile_link(news.author) }}</td>
|
||||||
<td>{{ news.dates.first().start_date|localtime|date(DATETIME_FORMAT) }}
|
<td>{{ news.dates.first().start_date|localtime|date(DATETIME_FORMAT) }}
|
||||||
{{ news.dates.first().start_date|localtime|time(DATETIME_FORMAT) }}</td>
|
{{ news.dates.first().start_date|localtime|time(DATETIME_FORMAT) }}</td>
|
||||||
<td>{{ news.dates.first().end_date|localtime|date(DATETIME_FORMAT) }}
|
<td>{{ news.dates.first().end_date|localtime|date(DATETIME_FORMAT) }}
|
||||||
{{ news.dates.first().end_date|localtime|time(DATETIME_FORMAT) }}</td>
|
{{ news.dates.first().end_date|localtime|time(DATETIME_FORMAT) }}</td>
|
||||||
<td><a href="{{ url('com:news_detail', news_id=news.id) }}">{% trans %}View{% endtrans %}</a>
|
<td><a href="{{ url('com:news_detail', news_id=news.id) }}">{% trans %}View{% endtrans %}</a>
|
||||||
<a href="{{ url('com:news_edit', news_id=news.id) }}">{% trans %}Edit{% endtrans %}</a>
|
<a href="{{ url('com:news_edit', news_id=news.id) }}">{% trans %}Edit{% endtrans %}</a>
|
||||||
<a href="{{ url('com:news_moderate', news_id=news.id) }}">{% trans %}Moderate{% endtrans %}</a>
|
<a href="{{ url('com:news_moderate', news_id=news.id) }}">{% trans %}Moderate{% endtrans %}</a>
|
||||||
<a href="{{ url('com:news_delete', news_id=news.id) }}">{% trans %}Delete{% endtrans %}</a>
|
<a href="{{ url('com:news_delete', news_id=news.id) }}">{% trans %}Delete{% endtrans %}</a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<hr />
|
<hr />
|
||||||
<h4>{% trans %}Events{% endtrans %}</h4>
|
<h4>{% trans %}Events{% endtrans %}</h4>
|
||||||
{% set events = object_list.filter(type="EVENT", dates__end_date__gte=timezone.now()).distinct().order_by('id') %}
|
{% set events = object_list.filter(type="EVENT", dates__end_date__gte=timezone.now()).distinct().order_by('id') %}
|
||||||
<h5>{% trans %}Displayed events{% endtrans %}</h5>
|
<h5>{% trans %}Displayed events{% endtrans %}</h5>
|
||||||
<table>
|
<table>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<td>{% trans %}Type{% endtrans %}</td>
|
<td>{% trans %}Type{% endtrans %}</td>
|
||||||
<td>{% trans %}Title{% endtrans %}</td>
|
<td>{% trans %}Title{% endtrans %}</td>
|
||||||
<td>{% trans %}Summary{% endtrans %}</td>
|
<td>{% trans %}Summary{% endtrans %}</td>
|
||||||
<td>{% trans %}Club{% endtrans %}</td>
|
<td>{% trans %}Club{% endtrans %}</td>
|
||||||
<td>{% trans %}Author{% endtrans %}</td>
|
<td>{% trans %}Author{% endtrans %}</td>
|
||||||
<td>{% trans %}Moderator{% endtrans %}</td>
|
<td>{% trans %}Moderator{% endtrans %}</td>
|
||||||
<td>{% trans %}Start{% endtrans %}</td>
|
<td>{% trans %}Start{% endtrans %}</td>
|
||||||
<td>{% trans %}End{% endtrans %}</td>
|
<td>{% trans %}End{% endtrans %}</td>
|
||||||
<td>{% trans %}Actions{% endtrans %}</td>
|
<td>{% trans %}Actions{% endtrans %}</td>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
{% for news in events.filter(is_moderated=True) %}
|
{% for news in events.filter(is_moderated=True) %}
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{ news.get_type_display() }}</td>
|
<td>{{ news.get_type_display() }}</td>
|
||||||
<td>{{ news.title }}</td>
|
<td>{{ news.title }}</td>
|
||||||
<td>{{ news.summary|markdown }}</td>
|
<td>{{ news.summary|markdown }}</td>
|
||||||
<td><a href="{{ news.club.get_absolute_url() }}">{{ news.club }}</a></td>
|
<td><a href="{{ news.club.get_absolute_url() }}">{{ news.club }}</a></td>
|
||||||
<td>{{ user_profile_link(news.author) }}</td>
|
<td>{{ user_profile_link(news.author) }}</td>
|
||||||
<td>{{ user_profile_link(news.moderator) }}</td>
|
<td>{{ user_profile_link(news.moderator) }}</td>
|
||||||
<td>{{ news.dates.first().start_date|localtime|date(DATETIME_FORMAT) }}
|
<td>{{ news.dates.first().start_date|localtime|date(DATETIME_FORMAT) }}
|
||||||
{{ news.dates.first().start_date|localtime|time(DATETIME_FORMAT) }}</td>
|
{{ news.dates.first().start_date|localtime|time(DATETIME_FORMAT) }}</td>
|
||||||
<td>{{ news.dates.first().end_date|localtime|date(DATETIME_FORMAT) }}
|
<td>{{ news.dates.first().end_date|localtime|date(DATETIME_FORMAT) }}
|
||||||
{{ news.dates.first().end_date|localtime|time(DATETIME_FORMAT) }}</td>
|
{{ news.dates.first().end_date|localtime|time(DATETIME_FORMAT) }}</td>
|
||||||
<td><a href="{{ url('com:news_detail', news_id=news.id) }}">{% trans %}View{% endtrans %}</a>
|
<td><a href="{{ url('com:news_detail', news_id=news.id) }}">{% trans %}View{% endtrans %}</a>
|
||||||
<a href="{{ url('com:news_edit', news_id=news.id) }}">{% trans %}Edit{% endtrans %}</a>
|
<a href="{{ url('com:news_edit', news_id=news.id) }}">{% trans %}Edit{% endtrans %}</a>
|
||||||
<a href="{{ url('com:news_moderate', news_id=news.id) }}?remove">{% trans %}Remove{% endtrans %}</a>
|
<a href="{{ url('com:news_moderate', news_id=news.id) }}?remove">{% trans %}Remove{% endtrans %}</a>
|
||||||
<a href="{{ url('com:news_delete', news_id=news.id) }}">{% trans %}Delete{% endtrans %}</a>
|
<a href="{{ url('com:news_delete', news_id=news.id) }}">{% trans %}Delete{% endtrans %}</a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
<h5>{% trans %}Events to moderate{% endtrans %}</h5>
|
<h5>{% trans %}Events to moderate{% endtrans %}</h5>
|
||||||
<table>
|
<table>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<td>{% trans %}Type{% endtrans %}</td>
|
<td>{% trans %}Type{% endtrans %}</td>
|
||||||
<td>{% trans %}Title{% endtrans %}</td>
|
<td>{% trans %}Title{% endtrans %}</td>
|
||||||
<td>{% trans %}Summary{% endtrans %}</td>
|
<td>{% trans %}Summary{% endtrans %}</td>
|
||||||
<td>{% trans %}Club{% endtrans %}</td>
|
<td>{% trans %}Club{% endtrans %}</td>
|
||||||
<td>{% trans %}Author{% endtrans %}</td>
|
<td>{% trans %}Author{% endtrans %}</td>
|
||||||
<td>{% trans %}Start{% endtrans %}</td>
|
<td>{% trans %}Start{% endtrans %}</td>
|
||||||
<td>{% trans %}End{% endtrans %}</td>
|
<td>{% trans %}End{% endtrans %}</td>
|
||||||
<td>{% trans %}Actions{% endtrans %}</td>
|
<td>{% trans %}Actions{% endtrans %}</td>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
{% for news in events.filter(is_moderated=False) %}
|
{% for news in events.filter(is_moderated=False) %}
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{ news.get_type_display() }}</td>
|
<td>{{ news.get_type_display() }}</td>
|
||||||
<td>{{ news.title }}</td>
|
<td>{{ news.title }}</td>
|
||||||
<td>{{ news.summary|markdown }}</td>
|
<td>{{ news.summary|markdown }}</td>
|
||||||
<td><a href="{{ news.club.get_absolute_url() }}">{{ news.club }}</a></td>
|
<td><a href="{{ news.club.get_absolute_url() }}">{{ news.club }}</a></td>
|
||||||
<td>{{ user_profile_link(news.author) }}</td>
|
<td>{{ user_profile_link(news.author) }}</td>
|
||||||
<td>{{ news.dates.first().start_date|localtime|date(DATETIME_FORMAT) }}
|
<td>{{ news.dates.first().start_date|localtime|date(DATETIME_FORMAT) }}
|
||||||
{{ news.dates.first().start_date|localtime|time(DATETIME_FORMAT) }}</td>
|
{{ news.dates.first().start_date|localtime|time(DATETIME_FORMAT) }}</td>
|
||||||
<td>{{ news.dates.first().end_date|localtime|date(DATETIME_FORMAT) }}
|
<td>{{ news.dates.first().end_date|localtime|date(DATETIME_FORMAT) }}
|
||||||
{{ news.dates.first().end_date|localtime|time(DATETIME_FORMAT) }}</td>
|
{{ news.dates.first().end_date|localtime|time(DATETIME_FORMAT) }}</td>
|
||||||
<td><a href="{{ url('com:news_detail', news_id=news.id) }}">{% trans %}View{% endtrans %}</a>
|
<td><a href="{{ url('com:news_detail', news_id=news.id) }}">{% trans %}View{% endtrans %}</a>
|
||||||
<a href="{{ url('com:news_edit', news_id=news.id) }}">{% trans %}Edit{% endtrans %}</a>
|
<a href="{{ url('com:news_edit', news_id=news.id) }}">{% trans %}Edit{% endtrans %}</a>
|
||||||
<a href="{{ url('com:news_moderate', news_id=news.id) }}">{% trans %}Moderate{% endtrans %}</a>
|
<a href="{{ url('com:news_moderate', news_id=news.id) }}">{% trans %}Moderate{% endtrans %}</a>
|
||||||
<a href="{{ url('com:news_delete', news_id=news.id) }}">{% trans %}Delete{% endtrans %}</a>
|
<a href="{{ url('com:news_delete', news_id=news.id) }}">{% trans %}Delete{% endtrans %}</a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
|
||||||
|
@ -2,48 +2,48 @@
|
|||||||
{% from 'core/macros.jinja' import user_profile_link, facebook_share, tweet, link_news_logo, gen_news_metatags %}
|
{% from 'core/macros.jinja' import user_profile_link, facebook_share, tweet, link_news_logo, gen_news_metatags %}
|
||||||
|
|
||||||
{% block title %}
|
{% block title %}
|
||||||
{% trans %}News{% endtrans %} -
|
{% trans %}News{% endtrans %} -
|
||||||
{{ object.title }}
|
{{ object.title }}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block head %}
|
{% block head %}
|
||||||
{{ super() }}
|
{{ super() }}
|
||||||
{{ gen_news_metatags(news) }}
|
{{ gen_news_metatags(news) }}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<p><a href="{{ url('com:news_list') }}">{% trans %}Back to news{% endtrans %}</a></p>
|
<p><a href="{{ url('com:news_list') }}">{% trans %}Back to news{% endtrans %}</a></p>
|
||||||
<section id="news_details">
|
<section id="news_details">
|
||||||
<div class="club_logo">
|
<div class="club_logo">
|
||||||
<img src="{{ link_news_logo(news)}}" alt="{{ news.club }}" />
|
<img src="{{ link_news_logo(news)}}" alt="{{ news.club }}" />
|
||||||
<a href="{{ news.club.get_absolute_url() }}">{{ news.club }}</a>
|
<a href="{{ news.club.get_absolute_url() }}">{{ news.club }}</a>
|
||||||
</div>
|
</div>
|
||||||
<h4>{{ news.title }}</h4>
|
<h4>{{ news.title }}</h4>
|
||||||
<p class="date">
|
<p class="date">
|
||||||
<span>{{ news.dates.first().start_date|localtime|date(DATETIME_FORMAT) }}
|
<span>{{ news.dates.first().start_date|localtime|date(DATETIME_FORMAT) }}
|
||||||
{{ news.dates.first().start_date|localtime|time(DATETIME_FORMAT) }}</span> -
|
{{ news.dates.first().start_date|localtime|time(DATETIME_FORMAT) }}</span> -
|
||||||
<span>{{ news.dates.first().end_date|localtime|date(DATETIME_FORMAT) }}
|
<span>{{ news.dates.first().end_date|localtime|date(DATETIME_FORMAT) }}
|
||||||
{{ news.dates.first().end_date|localtime|time(DATETIME_FORMAT) }}</span>
|
{{ news.dates.first().end_date|localtime|time(DATETIME_FORMAT) }}</span>
|
||||||
</p>
|
</p>
|
||||||
<div class="news_content">
|
<div class="news_content">
|
||||||
<div><em>{{ news.summary|markdown }}</em></div>
|
<div><em>{{ news.summary|markdown }}</em></div>
|
||||||
<br/>
|
<br/>
|
||||||
<div>{{ news.content|markdown }}</div>
|
<div>{{ news.content|markdown }}</div>
|
||||||
{{ facebook_share(news) }}
|
{{ facebook_share(news) }}
|
||||||
{{ tweet(news) }}
|
{{ tweet(news) }}
|
||||||
<div class="news_meta">
|
<div class="news_meta">
|
||||||
<p>{% trans %}Author: {% endtrans %}{{ user_profile_link(news.author) }}</p>
|
<p>{% trans %}Author: {% endtrans %}{{ user_profile_link(news.author) }}</p>
|
||||||
{% if news.moderator %}
|
{% if news.moderator %}
|
||||||
<p>{% trans %}Moderator: {% endtrans %}{{ user_profile_link(news.moderator) }}</p>
|
<p>{% trans %}Moderator: {% endtrans %}{{ user_profile_link(news.moderator) }}</p>
|
||||||
{% elif user.is_com_admin %}
|
{% elif user.is_com_admin %}
|
||||||
<p> <a href="{{ url('com:news_moderate', news_id=news.id) }}">{% trans %}Moderate{% endtrans %}</a></p>
|
<p> <a href="{{ url('com:news_moderate', news_id=news.id) }}">{% trans %}Moderate{% endtrans %}</a></p>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if user.can_edit(news) %}
|
{% if user.can_edit(news) %}
|
||||||
<p> <a href="{{ url('com:news_edit', news_id=news.id) }}">{% trans %}Edit (will be moderated again){% endtrans %}</a></p>
|
<p> <a href="{{ url('com:news_edit', news_id=news.id) }}">{% trans %}Edit (will be moderated again){% endtrans %}</a></p>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
|
||||||
|
@ -2,46 +2,46 @@
|
|||||||
{% from 'core/macros.jinja' import user_profile_link %}
|
{% from 'core/macros.jinja' import user_profile_link %}
|
||||||
|
|
||||||
{% block title %}
|
{% block title %}
|
||||||
{% if object %}
|
{% if object %}
|
||||||
{% trans %}Edit news{% endtrans %}
|
{% trans %}Edit news{% endtrans %}
|
||||||
{% else %}
|
{% else %}
|
||||||
{% trans %}Create news{% endtrans %}
|
{% trans %}Create news{% endtrans %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
{% if 'preview' in request.POST.keys() %}
|
{% if 'preview' in request.POST.keys() %}
|
||||||
<section class="news_event">
|
<section class="news_event">
|
||||||
<h4>{{ form.instance.title }}</h4>
|
<h4>{{ form.instance.title }}</h4>
|
||||||
<p class="date">
|
<p class="date">
|
||||||
<span>{{ form.instance.dates.first().start_date|localtime|date(DATETIME_FORMAT) }}
|
<span>{{ form.instance.dates.first().start_date|localtime|date(DATETIME_FORMAT) }}
|
||||||
{{ form.instance.dates.first().start_date|localtime|time(DATETIME_FORMAT) }}</span> -
|
{{ form.instance.dates.first().start_date|localtime|time(DATETIME_FORMAT) }}</span> -
|
||||||
<span>{{ form.instance.dates.first().end_date|localtime|date(DATETIME_FORMAT) }}
|
<span>{{ form.instance.dates.first().end_date|localtime|date(DATETIME_FORMAT) }}
|
||||||
{{ form.instance.dates.first().end_date|localtime|time(DATETIME_FORMAT) }}</span>
|
{{ form.instance.dates.first().end_date|localtime|time(DATETIME_FORMAT) }}</span>
|
||||||
</p>
|
</p>
|
||||||
<p><a href="#">{{ form.instance.club or "Club" }}</a></p>
|
<p><a href="#">{{ form.instance.club or "Club" }}</a></p>
|
||||||
<div>{{ form.instance.summary|markdown }}</div>
|
<div>{{ form.instance.summary|markdown }}</div>
|
||||||
<div>{{ form.instance.content|markdown }}</div>
|
<div>{{ form.instance.content|markdown }}</div>
|
||||||
<p>{% trans %}Author: {% endtrans %} {{ user_profile_link(form.instance.author) }}</p>
|
<p>{% trans %}Author: {% endtrans %} {{ user_profile_link(form.instance.author) }}</p>
|
||||||
</section>
|
</section>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if object %}
|
{% if object %}
|
||||||
<h2>{% trans %}Edit news{% endtrans %}</h2>
|
<h2>{% trans %}Edit news{% endtrans %}</h2>
|
||||||
{% else %}
|
{% else %}
|
||||||
<h2>{% trans %}Create news{% endtrans %}</h2>
|
<h2>{% trans %}Create news{% endtrans %}</h2>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<form action="" method="post">
|
<form action="" method="post">
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
{{ form.non_field_errors() }}
|
{{ form.non_field_errors() }}
|
||||||
{{ form.author }}
|
{{ form.author }}
|
||||||
<p>{{ form.type.errors }}<label for="{{ form.type.name }}">{{ form.type.label }}</label>
|
<p>{{ form.type.errors }}<label for="{{ form.type.name }}">{{ form.type.label }}</label>
|
||||||
<ul>
|
<ul>
|
||||||
<li>{% trans %}Notice: Information, election result - no date{% endtrans %}</li>
|
<li>{% trans %}Notice: Information, election result - no date{% endtrans %}</li>
|
||||||
<li>{% trans %}Event: punctual event, associated with one date{% endtrans %}</li>
|
<li>{% trans %}Event: punctual event, associated with one date{% endtrans %}</li>
|
||||||
<li>{% trans %}Weekly: recurrent event, associated with many dates (specify the first one, and a deadline){% endtrans %}</li>
|
<li>{% trans %}Weekly: recurrent event, associated with many dates (specify the first one, and a deadline){% endtrans %}</li>
|
||||||
<li>{% trans %}Call: long time event, associated with a long date (election appliance, ...){% endtrans %}</li>
|
<li>{% trans %}Call: long time event, associated with a long date (election appliance, ...){% endtrans %}</li>
|
||||||
</ul>
|
</ul>
|
||||||
{{ form.type }}</p>
|
{{ form.type }}</p>
|
||||||
<p class="date">{{ form.start_date.errors }}<label for="{{ form.start_date.name }}">{{ form.start_date.label }}</label> {{ form.start_date }}</p>
|
<p class="date">{{ form.start_date.errors }}<label for="{{ form.start_date.name }}">{{ form.start_date.label }}</label> {{ form.start_date }}</p>
|
||||||
<p class="date">{{ form.end_date.errors }}<label for="{{ form.end_date.name }}">{{ form.end_date.label }}</label> {{ form.end_date }}</p>
|
<p class="date">{{ form.end_date.errors }}<label for="{{ form.end_date.name }}">{{ form.end_date.label }}</label> {{ form.end_date }}</p>
|
||||||
<p class="until">{{ form.until.errors }}<label for="{{ form.until.name }}">{{ form.until.label }}</label> {{ form.until }}</p>
|
<p class="until">{{ form.until.errors }}<label for="{{ form.until.name }}">{{ form.until.label }}</label> {{ form.until }}</p>
|
||||||
@ -50,38 +50,38 @@
|
|||||||
<p>{{ form.summary.errors }}<label for="{{ form.summary.name }}">{{ form.summary.label }}</label> {{ form.summary }}</p>
|
<p>{{ form.summary.errors }}<label for="{{ form.summary.name }}">{{ form.summary.label }}</label> {{ form.summary }}</p>
|
||||||
<p>{{ form.content.errors }}<label for="{{ form.content.name }}">{{ form.content.label }}</label> {{ form.content }}</p>
|
<p>{{ form.content.errors }}<label for="{{ form.content.name }}">{{ form.content.label }}</label> {{ form.content }}</p>
|
||||||
{% if user.is_com_admin %}
|
{% if user.is_com_admin %}
|
||||||
<p>{{ form.automoderation.errors }}<label for="{{ form.automoderation.name }}">{{ form.automoderation.label }}</label>
|
<p>{{ form.automoderation.errors }}<label for="{{ form.automoderation.name }}">{{ form.automoderation.label }}</label>
|
||||||
{{ form.automoderation }}</p>
|
{{ form.automoderation }}</p>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<p><input type="submit" name="preview" value="{% trans %}Preview{% endtrans %}" /></p>
|
<p><input type="submit" name="preview" value="{% trans %}Preview{% endtrans %}" /></p>
|
||||||
<p><input type="submit" value="{% trans %}Save{% endtrans %}" /></p>
|
<p><input type="submit" value="{% trans %}Save{% endtrans %}" /></p>
|
||||||
</form>
|
</form>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block script %}
|
{% block script %}
|
||||||
{{ super() }}
|
{{ super() }}
|
||||||
<script>
|
<script>
|
||||||
$( function() {
|
$( function() {
|
||||||
var type = $('input[name=type]');
|
var type = $('input[name=type]');
|
||||||
var dates = $('.date');
|
var dates = $('.date');
|
||||||
var until = $('.until');
|
var until = $('.until');
|
||||||
function update_targets () {
|
function update_targets () {
|
||||||
type_checked = $('input[name=type]:checked');
|
type_checked = $('input[name=type]:checked');
|
||||||
if (type_checked.val() == "EVENT" || type_checked.val() == "CALL") {
|
if (type_checked.val() == "EVENT" || type_checked.val() == "CALL") {
|
||||||
dates.show();
|
dates.show();
|
||||||
until.hide();
|
until.hide();
|
||||||
} else if (type_checked.val() == "WEEKLY") {
|
} else if (type_checked.val() == "WEEKLY") {
|
||||||
dates.show();
|
dates.show();
|
||||||
until.show();
|
until.show();
|
||||||
} else {
|
} else {
|
||||||
dates.hide();
|
dates.hide();
|
||||||
until.hide();
|
until.hide();
|
||||||
}
|
|
||||||
}
|
}
|
||||||
update_targets();
|
}
|
||||||
type.change(update_targets);
|
update_targets();
|
||||||
} );
|
type.change(update_targets);
|
||||||
</script>
|
} );
|
||||||
|
</script>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
|
||||||
|
@ -2,162 +2,162 @@
|
|||||||
{% from 'core/macros.jinja' import tweet_quick, fb_quick %}
|
{% from 'core/macros.jinja' import tweet_quick, fb_quick %}
|
||||||
|
|
||||||
{% block title %}
|
{% block title %}
|
||||||
{% trans %}News{% endtrans %}
|
{% trans %}News{% endtrans %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
{% if user.is_com_admin %}
|
{% if user.is_com_admin %}
|
||||||
<div id="news_admin">
|
<div id="news_admin">
|
||||||
<a class="button" href="{{ url('com:news_admin_list') }}">{% trans %}Administrate news{% endtrans %}</a>
|
<a class="button" href="{{ url('com:news_admin_list') }}">{% trans %}Administrate news{% endtrans %}</a>
|
||||||
</div>
|
</div>
|
||||||
<br>
|
<br>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<div id="news">
|
<div id="news">
|
||||||
<div id="left_column" class="news_column">
|
<div id="left_column" class="news_column">
|
||||||
{% for news in object_list.filter(type="NOTICE") %}
|
{% for news in object_list.filter(type="NOTICE") %}
|
||||||
<section class="news_notice">
|
<section class="news_notice">
|
||||||
<h4><a href="{{ url('com:news_detail', news_id=news.id) }}">{{ news.title }}</a></h4>
|
<h4><a href="{{ url('com:news_detail', news_id=news.id) }}">{{ news.title }}</a></h4>
|
||||||
<div class="news_content">{{ news.summary|markdown }}</div>
|
<div class="news_content">{{ news.summary|markdown }}</div>
|
||||||
</section>
|
</section>
|
||||||
{% endfor %}
|
{% 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") %}
|
||||||
<section class="news_call">
|
<section class="news_call">
|
||||||
|
<h4> <a href="{{ url('com:news_detail', news_id=news.id) }}">{{ news.title }}</a></h4>
|
||||||
|
<div class="news_date">
|
||||||
|
<span>{{ news.dates.first().start_date|localtime|date(DATETIME_FORMAT) }}
|
||||||
|
{{ news.dates.first().start_date|localtime|time(DATETIME_FORMAT) }}</span> -
|
||||||
|
<span>{{ news.dates.first().end_date|localtime|date(DATETIME_FORMAT) }}
|
||||||
|
{{ news.dates.first().end_date|localtime|time(DATETIME_FORMAT) }}</span>
|
||||||
|
</div>
|
||||||
|
<div class="news_content">{{ news.summary|markdown }}</div>
|
||||||
|
</section>
|
||||||
|
{% 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') %}
|
||||||
|
<h3>{% trans %}Events today and the next few days{% endtrans %}</h3>
|
||||||
|
{% if events_dates %}
|
||||||
|
{% for d in events_dates %}
|
||||||
|
<div class="news_events_group">
|
||||||
|
<div class="news_events_group_date">
|
||||||
|
<div>
|
||||||
|
<div>{{ d|localtime|date('D') }}</div>
|
||||||
|
<div class="day">{{ d|localtime|date('d') }}</div>
|
||||||
|
<div>{{ d|localtime|date('b') }}</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="news_events_group_items">
|
||||||
|
{% 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') %}
|
||||||
|
<section class="news_event">
|
||||||
|
<div class="club_logo">
|
||||||
|
{% if news.club.logo %}
|
||||||
|
<img src="{{ news.club.logo.url }}" alt="{{ news.club }}" />
|
||||||
|
{% else %}
|
||||||
|
<img src="{{ static("com/img/news.png") }}" alt="{{ news.club }}" />
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
<h4> <a href="{{ url('com:news_detail', news_id=news.id) }}">{{ news.title }}</a></h4>
|
<h4> <a href="{{ url('com:news_detail', news_id=news.id) }}">{{ news.title }}</a></h4>
|
||||||
|
<div><a href="{{ news.club.get_absolute_url() }}">{{ news.club }}</a></div>
|
||||||
<div class="news_date">
|
<div class="news_date">
|
||||||
<span>{{ news.dates.first().start_date|localtime|date(DATETIME_FORMAT) }}
|
<span>{{ news.dates.first().start_date|localtime|time(DATETIME_FORMAT) }}</span> -
|
||||||
{{ news.dates.first().start_date|localtime|time(DATETIME_FORMAT) }}</span> -
|
<span>{{ news.dates.first().end_date|localtime|time(DATETIME_FORMAT) }}</span>
|
||||||
<span>{{ news.dates.first().end_date|localtime|date(DATETIME_FORMAT) }}
|
|
||||||
{{ news.dates.first().end_date|localtime|time(DATETIME_FORMAT) }}</span>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="news_content">{{ news.summary|markdown }}</div>
|
<div class="news_content">{{ news.summary|markdown }}
|
||||||
</section>
|
<div class="button_bar">
|
||||||
|
{{ fb_quick(news) }}
|
||||||
|
{{ tweet_quick(news) }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
{% endfor %}
|
{% 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') %}
|
|
||||||
<h3>{% trans %}Events today and the next few days{% endtrans %}</h3>
|
|
||||||
{% if events_dates %}
|
|
||||||
{% for d in events_dates %}
|
|
||||||
<div class="news_events_group">
|
|
||||||
<div class="news_events_group_date">
|
|
||||||
<div>
|
|
||||||
<div>{{ d|localtime|date('D') }}</div>
|
|
||||||
<div class="day">{{ d|localtime|date('d') }}</div>
|
|
||||||
<div>{{ d|localtime|date('b') }}</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="news_events_group_items">
|
|
||||||
{% 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') %}
|
|
||||||
<section class="news_event">
|
|
||||||
<div class="club_logo">
|
|
||||||
{% if news.club.logo %}
|
|
||||||
<img src="{{ news.club.logo.url }}" alt="{{ news.club }}" />
|
|
||||||
{% else %}
|
|
||||||
<img src="{{ static("com/img/news.png") }}" alt="{{ news.club }}" />
|
|
||||||
{% endif %}
|
|
||||||
</div>
|
|
||||||
<h4> <a href="{{ url('com:news_detail', news_id=news.id) }}">{{ news.title }}</a></h4>
|
|
||||||
<div><a href="{{ news.club.get_absolute_url() }}">{{ news.club }}</a></div>
|
|
||||||
<div class="news_date">
|
|
||||||
<span>{{ news.dates.first().start_date|localtime|time(DATETIME_FORMAT) }}</span> -
|
|
||||||
<span>{{ news.dates.first().end_date|localtime|time(DATETIME_FORMAT) }}</span>
|
|
||||||
</div>
|
|
||||||
<div class="news_content">{{ news.summary|markdown }}
|
|
||||||
<div class="button_bar">
|
|
||||||
{{ fb_quick(news) }}
|
|
||||||
{{ tweet_quick(news) }}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
{% endfor %}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{% endfor %}
|
|
||||||
{% else %}
|
|
||||||
<div class="news_empty">
|
|
||||||
<em>{% trans %}Nothing to come...{% endtrans %}</em>
|
|
||||||
</div>
|
|
||||||
{% 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 %}
|
|
||||||
<h3>{% trans %}Coming soon... don't miss!{% endtrans %}</h3>
|
|
||||||
{% for news in coming_soon %}
|
|
||||||
<section class="news_coming_soon">
|
|
||||||
<a href="{{ url('com:news_detail', news_id=news.id) }}">{{ news.title }}</a>
|
|
||||||
<span class="news_date">{{ 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) }}</span>
|
|
||||||
</section>
|
|
||||||
{% endfor %}
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
<h3>{% trans %}All coming events{% endtrans %}</h3>
|
|
||||||
<iframe
|
|
||||||
src="https://embed.styledcalendar.com/#2mF2is8CEXhr4ADcX6qN"
|
|
||||||
title="Styled Calendar"
|
|
||||||
class="styled-calendar-container"
|
|
||||||
style="width: 100%; border: none; height: 1060px"
|
|
||||||
data-cy="calendar-embed-iframe">
|
|
||||||
</iframe>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="right_column" class="news_column">
|
|
||||||
<div id="agenda">
|
|
||||||
<div id="agenda_title">{% trans %}Agenda{% endtrans %}</div>
|
|
||||||
<div id="agenda_content">
|
|
||||||
{% 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') %}
|
|
||||||
<div class="agenda_item">
|
|
||||||
<div class="agenda_date">
|
|
||||||
<strong>{{ d.start_date|localtime|date('D d M Y') }}</strong>
|
|
||||||
</div>
|
|
||||||
<div class="agenda_time">
|
|
||||||
<span>{{ d.start_date|localtime|time(DATETIME_FORMAT) }}</span> -
|
|
||||||
<span>{{ d.end_date|localtime|time(DATETIME_FORMAT) }}</span>
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<strong><a href="{{ url('com:news_detail', news_id=d.news.id) }}">{{ d.news.title }}</a></strong>
|
|
||||||
<a href="{{ d.news.club.get_absolute_url() }}">{{ d.news.club }}</a>
|
|
||||||
</div>
|
|
||||||
<div class="agenda_item_content">{{ d.news.summary|markdown }}</div>
|
|
||||||
</div>
|
|
||||||
{% endfor %}
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
{% endfor %}
|
||||||
|
{% else %}
|
||||||
|
<div class="news_empty">
|
||||||
|
<em>{% trans %}Nothing to come...{% endtrans %}</em>
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
<div id="birthdays">
|
{% set coming_soon = object_list.filter(dates__start_date__gte=timezone.now()+timedelta(days=5),
|
||||||
<div id="birthdays_title">{% trans %}Birthdays{% endtrans %}</div>
|
type="EVENT").order_by('dates__start_date') %}
|
||||||
<div id="birthdays_content">
|
{% if coming_soon %}
|
||||||
{% if user.is_subscribed %}
|
<h3>{% trans %}Coming soon... don't miss!{% endtrans %}</h3>
|
||||||
|
{% for news in coming_soon %}
|
||||||
|
<section class="news_coming_soon">
|
||||||
|
<a href="{{ url('com:news_detail', news_id=news.id) }}">{{ news.title }}</a>
|
||||||
|
<span class="news_date">{{ 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) }}</span>
|
||||||
|
</section>
|
||||||
|
{% endfor %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
<h3>{% trans %}All coming events{% endtrans %}</h3>
|
||||||
|
<iframe
|
||||||
|
src="https://embed.styledcalendar.com/#2mF2is8CEXhr4ADcX6qN"
|
||||||
|
title="Styled Calendar"
|
||||||
|
class="styled-calendar-container"
|
||||||
|
style="width: 100%; border: none; height: 1060px"
|
||||||
|
data-cy="calendar-embed-iframe">
|
||||||
|
</iframe>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="right_column" class="news_column">
|
||||||
|
<div id="agenda">
|
||||||
|
<div id="agenda_title">{% trans %}Agenda{% endtrans %}</div>
|
||||||
|
<div id="agenda_content">
|
||||||
|
{% 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') %}
|
||||||
|
<div class="agenda_item">
|
||||||
|
<div class="agenda_date">
|
||||||
|
<strong>{{ d.start_date|localtime|date('D d M Y') }}</strong>
|
||||||
|
</div>
|
||||||
|
<div class="agenda_time">
|
||||||
|
<span>{{ d.start_date|localtime|time(DATETIME_FORMAT) }}</span> -
|
||||||
|
<span>{{ d.end_date|localtime|time(DATETIME_FORMAT) }}</span>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<strong><a href="{{ url('com:news_detail', news_id=d.news.id) }}">{{ d.news.title }}</a></strong>
|
||||||
|
<a href="{{ d.news.club.get_absolute_url() }}">{{ d.news.club }}</a>
|
||||||
|
</div>
|
||||||
|
<div class="agenda_item_content">{{ d.news.summary|markdown }}</div>
|
||||||
|
</div>
|
||||||
|
{% endfor %}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="birthdays">
|
||||||
|
<div id="birthdays_title">{% trans %}Birthdays{% endtrans %}</div>
|
||||||
|
<div id="birthdays_content">
|
||||||
|
{% if user.is_subscribed %}
|
||||||
{# Cache request for 1 hour #}
|
{# Cache request for 1 hour #}
|
||||||
{% cache 3600 "birthdays" %}
|
{% cache 3600 "birthdays" %}
|
||||||
<ul class="birthdays_year">
|
<ul class="birthdays_year">
|
||||||
{% for d in birthdays.dates('date_of_birth', 'year', 'DESC') %}
|
{% for d in birthdays.dates('date_of_birth', 'year', 'DESC') %}
|
||||||
<li>
|
<li>
|
||||||
{% trans age=timezone.now().year - d.year %}{{ age }} year old{% endtrans %}
|
{% trans age=timezone.now().year - d.year %}{{ age }} year old{% endtrans %}
|
||||||
<ul>
|
<ul>
|
||||||
{% for u in birthdays.filter(date_of_birth__year=d.year) %}
|
{% for u in birthdays.filter(date_of_birth__year=d.year) %}
|
||||||
<li><a href="{{ u.get_absolute_url() }}">{{ u.get_short_name() }}</a></li>
|
<li><a href="{{ u.get_absolute_url() }}">{{ u.get_short_name() }}</a></li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
{% endcache %}
|
{% endcache %}
|
||||||
{% else %}
|
{% else %}
|
||||||
<p>{% trans %}You need an up to date subscription to access this content{% endtrans %}</p>
|
<p>{% trans %}You need an up to date subscription to access this content{% endtrans %}</p>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@ -1,42 +1,42 @@
|
|||||||
{% extends "core/base.jinja" %}
|
{% extends "core/base.jinja" %}
|
||||||
|
|
||||||
{% block title %}
|
{% block title %}
|
||||||
{% trans %}Poster{% endtrans %}
|
{% trans %}Poster{% endtrans %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div id="poster_edit">
|
<div id="poster_edit">
|
||||||
|
|
||||||
<div id="title">
|
<div id="title">
|
||||||
<div id="links" class="left">
|
<div id="links" class="left">
|
||||||
{% if app == "com" %}
|
{% if app == "com" %}
|
||||||
<a id="list" class="link" href="{{ url(app + ":poster_list") }}">{% trans %}List{% endtrans %}</a>
|
<a id="list" class="link" href="{{ url(app + ":poster_list") }}">{% trans %}List{% endtrans %}</a>
|
||||||
{% elif app == "club" %}
|
{% elif app == "club" %}
|
||||||
<a id="list" class="link" href="{{ url(app + ":poster_list", club.id) }}">{% trans %}List{% endtrans %}</a>
|
<a id="list" class="link" href="{{ url(app + ":poster_list", club.id) }}">{% trans %}List{% endtrans %}</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
<h3>{% trans %}Posters - edit{% endtrans %}</h3>
|
<h3>{% trans %}Posters - edit{% endtrans %}</h3>
|
||||||
<div id="links" class="right">
|
<div id="links" class="right">
|
||||||
{% if app == "com" %}
|
{% if app == "com" %}
|
||||||
<a class="link delete" href="{{ url(app + ":poster_delete", poster.id) }}">{% trans %}Delete{% endtrans %}</a>
|
<a class="link delete" href="{{ url(app + ":poster_delete", poster.id) }}">{% trans %}Delete{% endtrans %}</a>
|
||||||
{% elif app == "club" %}
|
{% elif app == "club" %}
|
||||||
<a class="link delete" href="{{ url(app + ":poster_delete", club.id, poster.id) }}">{% trans %}Delete{% endtrans %}</a>
|
<a class="link delete" href="{{ url(app + ":poster_delete", club.id, poster.id) }}">{% trans %}Delete{% endtrans %}</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="poster">
|
<div id="poster">
|
||||||
|
|
||||||
<form action="" method="post" enctype="multipart/form-data">
|
<form action="" method="post" enctype="multipart/form-data">
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
{{ form.as_p() }}
|
{{ form.as_p() }}
|
||||||
<p><input type="submit" value="{% trans %}Save{% endtrans %}" /></p>
|
<p><input type="submit" value="{% trans %}Save{% endtrans %}" /></p>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,66 +1,66 @@
|
|||||||
{% extends "core/base.jinja" %}
|
{% extends "core/base.jinja" %}
|
||||||
|
|
||||||
{% block script %}
|
{% block script %}
|
||||||
{{ super() }}
|
{{ super() }}
|
||||||
<script src="{{ static('com/js/poster_list.js') }}"></script>
|
<script src="{{ static('com/js/poster_list.js') }}"></script>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
|
||||||
{% block title %}
|
{% block title %}
|
||||||
{% trans %}Poster{% endtrans %}
|
{% trans %}Poster{% endtrans %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div id="poster_list">
|
<div id="poster_list">
|
||||||
|
|
||||||
<div id="title">
|
<div id="title">
|
||||||
<h3>{% trans %}Posters{% endtrans %}</h3>
|
<h3>{% trans %}Posters{% endtrans %}</h3>
|
||||||
<div id="links" class="right">
|
<div id="links" class="right">
|
||||||
{% if app == "com" %}
|
{% if app == "com" %}
|
||||||
<a id="create" class="link" href="{{ url(app + ":poster_create") }}">{% trans %}Create{% endtrans %}</a>
|
<a id="create" class="link" href="{{ url(app + ":poster_create") }}">{% trans %}Create{% endtrans %}</a>
|
||||||
<a id="moderation" class="link" href="{{ url("com:poster_moderate_list") }}">{% trans %}Moderation{% endtrans %}</a>
|
<a id="moderation" class="link" href="{{ url("com:poster_moderate_list") }}">{% trans %}Moderation{% endtrans %}</a>
|
||||||
{% elif app == "club" %}
|
{% elif app == "club" %}
|
||||||
<a id="create" class="link" href="{{ url(app + ":poster_create", club.id) }}">{% trans %}Create{% endtrans %}</a>
|
<a id="create" class="link" href="{{ url(app + ":poster_create", club.id) }}">{% trans %}Create{% endtrans %}</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="posters">
|
<div id="posters">
|
||||||
|
|
||||||
{% if poster_list.count() == 0 %}
|
{% if poster_list.count() == 0 %}
|
||||||
<div id="no-posters">{% trans %}No posters{% endtrans %}</div>
|
<div id="no-posters">{% trans %}No posters{% endtrans %}</div>
|
||||||
{% else %}
|
{% else %}
|
||||||
|
|
||||||
{% for poster in poster_list %}
|
{% for poster in poster_list %}
|
||||||
<div class="poster{% if not poster.is_moderated %} not_moderated{% endif %}">
|
<div class="poster{% if not poster.is_moderated %} not_moderated{% endif %}">
|
||||||
<div class="name">{{ poster.name }}</div>
|
<div class="name">{{ poster.name }}</div>
|
||||||
<div class="image"><img src="{{ poster.file.url }}"></img></div>
|
<div class="image"><img src="{{ poster.file.url }}"></img></div>
|
||||||
<div class="dates">
|
<div class="dates">
|
||||||
<div class="begin">{{ poster.date_begin | localtime | date("d/M/Y H:m") }}</div>
|
<div class="begin">{{ poster.date_begin | localtime | date("d/M/Y H:m") }}</div>
|
||||||
<div class="end">{{ poster.date_end | localtime | date("d/M/Y H:m") }}</div>
|
<div class="end">{{ poster.date_end | localtime | date("d/M/Y H:m") }}</div>
|
||||||
</div>
|
</div>
|
||||||
{% if app == "com" %}
|
{% if app == "com" %}
|
||||||
<a class="edit" href="{{ url(app + ":poster_edit", poster.id) }}">{% trans %}Edit{% endtrans %}</a>
|
<a class="edit" href="{{ url(app + ":poster_edit", poster.id) }}">{% trans %}Edit{% endtrans %}</a>
|
||||||
{% elif app == "club" %}
|
{% elif app == "club" %}
|
||||||
<a class="edit" href="{{ url(app + ":poster_edit", club.id, poster.id) }}">{% trans %}Edit{% endtrans %}</a>
|
<a class="edit" href="{{ url(app + ":poster_edit", club.id, poster.id) }}">{% trans %}Edit{% endtrans %}</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<div class="tooltip">
|
<div class="tooltip">
|
||||||
<ul>
|
<ul>
|
||||||
{% for screen in poster.screens.all() %}
|
{% for screen in poster.screens.all() %}
|
||||||
<li>{{ screen }}</li>
|
<li>{{ screen }}</li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="view"><div id="placeholder"></div></div>
|
<div id="view"><div id="placeholder"></div></div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,39 +1,39 @@
|
|||||||
{% extends "core/base.jinja" %}
|
{% extends "core/base.jinja" %}
|
||||||
|
|
||||||
{% block script %}
|
{% block script %}
|
||||||
{{ super() }}
|
{{ super() }}
|
||||||
<script src="{{ static('com/js/poster_list.js') }}"></script>
|
<script src="{{ static('com/js/poster_list.js') }}"></script>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div id="poster_list">
|
<div id="poster_list">
|
||||||
|
|
||||||
<div id="title">
|
<div id="title">
|
||||||
<div id="links" class="left">
|
<div id="links" class="left">
|
||||||
<a id="list" class="link" href="{{ url("com:poster_list") }}">{% trans %}List{% endtrans %}</a>
|
<a id="list" class="link" href="{{ url("com:poster_list") }}">{% trans %}List{% endtrans %}</a>
|
||||||
</div>
|
</div>
|
||||||
<h3>{% trans %}Posters - moderation{% endtrans %}</h3>
|
<h3>{% trans %}Posters - moderation{% endtrans %}</h3>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="posters">
|
<div id="posters">
|
||||||
|
|
||||||
{% if object_list.count == 0 %}
|
{% if object_list.count == 0 %}
|
||||||
<div id="no-posters">{% trans %}No objects{% endtrans %}</div>
|
<div id="no-posters">{% trans %}No objects{% endtrans %}</div>
|
||||||
{% else %}
|
{% else %}
|
||||||
|
|
||||||
{% for poster in object_list %}
|
{% for poster in object_list %}
|
||||||
<div class="poster{% if not poster.is_moderated %} not_moderated{% endif %}">
|
<div class="poster{% if not poster.is_moderated %} not_moderated{% endif %}">
|
||||||
<div class="name"> {{ poster.name }} </div>
|
<div class="name"> {{ poster.name }} </div>
|
||||||
<div class="image"> <img src="{{ poster.file.url }}"></img> </div>
|
<div class="image"> <img src="{{ poster.file.url }}"></img> </div>
|
||||||
<a class="moderate" href="{{ url("com:poster_moderate", object_id=poster.id) }}">Moderate</a>
|
<a class="moderate" href="{{ url("com:poster_moderate", object_id=poster.id) }}">Moderate</a>
|
||||||
</div>
|
</div>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="view"><div id="placeholder"></div></div>
|
<div id="view"><div id="placeholder"></div></div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@ -1,33 +1,33 @@
|
|||||||
{% extends "core/base.jinja" %}
|
{% extends "core/base.jinja" %}
|
||||||
|
|
||||||
{% block title %}
|
{% block title %}
|
||||||
{% trans %}Screen{% endtrans %}
|
{% trans %}Screen{% endtrans %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div id="screen_edit">
|
<div id="screen_edit">
|
||||||
|
|
||||||
<div id="title">
|
<div id="title">
|
||||||
<div id="links" class="left">
|
<div id="links" class="left">
|
||||||
<a id="list" class="link" href="{{ url("com:screen_list") }}">{% trans %}List{% endtrans %}</a>
|
<a id="list" class="link" href="{{ url("com:screen_list") }}">{% trans %}List{% endtrans %}</a>
|
||||||
</div>
|
</div>
|
||||||
<h3>{% trans %}Screen - edit{% endtrans %}</h3>
|
<h3>{% trans %}Screen - edit{% endtrans %}</h3>
|
||||||
<div id="links" class="right">
|
<div id="links" class="right">
|
||||||
<a class="link delete" href="{{ url("com:screen_delete", screen.id) }}">{% trans %}Delete{% endtrans %}</a>
|
<a class="link delete" href="{{ url("com:screen_delete", screen.id) }}">{% trans %}Delete{% endtrans %}</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="screen">
|
<div id="screen">
|
||||||
|
|
||||||
<form action="" method="post" enctype="multipart/form-data">
|
<form action="" method="post" enctype="multipart/form-data">
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
{{ form.as_p() }}
|
{{ form.as_p() }}
|
||||||
<p><input type="submit" value="{% trans %}Save{% endtrans %}" /></p>
|
<p><input type="submit" value="{% trans %}Save{% endtrans %}" /></p>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,38 +1,38 @@
|
|||||||
{% extends "core/base.jinja" %}
|
{% extends "core/base.jinja" %}
|
||||||
|
|
||||||
{% block title %}
|
{% block title %}
|
||||||
{% trans %}Screens{% endtrans %}
|
{% trans %}Screens{% endtrans %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div id="screen_list">
|
<div id="screen_list">
|
||||||
|
|
||||||
<div id="title">
|
<div id="title">
|
||||||
<h3>{% trans %}Screens{% endtrans %}</h3>
|
<h3>{% trans %}Screens{% endtrans %}</h3>
|
||||||
<div id="links" class="right">
|
<div id="links" class="right">
|
||||||
<a id="create" class="link" href="{{ url("com:screen_create") }}">{% trans %}Create{% endtrans %}</a>
|
<a id="create" class="link" href="{{ url("com:screen_create") }}">{% trans %}Create{% endtrans %}</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="screens">
|
<div id="screens">
|
||||||
|
|
||||||
{% if screen_list.count() == 0 %}
|
{% if screen_list.count() == 0 %}
|
||||||
<div id="no-screens">{% trans %}No screens{% endtrans %}</div>
|
<div id="no-screens">{% trans %}No screens{% endtrans %}</div>
|
||||||
{% else %}
|
{% else %}
|
||||||
|
|
||||||
{% for screen in screen_list %}
|
{% for screen in screen_list %}
|
||||||
<div class="screen">
|
<div class="screen">
|
||||||
<div class="name">{{ screen.name }}</div>
|
<div class="name">{{ screen.name }}</div>
|
||||||
<a class="edit" href="{{ url("com:screen_edit", screen.id) }}">{% trans %}Edit{% endtrans %}</a>
|
<a class="edit" href="{{ url("com:screen_edit", screen.id) }}">{% trans %}Edit{% endtrans %}</a>
|
||||||
<a class="slideshow" href="{{ url("com:screen_slideshow", screen.id) }}" target="_blank">{% trans %}Slideshow{% endtrans %}</a>
|
<a class="slideshow" href="{{ url("com:screen_slideshow", screen.id) }}" target="_blank">{% trans %}Slideshow{% endtrans %}</a>
|
||||||
</div>
|
</div>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,30 +1,30 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="fr">
|
<html lang="fr">
|
||||||
<head>
|
<head>
|
||||||
<title>{% trans %}Slideshow{% endtrans %}</title>
|
<title>{% trans %}Slideshow{% endtrans %}</title>
|
||||||
<link href="{{ scss('com/slideshow.scss') }}" rel="stylesheet" type="text/css" />
|
<link href="{{ scss('com/slideshow.scss') }}" rel="stylesheet" type="text/css" />
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="slideshow">
|
<div id="slideshow">
|
||||||
|
|
||||||
<div id="slides">
|
<div id="slides">
|
||||||
{% for poster in posters %}
|
{% for poster in posters %}
|
||||||
<div class="slide {% if loop.first %}center{% else %}right{% endif %}" display_time="{{ poster.display_time }}">
|
<div class="slide {% if loop.first %}center{% else %}right{% endif %}" display_time="{{ poster.display_time }}">
|
||||||
<img src="{{ poster.file.url }}"></img>
|
<img src="{{ poster.file.url }}"></img>
|
||||||
</div>
|
</div>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="progress_bullets">
|
<div id="progress_bullets">
|
||||||
{% for poster in posters %}
|
{% for poster in posters %}
|
||||||
<div class="bullet {% if loop.first %}active{% endif %}"></div>
|
<div class="bullet {% if loop.first %}active{% endif %}"></div>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="progress_bar"></div>
|
<div id="progress_bar"></div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<script src="{{ static('core/js/jquery-3.6.2.min.js') }}"></script>
|
<script src="{{ static('core/js/jquery-3.6.2.min.js') }}"></script>
|
||||||
<script src="{{ static('com/js/slideshow.js') }}"></script>
|
<script src="{{ static('com/js/slideshow.js') }}"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
@ -2,77 +2,77 @@
|
|||||||
{% from 'core/macros.jinja' import user_profile_link %}
|
{% from 'core/macros.jinja' import user_profile_link %}
|
||||||
|
|
||||||
{% block title %}
|
{% block title %}
|
||||||
{% trans %}Weekmail{% endtrans %}
|
{% trans %}Weekmail{% endtrans %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<h3>{% trans %}Weekmail{% endtrans %} {{ object.id }}</h3>
|
<h3>{% trans %}Weekmail{% endtrans %} {{ object.id }}</h3>
|
||||||
<p><a href="{{ url('com:weekmail_preview') }}">{% trans %}Preview{% endtrans %}</a></p>
|
<p><a href="{{ url('com:weekmail_preview') }}">{% trans %}Preview{% endtrans %}</a></p>
|
||||||
<p><a href="{{ url('com:weekmail_preview') }}?send=true">{% trans %}Send{% endtrans %}</a></p>
|
<p><a href="{{ url('com:weekmail_preview') }}?send=true">{% trans %}Send{% endtrans %}</a></p>
|
||||||
<p><a href="{{ url('com:weekmail_article') }}">{% trans %}New article{% endtrans %}</a></p>
|
<p><a href="{{ url('com:weekmail_article') }}">{% trans %}New article{% endtrans %}</a></p>
|
||||||
<h4>{% trans %}Articles in no weekmail yet{% endtrans %}</h4>
|
<h4>{% trans %}Articles in no weekmail yet{% endtrans %}</h4>
|
||||||
<table>
|
<table>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<td>{% trans %}Author{% endtrans %}</td>
|
<td>{% trans %}Author{% endtrans %}</td>
|
||||||
<td>{% trans %}Club{% endtrans %}</td>
|
<td>{% trans %}Club{% endtrans %}</td>
|
||||||
<td>{% trans %}Title{% endtrans %}</td>
|
<td>{% trans %}Title{% endtrans %}</td>
|
||||||
<td>{% trans %}Content{% endtrans %}</td>
|
<td>{% trans %}Content{% endtrans %}</td>
|
||||||
<td>{% trans %}Actions{% endtrans %}</td>
|
<td>{% trans %}Actions{% endtrans %}</td>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
{% for a in orphans.all() %}
|
{% for a in orphans.all() %}
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{ user_profile_link(a.author) }}</td>
|
<td>{{ user_profile_link(a.author) }}</td>
|
||||||
<td><a href="{{ a.club.get_absolute_url() }}">{{ a.club }}</a></td>
|
<td><a href="{{ a.club.get_absolute_url() }}">{{ a.club }}</a></td>
|
||||||
<td>{{ a.title }}</td>
|
<td>{{ a.title }}</td>
|
||||||
<td>{{ a.content|markdown }}</td>
|
<td>{{ a.content|markdown }}</td>
|
||||||
<td>
|
<td>
|
||||||
<a href="{{ url('com:weekmail_article_edit', article_id=a.id) }}">{% trans %}Edit{% endtrans %}</a> |
|
<a href="{{ url('com:weekmail_article_edit', article_id=a.id) }}">{% trans %}Edit{% endtrans %}</a> |
|
||||||
<a href="{{ url('com:weekmail_article_delete', article_id=a.id) }}">{% trans %}Delete{% endtrans %}</a> |
|
<a href="{{ url('com:weekmail_article_delete', article_id=a.id) }}">{% trans %}Delete{% endtrans %}</a> |
|
||||||
<a href="?add_article={{ a.id }}">{% trans %}Add to weekmail{% endtrans %}</a> |
|
<a href="?add_article={{ a.id }}">{% trans %}Add to weekmail{% endtrans %}</a> |
|
||||||
<a href="?up_article={{ a.id }}">{% trans %}Up{% endtrans %}</a> |
|
<a href="?up_article={{ a.id }}">{% trans %}Up{% endtrans %}</a> |
|
||||||
<a href="?down_article={{ a.id }}">{% trans %}Down{% endtrans %}</a>
|
<a href="?down_article={{ a.id }}">{% trans %}Down{% endtrans %}</a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
<h4>{% trans %}Articles included the next weekmail{% endtrans %}</h4>
|
<h4>{% trans %}Articles included the next weekmail{% endtrans %}</h4>
|
||||||
<table>
|
<table>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<td>{% trans %}Author{% endtrans %}</td>
|
<td>{% trans %}Author{% endtrans %}</td>
|
||||||
<td>{% trans %}Club{% endtrans %}</td>
|
<td>{% trans %}Club{% endtrans %}</td>
|
||||||
<td>{% trans %}Title{% endtrans %}</td>
|
<td>{% trans %}Title{% endtrans %}</td>
|
||||||
<td>{% trans %}Content{% endtrans %}</td>
|
<td>{% trans %}Content{% endtrans %}</td>
|
||||||
<td>{% trans %}Actions{% endtrans %}</td>
|
<td>{% trans %}Actions{% endtrans %}</td>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
{% for a in object.articles.order_by('rank') %}
|
{% for a in object.articles.order_by('rank') %}
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{ user_profile_link(a.author) }}</td>
|
<td>{{ user_profile_link(a.author) }}</td>
|
||||||
<td><a href="{{ a.club.get_absolute_url() }}">{{ a.club }}</a></td>
|
<td><a href="{{ a.club.get_absolute_url() }}">{{ a.club }}</a></td>
|
||||||
<td>{{ a.title }}</td>
|
<td>{{ a.title }}</td>
|
||||||
<td>{{ a.content|markdown }}</td>
|
<td>{{ a.content|markdown }}</td>
|
||||||
<td>
|
<td>
|
||||||
<a href="{{ url('com:weekmail_article_edit', article_id=a.id) }}">{% trans %}Edit{% endtrans %}</a> |
|
<a href="{{ url('com:weekmail_article_edit', article_id=a.id) }}">{% trans %}Edit{% endtrans %}</a> |
|
||||||
<a href="{{ url('com:weekmail_article_delete', article_id=a.id) }}">{% trans %}Delete{% endtrans %}</a> |
|
<a href="{{ url('com:weekmail_article_delete', article_id=a.id) }}">{% trans %}Delete{% endtrans %}</a> |
|
||||||
<a href="?del_article={{ a.id }}">{% trans %}Delete from weekmail{% endtrans %}</a> |
|
<a href="?del_article={{ a.id }}">{% trans %}Delete from weekmail{% endtrans %}</a> |
|
||||||
<a href="?up_article={{ a.id }}">{% trans %}Up{% endtrans %}</a> |
|
<a href="?up_article={{ a.id }}">{% trans %}Up{% endtrans %}</a> |
|
||||||
<a href="?down_article={{ a.id }}">{% trans %}Down{% endtrans %}</a>
|
<a href="?down_article={{ a.id }}">{% trans %}Down{% endtrans %}</a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
<form action="" method="post" enctype="multipart/form-data">
|
<form action="" method="post" enctype="multipart/form-data">
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
{{ form.as_p() }}
|
{{ form.as_p() }}
|
||||||
<p><input type="submit" value="{% trans %}Save{% endtrans %}" /></p>
|
<p><input type="submit" value="{% trans %}Save{% endtrans %}" /></p>
|
||||||
</form>
|
</form>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
|
||||||
|
@ -2,41 +2,41 @@
|
|||||||
{% from 'core/macros.jinja' import user_profile_link %}
|
{% from 'core/macros.jinja' import user_profile_link %}
|
||||||
|
|
||||||
{% block title %}
|
{% block title %}
|
||||||
{{ weekmail.title }}
|
{{ weekmail.title }}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<a href="{{ url('com:weekmail') }}">{% trans %}Back{% endtrans %}</a>
|
<a href="{{ url('com:weekmail') }}">{% trans %}Back{% endtrans %}</a>
|
||||||
{% if bad_recipients %}
|
{% if bad_recipients %}
|
||||||
<p>
|
<p>
|
||||||
<span class="important">
|
<span class="important">
|
||||||
{% trans %}The following recipients were refused by the SMTP:{% endtrans %}
|
{% trans %}The following recipients were refused by the SMTP:{% endtrans %}
|
||||||
</span>
|
</span>
|
||||||
<ul>
|
<ul>
|
||||||
{% for r in bad_recipients.keys() %}
|
{% for r in bad_recipients.keys() %}
|
||||||
<li>{{ r }}</li>
|
<li>{{ r }}</li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<form method="post" action="">
|
<form method="post" action="">
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
<button type="submit" name="send" value="clean">{% trans %}Clean subscribers{% endtrans %}</button>
|
<button type="submit" name="send" value="clean">{% trans %}Clean subscribers{% endtrans %}</button>
|
||||||
</form>
|
</form>
|
||||||
{% else %}
|
{% else %}
|
||||||
{% if request.GET['send'] %}
|
{% if request.GET['send'] %}
|
||||||
<p>{% trans %}Are you sure you want to send this weekmail?{% endtrans %}</p>
|
<p>{% trans %}Are you sure you want to send this weekmail?{% endtrans %}</p>
|
||||||
{% if request.LANGUAGE_CODE != settings.LANGUAGE_CODE[:2] %}
|
{% if request.LANGUAGE_CODE != settings.LANGUAGE_CODE[:2] %}
|
||||||
<p><strong>{% trans %}Warning: you are sending the weekmail in another language than the default one!{% endtrans %}</strong></p>
|
<p><strong>{% trans %}Warning: you are sending the weekmail in another language than the default one!{% endtrans %}</strong></p>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<form method="post" action="">
|
<form method="post" action="">
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
<button type="submit" name="send" value="validate">{% trans %}Send{% endtrans %}</button>
|
<button type="submit" name="send" value="validate">{% trans %}Send{% endtrans %}</button>
|
||||||
</form>
|
</form>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<hr>
|
<hr>
|
||||||
{{ weekmail_rendered|safe }}
|
{{ weekmail_rendered|safe }}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,52 +1,52 @@
|
|||||||
<style type="text/css" media="all">
|
<style type="text/css" media="all">
|
||||||
h1, h2, h3, h4, h5, h6, p {
|
h1, h2, h3, h4, h5, h6, p {
|
||||||
padding: 5px ;
|
padding: 5px ;
|
||||||
margin: 5px;
|
margin: 5px;
|
||||||
}
|
}
|
||||||
img {
|
img {
|
||||||
margin: 5px ;
|
margin: 5px ;
|
||||||
width: 95%;
|
width: 95%;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<div style="background: #CBD1DD; padding: 0px 5%;">
|
<div style="background: #CBD1DD; padding: 0px 5%;">
|
||||||
<div style="background: #F9FAFB;">
|
<div style="background: #F9FAFB;">
|
||||||
<h2 style="background: #000; color: #f9fafb">{{ weekmail.title }}</h2>
|
<h2 style="background: #000; color: #f9fafb">{{ weekmail.title }}</h2>
|
||||||
<img src="{{ weekmail.get_banner() }}"
|
<img src="{{ weekmail.get_banner() }}"
|
||||||
id="OWATemporaryImageDivContainerBannerForOutlook"
|
id="OWATemporaryImageDivContainerBannerForOutlook"
|
||||||
>
|
>
|
||||||
{% if weekmail.intro %}
|
{% if weekmail.intro %}
|
||||||
<h3 style="background: #000; color: #f9fafb">{% trans %}Intro{% endtrans %}</h3>
|
<h3 style="background: #000; color: #f9fafb">{% trans %}Intro{% endtrans %}</h3>
|
||||||
{{ weekmail.intro|markdown }}
|
{{ weekmail.intro|markdown }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<h3 style="background: #000; color: #f9fafb">{% trans %}Table of content{% endtrans %}</h3>
|
<h3 style="background: #000; color: #f9fafb">{% trans %}Table of content{% endtrans %}</h3>
|
||||||
<ul>
|
<ul>
|
||||||
{% for a in weekmail.articles.all() %}
|
{% for a in weekmail.articles.all() %}
|
||||||
<li>[{{ a.club }}] {{ a.title }}</li>
|
<li>[{{ a.club }}] {{ a.title }}</li>
|
||||||
{%- endfor %}
|
{%- endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
{%- for a in weekmail.articles.all() %}
|
{%- for a in weekmail.articles.all() %}
|
||||||
<h3 style="background: #000; color: #f9fafb">[{{ a.club }}] {{ a.title }}</h3>
|
<h3 style="background: #000; color: #f9fafb">[{{ a.club }}] {{ a.title }}</h3>
|
||||||
{{ a.content|markdown }}
|
{{ a.content|markdown }}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
|
|
||||||
{%- if weekmail.joke %}
|
{%- if weekmail.joke %}
|
||||||
<h3 style="background: #000; color: #f9fafb">{% trans %}Joke{% endtrans %}</h3>
|
<h3 style="background: #000; color: #f9fafb">{% trans %}Joke{% endtrans %}</h3>
|
||||||
{{ weekmail.joke|markdown }}
|
{{ weekmail.joke|markdown }}
|
||||||
{% endif -%}
|
{% endif -%}
|
||||||
|
|
||||||
{%- if weekmail.protip %}
|
{%- if weekmail.protip %}
|
||||||
<h3 style="background: #000; color: #f9fafb">{% trans %}Pro tip{% endtrans %}</h3>
|
<h3 style="background: #000; color: #f9fafb">{% trans %}Pro tip{% endtrans %}</h3>
|
||||||
{{ weekmail.protip|markdown }}
|
{{ weekmail.protip|markdown }}
|
||||||
{% endif -%}
|
{% endif -%}
|
||||||
|
|
||||||
{%- if weekmail.conclusion %}
|
{%- if weekmail.conclusion %}
|
||||||
<h3 style="background: #000; color: #f9fafb">{% trans %}Final word{% endtrans %}</h3>
|
<h3 style="background: #000; color: #f9fafb">{% trans %}Final word{% endtrans %}</h3>
|
||||||
{{ weekmail.conclusion|markdown }}
|
{{ weekmail.conclusion|markdown }}
|
||||||
{% endif -%}
|
{% endif -%}
|
||||||
<img src="{{ weekmail.get_footer() }}"
|
<img src="{{ weekmail.get_footer() }}"
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
# {{ weekmail.title }}
|
# {{ weekmail.title }}
|
||||||
|
|
||||||
{%- if weekmail.intro %}
|
{%- if weekmail.intro %}
|
||||||
## {% trans %}Intro{% endtrans %}
|
## {% trans %}Intro{% endtrans %}
|
||||||
{{ weekmail.intro }}
|
{{ weekmail.intro }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
## {% trans %}Table of content{% endtrans %}
|
## {% trans %}Table of content{% endtrans %}
|
||||||
@ -11,22 +11,22 @@
|
|||||||
{% endfor -%}
|
{% endfor -%}
|
||||||
|
|
||||||
{% for a in weekmail.articles.all() %}
|
{% for a in weekmail.articles.all() %}
|
||||||
## [{{ a.club }}] {{ a.title }}
|
## [{{ a.club }}] {{ a.title }}
|
||||||
{{ a.content }}
|
{{ a.content }}
|
||||||
{% endfor -%}
|
{% endfor -%}
|
||||||
|
|
||||||
{%- if weekmail.joke %}
|
{%- if weekmail.joke %}
|
||||||
## {% trans %}Joke{% endtrans %}
|
## {% trans %}Joke{% endtrans %}
|
||||||
{{ weekmail.joke }}
|
{{ weekmail.joke }}
|
||||||
{% endif -%}
|
{% endif -%}
|
||||||
|
|
||||||
{%- if weekmail.protip %}
|
{%- if weekmail.protip %}
|
||||||
## {% trans %}Pro tip{% endtrans %}
|
## {% trans %}Pro tip{% endtrans %}
|
||||||
{{ weekmail.protip }}
|
{{ weekmail.protip }}
|
||||||
{% endif -%}
|
{% endif -%}
|
||||||
|
|
||||||
{%- if weekmail.conclusion %}
|
{%- if weekmail.conclusion %}
|
||||||
## {% trans %}Final word{% endtrans %}
|
## {% trans %}Final word{% endtrans %}
|
||||||
{{ weekmail.conclusion }}
|
{{ weekmail.conclusion }}
|
||||||
{% endif -%}
|
{% endif -%}
|
||||||
|
|
||||||
|
20
com/tests.py
20
com/tests.py
@ -69,11 +69,11 @@ class TestCom(TestCase):
|
|||||||
},
|
},
|
||||||
)
|
)
|
||||||
r = self.client.get(reverse("core:index"))
|
r = self.client.get(reverse("core:index"))
|
||||||
self.assertContains(
|
assert r.status_code == 200
|
||||||
r,
|
self.assertInHTML(
|
||||||
"""<div id="alert_box">
|
"""<div id="alert_box"><div class="markdown"><h3>ALERTE!</h3>
|
||||||
<div class="markdown"><h3>ALERTE!</h3>
|
<p><strong>Caaaataaaapuuuulte!!!!</strong></p>""",
|
||||||
<p><strong>Caaaataaaapuuuulte!!!!</strong></p>""",
|
r.content.decode(),
|
||||||
)
|
)
|
||||||
|
|
||||||
def test_info_msg(self):
|
def test_info_msg(self):
|
||||||
@ -86,10 +86,12 @@ class TestCom(TestCase):
|
|||||||
},
|
},
|
||||||
)
|
)
|
||||||
r = self.client.get(reverse("core:index"))
|
r = self.client.get(reverse("core:index"))
|
||||||
self.assertContains(
|
|
||||||
r,
|
assert r.status_code == 200
|
||||||
"""<div id="info_box">
|
self.assertInHTML(
|
||||||
<div class="markdown"><h3>INFO: <strong>Caaaataaaapuuuulte!!!!</strong></h3>""",
|
"""<div id="info_box"><div class="markdown">
|
||||||
|
<h3>INFO: <strong>Caaaataaaapuuuulte!!!!</strong></h3>""",
|
||||||
|
r.content.decode(),
|
||||||
)
|
)
|
||||||
|
|
||||||
def test_birthday_non_subscribed_user(self):
|
def test_birthday_non_subscribed_user(self):
|
||||||
|
@ -1,149 +1,149 @@
|
|||||||
body{
|
body{
|
||||||
position: absolute;
|
position: absolute;
|
||||||
width: 100vw;
|
width: 100vw;
|
||||||
height: 100vh;
|
height: 100vh;
|
||||||
|
|
||||||
padding: 0;
|
padding: 0;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#slideshow{
|
#slideshow{
|
||||||
position: relative;
|
position: relative;
|
||||||
background-color: lightgrey;
|
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%;
|
height: 100%;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
background: none;
|
||||||
|
|
||||||
*{
|
&:before{
|
||||||
-webkit-user-select: none;
|
display: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;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#slides{
|
#slides{
|
||||||
position: relative;
|
height: 100vh;
|
||||||
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;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
#progress_bullets{
|
#slides{
|
||||||
position: absolute;
|
position: relative;
|
||||||
bottom: 10px;
|
height: 100%;
|
||||||
width: 100%;
|
overflow: hidden;
|
||||||
height: 10px;
|
|
||||||
|
|
||||||
display: flex;
|
.slide{
|
||||||
justify-content: center;
|
position: absolute;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
|
||||||
margin-bottom: 10px;
|
display: inline-flex;
|
||||||
|
justify-content: center;
|
||||||
|
|
||||||
.bullet{
|
top: 0px;
|
||||||
height: 10px;
|
|
||||||
width: 10px;
|
|
||||||
|
|
||||||
margin-left: 5px;
|
background-color: grey;
|
||||||
margin-right: 5px;
|
transition: left 1s ease-out;
|
||||||
|
|
||||||
border-radius: 50%;
|
img{
|
||||||
|
max-width: 100%;
|
||||||
background-color: grey;
|
max-height: 100%;
|
||||||
|
object-fit: contain;
|
||||||
&.active{
|
}
|
||||||
background-color: #c99836;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#progress_bar{
|
.slide.left{
|
||||||
position: absolute;
|
left: -100%;
|
||||||
bottom: 0px;
|
|
||||||
height: 10px;
|
|
||||||
background-color: #304c83;
|
|
||||||
|
|
||||||
&.init{
|
|
||||||
width: 0px;
|
|
||||||
transition: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
&.progress{
|
|
||||||
width: 100%;
|
|
||||||
transition: width 10s linear;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.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;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -21,9 +21,9 @@
|
|||||||
overflow: auto;
|
overflow: auto;
|
||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
font-family: Consolas, "Andale Mono WT", "Andale Mono", "Lucida Console",
|
font-family: Consolas, "Andale Mono WT", "Andale Mono", "Lucida Console",
|
||||||
"Lucida Sans Typewriter", "DejaVu Sans Mono", "Bitstream Vera Sans Mono",
|
"Lucida Sans Typewriter", "DejaVu Sans Mono", "Bitstream Vera Sans Mono",
|
||||||
"Liberation Mono", "Nimbus Mono L", Monaco, "Courier New", Courier,
|
"Liberation Mono", "Nimbus Mono L", Monaco, "Courier New", Courier,
|
||||||
monospace;
|
monospace;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
tab-size: 4;
|
tab-size: 4;
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
|
@ -43,7 +43,7 @@ nav.navbar {
|
|||||||
justify-content: center;
|
justify-content: center;
|
||||||
display: flex !important;
|
display: flex !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
> .menu,
|
> .menu,
|
||||||
> .link {
|
> .link {
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
@ -146,5 +146,5 @@ nav.navbar {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -170,7 +170,7 @@ a:not(.button) {
|
|||||||
|
|
||||||
.shadow {
|
.shadow {
|
||||||
box-shadow: rgba(60, 64, 67, 0.3) 0 1px 3px 0,
|
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 {
|
.w_big {
|
||||||
@ -246,7 +246,7 @@ a:not(.button) {
|
|||||||
#page {
|
#page {
|
||||||
width: 90%;
|
width: 90%;
|
||||||
margin: 20px auto 0;
|
margin: 20px auto 0;
|
||||||
/*---------------------------------NAV---------------------------------*/
|
/*---------------------------------NAV---------------------------------*/
|
||||||
|
|
||||||
.btn {
|
.btn {
|
||||||
font-size: 15px;
|
font-size: 15px;
|
||||||
@ -278,7 +278,7 @@ a:not(.button) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*--------------------------------CONTENT------------------------------*/
|
/*--------------------------------CONTENT------------------------------*/
|
||||||
#quick_notif {
|
#quick_notif {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
@ -357,7 +357,7 @@ a:not(.button) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*---------------------------------NEWS--------------------------------*/
|
/*---------------------------------NEWS--------------------------------*/
|
||||||
#news {
|
#news {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|
||||||
@ -385,11 +385,11 @@ a:not(.button) {
|
|||||||
background: $second-color;
|
background: $second-color;
|
||||||
box-shadow: $shadow-color 1px 1px 1px;
|
box-shadow: $shadow-color 1px 1px 1px;
|
||||||
padding: 0.4em;
|
padding: 0.4em;
|
||||||
margin: 0em 0em 0.5em 0em;
|
margin: 0 0 0.5em 0;
|
||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
font-size: 1.1em;
|
font-size: 1.1em;
|
||||||
&:not(:first-of-type) {
|
&: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,
|
#agenda,
|
||||||
#birthdays {
|
#birthdays {
|
||||||
display: block;
|
display: block;
|
||||||
@ -410,7 +410,7 @@ a:not(.button) {
|
|||||||
margin-bottom: 1em;
|
margin-bottom: 1em;
|
||||||
#agenda_title,
|
#agenda_title,
|
||||||
#birthdays_title {
|
#birthdays_title {
|
||||||
margin: 0em;
|
margin: 0;
|
||||||
border-radius: 5px 5px 0 0;
|
border-radius: 5px 5px 0 0;
|
||||||
box-shadow: $shadow-color 1px 1px 1px;
|
box-shadow: $shadow-color 1px 1px 1px;
|
||||||
padding: 0.5em;
|
padding: 0.5em;
|
||||||
@ -444,7 +444,7 @@ a:not(.button) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
ul.birthdays_year {
|
ul.birthdays_year {
|
||||||
margin: 0em;
|
margin: 0;
|
||||||
list-style-type: none;
|
list-style-type: none;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
> li {
|
> li {
|
||||||
@ -454,7 +454,7 @@ a:not(.button) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
ul {
|
ul {
|
||||||
margin: 0em;
|
margin: 0;
|
||||||
margin-left: 1em;
|
margin-left: 1em;
|
||||||
list-style-type: square;
|
list-style-type: square;
|
||||||
list-style-position: inside;
|
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 {
|
.news_events_group {
|
||||||
box-shadow: $shadow-color 1px 1px 1px;
|
box-shadow: $shadow-color 1px 1px 1px;
|
||||||
margin-left: 1em;
|
margin-left: 1em;
|
||||||
@ -516,14 +516,14 @@ a:not(.button) {
|
|||||||
float: left;
|
float: left;
|
||||||
min-width: 7em;
|
min-width: 7em;
|
||||||
max-width: 9em;
|
max-width: 9em;
|
||||||
margin: 0em;
|
margin: 0;
|
||||||
margin-right: 1em;
|
margin-right: 1em;
|
||||||
margin-top: 0.8em;
|
margin-top: 0.8em;
|
||||||
img {
|
img {
|
||||||
max-height: 6em;
|
max-height: 6em;
|
||||||
max-width: 8em;
|
max-width: 8em;
|
||||||
display: block;
|
display: block;
|
||||||
margin: 0em auto;
|
margin: 0 auto;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.news_date {
|
.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 {
|
.news_coming_soon {
|
||||||
display: list-item;
|
display: list-item;
|
||||||
list-style-type: square;
|
list-style-type: square;
|
||||||
list-style-position: inside;
|
list-style-position: inside;
|
||||||
margin-left: 1em;
|
margin-left: 1em;
|
||||||
padding-left: 0em;
|
padding-left: 0;
|
||||||
a {
|
a {
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
@ -561,35 +561,35 @@ a:not(.button) {
|
|||||||
font-size: 0.9em;
|
font-size: 0.9em;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* END COMING SOON */
|
/* END COMING SOON */
|
||||||
|
|
||||||
/* NOTICES */
|
/* NOTICES */
|
||||||
.news_notice {
|
.news_notice {
|
||||||
margin: 0em 0em 1em 1em;
|
margin: 0 0 1em 1em;
|
||||||
padding: 0.4em;
|
padding: 0.4em;
|
||||||
padding-left: 1em;
|
padding-left: 1em;
|
||||||
background: $secondary-neutral-light-color;
|
background: $secondary-neutral-light-color;
|
||||||
box-shadow: $shadow-color 0 0 2px;
|
box-shadow: $shadow-color 0 0 2px;
|
||||||
border-radius: 18px 5px 18px 5px;
|
border-radius: 18px 5px 18px 5px;
|
||||||
h4 {
|
h4 {
|
||||||
margin: 0em;
|
margin: 0;
|
||||||
}
|
}
|
||||||
.news_content {
|
.news_content {
|
||||||
margin-left: 1em;
|
margin-left: 1em;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* END NOTICES */
|
/* END NOTICES */
|
||||||
|
|
||||||
/* CALLS */
|
/* CALLS */
|
||||||
.news_call {
|
.news_call {
|
||||||
margin: 0em 0em 1em 1em;
|
margin: 0 0 1em 1em;
|
||||||
padding: 0.4em;
|
padding: 0.4em;
|
||||||
padding-left: 1em;
|
padding-left: 1em;
|
||||||
background: $secondary-neutral-light-color;
|
background: $secondary-neutral-light-color;
|
||||||
border: 1px solid grey;
|
border: 1px solid grey;
|
||||||
box-shadow: $shadow-color 1px 1px 1px;
|
box-shadow: $shadow-color 1px 1px 1px;
|
||||||
h4 {
|
h4 {
|
||||||
margin: 0em;
|
margin: 0;
|
||||||
}
|
}
|
||||||
.news_date {
|
.news_date {
|
||||||
font-size: 0.9em;
|
font-size: 0.9em;
|
||||||
@ -598,7 +598,7 @@ a:not(.button) {
|
|||||||
margin-left: 1em;
|
margin-left: 1em;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* END CALLS */
|
/* END CALLS */
|
||||||
|
|
||||||
.news_empty {
|
.news_empty {
|
||||||
margin-left: 1em;
|
margin-left: 1em;
|
||||||
@ -631,12 +631,12 @@ a:not(.button) {
|
|||||||
width: 19%;
|
width: 19%;
|
||||||
float: left;
|
float: left;
|
||||||
min-width: 15em;
|
min-width: 15em;
|
||||||
margin: 0em;
|
margin: 0;
|
||||||
img {
|
img {
|
||||||
max-height: 15em;
|
max-height: 15em;
|
||||||
max-width: 12em;
|
max-width: 12em;
|
||||||
display: block;
|
display: block;
|
||||||
margin: 0em auto;
|
margin: 0 auto;
|
||||||
margin-bottom: 10px;
|
margin-bottom: 10px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -646,7 +646,6 @@ a:not(.button) {
|
|||||||
padding: 0.5em 1em;
|
padding: 0.5em 1em;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
display: inline-block;
|
|
||||||
font-size: 1.2em;
|
font-size: 1.2em;
|
||||||
border-radius: 2px;
|
border-radius: 2px;
|
||||||
float: right;
|
float: right;
|
||||||
@ -978,7 +977,7 @@ table {
|
|||||||
-moz-border-radius: 5px;
|
-moz-border-radius: 5px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
box-shadow: rgba(60, 64, 67, 0.3) 0 1px 3px 0,
|
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) {
|
@media screen and (max-width: 500px) {
|
||||||
@ -1198,8 +1197,8 @@ u,
|
|||||||
color: $primary-neutral-dark-color;
|
color: $primary-neutral-dark-color;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
margin: 0em;
|
margin: 0;
|
||||||
padding: 0em;
|
padding: 0;
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1393,7 +1392,7 @@ footer {
|
|||||||
text-align: center;
|
text-align: center;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
div {
|
div {
|
||||||
margin: 0.6em 0em;
|
margin: 0.6em 0;
|
||||||
color: $white-color;
|
color: $white-color;
|
||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
display: flex;
|
display: flex;
|
||||||
@ -1573,10 +1572,10 @@ $pedagogy-white-text: #f0f0f0;
|
|||||||
grid-template-columns: auto auto;
|
grid-template-columns: auto auto;
|
||||||
grid-template-rows: auto auto auto;
|
grid-template-rows: auto auto auto;
|
||||||
grid-template-areas:
|
grid-template-areas:
|
||||||
"action-bar action-bar"
|
"action-bar action-bar"
|
||||||
"search-bar search-bar"
|
"search-bar search-bar"
|
||||||
"radio-department radio-department"
|
"radio-department radio-department"
|
||||||
"radio-credit-type radio-semester";
|
"radio-credit-type radio-semester";
|
||||||
}
|
}
|
||||||
|
|
||||||
.action-bar {
|
.action-bar {
|
||||||
@ -1668,8 +1667,8 @@ $pedagogy-white-text: #f0f0f0;
|
|||||||
grid-template-columns: 20% 20% 20% 20% auto;
|
grid-template-columns: 20% 20% 20% 20% auto;
|
||||||
grid-template-rows: auto auto;
|
grid-template-rows: auto auto;
|
||||||
grid-template-areas:
|
grid-template-areas:
|
||||||
"hours-cm hours-td hours-tp hours-te hours-the"
|
"hours-cm hours-td hours-tp hours-te hours-the"
|
||||||
"department credit-type semester . .";
|
"department credit-type semester . .";
|
||||||
}
|
}
|
||||||
|
|
||||||
.department {
|
.department {
|
||||||
@ -1722,8 +1721,8 @@ $pedagogy-white-text: #f0f0f0;
|
|||||||
grid-template-columns: 100%;
|
grid-template-columns: 100%;
|
||||||
grid-template-rows: auto auto;
|
grid-template-rows: auto auto;
|
||||||
grid-template-areas:
|
grid-template-areas:
|
||||||
"stars"
|
"stars"
|
||||||
"comment";
|
"comment";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1770,15 +1769,15 @@ $pedagogy-white-text: #f0f0f0;
|
|||||||
grid-template-columns: 150px 100px auto;
|
grid-template-columns: 150px 100px auto;
|
||||||
grid-template-rows: 156px 1fr;
|
grid-template-rows: 156px 1fr;
|
||||||
grid-template-areas:
|
grid-template-areas:
|
||||||
"grade grade-stars uv-infos"
|
"grade grade-stars uv-infos"
|
||||||
". . uv-infos";
|
". . uv-infos";
|
||||||
|
|
||||||
@media screen and (max-width: $large-devices) {
|
@media screen and (max-width: $large-devices) {
|
||||||
grid-template-columns: 50% 50%;
|
grid-template-columns: 50% 50%;
|
||||||
grid-template-rows: auto auto;
|
grid-template-rows: auto auto;
|
||||||
grid-template-areas:
|
grid-template-areas:
|
||||||
"grade grade-stars"
|
"grade grade-stars"
|
||||||
"uv-infos uv-infos";
|
"uv-infos uv-infos";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1811,9 +1810,9 @@ $pedagogy-white-text: #f0f0f0;
|
|||||||
grid-template-columns: 300px auto;
|
grid-template-columns: 300px auto;
|
||||||
grid-template-rows: auto auto auto;
|
grid-template-rows: auto auto auto;
|
||||||
grid-template-areas:
|
grid-template-areas:
|
||||||
"grade-block comment"
|
"grade-block comment"
|
||||||
"grade-block info"
|
"grade-block info"
|
||||||
"comment-end-bar comment-end-bar";
|
"comment-end-bar comment-end-bar";
|
||||||
margin-bottom: 30px;
|
margin-bottom: 30px;
|
||||||
margin-top: 10px;
|
margin-top: 10px;
|
||||||
|
|
||||||
@ -1821,10 +1820,10 @@ $pedagogy-white-text: #f0f0f0;
|
|||||||
grid-template-columns: auto;
|
grid-template-columns: auto;
|
||||||
grid-template-rows: auto auto auto auto;
|
grid-template-rows: auto auto auto auto;
|
||||||
grid-template-areas:
|
grid-template-areas:
|
||||||
"grade-block"
|
"grade-block"
|
||||||
"comment"
|
"comment"
|
||||||
"info"
|
"info"
|
||||||
"comment-end-bar";
|
"comment-end-bar";
|
||||||
}
|
}
|
||||||
|
|
||||||
.grade-block {
|
.grade-block {
|
||||||
@ -1835,8 +1834,8 @@ $pedagogy-white-text: #f0f0f0;
|
|||||||
grid-template-columns: 150px 150px;
|
grid-template-columns: 150px 150px;
|
||||||
grid-template-rows: 156px auto;
|
grid-template-rows: 156px auto;
|
||||||
grid-template-areas:
|
grid-template-areas:
|
||||||
"grade-type grade-stars"
|
"grade-type grade-stars"
|
||||||
"grade-extension grade-extension";
|
"grade-extension grade-extension";
|
||||||
grid-gap: 15px;
|
grid-gap: 15px;
|
||||||
|
|
||||||
clip-path: polygon(0 0, 0 100%, 100% 100%, 100% 30px, 270px 0);
|
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-columns: auto;
|
||||||
grid-template-rows: auto auto;
|
grid-template-rows: auto auto;
|
||||||
grid-template-areas:
|
grid-template-areas:
|
||||||
"anchor"
|
"anchor"
|
||||||
"markdown";
|
"markdown";
|
||||||
|
|
||||||
@media screen and (max-width: $large-devices) {
|
@media screen and (max-width: $large-devices) {
|
||||||
border-left: solid;
|
border-left: solid;
|
||||||
@ -1944,9 +1943,9 @@ $pedagogy-white-text: #f0f0f0;
|
|||||||
grid-template-columns: auto;
|
grid-template-columns: auto;
|
||||||
grid-template-rows: auto auto auto;
|
grid-template-rows: auto auto auto;
|
||||||
grid-template-areas:
|
grid-template-areas:
|
||||||
"report"
|
"report"
|
||||||
"date"
|
"date"
|
||||||
"author";
|
"author";
|
||||||
margin-top: 0;
|
margin-top: 0;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
@ -5,287 +5,287 @@ $border: .01rem solid black;
|
|||||||
$min_col_width: 100px;
|
$min_col_width: 100px;
|
||||||
|
|
||||||
.error {
|
.error {
|
||||||
color: red !important;
|
color: red !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.radio-btn {
|
.radio-btn {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
gap: $gap;
|
gap: $gap;
|
||||||
|
|
||||||
> input,
|
> input,
|
||||||
> label {
|
> label {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.election_vote {
|
.election_vote {
|
||||||
overflow-x: scroll !important;
|
overflow-x: scroll !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.election_table {
|
.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;
|
display: flex;
|
||||||
flex-direction: row;
|
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 {
|
>.role_text {
|
||||||
display: flex;
|
>h4 {
|
||||||
flex-direction: column-reverse;
|
margin: 0;
|
||||||
align-items: center;
|
}
|
||||||
justify-content: center;
|
>p {
|
||||||
padding: $padding;
|
margin-top: .5em;
|
||||||
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 {
|
>.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;
|
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;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: column;
|
||||||
background-color: lightgrey;
|
align-items: center;
|
||||||
|
list-style-type: none;
|
||||||
|
width: 100%;
|
||||||
|
gap: $gap;
|
||||||
|
|
||||||
&:hover {
|
>input[type="radio"]:checked + label,
|
||||||
background-color: lightgrey;
|
>input[type="checkbox"]:checked + label {
|
||||||
}
|
background-color: lightgray;
|
||||||
|
border-radius: 10px;
|
||||||
|
|
||||||
>.role_title {
|
>figure>.edit_btns>a:hover{
|
||||||
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;
|
|
||||||
background-color: #fff;
|
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 {
|
.election_details {
|
||||||
margin: .5em 0;
|
margin: .5em 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.buttons {
|
.buttons {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
gap: $gap;
|
gap: $gap;
|
||||||
}
|
}
|
||||||
|
|
||||||
.button {
|
.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;
|
color: black;
|
||||||
text-decoration: none;
|
background: #d4d4d4;
|
||||||
background-color: #f2f2f2;
|
}
|
||||||
padding: 0.4em;
|
|
||||||
margin: 0.1em;
|
|
||||||
font-size: 1.18em;
|
|
||||||
border-radius: 5px;
|
|
||||||
box-shadow: #dfdfdf 0px 0px 1px;
|
|
||||||
cursor: pointer;
|
|
||||||
|
|
||||||
|
&_send {
|
||||||
|
background-color: #59aee2;
|
||||||
&:hover {
|
&:hover {
|
||||||
color: black;
|
background-color: rgb(130, 186, 235);
|
||||||
background: #d4d4d4;
|
|
||||||
}
|
|
||||||
|
|
||||||
&_send {
|
|
||||||
background-color: #59aee2;
|
|
||||||
&:hover {
|
|
||||||
background-color: rgb(130, 186, 235);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
@ -50,7 +50,7 @@
|
|||||||
align-items: flex-start;
|
align-items: flex-start;
|
||||||
max-height: 65px;
|
max-height: 65px;
|
||||||
}
|
}
|
||||||
|
|
||||||
> span {
|
> span {
|
||||||
height: 150px;
|
height: 150px;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
@ -66,14 +66,14 @@
|
|||||||
max-height: 100%;
|
max-height: 100%;
|
||||||
height: auto;
|
height: auto;
|
||||||
object-fit: contain;
|
object-fit: contain;
|
||||||
|
|
||||||
@media (max-width: 375px) {
|
@media (max-width: 375px) {
|
||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
max-height: 65px;
|
max-height: 65px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
> em {
|
> em {
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
padding: 0 5px;
|
padding: 0 5px;
|
||||||
|
@ -35,7 +35,7 @@ main {
|
|||||||
> span {
|
> span {
|
||||||
margin-top: 5px;
|
margin-top: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
> span > span,
|
> span > span,
|
||||||
> span {
|
> span {
|
||||||
display: flex;
|
display: flex;
|
||||||
@ -43,7 +43,7 @@ main {
|
|||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
gap: 5px;
|
gap: 5px;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|
||||||
>.button {
|
>.button {
|
||||||
font-size: smaller;
|
font-size: smaller;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
@ -2,9 +2,9 @@
|
|||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
|
|
||||||
<h3>{% trans %}403, Forbidden{% endtrans %}</h3>
|
<h3>{% trans %}403, Forbidden{% endtrans %}</h3>
|
||||||
|
|
||||||
{{ super() }}
|
{{ super() }}
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
@ -2,9 +2,9 @@
|
|||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
|
|
||||||
<div id="page">
|
<div id="page">
|
||||||
<h3>{% trans %}404, Not Found{% endtrans %}</h3>
|
<h3>{% trans %}404, Not Found{% endtrans %}</h3>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
@ -1,27 +1,27 @@
|
|||||||
{% extends "core/base.jinja" %}
|
{% extends "core/base.jinja" %}
|
||||||
{% block head %}
|
{% block head %}
|
||||||
{{ super() }}
|
{{ super() }}
|
||||||
<script
|
<script
|
||||||
src="https://browser.sentry-cdn.com/7.11.1/bundle.min.js"
|
src="https://browser.sentry-cdn.com/7.11.1/bundle.min.js"
|
||||||
integrity="sha384-qcYSo5+/E8hEkPmHFa79GRDsGT84SRhBJHRw3+dbQyh0UwueiFP1jCsRBClEREcs"
|
integrity="sha384-qcYSo5+/E8hEkPmHFa79GRDsGT84SRhBJHRw3+dbQyh0UwueiFP1jCsRBClEREcs"
|
||||||
crossorigin="anonymous"
|
crossorigin="anonymous"
|
||||||
></script>
|
></script>
|
||||||
{% endblock head %}
|
{% endblock head %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<h3>{% trans %}500, Server Error{% endtrans %}</h3>
|
<h3>{% trans %}500, Server Error{% endtrans %}</h3>
|
||||||
{% if settings.SENTRY_DSN %}
|
{% if settings.SENTRY_DSN %}
|
||||||
<script>
|
<script>
|
||||||
Sentry.init({ dsn: '{{ settings.SENTRY_DSN }}' });
|
Sentry.init({ dsn: '{{ settings.SENTRY_DSN }}' });
|
||||||
Sentry.showReportDialog({
|
Sentry.showReportDialog({
|
||||||
eventId: '{{ request.sentry_last_event_id() }}',
|
eventId: '{{ request.sentry_last_event_id() }}',
|
||||||
{% if user.is_authenticated %}
|
{% if user.is_authenticated %}
|
||||||
user: {
|
user: {
|
||||||
'name': '{{user.first_name}} {{user.last_name}}',
|
'name': '{{user.first_name}} {{user.last_name}}',
|
||||||
'email': '{{user.email}}'
|
'email': '{{user.email}}'
|
||||||
}
|
}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endblock content %}
|
{% endblock content %}
|
||||||
|
@ -1,319 +1,321 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="fr">
|
<html lang="fr">
|
||||||
<head>
|
<head>
|
||||||
{% block head %}
|
{% block head %}
|
||||||
<title>{% block title %}{% trans %}Welcome!{% endtrans %}{% endblock %} - Association des Étudiants UTBM</title>
|
<title>{% block title %}{% trans %}Welcome!{% endtrans %}{% endblock %} - Association des Étudiants UTBM</title>
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<link rel="shortcut icon" href="{{ static('core/img/favicon.ico') }}">
|
<link rel="shortcut icon" href="{{ static('core/img/favicon.ico') }}">
|
||||||
<link rel="stylesheet" href="{{ static('core/base.css') }}">
|
<link rel="stylesheet" href="{{ static('core/base.css') }}">
|
||||||
<link rel="stylesheet" href="{{ static('ajax_select/css/ajax_select.css') }}">
|
<link rel="stylesheet" href="{{ static('ajax_select/css/ajax_select.css') }}">
|
||||||
<link rel="stylesheet" href="{{ scss('core/style.scss') }}">
|
<link rel="stylesheet" href="{{ scss('core/style.scss') }}">
|
||||||
<link rel="stylesheet" href="{{ scss('core/markdown.scss') }}">
|
<link rel="stylesheet" href="{{ scss('core/markdown.scss') }}">
|
||||||
<link rel="stylesheet" href="{{ scss('core/header.scss') }}">
|
<link rel="stylesheet" href="{{ scss('core/header.scss') }}">
|
||||||
<link rel="stylesheet" href="{{ scss('core/navbar.scss') }}">
|
<link rel="stylesheet" href="{{ scss('core/navbar.scss') }}">
|
||||||
|
|
||||||
{% block jquery_css %}
|
{% block jquery_css %}
|
||||||
{# Thile file is quite heavy (around 250kb), so declaring it in a block allows easy removal #}
|
{# Thile file is quite heavy (around 250kb), so declaring it in a block allows easy removal #}
|
||||||
<link rel="stylesheet" href="{{ static('core/js/ui/jquery-ui.min.css') }}">
|
<link rel="stylesheet" href="{{ static('core/js/ui/jquery-ui.min.css') }}">
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
<link rel="preload" as="style" href="{{ static('core/font-awesome/css/font-awesome.min.css') }}" onload="this.onload=null;this.rel='stylesheet'">
|
<link rel="preload" as="style" href="{{ static('core/font-awesome/css/font-awesome.min.css') }}" onload="this.onload=null;this.rel='stylesheet'">
|
||||||
<noscript><link rel="stylesheet" href="{{ static('core/font-awesome/css/font-awesome.min.css') }}"></noscript>
|
<noscript><link rel="stylesheet" href="{{ static('core/font-awesome/css/font-awesome.min.css') }}"></noscript>
|
||||||
<script defer href="{{ static('core/font-awesome/js/fontawesone.min.js') }}"></script>
|
<script defer href="{{ static('core/font-awesome/js/fontawesone.min.js') }}"></script>
|
||||||
|
|
||||||
<!-- Jquery declared here to be accessible in every django widgets -->
|
<!-- Jquery declared here to be accessible in every django widgets -->
|
||||||
<script src="{{ static('core/js/jquery-3.6.2.min.js') }}"></script>
|
<script src="{{ static('core/js/jquery-3.6.2.min.js') }}"></script>
|
||||||
<!-- Put here to always have acces to those functions on django widgets -->
|
<!-- Put here to always have acces to those functions on django widgets -->
|
||||||
<script src="{{ static('core/js/script.js') }}"></script>
|
<script src="{{ static('core/js/script.js') }}"></script>
|
||||||
|
|
||||||
{% block additional_css %}{% endblock %}
|
{% block additional_css %}{% endblock %}
|
||||||
{% block additional_js %}{% endblock %}
|
{% block additional_js %}{% endblock %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
<!-- The token is always passed here to be accessible from the dom -->
|
<!-- The token is always passed here to be accessible from the dom -->
|
||||||
<!-- See this workaround https://docs.djangoproject.com/en/2.0/ref/csrf/#acquiring-the-token-if-csrf-use-sessions-is-true -->
|
<!-- See this workaround https://docs.djangoproject.com/en/2.0/ref/csrf/#acquiring-the-token-if-csrf-use-sessions-is-true -->
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
<!-- BEGIN HEADER -->
|
<!-- BEGIN HEADER -->
|
||||||
{% block header %}
|
{% block header %}
|
||||||
{% if not popup %}
|
{% if not popup %}
|
||||||
<header class="header">
|
<header class="header">
|
||||||
<div class="header-logo">
|
<div class="header-logo">
|
||||||
<a class="header-logo-picture" href="{{ url('core:index') }}" style="background-image: url('{{ static('core/img/logo_no_text.png') }}')">
|
<a class="header-logo-picture" href="{{ url('core:index') }}" style="background-image: url('{{ static('core/img/logo_no_text.png') }}')">
|
||||||
|
|
||||||
</a>
|
</a>
|
||||||
<a class="header-logo-text" href="{{ url('core:index') }}">
|
<a class="header-logo-text" href="{{ url('core:index') }}">
|
||||||
<span>Association des Étudiants</span>
|
<span>Association des Étudiants</span>
|
||||||
<span>de l'Université de Technologie de Belfort-Montbéliard</span>
|
<span>de l'Université de Technologie de Belfort-Montbéliard</span>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
{% if not user.is_authenticated %}
|
{% if not user.is_authenticated %}
|
||||||
<div class="header-disconnected">
|
<div class="header-disconnected">
|
||||||
<a class="button" href="{{ url('core:login') }}">{% trans %}Login{% endtrans %}</a>
|
<a class="button" href="{{ url('core:login') }}">{% trans %}Login{% endtrans %}</a>
|
||||||
<a class="button" href="{{ url('core:register') }}">{% trans %}Register{% endtrans %}</a>
|
<a class="button" href="{{ url('core:register') }}">{% trans %}Register{% endtrans %}</a>
|
||||||
</div>
|
</div>
|
||||||
{% else %}
|
{% else %}
|
||||||
<div class="header-connected">
|
<div class="header-connected">
|
||||||
<div class="left">
|
<div class="left">
|
||||||
<form class="search" action="{{ url('core:search') }}" method="GET" id="header_search">
|
<form class="search" action="{{ url('core:search') }}" method="GET" id="header_search">
|
||||||
<input class="header-input" type="text" placeholder="{% trans %}Search{% endtrans %}" name="query" id="search" />
|
<input class="header-input" type="text" placeholder="{% trans %}Search{% endtrans %}" name="query" id="search" />
|
||||||
<input type="submit" value="{% trans %}Search{% endtrans %}" style="display: none;" />
|
<input type="submit" value="{% trans %}Search{% endtrans %}" style="display: none;" />
|
||||||
</form>
|
</form>
|
||||||
<ul class="bars">
|
<ul class="bars">
|
||||||
{% cache 100 "counters_activity" %}
|
{% cache 100 "counters_activity" %}
|
||||||
{% for bar in Counter.objects.annotate_has_barman(user).filter(type="BAR") %}
|
{% for bar in Counter.objects.annotate_has_barman(user).filter(type="BAR") %}
|
||||||
<li>
|
<li>
|
||||||
{# If the user is a barman, we redirect him directly to the barman page
|
{# If the user is a barman, we redirect him directly to the barman page
|
||||||
else we redirect him to the activity page #}
|
else we redirect him to the activity page #}
|
||||||
{% if bar.has_annotated_barman %}
|
{% if bar.has_annotated_barman %}
|
||||||
<a href="{{ url('counter:details', counter_id=bar.id) }}">
|
<a href="{{ url('counter:details', counter_id=bar.id) }}">
|
||||||
{% else %}
|
{% else %}
|
||||||
<a href="{{ url('counter:activity', counter_id=bar.id) }}">
|
<a href="{{ url('counter:activity', counter_id=bar.id) }}">
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if bar.is_inactive() %}
|
{% if bar.is_inactive() %}
|
||||||
<i class="fa fa-question" style="color: #f39c12"></i>
|
<i class="fa fa-question" style="color: #f39c12"></i>
|
||||||
{% elif bar.is_open %}
|
{% elif bar.is_open %}
|
||||||
<i class="fa fa-check" style="color: #2ecc71"></i>
|
<i class="fa fa-check" style="color: #2ecc71"></i>
|
||||||
{% else %}
|
{% else %}
|
||||||
<i class="fa fa-times" style="color: #eb2f06"></i>
|
<i class="fa fa-times" style="color: #eb2f06"></i>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<span>{{ bar }}</span>
|
<span>{{ bar }}</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endcache %}
|
{% endcache %}
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="right">
|
<div class="right">
|
||||||
<div class="user">
|
<div class="user">
|
||||||
<div class="options">
|
<div class="options">
|
||||||
<div class="username">
|
<div class="username">
|
||||||
<a href="{{ url('core:user_profile', user_id=user.id) }}">{{ user.get_display_name() }}</a>
|
<a href="{{ url('core:user_profile', user_id=user.id) }}">{{ user.get_display_name() }}</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="links">
|
<div class="links">
|
||||||
<a href="{{ url('core:user_tools') }}">{% trans %}Tools{% endtrans %}</a>
|
<a href="{{ url('core:user_tools') }}">{% trans %}Tools{% endtrans %}</a>
|
||||||
<a href="{{ url('core:logout') }}">{% trans %}Logout{% endtrans %}</a>
|
<a href="{{ url('core:logout') }}">{% trans %}Logout{% endtrans %}</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<a
|
<a
|
||||||
href="{{ url('core:user_profile', user_id=user.id) }}"
|
href="{{ url('core:user_profile', user_id=user.id) }}"
|
||||||
{% if user.profile_pict %}
|
{% if user.profile_pict %}
|
||||||
style="background-image: url('{{ user.profile_pict.get_download_url() }}')"
|
style="background-image: url('{{ user.profile_pict.get_download_url() }}')"
|
||||||
{% else %}
|
{% else %}
|
||||||
style="background-image: url('{{ static('core/img/unknown.jpg') }}')"
|
style="background-image: url('{{ static('core/img/unknown.jpg') }}')"
|
||||||
{% endif %}
|
|
||||||
></a>
|
|
||||||
</div>
|
|
||||||
<div class="notification">
|
|
||||||
<a href="#" onclick="display_notif()">
|
|
||||||
<i class="fa fa-bell-o"></i>
|
|
||||||
{% set notification_count = user.notifications.filter(viewed=False).count() %}
|
|
||||||
|
|
||||||
{% if notification_count > 0 %}
|
|
||||||
<span>
|
|
||||||
{% if notification_count < 100 %}
|
|
||||||
{{ notification_count }}
|
|
||||||
{% else %}
|
|
||||||
|
|
||||||
{% endif %}
|
|
||||||
</span>
|
|
||||||
{% endif %}
|
|
||||||
</a>
|
|
||||||
<div id="header_notif">
|
|
||||||
<ul>
|
|
||||||
{% if user.notifications.filter(viewed=False).count() > 0 %}
|
|
||||||
{% for n in user.notifications.filter(viewed=False).order_by('-date') %}
|
|
||||||
<li>
|
|
||||||
<a href="{{ url("core:notification", notif_id=n.id) }}">
|
|
||||||
<div class="datetime">
|
|
||||||
<span class="header_notif_date">
|
|
||||||
{{ n.date|localtime|date(DATE_FORMAT) }}
|
|
||||||
</span>
|
|
||||||
<span class="header_notif_time">
|
|
||||||
{{ n.date|localtime|time(DATETIME_FORMAT) }}
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
<div class="reason">
|
|
||||||
{{ n }}
|
|
||||||
</div>
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
{% endfor %}
|
|
||||||
{% else %}
|
|
||||||
<li class="empty-notification">{% trans %}You do not have any unread notification{% endtrans %}</li>
|
|
||||||
{% endif %}
|
|
||||||
</ul>
|
|
||||||
<div class="options">
|
|
||||||
<a href="{{ url('core:notification_list') }}">
|
|
||||||
{% trans %}View more{% endtrans %}
|
|
||||||
</a>
|
|
||||||
<a href="{{ url('core:notification_list') }}?see_all">
|
|
||||||
{% trans %}Mark all as read{% endtrans %}
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<div class="header-lang">
|
></a>
|
||||||
{% for language in LANGUAGES %}
|
</div>
|
||||||
<form action="{{ url('set_language') }}" method="post">
|
<div class="notification">
|
||||||
{% csrf_token %}
|
<a href="#" onclick="display_notif()">
|
||||||
<input name="next" value="{{ request.path }}" type="hidden" />
|
<i class="fa fa-bell-o"></i>
|
||||||
<input name="language" value="{{ language[0] }}" type="hidden" />
|
{% set notification_count = user.notifications.filter(viewed=False).count() %}
|
||||||
<input type="submit" value="{% if language[0] == 'en' %}🇬🇧{% else %}🇫🇷{% endif %}" />
|
|
||||||
</form>
|
{% if notification_count > 0 %}
|
||||||
|
<span>
|
||||||
|
{% if notification_count < 100 %}
|
||||||
|
{{ notification_count }}
|
||||||
|
{% else %}
|
||||||
|
|
||||||
|
{% endif %}
|
||||||
|
</span>
|
||||||
|
{% endif %}
|
||||||
|
</a>
|
||||||
|
<div id="header_notif">
|
||||||
|
<ul>
|
||||||
|
{% if user.notifications.filter(viewed=False).count() > 0 %}
|
||||||
|
{% for n in user.notifications.filter(viewed=False).order_by('-date') %}
|
||||||
|
<li>
|
||||||
|
<a href="{{ url("core:notification", notif_id=n.id) }}">
|
||||||
|
<div class="datetime">
|
||||||
|
<span class="header_notif_date">
|
||||||
|
{{ n.date|localtime|date(DATE_FORMAT) }}
|
||||||
|
</span>
|
||||||
|
<span class="header_notif_time">
|
||||||
|
{{ n.date|localtime|time(DATETIME_FORMAT) }}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<div class="reason">
|
||||||
|
{{ n }}
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
{% else %}
|
||||||
|
<li class="empty-notification">{% trans %}You do not have any unread notification{% endtrans %}</li>
|
||||||
|
{% endif %}
|
||||||
|
</ul>
|
||||||
|
<div class="options">
|
||||||
|
<a href="{{ url('core:notification_list') }}">
|
||||||
|
{% trans %}View more{% endtrans %}
|
||||||
|
</a>
|
||||||
|
<a href="{{ url('core:notification_list') }}?see_all">
|
||||||
|
{% trans %}Mark all as read{% endtrans %}
|
||||||
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
<div class="header-lang">
|
||||||
|
{% for language in LANGUAGES %}
|
||||||
|
<form action="{{ url('set_language') }}" method="post">
|
||||||
|
{% csrf_token %}
|
||||||
|
<input name="next" value="{{ request.path }}" type="hidden" />
|
||||||
|
<input name="language" value="{{ language[0] }}" type="hidden" />
|
||||||
|
<input type="submit" value="{% if language[0] == 'en' %}🇬🇧{% else %}🇫🇷{% endif %}" />
|
||||||
|
</form>
|
||||||
|
{% endfor %}
|
||||||
|
</div>
|
||||||
|
</header>
|
||||||
|
|
||||||
{% block info_boxes %}
|
{% block info_boxes %}
|
||||||
<div id="info_boxes">
|
<div id="info_boxes">
|
||||||
{% set sith = get_sith() %}
|
{% set sith = get_sith() %}
|
||||||
{% if sith.alert_msg %}
|
{% if sith.alert_msg %}
|
||||||
<div id="alert_box">
|
<div id="alert_box">
|
||||||
{{ sith.alert_msg|markdown }}
|
{{ sith.alert_msg|markdown }}
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
|
||||||
{% if sith.info_msg %}
|
|
||||||
<div id="info_box">
|
|
||||||
{{ sith.info_msg|markdown }}
|
|
||||||
</div>
|
|
||||||
{% endif %}
|
|
||||||
</div>
|
|
||||||
{% endblock %}
|
|
||||||
|
|
||||||
{% else %}
|
|
||||||
<div id="popupheader">{{ user.get_display_name() }}</div>
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
{% if sith.info_msg %}
|
||||||
|
<div id="info_box">
|
||||||
|
{{ sith.info_msg|markdown }}
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
{% else %}
|
||||||
|
<div id="popupheader">{{ user.get_display_name() }}</div>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% endblock %}
|
||||||
<!-- END HEADER -->
|
<!-- END HEADER -->
|
||||||
|
|
||||||
{% block nav %}
|
{% block nav %}
|
||||||
{% if not popup %}
|
{% if not popup %}
|
||||||
<nav class="navbar">
|
<nav class="navbar">
|
||||||
<button class="expand-button" onclick="showMenu()"><i class="fa fa-bars"></i></button>
|
<button class="expand-button" onclick="showMenu()"><i class="fa fa-bars"></i></button>
|
||||||
<div id="navbar-content" class="content" style="display: none;">
|
<div id="navbar-content" class="content" style="display: none;">
|
||||||
<a class="link" href="{{ url('core:index') }}">{% trans %}Main{% endtrans %}</a>
|
<a class="link" href="{{ url('core:index') }}">{% trans %}Main{% endtrans %}</a>
|
||||||
<div class="menu">
|
<div class="menu">
|
||||||
<span class="head">{% trans %}Associations & Clubs{% endtrans %}</span>
|
<span class="head">{% trans %}Associations & Clubs{% endtrans %}</span>
|
||||||
<ul class="content">
|
<ul class="content">
|
||||||
<li><a href="{{ url('core:page', page_name='ae') }}">{% trans %}AE{% endtrans %}</a></li>
|
<li><a href="{{ url('core:page', page_name='ae') }}">{% trans %}AE{% endtrans %}</a></li>
|
||||||
<li><a href="{{ url('core:page', page_name='clubs') }}">{% trans %}AE's clubs{% endtrans %}</a></li>
|
<li><a href="{{ url('core:page', page_name='clubs') }}">{% trans %}AE's clubs{% endtrans %}</a></li>
|
||||||
<li><a href="{{ url('core:page', page_name='utbm-associations') }}">{% trans %}Others UTBM's Associations{% endtrans %}</a></li>
|
<li><a href="{{ url('core:page', page_name='utbm-associations') }}">{% trans %}Others UTBM's Associations{% endtrans %}</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="menu">
|
<div class="menu">
|
||||||
<span class="head">{% trans %}Events{% endtrans %}</span>
|
<span class="head">{% trans %}Events{% endtrans %}</span>
|
||||||
<ul class="content">
|
<ul class="content">
|
||||||
<li><a href="{{ url('election:list') }}">{% trans %}Elections{% endtrans %}</a></li>
|
<li><a href="{{ url('election:list') }}">{% trans %}Elections{% endtrans %}</a></li>
|
||||||
<li><a href="{{ url('core:page', page_name='ga') }}">{% trans %}Big event{% endtrans %}</a></li>
|
<li><a href="{{ url('core:page', page_name='ga') }}">{% trans %}Big event{% endtrans %}</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<a class="link" href="{{ url('forum:main') }}">{% trans %}Forum{% endtrans %}</a>
|
<a class="link" href="{{ url('forum:main') }}">{% trans %}Forum{% endtrans %}</a>
|
||||||
<a class="link" href="{{ url('sas:main') }}">{% trans %}Gallery{% endtrans %}</a>
|
<a class="link" href="{{ url('sas:main') }}">{% trans %}Gallery{% endtrans %}</a>
|
||||||
<a class="link" href="{{ url('eboutic:main') }}">{% trans %}Eboutic{% endtrans %}</a>
|
<a class="link" href="{{ url('eboutic:main') }}">{% trans %}Eboutic{% endtrans %}</a>
|
||||||
<div class="menu">
|
<div class="menu">
|
||||||
<span class="head">{% trans %}Services{% endtrans %}</span>
|
<span class="head">{% trans %}Services{% endtrans %}</span>
|
||||||
<ul class="content">
|
<ul class="content">
|
||||||
<li><a href="{{ url('matmat:search_clear') }}">{% trans %}Matmatronch{% endtrans %}</a></li>
|
<li><a href="{{ url('matmat:search_clear') }}">{% trans %}Matmatronch{% endtrans %}</a></li>
|
||||||
<li><a href="/launderette">{% trans %}Launderette{% endtrans %}</a></li>
|
<li><a href="/launderette">{% trans %}Launderette{% endtrans %}</a></li>
|
||||||
<li><a href="{{ url('core:file_list') }}">{% trans %}Files{% endtrans %}</a></li>
|
<li><a href="{{ url('core:file_list') }}">{% trans %}Files{% endtrans %}</a></li>
|
||||||
<li><a href="{{ url('pedagogy:guide') }}">{% trans %}Pedagogy{% endtrans %}</a></li>
|
<li><a href="{{ url('pedagogy:guide') }}">{% trans %}Pedagogy{% endtrans %}</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="menu">
|
<div class="menu">
|
||||||
<span class="head">{% trans %}My Benefits{% endtrans %}</span>
|
<span class="head">{% trans %}My Benefits{% endtrans %}</span>
|
||||||
<ul class="content">
|
<ul class="content">
|
||||||
<li><a href="{{ url('core:page', page_name='partenaires')}}">{% trans %}Sponsors{% endtrans %}</a></li>
|
<li><a href="{{ url('core:page', page_name='partenaires')}}">{% trans %}Sponsors{% endtrans %}</a></li>
|
||||||
<li><a href="{{ url('core:page', page_name='avantages') }}">{% trans %}Subscriber benefits{% endtrans %}</a></li>
|
<li><a href="{{ url('core:page', page_name='avantages') }}">{% trans %}Subscriber benefits{% endtrans %}</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="menu">
|
<div class="menu">
|
||||||
<span class="head">{% trans %}Help{% endtrans %}</span>
|
<span class="head">{% trans %}Help{% endtrans %}</span>
|
||||||
<ul class="content">
|
<ul class="content">
|
||||||
<li><a href="{{ url('core:page', page_name='FAQ') }}">{% trans %}FAQ{% endtrans %}</a></li>
|
<li><a href="{{ url('core:page', page_name='FAQ') }}">{% trans %}FAQ{% endtrans %}</a></li>
|
||||||
<li><a href="{{ url('core:page', 'contacts') }}">{% trans %}Contacts{% endtrans %}</a></li>
|
<li><a href="{{ url('core:page', 'contacts') }}">{% trans %}Contacts{% endtrans %}</a></li>
|
||||||
<li><a href="{{ url('core:page', page_name='Index') }}">{% trans %}Wiki{% endtrans %}</a></li>
|
<li><a href="{{ url('core:page', page_name='Index') }}">{% trans %}Wiki{% endtrans %}</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</nav>
|
|
||||||
{% endif %}
|
|
||||||
{% endblock %}
|
|
||||||
|
|
||||||
<div id="page">
|
|
||||||
|
|
||||||
<ul id="quick_notif">
|
|
||||||
{% for n in quick_notifs %}
|
|
||||||
<li>{{ n }}</li>
|
|
||||||
{% endfor %}
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<div id="content">
|
|
||||||
{% if list_of_tabs %}
|
|
||||||
<div class="tool_bar">
|
|
||||||
<div class="tools">
|
|
||||||
{% for t in list_of_tabs -%}
|
|
||||||
<a href="{{ t.url }}" {%- if current_tab==t.slug %} class="selected_tab" {%- endif -%}>{{ t.name }}</a>
|
|
||||||
{%- endfor %}
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
{% if error %}
|
|
||||||
{{ error }}
|
|
||||||
{% endif %}
|
|
||||||
{% block content %}
|
|
||||||
{% endblock %}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</nav>
|
||||||
|
{% endif %}
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
{% if not popup %}
|
<div id="page">
|
||||||
<footer>
|
|
||||||
{% block footer %}
|
<ul id="quick_notif">
|
||||||
<div>
|
{% for n in quick_notifs %}
|
||||||
<a href="{{ url('core:page', 'contacts') }}">{% trans %}Contacts{% endtrans %}</a>
|
<li>{{ n }}</li>
|
||||||
<a href="{{ url('core:page', 'legals') }}">{% trans %}Legal notices{% endtrans %}</a>
|
{% endfor %}
|
||||||
<a href="{{ url('core:page', 'copyright_agent') }}">{% trans %}Intellectual property{% endtrans %}</a>
|
</ul>
|
||||||
<a href="{{ url('core:page', 'docs') }}">{% trans %}Help & Documentation{% endtrans %}</a>
|
|
||||||
<a href="{{ url('core:page', 'rd') }}">{% trans %}R&D{% endtrans %}</a>
|
<div id="content">
|
||||||
</div>
|
{% if list_of_tabs %}
|
||||||
<a href="https://discord.gg/XK9WfPsUFm" target="_link">
|
<div class="tool_bar">
|
||||||
{% trans %}Site created by the IT Department of the AE{% endtrans %}
|
<div class="tools">
|
||||||
</a>
|
{% for t in list_of_tabs -%}
|
||||||
{% endblock %}
|
<a href="{{ t.url }}" {%- if current_tab==t.slug %} class="selected_tab" {%- endif -%}>{{ t.name }}</a>
|
||||||
<br>
|
{%- endfor %}
|
||||||
<code class="version">
|
</div>
|
||||||
{% cache 1000 "sith_version" %}
|
</div>
|
||||||
{% trans %}Sith version:{% endtrans %} {{ get_sith().version }}
|
|
||||||
{% endcache %}
|
|
||||||
</code>
|
|
||||||
</footer>
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% block script %}
|
|
||||||
<script src="{{ static('core/js/ui/jquery-ui.min.js') }}"></script>
|
{% if error %}
|
||||||
<script src="{{ static('ajax_select/js/ajax_select.js') }}"></script>
|
{{ error }}
|
||||||
<script src="{{ url('javascript-catalog') }}"></script>
|
{% endif %}
|
||||||
<script>
|
{% block content %}
|
||||||
function showMenu() {
|
|
||||||
let navbar = document.getElementById("navbar-content");
|
|
||||||
const current = navbar.style.getPropertyValue("display");
|
|
||||||
navbar.style.setProperty("display", current === "none" ? "block" : "none");
|
|
||||||
}
|
|
||||||
$(document).keydown(function (e) {
|
|
||||||
if ($(e.target).is('input')) { return }
|
|
||||||
if ($(e.target).is('textarea')) { return }
|
|
||||||
if ($(e.target).is('select')) { return }
|
|
||||||
if (e.keyCode === 83) {
|
|
||||||
$("#search").focus();
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
</body>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{% if not popup %}
|
||||||
|
<footer>
|
||||||
|
{% block footer %}
|
||||||
|
<div>
|
||||||
|
<a href="{{ url('core:page', 'contacts') }}">{% trans %}Contacts{% endtrans %}</a>
|
||||||
|
<a href="{{ url('core:page', 'legals') }}">{% trans %}Legal notices{% endtrans %}</a>
|
||||||
|
<a href="{{ url('core:page', 'copyright_agent') }}">{% trans %}Intellectual property{% endtrans %}</a>
|
||||||
|
<a href="{{ url('core:page', 'docs') }}">{% trans %}Help & Documentation{% endtrans %}</a>
|
||||||
|
<a href="{{ url('core:page', 'rd') }}">{% trans %}R&D{% endtrans %}</a>
|
||||||
|
</div>
|
||||||
|
<a href="https://discord.gg/XK9WfPsUFm" target="_link">
|
||||||
|
{% trans %}Site created by the IT Department of the AE{% endtrans %}
|
||||||
|
</a>
|
||||||
|
{% endblock %}
|
||||||
|
<br>
|
||||||
|
<code class="version">
|
||||||
|
{% cache 1000 "sith_version" %}
|
||||||
|
{% trans %}Sith version:{% endtrans %} {{ get_sith().version }}
|
||||||
|
{% endcache %}
|
||||||
|
</code>
|
||||||
|
</footer>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% block script %}
|
||||||
|
<script src="{{ static('core/js/ui/jquery-ui.min.js') }}"></script>
|
||||||
|
<script src="{{ static('ajax_select/js/ajax_select.js') }}"></script>
|
||||||
|
<script src="{{ url('javascript-catalog') }}"></script>
|
||||||
|
<script>
|
||||||
|
function showMenu() {
|
||||||
|
let navbar = document.getElementById("navbar-content");
|
||||||
|
const current = navbar.style.getPropertyValue("display");
|
||||||
|
navbar.style.setProperty("display", current === "none" ? "block" : "none");
|
||||||
|
}
|
||||||
|
|
||||||
|
$(document).keydown(function (e) {
|
||||||
|
if ($(e.target).is('input')) { return }
|
||||||
|
if ($(e.target).is('textarea')) { return }
|
||||||
|
if ($(e.target).is('select')) { return }
|
||||||
|
if (e.keyCode === 83) {
|
||||||
|
$("#search").focus();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
{% endblock %}
|
||||||
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
@ -1,16 +1,16 @@
|
|||||||
{% extends "core/base.jinja" %}
|
{% extends "core/base.jinja" %}
|
||||||
|
|
||||||
{% block title %}
|
{% 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 %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<h2>{% trans name=form.instance.__class__._meta.verbose_name %}Create {{ name }}{% endtrans %}</h2>
|
<h2>{% trans name=form.instance.__class__._meta.verbose_name %}Create {{ name }}{% endtrans %}</h2>
|
||||||
<form action="" method="post" enctype="multipart/form-data">
|
<form action="" method="post" enctype="multipart/form-data">
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
{{ form.as_p() }}
|
{{ form.as_p() }}
|
||||||
<p><input type="submit" value="{% trans %}Save{% endtrans %}" /></p>
|
<p><input type="submit" value="{% trans %}Save{% endtrans %}" /></p>
|
||||||
</form>
|
</form>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
{% extends "core/base.jinja" %}
|
{% extends "core/base.jinja" %}
|
||||||
|
|
||||||
{% block title %}
|
{% block title %}
|
||||||
{% trans %}Delete confirmation{% endtrans %}
|
{% trans %}Delete confirmation{% endtrans %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block info_boxes %}
|
{% block info_boxes %}
|
||||||
@ -11,14 +11,14 @@
|
|||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<h2>{% trans %}Delete confirmation{% endtrans %}</h2>
|
<h2>{% trans %}Delete confirmation{% endtrans %}</h2>
|
||||||
<form action="" method="post">{% csrf_token %}
|
<form action="" method="post">{% csrf_token %}
|
||||||
<p>{% trans obj=object %}Are you sure you want to delete "{{ obj }}"?{% endtrans %}</p>
|
<p>{% trans obj=object %}Are you sure you want to delete "{{ obj }}"?{% endtrans %}</p>
|
||||||
<input type="submit" value="{% trans %}Confirm{% endtrans %}" />
|
<input type="submit" value="{% trans %}Confirm{% endtrans %}" />
|
||||||
</form>
|
</form>
|
||||||
<form method="GET" action="javascript:history.back();">
|
<form method="GET" action="javascript:history.back();">
|
||||||
<input type="submit" name="cancel" value="{% trans %}Cancel{% endtrans %}" />
|
<input type="submit" name="cancel" value="{% trans %}Cancel{% endtrans %}" />
|
||||||
</form>
|
</form>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,24 +1,24 @@
|
|||||||
{% extends "core/base.jinja" %}
|
{% extends "core/base.jinja" %}
|
||||||
|
|
||||||
{% block title %}
|
{% block title %}
|
||||||
{% if object %}
|
{% if object %}
|
||||||
{% trans obj=object %}Edit {{ obj }}{% endtrans %}
|
{% trans obj=object %}Edit {{ obj }}{% endtrans %}
|
||||||
{% else %}
|
{% else %}
|
||||||
{% trans %}Save{% endtrans %}
|
{% trans %}Save{% endtrans %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
{% if object %}
|
{% if object %}
|
||||||
<h2>{% trans obj=object %}Edit {{ obj }}{% endtrans %}</h2>
|
<h2>{% trans obj=object %}Edit {{ obj }}{% endtrans %}</h2>
|
||||||
{% else %}
|
{% else %}
|
||||||
<h2>{% trans %}Save{% endtrans %}</h2>
|
<h2>{% trans %}Save{% endtrans %}</h2>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<form action="" method="post" enctype="multipart/form-data">
|
<form action="" method="post" enctype="multipart/form-data">
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
{{ form.as_p() }}
|
{{ form.as_p() }}
|
||||||
<p><input type="submit" value="{% trans %}Save{% endtrans %}" /></p>
|
<p><input type="submit" value="{% trans %}Save{% endtrans %}" /></p>
|
||||||
</form>
|
</form>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,62 +1,62 @@
|
|||||||
{% extends "core/base.jinja" %}
|
{% extends "core/base.jinja" %}
|
||||||
|
|
||||||
{% block title %}
|
{% block title %}
|
||||||
{% if file %}
|
{% if file %}
|
||||||
{{ file.get_display_name() }}
|
{{ file.get_display_name() }}
|
||||||
{% elif file_list %}
|
{% elif file_list %}
|
||||||
{% trans %}File list{% endtrans %}
|
{% trans %}File list{% endtrans %}
|
||||||
{% elif new_file %}
|
{% elif new_file %}
|
||||||
{% trans %}New file{% endtrans %}
|
{% trans %}New file{% endtrans %}
|
||||||
{% else %}
|
{% else %}
|
||||||
{% trans %}Not found{% endtrans %}
|
{% trans %}Not found{% endtrans %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% macro print_file_name(file) %}
|
{% macro print_file_name(file) %}
|
||||||
{% if file %}
|
{% if file %}
|
||||||
{{ print_file_name(file.parent) }} >
|
{{ print_file_name(file.parent) }} >
|
||||||
<a href="{{ url('core:file_detail', file_id=file.id, popup=popup) }}">{{ file.get_display_name() }}</a>
|
<a href="{{ url('core:file_detail', file_id=file.id, popup=popup) }}">{{ file.get_display_name() }}</a>
|
||||||
{% else %}
|
{% else %}
|
||||||
<a href="{{ url('core:file_list', popup) }}">{% trans %}Files{% endtrans %}</a>
|
<a href="{{ url('core:file_list', popup) }}">{% trans %}Files{% endtrans %}</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endmacro %}
|
{% endmacro %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
{{ print_file_name(file) }}
|
{{ print_file_name(file) }}
|
||||||
|
|
||||||
<div class="tool_bar">
|
<div class="tool_bar">
|
||||||
<div class="tools">
|
<div class="tools">
|
||||||
<div>
|
<div>
|
||||||
{% set home = user.home %}
|
{% set home = user.home %}
|
||||||
{% if home %}
|
{% if home %}
|
||||||
<a href="{{ url('core:file_detail', home.id, popup) }}">{% trans %}My files{% endtrans %}</a>
|
<a href="{{ url('core:file_detail', home.id, popup) }}">{% trans %}My files{% endtrans %}</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
{% if file %}
|
{% if file %}
|
||||||
<a href="{{ url('core:file_detail', file.id, popup) }}">{% trans %}View{% endtrans %}</a>
|
<a href="{{ url('core:file_detail', file.id, popup) }}">{% trans %}View{% endtrans %}</a>
|
||||||
{% if can_edit(file, user) %}
|
{% if can_edit(file, user) %}
|
||||||
<a href="{{ url('core:file_edit', file_id=file.id, popup=popup) }}">{% trans %}Edit{% endtrans %}</a>
|
<a href="{{ url('core:file_edit', file_id=file.id, popup=popup) }}">{% trans %}Edit{% endtrans %}</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if can_edit_prop(file, user) %}
|
{% if can_edit_prop(file, user) %}
|
||||||
<a href="{{ url('core:file_prop', file_id=file.id, popup=popup) }}">{% trans %}Prop{% endtrans %}</a>
|
<a href="{{ url('core:file_prop', file_id=file.id, popup=popup) }}">{% trans %}Prop{% endtrans %}</a>
|
||||||
{% endif %}
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<hr>
|
<hr>
|
||||||
|
|
||||||
{% if file %}
|
{% if file %}
|
||||||
{% block file %}
|
{% block file %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% block script %}
|
{% block script %}
|
||||||
{{ super() }}
|
{{ super() }}
|
||||||
{% if popup %}
|
{% if popup %}
|
||||||
<script>
|
<script>
|
||||||
parent.$(".choose_file_widget").css("height", "75%");
|
parent.$(".choose_file_widget").css("height", "75%");
|
||||||
</script>
|
</script>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@ -1,18 +1,18 @@
|
|||||||
{% extends "core/file.jinja" %}
|
{% extends "core/file.jinja" %}
|
||||||
|
|
||||||
{% block title %}
|
{% block title %}
|
||||||
{% trans %}Delete confirmation{% endtrans %}
|
{% trans %}Delete confirmation{% endtrans %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block file %}
|
{% block file %}
|
||||||
<h2>{% trans %}Delete confirmation{% endtrans %}</h2>
|
<h2>{% trans %}Delete confirmation{% endtrans %}</h2>
|
||||||
<form action="" method="post">{% csrf_token %}
|
<form action="" method="post">{% csrf_token %}
|
||||||
<p>{% trans obj=object %}Are you sure you want to delete "{{ obj }}"?{% endtrans %}</p>
|
<p>{% trans obj=object %}Are you sure you want to delete "{{ obj }}"?{% endtrans %}</p>
|
||||||
<input type="submit" value="{% trans %}Confirm{% endtrans %}" />
|
<input type="submit" value="{% trans %}Confirm{% endtrans %}" />
|
||||||
</form>
|
</form>
|
||||||
<form method="GET" action="javascript:history.back();">
|
<form method="GET" action="javascript:history.back();">
|
||||||
<input type="submit" name="cancel" value="{% trans %}Cancel{% endtrans %}" />
|
<input type="submit" name="cancel" value="{% trans %}Cancel{% endtrans %}" />
|
||||||
</form>
|
</form>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
|
||||||
|
@ -2,78 +2,78 @@
|
|||||||
|
|
||||||
|
|
||||||
{% block file %}
|
{% block file %}
|
||||||
<h3>
|
<h3>
|
||||||
{% if file.is_folder %}
|
{% if file.is_folder %}
|
||||||
<i class="fa fa-folder fa-3x" aria-hidden="true"></i>
|
<i class="fa fa-folder fa-3x" aria-hidden="true"></i>
|
||||||
{% else %}
|
{% else %}
|
||||||
<i class="fa fa-file fa-3x" aria-hidden="true"></i>
|
<i class="fa fa-file fa-3x" aria-hidden="true"></i>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{{ file.get_display_name() }}
|
{{ file.get_display_name() }}
|
||||||
</h3>
|
</h3>
|
||||||
<p>{% trans %}Owner: {% endtrans %}{{ file.owner.get_display_name() }}</p>
|
<p>{% trans %}Owner: {% endtrans %}{{ file.owner.get_display_name() }}</p>
|
||||||
{% if file.is_folder %}
|
{% if file.is_folder %}
|
||||||
{% if user.can_edit(file) %}
|
{% if user.can_edit(file) %}
|
||||||
<form action="" method="post" enctype="multipart/form-data">
|
<form action="" method="post" enctype="multipart/form-data">
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
{{ form.as_p() }}
|
{{ form.as_p() }}
|
||||||
<p><input type="submit" value="{% trans %}Add{% endtrans %}"></p>
|
<p><input type="submit" value="{% trans %}Add{% endtrans %}"></p>
|
||||||
</form>
|
</form>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<form action="" method="post" enctype="multipart/form-data">
|
<form action="" method="post" enctype="multipart/form-data">
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
<p>
|
<p>
|
||||||
<input name="delete" type="submit" value="{% trans %}Delete{% endtrans %}"> |
|
<input name="delete" type="submit" value="{% trans %}Delete{% endtrans %}"> |
|
||||||
<input name="clear" type="submit" value="{% trans %}Clear clipboard{% endtrans %}"> |
|
<input name="clear" type="submit" value="{% trans %}Clear clipboard{% endtrans %}"> |
|
||||||
<input name="cut" type="submit" value="{% trans %}Cut{% endtrans %}"> |
|
<input name="cut" type="submit" value="{% trans %}Cut{% endtrans %}"> |
|
||||||
<input name="paste" type="submit" value="{% trans %}Paste{% endtrans %}">
|
<input name="paste" type="submit" value="{% trans %}Paste{% endtrans %}">
|
||||||
</p>
|
</p>
|
||||||
{% if clipboard %}
|
{% if clipboard %}
|
||||||
<p>{% trans %}Clipboard: {% endtrans %}
|
<p>{% trans %}Clipboard: {% endtrans %}
|
||||||
<ul>
|
<ul>
|
||||||
{% for f in clipboard %}
|
{% for f in clipboard %}
|
||||||
<li>{{ f.get_full_path() }}</li>
|
<li>{{ f.get_full_path() }}</li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
</p>
|
</p>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<ul>
|
<ul>
|
||||||
{% for f in file.children.order_by('-is_folder', 'name').all() %}
|
{% for f in file.children.order_by('-is_folder', 'name').all() %}
|
||||||
<li style="list-style-type: none;">
|
<li style="list-style-type: none;">
|
||||||
<input type="checkbox" name="file_list" value="{{ f.id }}">
|
<input type="checkbox" name="file_list" value="{{ f.id }}">
|
||||||
{% if f.is_folder %}
|
{% if f.is_folder %}
|
||||||
<i class="fa fa-folder" aria-hidden="true"></i>
|
<i class="fa fa-folder" aria-hidden="true"></i>
|
||||||
{% else %}
|
{% else %}
|
||||||
<i class="fa fa-file" aria-hidden="true"></i>
|
<i class="fa fa-file" aria-hidden="true"></i>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<a href="{{ url('core:file_detail', file_id=f.id, popup=popup) }}">{{ f.get_display_name() }}</a></li>
|
<a href="{{ url('core:file_detail', file_id=f.id, popup=popup) }}">{{ f.get_display_name() }}</a></li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
</form>
|
</form>
|
||||||
{% else %}
|
{% else %}
|
||||||
<p>{% trans %}Real name: {% endtrans %}{{ file.file.name.split('/')[-1] }}</p>
|
<p>{% trans %}Real name: {% endtrans %}{{ file.file.name.split('/')[-1] }}</p>
|
||||||
<p>{% trans %}Date: {% endtrans %}{{ file.date|localtime|date(DATETIME_FORMAT) }} -
|
<p>{% trans %}Date: {% endtrans %}{{ file.date|localtime|date(DATETIME_FORMAT) }} -
|
||||||
{{ file.date|localtime|time(DATETIME_FORMAT) }}</p>
|
{{ file.date|localtime|time(DATETIME_FORMAT) }}</p>
|
||||||
<p>{% trans %}Type: {% endtrans %}{{ file.mime_type }}</p>
|
<p>{% trans %}Type: {% endtrans %}{{ file.mime_type }}</p>
|
||||||
<p>{% trans %}Size: {% endtrans %}{{ file.size }} {% trans %}bytes{% endtrans %}</p>
|
<p>{% trans %}Size: {% endtrans %}{{ file.size }} {% trans %}bytes{% endtrans %}</p>
|
||||||
|
|
||||||
<p><a href="{{ url('core:download', file_id=file.id) }}">{% trans %}Download{% endtrans %}</a></p>
|
<p><a href="{{ url('core:download', file_id=file.id) }}">{% trans %}Download{% endtrans %}</a></p>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if not file.home_of and not file.home_of_club and file.parent %}
|
{% if not file.home_of and not file.home_of_club and file.parent %}
|
||||||
<p><a href="{{ url('core:file_delete', file_id=file.id, popup=popup) }}">{% trans %}Delete{% endtrans %}</a></p>
|
<p><a href="{{ url('core:file_delete', file_id=file.id, popup=popup) }}">{% trans %}Delete{% endtrans %}</a></p>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if user.is_com_admin %}
|
{% if user.is_com_admin %}
|
||||||
<p><a href="{{ url('core:file_moderate', file_id=file.id) }}">{% trans %}Moderate{% endtrans %}</a></p>
|
<p><a href="{{ url('core:file_moderate', file_id=file.id) }}">{% trans %}Moderate{% endtrans %}</a></p>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block script %}
|
{% block script %}
|
||||||
{{ super() }}
|
{{ super() }}
|
||||||
<script>
|
<script>
|
||||||
{% if popup and file.is_file %}
|
{% if popup and file.is_file %}
|
||||||
parent.$("#file_id").replaceWith('<div id="file_id" value="{{ file.id }}">{{ file.name }}</div>');
|
parent.$("#file_id").replaceWith('<div id="file_id" value="{{ file.id }}">{{ file.name }}</div>');
|
||||||
parent.$(".ui-dialog-buttonpane button").button("option", "disabled", false);
|
parent.$(".ui-dialog-buttonpane button").button("option", "disabled", false);
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</script>
|
</script>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
{% extends "core/file.jinja" %}
|
{% extends "core/file.jinja" %}
|
||||||
|
|
||||||
{% block file %}
|
{% block file %}
|
||||||
<h2>{% trans obj=object %}Edit {{ obj }}{% endtrans %}</h2>
|
<h2>{% trans obj=object %}Edit {{ obj }}{% endtrans %}</h2>
|
||||||
<form action="" method="post">
|
<form action="" method="post">
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
{{ form.as_p() }}
|
{{ form.as_p() }}
|
||||||
<p><input type="submit" value="{% trans %}Save{% endtrans %}" /></p>
|
<p><input type="submit" value="{% trans %}Save{% endtrans %}" /></p>
|
||||||
</form>
|
</form>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,23 +1,23 @@
|
|||||||
{% extends "core/file.jinja" %}
|
{% extends "core/file.jinja" %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
{{ super() }}
|
{{ super() }}
|
||||||
{% if file_list %}
|
{% if file_list %}
|
||||||
<h3>{% trans %}File list{% endtrans %}</h3>
|
<h3>{% trans %}File list{% endtrans %}</h3>
|
||||||
<ul>
|
<ul>
|
||||||
{% for f in file_list %}
|
{% for f in file_list %}
|
||||||
<li style="list-style-type: none;">
|
<li style="list-style-type: none;">
|
||||||
{% if f.is_folder %}
|
{% if f.is_folder %}
|
||||||
<i class="fa fa-folder" aria-hidden="true"></i>
|
<i class="fa fa-folder" aria-hidden="true"></i>
|
||||||
{% else %}
|
{% else %}
|
||||||
<i class="fa fa-file" aria-hidden="true"></i>
|
<i class="fa fa-file" aria-hidden="true"></i>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<a href="{{ url('core:file_detail', file_id=f.id, popup=popup) }}">{{ f.name }}</a></li>
|
<a href="{{ url('core:file_detail', file_id=f.id, popup=popup) }}">{{ f.name }}</a></li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
{% else %}
|
{% else %}
|
||||||
<p>{% trans %}There is no file in this website.{% endtrans %}</p>
|
<p>{% trans %}There is no file in this website.{% endtrans %}</p>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,28 +1,28 @@
|
|||||||
{% extends "core/base.jinja" %}
|
{% extends "core/base.jinja" %}
|
||||||
|
|
||||||
{% block title %}
|
{% block title %}
|
||||||
{% trans %}File moderation{% endtrans %}
|
{% trans %}File moderation{% endtrans %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<h3>{% trans %}File moderation{% endtrans %}</h3>
|
<h3>{% trans %}File moderation{% endtrans %}</h3>
|
||||||
<div>
|
<div>
|
||||||
{% for f in files %}
|
{% for f in files %}
|
||||||
<div style="margin: 2px; padding: 2px; border: solid 1px red; text-align: center">
|
<div style="margin: 2px; padding: 2px; border: solid 1px red; text-align: center">
|
||||||
{% if f.is_folder %}
|
{% if f.is_folder %}
|
||||||
<strong>Folder</strong>
|
<strong>Folder</strong>
|
||||||
{% else %}
|
{% else %}
|
||||||
<strong>File</strong>
|
<strong>File</strong>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<p>
|
<p>
|
||||||
<a href="{{ url("core:file_detail", file_id=f.id) }}">{{ f.name }}</a><br/>
|
<a href="{{ url("core:file_detail", file_id=f.id) }}">{{ f.name }}</a><br/>
|
||||||
{% trans %}Full name: {% endtrans %}{{ f.get_parent_path()+'/'+f.name }}<br/>
|
{% trans %}Full name: {% endtrans %}{{ f.get_parent_path()+'/'+f.name }}<br/>
|
||||||
{% trans %}Owner: {% endtrans %}{{ f.owner.get_display_name() }}<br/>
|
{% trans %}Owner: {% endtrans %}{{ f.owner.get_display_name() }}<br/>
|
||||||
{% trans %}Date: {% endtrans %}{{ f.date|date(DATE_FORMAT) }} {{ f.date|time(TIME_FORMAT) }}<br/>
|
{% trans %}Date: {% endtrans %}{{ f.date|date(DATE_FORMAT) }} {{ f.date|time(TIME_FORMAT) }}<br/>
|
||||||
</p>
|
</p>
|
||||||
<p><a href="{{ url('core:file_moderate', file_id=f.id) }}">{% trans %}Moderate{% endtrans %}</a> -
|
<p><a href="{{ url('core:file_moderate', file_id=f.id) }}">{% trans %}Moderate{% endtrans %}</a> -
|
||||||
<a href="{{ url('core:file_delete', file_id=f.id) }}?next={{ url('core:file_moderation') }}">{% trans %}Delete{% endtrans %}</a></p>
|
<a href="{{ url('core:file_delete', file_id=f.id) }}?next={{ url('core:file_moderation') }}">{% trans %}Delete{% endtrans %}</a></p>
|
||||||
</div>
|
</div>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@ -2,38 +2,38 @@
|
|||||||
{% from "core/macros.jinja" import select_all_checkbox %}
|
{% from "core/macros.jinja" import select_all_checkbox %}
|
||||||
|
|
||||||
{% block title %}
|
{% block title %}
|
||||||
{% trans %}Group detail{% endtrans %}
|
{% trans %}Group detail{% endtrans %}
|
||||||
{% endblock title %}
|
{% endblock title %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<h1>{{ object }}</h1>
|
<h1>{{ object }}</h1>
|
||||||
<p><a href="{{ url('core:group_list') }}">{% trans %}Back to list{% endtrans %}</a></p>
|
<p><a href="{{ url('core:group_list') }}">{% trans %}Back to list{% endtrans %}</a></p>
|
||||||
{% if form.users_removed | length <= 0 %}
|
{% if form.users_removed | length <= 0 %}
|
||||||
<p>{% trans %}No user in this group{% endtrans %}</p>
|
<p>{% trans %}No user in this group{% endtrans %}</p>
|
||||||
{% else %}
|
{% else %}
|
||||||
<form action="{{ url('core:group_detail', object.id) }}" method="post" id="add_users">
|
|
||||||
{{ select_all_checkbox("add_users") }}
|
|
||||||
<hr>
|
|
||||||
{% csrf_token %}
|
|
||||||
<label for="{{ form.users_removed.id_for_label }}">{{ form.users_removed.label }} :</label>
|
|
||||||
{{ form.users_removed.errors }}
|
|
||||||
{% for user in form.users_removed %}
|
|
||||||
<label for="{{ user.id_for_label }}">
|
|
||||||
{{ user.tag() }}
|
|
||||||
<a href="{{ url('core:user_profile', user.data.value) }}">{{ user.choice_label }}</a>
|
|
||||||
</label>
|
|
||||||
{% endfor %}
|
|
||||||
<input type="submit" name="submit" value="{% trans %}Delete{% endtrans %}">
|
|
||||||
</form>
|
|
||||||
{% endif %}
|
|
||||||
<form action="{{ url('core:group_detail', object.id) }}" method="post" id="add_users">
|
<form action="{{ url('core:group_detail', object.id) }}" method="post" id="add_users">
|
||||||
{% csrf_token %}
|
{{ select_all_checkbox("add_users") }}
|
||||||
<p>
|
<hr>
|
||||||
{{ form.users_added.errors }}
|
{% csrf_token %}
|
||||||
<label for="{{ form.users_added.id_for_label }}">{{ form.users_added.label }} :</label>
|
<label for="{{ form.users_removed.id_for_label }}">{{ form.users_removed.label }} :</label>
|
||||||
{{ form.users_added }}
|
{{ form.users_removed.errors }}
|
||||||
<span class="helptext">{{ form.users_added.help_text }}</span>
|
{% for user in form.users_removed %}
|
||||||
</p>
|
<label for="{{ user.id_for_label }}">
|
||||||
<input type="submit" name="submit">
|
{{ user.tag() }}
|
||||||
|
<a href="{{ url('core:user_profile', user.data.value) }}">{{ user.choice_label }}</a>
|
||||||
|
</label>
|
||||||
|
{% endfor %}
|
||||||
|
<input type="submit" name="submit" value="{% trans %}Delete{% endtrans %}">
|
||||||
</form>
|
</form>
|
||||||
|
{% endif %}
|
||||||
|
<form action="{{ url('core:group_detail', object.id) }}" method="post" id="add_users">
|
||||||
|
{% csrf_token %}
|
||||||
|
<p>
|
||||||
|
{{ form.users_added.errors }}
|
||||||
|
<label for="{{ form.users_added.id_for_label }}">{{ form.users_added.label }} :</label>
|
||||||
|
{{ form.users_added }}
|
||||||
|
<span class="helptext">{{ form.users_added.help_text }}</span>
|
||||||
|
</p>
|
||||||
|
<input type="submit" name="submit">
|
||||||
|
</form>
|
||||||
{% endblock content %}
|
{% endblock content %}
|
@ -1,13 +1,13 @@
|
|||||||
{% extends "core/base.jinja" %}
|
{% extends "core/base.jinja" %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<p><a href="{{ url('core:group_list') }}">{% trans %}Back to list{% endtrans %}</a></p>
|
<p><a href="{{ url('core:group_list') }}">{% trans %}Back to list{% endtrans %}</a></p>
|
||||||
<h2>{% trans %}Edit group{% endtrans %}</h2>
|
<h2>{% trans %}Edit group{% endtrans %}</h2>
|
||||||
<form action="" method="post">
|
<form action="" method="post">
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
{{ form.as_p() }}
|
{{ form.as_p() }}
|
||||||
<p><input type="submit" value="{% trans %}Update{% endtrans %}" /></p>
|
<p><input type="submit" value="{% trans %}Update{% endtrans %}" /></p>
|
||||||
</form>
|
</form>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,31 +1,31 @@
|
|||||||
{% extends "core/base.jinja" %}
|
{% extends "core/base.jinja" %}
|
||||||
|
|
||||||
{% block title %}
|
{% block title %}
|
||||||
{% trans %}Group list{% endtrans %}
|
{% trans %}Group list{% endtrans %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<h3>{% trans %}Group list{% endtrans %}</h3>
|
<h3>{% trans %}Group list{% endtrans %}</h3>
|
||||||
<p><a href="{{ url('core:group_new') }}">{% trans %}New group{% endtrans %}</a></p>
|
<p><a href="{{ url('core:group_new') }}">{% trans %}New group{% endtrans %}</a></p>
|
||||||
<table>
|
<table>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<td>{% trans %}ID{% endtrans %}</td>
|
<td>{% trans %}ID{% endtrans %}</td>
|
||||||
<td>{% trans %}Group{% endtrans %}</td>
|
<td>{% trans %}Group{% endtrans %}</td>
|
||||||
<td>{% trans %}Description{% endtrans %}</td>
|
<td>{% trans %}Description{% endtrans %}</td>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
{% for group in object_list %}
|
{% for group in object_list %}
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{ group.id }}</td>
|
<td>{{ group.id }}</td>
|
||||||
<td><a href="{{ url('core:group_detail', group.id) }}">{{ group }}</a></td>
|
<td><a href="{{ url('core:group_detail', group.id) }}">{{ group }}</a></td>
|
||||||
<td>{{ group.description }}</td>
|
<td>{{ group.description }}</td>
|
||||||
<td><a href="{{ url('core:group_edit', group.id) }}">{% trans %}Edit{% endtrans %}</a></td>
|
<td><a href="{{ url('core:group_edit', group.id) }}">{% trans %}Edit{% endtrans %}</a></td>
|
||||||
<td><a href="{{ url('core:group_delete', group.id) }}">{% trans %}Delete{% endtrans %}</a></td>
|
<td><a href="{{ url('core:group_delete', group.id) }}">{% trans %}Delete{% endtrans %}</a></td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
{% extends "core/base.jinja" %}
|
{% extends "core/base.jinja" %}
|
||||||
|
|
||||||
{%- block additional_css -%}
|
{%- block additional_css -%}
|
||||||
<link rel="stylesheet" href="{{ scss('user/login.scss') }}">
|
<link rel="stylesheet" href="{{ scss('user/login.scss') }}">
|
||||||
{%- endblock -%}
|
{%- endblock -%}
|
||||||
|
|
||||||
{% block title %}
|
{% block title %}
|
||||||
{% trans %}Login{% endtrans %}
|
{% trans %}Login{% endtrans %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block info_boxes %}
|
{% block info_boxes %}
|
||||||
@ -15,48 +15,48 @@
|
|||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<h1 class="title">{% trans %}Login{% endtrans %}</h1>
|
<h1 class="title">{% trans %}Login{% endtrans %}</h1>
|
||||||
|
|
||||||
{% if next %}
|
{% if next %}
|
||||||
{% if user.is_authenticated %}
|
{% if user.is_authenticated %}
|
||||||
<p>{% trans %}Your account doesn't have access to this page. To proceed,
|
<p>{% trans %}Your account doesn't have access to this page. To proceed,
|
||||||
please login with an account that has access.{% endtrans %}</p>
|
please login with an account that has access.{% endtrans %}</p>
|
||||||
{% else %}
|
{% else %}
|
||||||
<p>{% trans %}Please login or create an account to see this page.{% endtrans %}</p>
|
<p>{% trans %}Please login or create an account to see this page.{% endtrans %}</p>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
<form method="post" action="{{ url('core:login') }}">
|
||||||
|
{% if form.errors %}
|
||||||
|
<p class="alert alert-red">{% trans %}Your username and password didn't match. Please try again.{% endtrans %}</p>
|
||||||
|
<br>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<form method="post" action="{{ url('core:login') }}">
|
{% csrf_token %}
|
||||||
{% if form.errors %}
|
{% render_honeypot_field %}
|
||||||
<p class="alert alert-red">{% trans %}Your username and password didn't match. Please try again.{% endtrans %}</p>
|
|
||||||
<br>
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
{% csrf_token %}
|
<div>
|
||||||
{% render_honeypot_field %}
|
<label for="{{ form.username.name }}">{{ form.username.label }}</label>
|
||||||
|
<input id="id_username" maxlength="254" name="username" type="text" autofocus="autofocus" />
|
||||||
|
{{ form.username.errors }}
|
||||||
|
</div>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<label for="{{ form.username.name }}">{{ form.username.label }}</label>
|
<label for="{{ form.password.name }}">{{ form.password.label }}</label>
|
||||||
<input id="id_username" maxlength="254" name="username" type="text" autofocus="autofocus" />
|
{{ form.password }}
|
||||||
{{ form.username.errors }}
|
{{ form.password.errors }}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
<input type="hidden" name="next" value="{{ next }}">
|
||||||
<label for="{{ form.password.name }}">{{ form.password.label }}</label>
|
<input type="submit" value="{% trans %}Login{% endtrans %}">
|
||||||
{{ form.password }}
|
|
||||||
{{ form.password.errors }}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<input type="hidden" name="next" value="{{ next }}">
|
|
||||||
<input type="submit" value="{% trans %}Login{% endtrans %}">
|
|
||||||
|
|
||||||
|
|
||||||
{# Assumes you setup the password_reset view in your URLconf #}
|
{# Assumes you setup the password_reset view in your URLconf #}
|
||||||
<p>
|
<p>
|
||||||
<a href="{{ url('core:password_reset') }}">{% trans %}Lost password?{% endtrans %}</a>
|
<a href="{{ url('core:password_reset') }}">{% trans %}Lost password?{% endtrans %}</a>
|
||||||
|
|
||||||
<a href="{{ url('core:register') }}">{% trans %}Create account{% endtrans %}</a>
|
<a href="{{ url('core:register') }}">{% trans %}Create account{% endtrans %}</a>
|
||||||
</p>
|
</p>
|
||||||
</form>
|
</form>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
@ -1,155 +1,155 @@
|
|||||||
{% macro user_profile_link(user) -%}
|
{% macro user_profile_link(user) -%}
|
||||||
<a href="{{ url("core:user_profile", user_id=user.id) }}">{{ user.get_display_name() }}</a>
|
<a href="{{ url("core:user_profile", user_id=user.id) }}">{{ user.get_display_name() }}</a>
|
||||||
{%- endmacro %}
|
{%- endmacro %}
|
||||||
|
|
||||||
{% macro user_profile_link_short_name(user) -%}
|
{% macro user_profile_link_short_name(user) -%}
|
||||||
<a href="{{ url("core:user_profile", user_id=user.id) }}">{{ user.get_short_name() }}</a>
|
<a href="{{ url("core:user_profile", user_id=user.id) }}">{{ user.get_short_name() }}</a>
|
||||||
{%- endmacro %}
|
{%- endmacro %}
|
||||||
|
|
||||||
{% macro user_link_with_pict(user) -%}
|
{% macro user_link_with_pict(user) -%}
|
||||||
<a href="{{ url("core:user_profile", user_id=user.id) }}" class="mini_profile_link" >
|
<a href="{{ url("core:user_profile", user_id=user.id) }}" class="mini_profile_link" >
|
||||||
{{ user.get_mini_item()|safe }}
|
{{ user.get_mini_item()|safe }}
|
||||||
</a>
|
</a>
|
||||||
{%- endmacro %}
|
{%- endmacro %}
|
||||||
|
|
||||||
{% macro link_news_logo(news) -%}
|
{% macro link_news_logo(news) -%}
|
||||||
{% if news.club.logo -%}
|
{% if news.club.logo -%}
|
||||||
{{ news.club.logo.url }}
|
{{ news.club.logo.url }}
|
||||||
{% else -%}
|
{% else -%}
|
||||||
{{ static("com/img/news.png") }}
|
{{ static("com/img/news.png") }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{%- endmacro %}
|
{%- endmacro %}
|
||||||
|
|
||||||
{% macro gen_news_metatags(news) -%}
|
{% macro gen_news_metatags(news) -%}
|
||||||
<meta name="twitter:card" content="summary" />
|
<meta name="twitter:card" content="summary" />
|
||||||
<meta name="twitter:site" content="{{ settings.SITH_TWITTER }}" />
|
<meta name="twitter:site" content="{{ settings.SITH_TWITTER }}" />
|
||||||
<meta name="twitter:creator" content= "{{ settings.SITH_TWITTER }}" />
|
<meta name="twitter:creator" content= "{{ settings.SITH_TWITTER }}" />
|
||||||
<meta property="og:url" content="{{ news.get_full_url() }}" />
|
<meta property="og:url" content="{{ news.get_full_url() }}" />
|
||||||
<meta property="og:type" content="article" />
|
<meta property="og:type" content="article" />
|
||||||
<meta property="og:title" content="{{ news.title }}" />
|
<meta property="og:title" content="{{ news.title }}" />
|
||||||
<meta property="og:description" content="{{ news.summary }}" />
|
<meta property="og:description" content="{{ news.summary }}" />
|
||||||
<meta property="og:image" content="{{ "https://%s%s" % (settings.SITH_URL, link_news_logo(news)) }}" />
|
<meta property="og:image" content="{{ "https://%s%s" % (settings.SITH_URL, link_news_logo(news)) }}" />
|
||||||
{%- endmacro %}
|
{%- endmacro %}
|
||||||
|
|
||||||
{% macro facebook_share(news) -%}
|
{% macro facebook_share(news) -%}
|
||||||
<a rel="nofollow" target="#" class="share_button facebook" href="https://www.facebook.com/sharer/sharer.php?u={{ news.get_full_url() }}">{% trans %}Share on Facebook{% endtrans %}</a>
|
<a rel="nofollow" target="#" class="share_button facebook" href="https://www.facebook.com/sharer/sharer.php?u={{ news.get_full_url() }}">{% trans %}Share on Facebook{% endtrans %}</a>
|
||||||
{%- endmacro %}
|
{%- endmacro %}
|
||||||
|
|
||||||
{% macro tweet(news) -%}
|
{% macro tweet(news) -%}
|
||||||
<a rel="nofollow" target="#" class="share_button twitter" href="https://twitter.com/intent/tweet?text={{ news.get_full_url() }}">{% trans %}Tweet{% endtrans %}</a>
|
<a rel="nofollow" target="#" class="share_button twitter" href="https://twitter.com/intent/tweet?text={{ news.get_full_url() }}">{% trans %}Tweet{% endtrans %}</a>
|
||||||
{%- endmacro %}
|
{%- endmacro %}
|
||||||
|
|
||||||
{% macro fb_quick(news) -%}
|
{% macro fb_quick(news) -%}
|
||||||
<a rel="nofollow" target="#" href="https://www.facebook.com/sharer/sharer.php?u={{ news.get_full_url() }}" class="fb fa fa-facebook-square fa-2x"></a>
|
<a rel="nofollow" target="#" href="https://www.facebook.com/sharer/sharer.php?u={{ news.get_full_url() }}" class="fb fa fa-facebook-square fa-2x"></a>
|
||||||
{%- endmacro %}
|
{%- endmacro %}
|
||||||
|
|
||||||
{% macro tweet_quick(news) -%}
|
{% macro tweet_quick(news) -%}
|
||||||
<a rel="nofollow" target="#" href="https://twitter.com/intent/tweet?text={{ news.get_full_url() }}" class="twitter fa fa-twitter-square fa-2x"></a>
|
<a rel="nofollow" target="#" href="https://twitter.com/intent/tweet?text={{ news.get_full_url() }}" class="twitter fa fa-twitter-square fa-2x"></a>
|
||||||
{%- endmacro %}
|
{%- endmacro %}
|
||||||
|
|
||||||
{% macro user_mini_profile(user) %}
|
{% macro user_mini_profile(user) %}
|
||||||
<div class="user_mini_profile">
|
<div class="user_mini_profile">
|
||||||
<div class="user_mini_profile_infos">
|
<div class="user_mini_profile_infos">
|
||||||
<div class="user_mini_profile_infos_text">
|
<div class="user_mini_profile_infos_text">
|
||||||
<div class="user_mini_profile_name">{{ user.get_full_name() }}</div>
|
<div class="user_mini_profile_name">{{ user.get_full_name() }}</div>
|
||||||
{% if user.nick_name %}
|
{% if user.nick_name %}
|
||||||
<div class="user_mini_profile_nick">« {{ user.nick_name }} »</div>
|
<div class="user_mini_profile_nick">« {{ user.nick_name }} »</div>
|
||||||
{% endif %}
|
|
||||||
{% if user.pronouns %}
|
|
||||||
<div class="user_mini_profile_pronouns">{{ user.pronouns }}</div>
|
|
||||||
{% endif %}
|
|
||||||
{% if user.date_of_birth %}
|
|
||||||
<div class="user_mini_profile_dob">
|
|
||||||
{{ user.date_of_birth|date("d/m/Y") }} ({{ user.get_age() }})
|
|
||||||
</div>
|
|
||||||
{% endif %}
|
|
||||||
</div>
|
|
||||||
{% if user.promo %}
|
|
||||||
<div class="user_mini_profile_promo">
|
|
||||||
<img src="{{ static('core/img/promo_%02d.png' % user.promo) }}" title="Promo {{ user.promo }}" alt="Promo {{ user.promo }}" class="promo_pict" />
|
|
||||||
</div>
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
{% if user.pronouns %}
|
||||||
|
<div class="user_mini_profile_pronouns">{{ user.pronouns }}</div>
|
||||||
|
{% endif %}
|
||||||
|
{% if user.date_of_birth %}
|
||||||
|
<div class="user_mini_profile_dob">
|
||||||
|
{{ user.date_of_birth|date("d/m/Y") }} ({{ user.get_age() }})
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
{% if user.promo %}
|
||||||
|
<div class="user_mini_profile_promo">
|
||||||
|
<img src="{{ static('core/img/promo_%02d.png' % user.promo) }}" title="Promo {{ user.promo }}" alt="Promo {{ user.promo }}" class="promo_pict" />
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
<div class="user_mini_profile_picture">
|
<div class="user_mini_profile_picture">
|
||||||
{% if user.profile_pict %}
|
{% if user.profile_pict %}
|
||||||
<img src="{{ user.profile_pict.get_download_url() }}" alt="{% trans %}Profile{% endtrans %}" />
|
<img src="{{ user.profile_pict.get_download_url() }}" alt="{% trans %}Profile{% endtrans %}" />
|
||||||
{% else %}
|
{% else %}
|
||||||
<img src="{{ static('core/img/unknown.jpg') }}" alt="{% trans %}Profile{% endtrans %}"
|
<img src="{{ static('core/img/unknown.jpg') }}" alt="{% trans %}Profile{% endtrans %}"
|
||||||
title="{% trans %}Profile{% endtrans %}" />
|
title="{% trans %}Profile{% endtrans %}" />
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{%- endmacro %}
|
{%- endmacro %}
|
||||||
|
|
||||||
{% macro user_subscription(user) %}
|
{% macro user_subscription(user) %}
|
||||||
{% trans subscription_end=user.subscriptions.order_by('subscription_end').last().subscription_end %}Subscribed until {{ subscription_end }}{% endtrans %}<br/>
|
{% trans subscription_end=user.subscriptions.order_by('subscription_end').last().subscription_end %}Subscribed until {{ subscription_end }}{% endtrans %}<br/>
|
||||||
{% trans %}Account number: {% endtrans %}{{ user.customer.account_id }}<br/>
|
{% trans %}Account number: {% endtrans %}{{ user.customer.account_id }}<br/>
|
||||||
{%- endmacro %}
|
{%- endmacro %}
|
||||||
|
|
||||||
{% macro show_slots(user) %}
|
{% macro show_slots(user) %}
|
||||||
{% if user.slots.filter(start_date__gte=timezone.now()).exists() %}
|
{% if user.slots.filter(start_date__gte=timezone.now()).exists() %}
|
||||||
<h5>{% trans %}Slot{% endtrans %}</h5>
|
<h5>{% trans %}Slot{% endtrans %}</h5>
|
||||||
<ul>
|
<ul>
|
||||||
{% for i in user.slots.filter(start_date__gte=timezone.now().replace(tzinfo=None)).all() %}
|
{% for i in user.slots.filter(start_date__gte=timezone.now().replace(tzinfo=None)).all() %}
|
||||||
<li>{{ i.get_type_display() }} - {{i.machine.launderette }}, {{ i.start_date|date("l j") }} :
|
<li>{{ i.get_type_display() }} - {{i.machine.launderette }}, {{ i.start_date|date("l j") }} :
|
||||||
{{ i.start_date|time(DATETIME_FORMAT) }} |
|
{{ i.start_date|time(DATETIME_FORMAT) }} |
|
||||||
<a href="{{ url('launderette:delete_slot', slot_id=i.id) }}">{% trans %}Delete{% endtrans %}</a></li>
|
<a href="{{ url('launderette:delete_slot', slot_id=i.id) }}">{% trans %}Delete{% endtrans %}</a></li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endmacro %}
|
{% endmacro %}
|
||||||
|
|
||||||
{% macro show_tokens(user) %}
|
{% macro show_tokens(user) %}
|
||||||
{% if user.tokens.exists() %}
|
{% if user.tokens.exists() %}
|
||||||
<h5>{% trans %}Tokens{% endtrans %}</h5>
|
<h5>{% trans %}Tokens{% endtrans %}</h5>
|
||||||
<ul>
|
<ul>
|
||||||
{% for i in user.tokens.all() %}
|
{% for i in user.tokens.all() %}
|
||||||
<li>{{ i }}</li>
|
<li>{{ i }}</li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endmacro %}
|
{% endmacro %}
|
||||||
|
|
||||||
{% macro delete_godfather(user, profile, godfather, is_father) %}
|
{% 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 %}
|
||||||
<a href="{{ url("core:user_godfathers_delete", user_id=profile.id, godfather_id=godfather.id, is_father=is_father) }}">{% trans %}Delete{% endtrans %}</a>
|
<a href="{{ url("core:user_godfathers_delete", user_id=profile.id, godfather_id=godfather.id, is_father=is_father) }}">{% trans %}Delete{% endtrans %}</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endmacro %}
|
{% endmacro %}
|
||||||
|
|
||||||
{% macro paginate(page_obj, paginator, js_action) %}
|
{% macro paginate(page_obj, paginator, js_action) %}
|
||||||
{% set js = js_action|default('') %}
|
{% set js = js_action|default('') %}
|
||||||
{% if page_obj.has_previous() or page_obj.has_next() %}
|
{% if page_obj.has_previous() or page_obj.has_next() %}
|
||||||
{% if page_obj.has_previous() %}
|
{% if page_obj.has_previous() %}
|
||||||
<a {% if js %} type="submit" onclick="{{ js }}" {% endif %} href="?page={{ page_obj.previous_page_number() }}">{% trans %}Previous{% endtrans %}</a>
|
<a {% if js %} type="submit" onclick="{{ js }}" {% endif %} href="?page={{ page_obj.previous_page_number() }}">{% trans %}Previous{% endtrans %}</a>
|
||||||
{% else %}
|
{% else %}
|
||||||
<span class="disabled">{% trans %}Previous{% endtrans %}</span>
|
<span class="disabled">{% trans %}Previous{% endtrans %}</span>
|
||||||
{% endif %}
|
|
||||||
{% for i in paginator.page_range %}
|
|
||||||
{% if page_obj.number == i %}
|
|
||||||
<span class="active">{{ i }} <span class="sr-only">({% trans %}current{% endtrans %})</span></span>
|
|
||||||
{% else %}
|
|
||||||
<a {% if js %} type="submit" onclick="{{ js }}" {% endif %} href="?page={{ i }}">{{ i }}</a>
|
|
||||||
{% endif %}
|
|
||||||
{% endfor %}
|
|
||||||
{% if page_obj.has_next() %}
|
|
||||||
<a {% if js %} type="submit" onclick="{{ js }}" {% endif %} href="?page={{ page_obj.next_page_number() }}">{% trans %}Next{% endtrans %}</a>
|
|
||||||
{% else %}
|
|
||||||
<span class="disabled">{% trans %}Next{% endtrans %}</span>
|
|
||||||
{% endif %}
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
{% for i in paginator.page_range %}
|
||||||
|
{% if page_obj.number == i %}
|
||||||
|
<span class="active">{{ i }} <span class="sr-only">({% trans %}current{% endtrans %})</span></span>
|
||||||
|
{% else %}
|
||||||
|
<a {% if js %} type="submit" onclick="{{ js }}" {% endif %} href="?page={{ i }}">{{ i }}</a>
|
||||||
|
{% endif %}
|
||||||
|
{% endfor %}
|
||||||
|
{% if page_obj.has_next() %}
|
||||||
|
<a {% if js %} type="submit" onclick="{{ js }}" {% endif %} href="?page={{ page_obj.next_page_number() }}">{% trans %}Next{% endtrans %}</a>
|
||||||
|
{% else %}
|
||||||
|
<span class="disabled">{% trans %}Next{% endtrans %}</span>
|
||||||
|
{% endif %}
|
||||||
|
{% endif %}
|
||||||
{% endmacro %}
|
{% endmacro %}
|
||||||
|
|
||||||
{% macro select_all_checkbox(form_id) %}
|
{% macro select_all_checkbox(form_id) %}
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
function checkbox_{{form_id}}(value) {
|
function checkbox_{{form_id}}(value) {
|
||||||
list = document.getElementById("{{ form_id }}").getElementsByTagName("input");
|
list = document.getElementById("{{ form_id }}").getElementsByTagName("input");
|
||||||
for (let element of list){
|
for (let element of list){
|
||||||
if (element.type == "checkbox"){
|
if (element.type == "checkbox"){
|
||||||
element.checked = value;
|
element.checked = value;
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
</script>
|
}
|
||||||
<button type="button" onclick="checkbox_{{form_id}}(true);">{% trans %}Select All{% endtrans %}</button>
|
}
|
||||||
<button type="button" onclick="checkbox_{{form_id}}(false);">{% trans %}Unselect All{% endtrans %}</button>
|
</script>
|
||||||
|
<button type="button" onclick="checkbox_{{form_id}}(true);">{% trans %}Select All{% endtrans %}</button>
|
||||||
|
<button type="button" onclick="checkbox_{{form_id}}(false);">{% trans %}Unselect All{% endtrans %}</button>
|
||||||
{% endmacro %}
|
{% endmacro %}
|
||||||
|
@ -1,27 +1,27 @@
|
|||||||
{% from "core/macros.jinja" import user_profile_link %}
|
{% from "core/macros.jinja" import user_profile_link %}
|
||||||
|
|
||||||
{% macro page_history(page) %}
|
{% macro page_history(page) %}
|
||||||
<p>{% trans page_name=page.name %}You're seeing the history of page "{{ page_name }}"{% endtrans %}</p>
|
<p>{% trans page_name=page.name %}You're seeing the history of page "{{ page_name }}"{% endtrans %}</p>
|
||||||
<ul>
|
<ul>
|
||||||
{% for r in (page.revisions.all()|sort(attribute='date', reverse=True)) %}
|
{% for r in (page.revisions.all()|sort(attribute='date', reverse=True)) %}
|
||||||
{% if loop.index < 2 %}
|
{% if loop.index < 2 %}
|
||||||
<li><a href="{{ url('core:page', page_name=page.get_full_name()) }}">{% trans %}last{% endtrans %}</a> -
|
<li><a href="{{ url('core:page', page_name=page.get_full_name()) }}">{% trans %}last{% endtrans %}</a> -
|
||||||
{{ user_profile_link(page.revisions.last().author) }} -
|
{{ user_profile_link(page.revisions.last().author) }} -
|
||||||
{{ page.revisions.last().date|localtime|date(DATETIME_FORMAT) }} {{ page.revisions.last().date|localtime|time(DATETIME_FORMAT) }}</a></li>
|
{{ page.revisions.last().date|localtime|date(DATETIME_FORMAT) }} {{ page.revisions.last().date|localtime|time(DATETIME_FORMAT) }}</a></li>
|
||||||
{% else %}
|
{% else %}
|
||||||
<li><a href="{{ url('core:page_rev', page_name=page.get_full_name(), rev=r['id']) }}">{{ r.revision }}</a> -
|
<li><a href="{{ url('core:page_rev', page_name=page.get_full_name(), rev=r['id']) }}">{{ r.revision }}</a> -
|
||||||
{{ user_profile_link(r.author) }} -
|
{{ user_profile_link(r.author) }} -
|
||||||
{{ r.date|localtime|date(DATETIME_FORMAT) }} {{ r.date|localtime|time(DATETIME_FORMAT) }}</a></li>
|
{{ r.date|localtime|date(DATETIME_FORMAT) }} {{ r.date|localtime|time(DATETIME_FORMAT) }}</a></li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
{% endmacro %}
|
{% endmacro %}
|
||||||
|
|
||||||
{% macro page_edit_form(page, form, url, token) %}
|
{% macro page_edit_form(page, form, url, token) %}
|
||||||
<h2>{% trans %}Edit page{% endtrans %}</h2>
|
<h2>{% trans %}Edit page{% endtrans %}</h2>
|
||||||
<form action="{{ url }}" method="post">
|
<form action="{{ url }}" method="post">
|
||||||
<input type="hidden" name="csrfmiddlewaretoken" value="{{ token }}">
|
<input type="hidden" name="csrfmiddlewaretoken" value="{{ token }}">
|
||||||
{{ form.as_p() }}
|
{{ form.as_p() }}
|
||||||
<p><input type="submit" value="{% trans %}Save{% endtrans %}" /></p>
|
<p><input type="submit" value="{% trans %}Save{% endtrans %}" /></p>
|
||||||
</form>
|
</form>
|
||||||
{% endmacro %}
|
{% endmacro %}
|
||||||
|
@ -1,17 +1,17 @@
|
|||||||
{% autoescape off %}
|
{% 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 %}
|
{% trans %}Please go to the following page and choose a new password:{% endtrans %}
|
||||||
{% block reset_link %}
|
{% block reset_link %}
|
||||||
{{ protocol }}://{{ domain }}{{ url('core:password_reset_confirm', uidb64=uid, token=token) }}
|
{{ protocol }}://{{ domain }}{{ url('core:password_reset_confirm', uidb64=uid, token=token) }}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
{% trans %}Your username, in case it was not given to you: {% endtrans %} {{ user.get_username() }}
|
{% 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 %}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 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 %}
|
{% endautoescape %}
|
||||||
|
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
{% autoescape off %}
|
{% autoescape off %}
|
||||||
{% trans %}New subscription to the UTBM student association{% endtrans %}
|
{% trans %}New subscription to the UTBM student association{% endtrans %}
|
||||||
{% endautoescape %}
|
{% endautoescape %}
|
||||||
|
@ -1,24 +1,24 @@
|
|||||||
{% extends "core/base.jinja" %}
|
{% extends "core/base.jinja" %}
|
||||||
|
|
||||||
{% block title %}
|
{% block title %}
|
||||||
{% trans %}Notification list{% endtrans %}
|
{% trans %}Notification list{% endtrans %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<h3>{% trans %}Notification list{% endtrans %}</h3>
|
<h3>{% trans %}Notification list{% endtrans %}</h3>
|
||||||
<ul id="notifications">
|
<ul id="notifications">
|
||||||
{% for n in notification_list %}
|
{% for n in notification_list %}
|
||||||
{% if n.viewed %}
|
{% if n.viewed %}
|
||||||
<li>
|
<li>
|
||||||
{% else %}
|
{% else %}
|
||||||
<li style="background: lightgrey;">
|
<li style="background: lightgrey;">
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<a href="{{ url("core:notification", notif_id=n.id) }}">
|
<a href="{{ url("core:notification", notif_id=n.id) }}">
|
||||||
<span style="font-size: small; ">{{ n.date|localtime|date(DATE_FORMAT) }} {{
|
<span style="font-size: small; ">{{ n.date|localtime|date(DATE_FORMAT) }} {{
|
||||||
n.date|localtime|time(DATETIME_FORMAT) }}</span><br>
|
n.date|localtime|time(DATETIME_FORMAT) }}</span><br>
|
||||||
{{ n }}</a>
|
{{ n }}</a>
|
||||||
</li>
|
</li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
@ -1,53 +1,53 @@
|
|||||||
{% extends "core/base.jinja" %}
|
{% extends "core/base.jinja" %}
|
||||||
|
|
||||||
{% block title %}
|
{% block title %}
|
||||||
{% if page %}
|
{% if page %}
|
||||||
{{ page.get_display_name() }}
|
{{ page.get_display_name() }}
|
||||||
{% elif page_list %}
|
{% elif page_list %}
|
||||||
{% trans %}Page list{% endtrans %}
|
{% trans %}Page list{% endtrans %}
|
||||||
{% elif new_page %}
|
{% elif new_page %}
|
||||||
{% trans %}Create page{% endtrans %}
|
{% trans %}Create page{% endtrans %}
|
||||||
{% else %}
|
{% else %}
|
||||||
{% trans %}Not found{% endtrans %}
|
{% trans %}Not found{% endtrans %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% macro print_page_name(page) %}
|
{% macro print_page_name(page) %}
|
||||||
{% if page %}
|
{% if page %}
|
||||||
{{ print_page_name(page.parent) }} >
|
{{ print_page_name(page.parent) }} >
|
||||||
<a href="{{ url('core:page', page_name=page.get_full_name()) }}">{{ page.get_display_name() }}</a>
|
<a href="{{ url('core:page', page_name=page.get_full_name()) }}">{{ page.get_display_name() }}</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endmacro %}
|
{% endmacro %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
{{ print_page_name(page) }}
|
{{ print_page_name(page) }}
|
||||||
|
|
||||||
<div class="tool_bar">
|
<div class="tool_bar">
|
||||||
<div class="tools">
|
<div class="tools">
|
||||||
{% if page %}
|
{% if page %}
|
||||||
{% if page.club %}
|
{% if page.club %}
|
||||||
<a href="{{ url('club:club_view', club_id=page.club.id) }}">{% trans %}Return to club management{% endtrans %}</a>
|
<a href="{{ url('club:club_view', club_id=page.club.id) }}">{% trans %}Return to club management{% endtrans %}</a>
|
||||||
{% else %}
|
{% else %}
|
||||||
<a href="{{ url('core:page', page.get_full_name()) }}">{% trans %}View{% endtrans %}</a>
|
<a href="{{ url('core:page', page.get_full_name()) }}">{% trans %}View{% endtrans %}</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<a href="{{ url('core:page_hist', page_name=page.get_full_name()) }}">{% trans %}History{% endtrans %}</a>
|
<a href="{{ url('core:page_hist', page_name=page.get_full_name()) }}">{% trans %}History{% endtrans %}</a>
|
||||||
{% if can_edit(page, user) %}
|
{% if can_edit(page, user) %}
|
||||||
<a href="{{ url('core:page_edit', page_name=page.get_full_name()) }}">{% trans %}Edit{% endtrans %}</a>
|
<a href="{{ url('core:page_edit', page_name=page.get_full_name()) }}">{% trans %}Edit{% endtrans %}</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if can_edit_prop(page, user) and not page.is_club_page %}
|
{% if can_edit_prop(page, user) and not page.is_club_page %}
|
||||||
<a href="{{ url('core:page_prop', page_name=page.get_full_name()) }}">{% trans %}Prop{% endtrans %}</a>
|
<a href="{{ url('core:page_prop', page_name=page.get_full_name()) }}">{% trans %}Prop{% endtrans %}</a>
|
||||||
{% endif %}
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<hr>
|
<hr>
|
||||||
|
|
||||||
{% if page %}
|
{% if page %}
|
||||||
{% block page %}
|
{% block page %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
{% else %}
|
{% else %}
|
||||||
<h2>{% trans %}Page does not exist{% endtrans %}</h2>
|
<h2>{% trans %}Page does not exist{% endtrans %}</h2>
|
||||||
<p><a href="{{ url('core:page_new') }}?page={{ request.resolver_match.kwargs['page_name'] }}">
|
<p><a href="{{ url('core:page_new') }}?page={{ request.resolver_match.kwargs['page_name'] }}">
|
||||||
{% trans %}Create it?{% endtrans %}</a></p>
|
{% trans %}Create it?{% endtrans %}</a></p>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@ -1,16 +1,16 @@
|
|||||||
{% extends "core/page.jinja" %}
|
{% extends "core/page.jinja" %}
|
||||||
|
|
||||||
{% block page %}
|
{% block page %}
|
||||||
{% if rev %}
|
{% if rev %}
|
||||||
<h4>{% trans rev_id=rev.revision %}This may not be the last update, you are seeing revision {{ rev_id }}!{% endtrans %}</h4>
|
<h4>{% trans rev_id=rev.revision %}This may not be the last update, you are seeing revision {{ rev_id }}!{% endtrans %}</h4>
|
||||||
<h3>{{ rev.title }}</h3>
|
<h3>{{ rev.title }}</h3>
|
||||||
<div class="page_content">{{ rev.content|markdown }}</div>
|
<div class="page_content">{{ rev.content|markdown }}</div>
|
||||||
{% else %}
|
{% else %}
|
||||||
{% if page.revisions.last() %}
|
{% if page.revisions.last() %}
|
||||||
<h3>{{ page.revisions.last().title }}</h3>
|
<h3>{{ page.revisions.last().title }}</h3>
|
||||||
<div class="page_content">{{ page.revisions.last().content|markdown }}</div>
|
<div class="page_content">{{ page.revisions.last().content|markdown }}</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
|
||||||
|
@ -3,8 +3,8 @@
|
|||||||
{% from "core/macros_pages.jinja" import page_history %}
|
{% from "core/macros_pages.jinja" import page_history %}
|
||||||
|
|
||||||
{% block page %}
|
{% block page %}
|
||||||
<h3>{% trans %}Page history{% endtrans %}</h3>
|
<h3>{% trans %}Page history{% endtrans %}</h3>
|
||||||
{{ page_history(page) }}
|
{{ page_history(page) }}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,20 +1,20 @@
|
|||||||
{% extends "core/base.jinja" %}
|
{% extends "core/base.jinja" %}
|
||||||
|
|
||||||
{% block title %}
|
{% block title %}
|
||||||
{% trans %}Page list{% endtrans %}
|
{% trans %}Page list{% endtrans %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
{% if page_list %}
|
{% if page_list %}
|
||||||
<h3>{% trans %}Page list{% endtrans %}</h3>
|
<h3>{% trans %}Page list{% endtrans %}</h3>
|
||||||
<ul>
|
<ul>
|
||||||
{% for p in page_list %}
|
{% for p in page_list %}
|
||||||
<li><a href="{{ p.get_absolute_url() }}">{{ p.get_display_name() }}</a></li>
|
<li><a href="{{ p.get_absolute_url() }}">{{ p.get_display_name() }}</a></li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
{% else %}
|
{% else %}
|
||||||
{% trans %}There is no page in this website.{% endtrans %}
|
{% trans %}There is no page in this website.{% endtrans %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,18 +1,18 @@
|
|||||||
{% extends "core/page.jinja" %}
|
{% extends "core/page.jinja" %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
{% if page %}
|
{% if page %}
|
||||||
{{ super() }}
|
{{ super() }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<h2>{% trans %}Page properties{% endtrans %}</h2>
|
<h2>{% trans %}Page properties{% endtrans %}</h2>
|
||||||
<form action="" method="post">
|
<form action="" method="post">
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
{{ form.as_p() }}
|
{{ form.as_p() }}
|
||||||
<p><input type="submit" value="{% trans %}Save{% endtrans %}" /></p>
|
<p><input type="submit" value="{% trans %}Save{% endtrans %}" /></p>
|
||||||
</form>
|
</form>
|
||||||
{% if page %}
|
{% if page %}
|
||||||
<a href="{{ url('core:page_delete', page_id=page.id)}}">{% trans %}Delete{% endtrans %}</a>
|
<a href="{{ url('core:page_delete', page_id=page.id)}}">{% trans %}Delete{% endtrans %}</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
{% from 'core/macros_pages.jinja' import page_edit_form %}
|
{% from 'core/macros_pages.jinja' import page_edit_form %}
|
||||||
|
|
||||||
{% block page %}
|
{% 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 %}
|
{% endblock %}
|
||||||
|
|
||||||
|
|
||||||
|
@ -2,12 +2,12 @@
|
|||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
|
|
||||||
{% if target %}
|
{% if target %}
|
||||||
<p>{% trans user=target.get_display_name() %}Change password for {{ user }}{% endtrans %}</p>
|
<p>{% trans user=target.get_display_name() %}Change password for {{ user }}{% endtrans %}</p>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<form method="post" action="">
|
<form method="post" action="">
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
{{ form.as_p() }}
|
{{ form.as_p() }}
|
||||||
<input type="submit" value="{% trans %}Change{% endtrans %}" />
|
<input type="submit" value="{% trans %}Change{% endtrans %}" />
|
||||||
</form>
|
</form>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{% extends "core/base.jinja" %}
|
{% extends "core/base.jinja" %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<p>{% trans %}You successfully changed your password!{% endtrans %}</p>
|
<p>{% trans %}You successfully changed your password!{% endtrans %}</p>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
{% extends "core/base.jinja" %}
|
{% extends "core/base.jinja" %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<form method="post" action="">
|
<form method="post" action="">
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
{% render_honeypot_field %}
|
{% render_honeypot_field %}
|
||||||
{{ form.as_p() }}
|
{{ form.as_p() }}
|
||||||
<input type="submit" value="{% trans %}Reset{% endtrans %}" />
|
<input type="submit" value="{% trans %}Reset{% endtrans %}" />
|
||||||
</form>
|
</form>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
{% extends "core/base.jinja" %}
|
{% extends "core/base.jinja" %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<p>{% trans %}You successfully reset your password!{% endtrans %}</p>
|
<p>{% trans %}You successfully reset your password!{% endtrans %}</p>
|
||||||
<a href="{{ url('core:login') }}">{% trans %}Login{% endtrans %}</a>
|
<a href="{{ url('core:login') }}">{% trans %}Login{% endtrans %}</a>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,14 +1,14 @@
|
|||||||
{% extends "core/base.jinja" %}
|
{% extends "core/base.jinja" %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
{% if form %}
|
{% if form %}
|
||||||
<form method="post" action="">
|
<form method="post" action="">
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
{{ form.as_p() }}
|
{{ form.as_p() }}
|
||||||
<input type="submit" value="{% trans %}Reset{% endtrans %}" />
|
<input type="submit" value="{% trans %}Reset{% endtrans %}" />
|
||||||
</form>
|
</form>
|
||||||
{% else %}
|
{% else %}
|
||||||
{% trans %}It seems that this link has expired. To generate a new link, you can follow this link: {% endtrans %}<a href="{{ url('core:password_change') }}">{% trans %}lost password{% endtrans %}</a>.
|
{% trans %}It seems that this link has expired. To generate a new link, you can follow this link: {% endtrans %}<a href="{{ url('core:password_change') }}">{% trans %}lost password{% endtrans %}</a>.
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
@ -1,15 +1,15 @@
|
|||||||
{% extends "core/base.jinja" %}
|
{% extends "core/base.jinja" %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<h2>{% trans %}Password reset sent{% endtrans %}</h2>
|
<h2>{% trans %}Password reset sent{% endtrans %}</h2>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
{% trans %}We've emailed you instructions for setting your password, if an account exists with the email you entered. You should
|
{% 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 %}
|
receive them shortly.{% endtrans %}
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
{% trans %}If you don't receive an email, please make sure you've entered the address you registered with, and check your spam
|
{% 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 %}
|
folder.{% endtrans %}
|
||||||
</p>
|
</p>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@ -1,15 +1,15 @@
|
|||||||
{% autoescape off %}
|
{% 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 %}
|
{% trans %}Please go to the following page and choose a new password:{% endtrans %}
|
||||||
{% block reset_link %}
|
{% block reset_link %}
|
||||||
{{ protocol }}://{{ domain }}{{ url('core:password_reset_confirm', uidb64=uid, token=token) }}
|
{{ protocol }}://{{ domain }}{{ url('core:password_reset_confirm', uidb64=uid, token=token) }}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
{% trans %}Your username, in case you've forgotten: {% endtrans %} {{ user.get_username() }}
|
{% 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 %}
|
{% endautoescape %}
|
||||||
|
|
||||||
|
@ -1,53 +1,53 @@
|
|||||||
{% extends "core/base.jinja" %}
|
{% extends "core/base.jinja" %}
|
||||||
|
|
||||||
{% block script %}
|
{% block script %}
|
||||||
{{ super() }}
|
{{ super() }}
|
||||||
<script src="{{ static('com/js/poster_list.js') }}"></script>
|
<script src="{{ static('com/js/poster_list.js') }}"></script>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
|
||||||
{% block title %}
|
{% block title %}
|
||||||
{% trans %}Poster{% endtrans %}
|
{% trans %}Poster{% endtrans %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div id="poster_list">
|
<div id="poster_list">
|
||||||
|
|
||||||
<div id="title">
|
<div id="title">
|
||||||
<h3>{% trans %}Posters{% endtrans %}</h3>
|
<h3>{% trans %}Posters{% endtrans %}</h3>
|
||||||
<div id="links" class="right">
|
<div id="links" class="right">
|
||||||
<a id="create" class="link" href="{{ url(app + ":poster_list") }}">{% trans %}Create{% endtrans %}</a>
|
<a id="create" class="link" href="{{ url(app + ":poster_list") }}">{% trans %}Create{% endtrans %}</a>
|
||||||
{% if app == "com" %}
|
{% if app == "com" %}
|
||||||
<a id="moderation" class="link" href="{{ url("com:poster_moderate_list") }}">{% trans %}Moderation{% endtrans %}</a>
|
<a id="moderation" class="link" href="{{ url("com:poster_moderate_list") }}">{% trans %}Moderation{% endtrans %}</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="posters">
|
<div id="posters">
|
||||||
|
|
||||||
{% if poster_list.count() == 0 %}
|
{% if poster_list.count() == 0 %}
|
||||||
<div id="no-posters">{% trans %}No posters{% endtrans %}</div>
|
<div id="no-posters">{% trans %}No posters{% endtrans %}</div>
|
||||||
{% else %}
|
{% else %}
|
||||||
|
|
||||||
{% for poster in poster_list %}
|
{% for poster in poster_list %}
|
||||||
<div class="poster">
|
<div class="poster">
|
||||||
<div class="name">{{ poster.name }}</div>
|
<div class="name">{{ poster.name }}</div>
|
||||||
<div class="image"><img src="{{ poster.file.url }}"></img></div>
|
<div class="image"><img src="{{ poster.file.url }}"></img></div>
|
||||||
<div class="dates">
|
<div class="dates">
|
||||||
<div class="begin">{{ poster.date_begin | date("d/M/Y H:m") }}</div>
|
<div class="begin">{{ poster.date_begin | date("d/M/Y H:m") }}</div>
|
||||||
<div class="end">{{ poster.date_end | date("d/M/Y H:m") }}</div>
|
<div class="end">{{ poster.date_end | date("d/M/Y H:m") }}</div>
|
||||||
</div>
|
</div>
|
||||||
<a class="edit" href="{{ url(poster_edit_url_name, poster.id) }}">{% trans %}Edit{% endtrans %}</a>
|
<a class="edit" href="{{ url(poster_edit_url_name, poster.id) }}">{% trans %}Edit{% endtrans %}</a>
|
||||||
</div>
|
</div>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="view"><div id="placeholder"></div></div>
|
<div id="view"><div id="placeholder"></div></div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
{% extends "core/base.jinja" %}
|
{% extends "core/base.jinja" %}
|
||||||
|
|
||||||
{%- block additional_css -%}
|
{%- block additional_css -%}
|
||||||
<link rel="stylesheet" href="{{ scss('user/login.scss') }}">
|
<link rel="stylesheet" href="{{ scss('user/login.scss') }}">
|
||||||
{%- endblock -%}
|
{%- endblock -%}
|
||||||
|
|
||||||
{% block title %}{% trans %}Register{% endtrans %}{% endblock %}
|
{% block title %}{% trans %}Register{% endtrans %}{% endblock %}
|
||||||
@ -13,13 +13,12 @@
|
|||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<h1 class="title">{% trans %}Register{% endtrans %}</h1>
|
<h1 class="title">{% trans %}Register{% endtrans %}</h1>
|
||||||
|
|
||||||
<form action="{{ url('core:register') }}" method="post">
|
<form action="{{ url('core:register') }}" method="post">
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
{% render_honeypot_field %}
|
{% render_honeypot_field %}
|
||||||
{{ form }}
|
{{ form }}
|
||||||
<input type="submit" value="{% trans %}Register{% endtrans %}" />
|
<input type="submit" value="{% trans %}Register{% endtrans %}" />
|
||||||
</form>
|
</form>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
@ -1,17 +1,17 @@
|
|||||||
{% autoescape off %}
|
{% 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 %}
|
{% trans %}
|
||||||
As this is the website of the students of the AE, by the students of the AE,
|
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.
|
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.
|
To make a contribution, contact a member of the association's board, either directly or by email at ae@utbm.fr.
|
||||||
{% endtrans %}
|
{% 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 %}
|
{% endautoescape %}
|
||||||
|
|
||||||
|
@ -1,30 +1,30 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="fr">
|
<html lang="fr">
|
||||||
<head>
|
<head>
|
||||||
<title>{% trans %}Slideshow{% endtrans %}</title>
|
<title>{% trans %}Slideshow{% endtrans %}</title>
|
||||||
<link href="{{ scss('com/slideshow.scss') }}" rel="stylesheet" type="text/css" />
|
<link href="{{ scss('com/slideshow.scss') }}" rel="stylesheet" type="text/css" />
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="slideshow">
|
<div id="slideshow">
|
||||||
|
|
||||||
<div id="slides">
|
<div id="slides">
|
||||||
{% for poster in posters %}
|
{% for poster in posters %}
|
||||||
<div class="slide {% if loop.first %}center{% else %}right{% endif %}" display_time="{{ poster.display_time }}">
|
<div class="slide {% if loop.first %}center{% else %}right{% endif %}" display_time="{{ poster.display_time }}">
|
||||||
<img src="{{ poster.file.url }}"></img>
|
<img src="{{ poster.file.url }}"></img>
|
||||||
</div>
|
</div>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="progress_bullets">
|
<div id="progress_bullets">
|
||||||
{% for poster in posters %}
|
{% for poster in posters %}
|
||||||
<div class="bullet {% if loop.first %}active{% endif %}"></div>
|
<div class="bullet {% if loop.first %}active{% endif %}"></div>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="progress_bar"></div>
|
<div id="progress_bar"></div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<script src="{{ static('core/js/jquery-3.6.2.min.js') }}"></script>
|
<script src="{{ static('core/js/jquery-3.6.2.min.js') }}"></script>
|
||||||
<script src="{{ static('com/js/slideshow.js') }}"></script>
|
<script src="{{ static('com/js/slideshow.js') }}"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
@ -3,24 +3,24 @@
|
|||||||
{% from "core/macros.jinja" import user_link_with_pict %}
|
{% from "core/macros.jinja" import user_link_with_pict %}
|
||||||
|
|
||||||
{% block title %}
|
{% block title %}
|
||||||
{% trans %}Search result{% endtrans %}
|
{% trans %}Search result{% endtrans %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<h4>{% trans %}Users{% endtrans %}</h4>
|
<h4>{% trans %}Users{% endtrans %}</h4>
|
||||||
<ul>
|
<ul>
|
||||||
{% for i in result.users %}
|
{% for i in result.users %}
|
||||||
<li>
|
<li>
|
||||||
{{ user_link_with_pict(i) }}
|
{{ user_link_with_pict(i) }}
|
||||||
</li>
|
</li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
<h4>{% trans %}Clubs{% endtrans %}</h4>
|
<h4>{% trans %}Clubs{% endtrans %}</h4>
|
||||||
<ul>
|
<ul>
|
||||||
{% for i in result.clubs %}
|
{% for i in result.clubs %}
|
||||||
<li>
|
<li>
|
||||||
<a href="{{ url("club:club_view", club_id=i.id) }}">{{ i }}</a>
|
<a href="{{ url("club:club_view", club_id=i.id) }}">{{ i }}</a>
|
||||||
</li>
|
</li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@ -1,28 +1,28 @@
|
|||||||
{% extends "core/base.jinja" %}
|
{% extends "core/base.jinja" %}
|
||||||
|
|
||||||
{% block title %}
|
{% block title %}
|
||||||
{% trans %}To Markdown{% endtrans %}
|
{% trans %}To Markdown{% endtrans %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<form action="" method="post" enctype="multipart/form-data">
|
<form action="" method="post" enctype="multipart/form-data">
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
<input type="radio" name="syntax" value="doku" {% if request.POST['syntax'] != "bbcode" %}checked{% endif %} >Doku</input>
|
<input type="radio" name="syntax" value="doku" {% if request.POST['syntax'] != "bbcode" %}checked{% endif %} >Doku</input>
|
||||||
<input type="radio" name="syntax" value="bbcode" {% if request.POST['syntax'] == "bbcode" %}checked{% endif %} >BBCode</input>
|
<input type="radio" name="syntax" value="bbcode" {% if request.POST['syntax'] == "bbcode" %}checked{% endif %} >BBCode</input>
|
||||||
<textarea name="text" id="text" rows="30" cols="80">
|
<textarea name="text" id="text" rows="30" cols="80">
|
||||||
{{- text -}}
|
{{- text -}}
|
||||||
</textarea>
|
</textarea>
|
||||||
<p><input type="submit" value="{% trans %}Convert{% endtrans %}" /></p>
|
<p><input type="submit" value="{% trans %}Convert{% endtrans %}" /></p>
|
||||||
</form>
|
</form>
|
||||||
<hr>
|
<hr>
|
||||||
<h6>{% trans %}Markdown{% endtrans %}</h6>
|
<h6>{% trans %}Markdown{% endtrans %}</h6>
|
||||||
<div style="border: 1px solid black; color: white; background: black; padding: 10px; margin: 5px;"><pre>{{- text_md -}}</pre>
|
<div style="border: 1px solid black; color: white; background: black; padding: 10px; margin: 5px;"><pre>{{- text_md -}}</pre>
|
||||||
</div>
|
</div>
|
||||||
<hr>
|
<hr>
|
||||||
<h6>{% trans %}Render{% endtrans %}</h6>
|
<h6>{% trans %}Render{% endtrans %}</h6>
|
||||||
<div style="border: 1px solid black; padding: 10px; margin: 5px;" class="page_content">
|
<div style="border: 1px solid black; padding: 10px; margin: 5px;" class="page_content">
|
||||||
{{ text_md|markdown }}
|
{{ text_md|markdown }}
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,83 +1,83 @@
|
|||||||
{% extends "core/base.jinja" %}
|
{% extends "core/base.jinja" %}
|
||||||
|
|
||||||
{% macro monthly(obj) %}
|
{% macro monthly(obj) %}
|
||||||
<div>
|
<div>
|
||||||
<table>
|
<table>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<td>{% trans %}Year{% endtrans %}</td>
|
<td>{% trans %}Year{% endtrans %}</td>
|
||||||
<td>{% trans %}Month{% endtrans %}</td>
|
<td>{% trans %}Month{% endtrans %}</td>
|
||||||
<td>{% trans %}Total{% endtrans %}</td>
|
<td>{% trans %}Total{% endtrans %}</td>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
{% for array in obj %}
|
{% for array in obj %}
|
||||||
{% for dict in array %}
|
{% for dict in array %}
|
||||||
{% if dict['sum'] != 0 %}
|
{% if dict['sum'] != 0 %}
|
||||||
{% set link=url('core:user_account_detail', user_id=profile.id, year=dict['date'].year, month=dict['date'].month) %}
|
{% set link=url('core:user_account_detail', user_id=profile.id, year=dict['date'].year, month=dict['date'].month) %}
|
||||||
<tr>
|
<tr>
|
||||||
<td><a href="{{ link }}">{{ dict['date'].year }}</a></td>
|
<td><a href="{{ link }}">{{ dict['date'].year }}</a></td>
|
||||||
<td><a href="{{ link }}">{{ dict['date']|date("E") }}</a></td>
|
<td><a href="{{ link }}">{{ dict['date']|date("E") }}</a></td>
|
||||||
<td><a href="{{ link }}">{{ dict['sum'] }} €</a></td>
|
<td><a href="{{ link }}">{{ dict['sum'] }} €</a></td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
{% endmacro %}
|
{% endmacro %}
|
||||||
|
|
||||||
{% block title %}
|
{% 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 %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
{% if customer %}
|
{% if customer %}
|
||||||
<h3>{% trans %}User account{% endtrans %}</h3>
|
<h3>{% trans %}User account{% endtrans %}</h3>
|
||||||
<p>{% trans %}Amount: {% endtrans %}{{ customer.amount }} €</p>
|
<p>{% trans %}Amount: {% endtrans %}{{ customer.amount }} €</p>
|
||||||
<div id="drop">
|
<div id="drop">
|
||||||
{% set bought = customer.buyings.exists() %}
|
{% set bought = customer.buyings.exists() %}
|
||||||
{% set refilled = customer.refillings.exists() %}
|
{% set refilled = customer.refillings.exists() %}
|
||||||
{% if bought or refilled %}
|
{% if bought or refilled %}
|
||||||
{% if bought %}
|
{% if bought %}
|
||||||
<h5>{% trans %}Account purchases{% endtrans %}</h5>
|
<h5>{% trans %}Account purchases{% endtrans %}</h5>
|
||||||
{{ monthly(buyings_month) }}
|
{{ monthly(buyings_month) }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if refilled %}
|
{% if refilled %}
|
||||||
<h5>{% trans %}Reloads{% endtrans %}</h5>
|
<h5>{% trans %}Reloads{% endtrans %}</h5>
|
||||||
{{ monthly(refilling_month) }}
|
{{ monthly(refilling_month) }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if customer.user.invoices.exists() %}
|
{% if customer.user.invoices.exists() %}
|
||||||
<h5>{% trans %}Eboutic invoices{% endtrans %}</h5>
|
<h5>{% trans %}Eboutic invoices{% endtrans %}</h5>
|
||||||
{{ monthly(invoices_month) }}
|
{{ monthly(invoices_month) }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if etickets %}
|
{% if etickets %}
|
||||||
<h4>{% trans %}Etickets{% endtrans %}</h4>
|
<h4>{% trans %}Etickets{% endtrans %}</h4>
|
||||||
<div>
|
<div>
|
||||||
<ul>
|
<ul>
|
||||||
{% for s in etickets %}
|
{% for s in etickets %}
|
||||||
<li><a href="{{ url('counter:eticket_pdf', selling_id=s.id) }}">{{ s.quantity }} x {{ s.product.eticket }}</a></li>
|
<li><a href="{{ url('counter:eticket_pdf', selling_id=s.id) }}">{{ s.quantity }} x {{ s.product.eticket }}</a></li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% else %}
|
||||||
</div>
|
<p>{% trans %}User has no account{% endtrans %}</p>
|
||||||
{% else %}
|
{% endif %}
|
||||||
<p>{% trans %}User has no account{% endtrans %}</p>
|
|
||||||
{% endif %}
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block script %}
|
{% block script %}
|
||||||
{{ super() }}
|
{{ super() }}
|
||||||
<script>
|
<script>
|
||||||
$(function(){
|
$(function(){
|
||||||
$("#drop").accordion({
|
$("#drop").accordion({
|
||||||
heightStyle: "content"
|
heightStyle: "content"
|
||||||
|
});
|
||||||
});
|
});
|
||||||
});
|
</script>
|
||||||
</script>
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,19 +1,19 @@
|
|||||||
{% extends "core/base.jinja" %}
|
{% extends "core/base.jinja" %}
|
||||||
|
|
||||||
{% block title %}
|
{% 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 %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
{% if customer %}
|
{% if customer %}
|
||||||
<h3>{% trans %}User account{% endtrans %}</h3>
|
<h3>{% trans %}User account{% endtrans %}</h3>
|
||||||
<p>{% trans %}Amount: {% endtrans %}{{ customer.amount }} €</p>
|
<p>{% trans %}Amount: {% endtrans %}{{ customer.amount }} €</p>
|
||||||
<p><a href="{{ url('core:user_account', user_id=profile.id) }}">{% trans %}Back{% endtrans %}</a></p>
|
<p><a href="{{ url('core:user_account', user_id=profile.id) }}">{% trans %}Back{% endtrans %}</a></p>
|
||||||
{% if customer.buyings.exists() %}
|
{% if customer.buyings.exists() %}
|
||||||
<h4>{% trans %}Account purchases{% endtrans %}</h4>
|
<h4>{% trans %}Account purchases{% endtrans %}</h4>
|
||||||
<table>
|
<table>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<td>{% trans %}Date{% endtrans %}</td>
|
<td>{% trans %}Date{% endtrans %}</td>
|
||||||
<td>{% trans %}Counter{% endtrans %}</td>
|
<td>{% trans %}Counter{% endtrans %}</td>
|
||||||
<td>{% trans %}Barman{% endtrans %}</td>
|
<td>{% trans %}Barman{% endtrans %}</td>
|
||||||
@ -21,85 +21,85 @@
|
|||||||
<td>{% trans %}Quantity{% endtrans %}</td>
|
<td>{% trans %}Quantity{% endtrans %}</td>
|
||||||
<td>{% trans %}Total{% endtrans %}</td>
|
<td>{% trans %}Total{% endtrans %}</td>
|
||||||
<td>{% trans %}Payment method{% endtrans %}</td>
|
<td>{% trans %}Payment method{% endtrans %}</td>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
{% for i in customer.buyings.order_by('-date').all().filter(
|
||||||
|
date__year=year, date__month=month) %}
|
||||||
|
<tr>
|
||||||
|
<td>{{ i.date|localtime|date(DATETIME_FORMAT) }} - {{ i.date|localtime|time(DATETIME_FORMAT) }}</td>
|
||||||
|
<td>{{ i.counter }}</td>
|
||||||
|
<td><a href="{{ i.seller.get_absolute_url() }}">{{ i.seller.get_display_name() }}</a></td>
|
||||||
|
<td>{{ i.label }}</td>
|
||||||
|
<td>{{ i.quantity }}</td>
|
||||||
|
<td>{{ i.quantity * i.unit_price }} €</td>
|
||||||
|
<td>{{ i.get_payment_method_display() }}</td>
|
||||||
|
{% if i.is_owned_by(user) %}
|
||||||
|
<td><a href="{{ url('counter:selling_delete', selling_id=i.id) }}">{% trans %}Delete{% endtrans %}</a></td>
|
||||||
|
{% endif %}
|
||||||
|
</tr>
|
||||||
|
{% endfor %}
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
{% endif %}
|
||||||
|
{% if customer.refillings.exists() %}
|
||||||
|
<h4>{% trans %}Reloads{% endtrans %}</h4>
|
||||||
|
<table>
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<td>{% trans %}Date{% endtrans %}</td>
|
||||||
|
<td>{% trans %}Counter{% endtrans %}</td>
|
||||||
|
<td>{% trans %}Barman{% endtrans %}</td>
|
||||||
|
<td>{% trans %}Amount{% endtrans %}</td>
|
||||||
|
<td>{% trans %}Payment method{% endtrans %}</td>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
{% 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) %}
|
||||||
|
<tr>
|
||||||
|
<td>{{ i.date|localtime|date(DATETIME_FORMAT) }} - {{ i.date|localtime|time(DATETIME_FORMAT) }}</td>
|
||||||
|
<td>{{ i.counter }}</td>
|
||||||
|
<td><a href="{{ i.operator.get_absolute_url() }}">{{ i.operator.get_display_name() }}</a></td>
|
||||||
|
<td>{{ i.amount }} €</td>
|
||||||
|
<td>{{ i.get_payment_method_display() }}</td>
|
||||||
|
{% if i.is_owned_by(user) %}
|
||||||
|
<td><a href="{{ url('counter:refilling_delete', refilling_id=i.id) }}">{% trans %}Delete{% endtrans %}</a></td>
|
||||||
|
{% endif %}
|
||||||
|
</tr>
|
||||||
|
{% endfor %}
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
{% endif %}
|
||||||
|
{% if customer.user.invoices.exists() %}
|
||||||
|
<h4>{% trans %}Eboutic invoices{% endtrans %}</h4>
|
||||||
|
<table>
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<td>{% trans %}Date{% endtrans %}</td>
|
||||||
|
<td>{% trans %}Items{% endtrans %}</td>
|
||||||
|
<td>{% trans %}Amount{% endtrans %}</td>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
{% for i in customer.user.invoices.order_by('-date').all().filter(
|
||||||
date__year=year, date__month=month) %}
|
date__year=year, date__month=month) %}
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{ i.date|localtime|date(DATETIME_FORMAT) }} - {{ i.date|localtime|time(DATETIME_FORMAT) }}</td>
|
<td>{{ i.date|localtime|date(DATETIME_FORMAT) }} - {{ i.date|localtime|time(DATETIME_FORMAT) }}</td>
|
||||||
<td>{{ i.counter }}</td>
|
<td>
|
||||||
<td><a href="{{ i.seller.get_absolute_url() }}">{{ i.seller.get_display_name() }}</a></td>
|
|
||||||
<td>{{ i.label }}</td>
|
|
||||||
<td>{{ i.quantity }}</td>
|
|
||||||
<td>{{ i.quantity * i.unit_price }} €</td>
|
|
||||||
<td>{{ i.get_payment_method_display() }}</td>
|
|
||||||
{% if i.is_owned_by(user) %}
|
|
||||||
<td><a href="{{ url('counter:selling_delete', selling_id=i.id) }}">{% trans %}Delete{% endtrans %}</a></td>
|
|
||||||
{% endif %}
|
|
||||||
</tr>
|
|
||||||
{% endfor %}
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
{% endif %}
|
|
||||||
{% if customer.refillings.exists() %}
|
|
||||||
<h4>{% trans %}Reloads{% endtrans %}</h4>
|
|
||||||
<table>
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<td>{% trans %}Date{% endtrans %}</td>
|
|
||||||
<td>{% trans %}Counter{% endtrans %}</td>
|
|
||||||
<td>{% trans %}Barman{% endtrans %}</td>
|
|
||||||
<td>{% trans %}Amount{% endtrans %}</td>
|
|
||||||
<td>{% trans %}Payment method{% endtrans %}</td>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
{% for i in customer.refillings.order_by('-date').filter( date__year=year, date__month=month) %}
|
|
||||||
<tr>
|
|
||||||
<td>{{ i.date|localtime|date(DATETIME_FORMAT) }} - {{ i.date|localtime|time(DATETIME_FORMAT) }}</td>
|
|
||||||
<td>{{ i.counter }}</td>
|
|
||||||
<td><a href="{{ i.operator.get_absolute_url() }}">{{ i.operator.get_display_name() }}</a></td>
|
|
||||||
<td>{{ i.amount }} €</td>
|
|
||||||
<td>{{ i.get_payment_method_display() }}</td>
|
|
||||||
{% if i.is_owned_by(user) %}
|
|
||||||
<td><a href="{{ url('counter:refilling_delete', refilling_id=i.id) }}">{% trans %}Delete{% endtrans %}</a></td>
|
|
||||||
{% endif %}
|
|
||||||
</tr>
|
|
||||||
{% endfor %}
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
{% endif %}
|
|
||||||
{% if customer.user.invoices.exists() %}
|
|
||||||
<h4>{% trans %}Eboutic invoices{% endtrans %}</h4>
|
|
||||||
<table>
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<td>{% trans %}Date{% endtrans %}</td>
|
|
||||||
<td>{% trans %}Items{% endtrans %}</td>
|
|
||||||
<td>{% trans %}Amount{% endtrans %}</td>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
{% for i in customer.user.invoices.order_by('-date').all().filter(
|
|
||||||
date__year=year, date__month=month) %}
|
|
||||||
<tr>
|
|
||||||
<td>{{ i.date|localtime|date(DATETIME_FORMAT) }} - {{ i.date|localtime|time(DATETIME_FORMAT) }}</td>
|
|
||||||
<td>
|
|
||||||
<ul>
|
<ul>
|
||||||
{% for it in i.items.all() %}
|
{% for it in i.items.all() %}
|
||||||
<li>{{ it.quantity }} x {{ it.product_name }} - {{ it.product_unit_price }} €</li>
|
<li>{{ it.quantity }} x {{ it.product_name }} - {{ it.product_unit_price }} €</li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
</td>
|
</td>
|
||||||
<td>{{ i.get_total() }} €</td>
|
<td>{{ i.get_total() }} €</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% else %}
|
{% else %}
|
||||||
<p>{% trans %}User has no account{% endtrans %}</p>
|
<p>{% trans %}User has no account{% endtrans %}</p>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<p><a href="{{ url('core:user_account', user_id=profile.id) }}">{% trans %}Back{% endtrans %}</a></p>
|
<p><a href="{{ url('core:user_account', user_id=profile.id) }}">{% trans %}Back{% endtrans %}</a></p>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@ -1,80 +1,80 @@
|
|||||||
{% extends "core/base.jinja" %}
|
{% extends "core/base.jinja" %}
|
||||||
|
|
||||||
{% block title %}
|
{% 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 %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<h3>{% trans%}Club(s){% endtrans %}</h3>
|
<h3>{% trans%}Club(s){% endtrans %}</h3>
|
||||||
<br>
|
<br>
|
||||||
<h4>{% trans%}Current club(s) :{% endtrans %}</h4>
|
<h4>{% trans%}Current club(s) :{% endtrans %}</h4>
|
||||||
<br>
|
<br>
|
||||||
<table>
|
<table>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<td>{% trans %}Club{% endtrans %}</td>
|
<td>{% trans %}Club{% endtrans %}</td>
|
||||||
<td>{% trans %}Role{% endtrans %}</td>
|
<td>{% trans %}Role{% endtrans %}</td>
|
||||||
<td>{% trans %}Description{% endtrans %}</td>
|
<td>{% trans %}Description{% endtrans %}</td>
|
||||||
<td>{% trans %}Since{% endtrans %}</td>
|
<td>{% trans %}Since{% endtrans %}</td>
|
||||||
<td></td>
|
<td></td>
|
||||||
<td></td>
|
<td></td>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
{% for m in profile.memberships.filter(end_date=None).all() %}
|
{% for m in profile.memberships.filter(end_date=None).all() %}
|
||||||
<tr>
|
<tr>
|
||||||
<td><a href="{{ url('club:club_members', club_id=m.club.id) }}">{{ m.club }}</a></td>
|
<td><a href="{{ url('club:club_members', club_id=m.club.id) }}">{{ m.club }}</a></td>
|
||||||
<td>{{ settings.SITH_CLUB_ROLES[m.role] }}</td>
|
<td>{{ settings.SITH_CLUB_ROLES[m.role] }}</td>
|
||||||
<td>{{ m.description }}</td>
|
<td>{{ m.description }}</td>
|
||||||
<td>{{ m.start_date }}</td>
|
<td>{{ m.start_date }}</td>
|
||||||
{% if m.can_be_edited_by(user) %}
|
{% if m.can_be_edited_by(user) %}
|
||||||
<td><a href="{{ url('club:membership_set_old', membership_id=m.id) }}">{% trans %}Mark as old{% endtrans %}</a></td>
|
<td><a href="{{ url('club:membership_set_old', membership_id=m.id) }}">{% trans %}Mark as old{% endtrans %}</a></td>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if user.is_root %}
|
{% if user.is_root %}
|
||||||
<td><a href="{{ url('club:membership_delete', membership_id=m.id) }}">{% trans %}Delete{% endtrans %}</a></td>
|
<td><a href="{{ url('club:membership_delete', membership_id=m.id) }}">{% trans %}Delete{% endtrans %}</a></td>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
<br>
|
<br>
|
||||||
<h4>{% trans%}Old club(s) :{% endtrans %}</h4>
|
<h4>{% trans%}Old club(s) :{% endtrans %}</h4>
|
||||||
<br>
|
<br>
|
||||||
<table>
|
<table>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<td>{% trans %}Club{% endtrans %}</td>
|
<td>{% trans %}Club{% endtrans %}</td>
|
||||||
<td>{% trans %}Role{% endtrans %}</td>
|
<td>{% trans %}Role{% endtrans %}</td>
|
||||||
<td>{% trans %}Description{% endtrans %}</td>
|
<td>{% trans %}Description{% endtrans %}</td>
|
||||||
<td>{% trans %}From{% endtrans %}</td>
|
<td>{% trans %}From{% endtrans %}</td>
|
||||||
<td>{% trans %}To{% endtrans %}</td>
|
<td>{% trans %}To{% endtrans %}</td>
|
||||||
|
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
{% for m in profile.memberships.exclude(end_date=None).all() %}
|
{% for m in profile.memberships.exclude(end_date=None).all() %}
|
||||||
<tr>
|
<tr>
|
||||||
<td><a href="{{ url('club:club_members', club_id=m.club.id) }}">{{ m.club }}</a></td>
|
<td><a href="{{ url('club:club_members', club_id=m.club.id) }}">{{ m.club }}</a></td>
|
||||||
<td>{{ settings.SITH_CLUB_ROLES[m.role] }}</td>
|
<td>{{ settings.SITH_CLUB_ROLES[m.role] }}</td>
|
||||||
<td>{{ m.description }}</td>
|
<td>{{ m.description }}</td>
|
||||||
<td>{{ m.start_date }}</td>
|
<td>{{ m.start_date }}</td>
|
||||||
<td>{{ m.end_date }}</td>
|
<td>{{ m.end_date }}</td>
|
||||||
{% if user.is_root %}
|
{% if user.is_root %}
|
||||||
<td><a href="{{ url('club:membership_delete', membership_id=m.id) }}">{% trans %}Delete{% endtrans %}</a></td>
|
<td><a href="{{ url('club:membership_delete', membership_id=m.id) }}">{% trans %}Delete{% endtrans %}</a></td>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
{% if
|
{% if
|
||||||
profile.mailing_subscriptions.exists()
|
profile.mailing_subscriptions.exists()
|
||||||
and (profile.id == user.id or user.is_root or user.is_com_admin)
|
and (profile.id == user.id or user.is_root or user.is_com_admin)
|
||||||
%}
|
%}
|
||||||
<h4>{% trans %}Subscribed mailing lists{% endtrans %}</h4>
|
<h4>{% trans %}Subscribed mailing lists{% endtrans %}</h4>
|
||||||
{% for sub in profile.mailing_subscriptions.all() %}
|
{% for sub in profile.mailing_subscriptions.all() %}
|
||||||
<p>{{ sub.mailing.email }} <a href="{{ url('club:mailing_subscription_delete', mailing_subscription_id=sub.id) }}">{% trans %}Unsubscribe{% endtrans %}</a></p>
|
<p>{{ sub.mailing.email }} <a href="{{ url('club:mailing_subscription_delete', mailing_subscription_id=sub.id) }}">{% trans %}Unsubscribe{% endtrans %}</a></p>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
@ -2,279 +2,279 @@
|
|||||||
{% from "core/macros.jinja" import show_slots, show_tokens, user_subscription %}
|
{% from "core/macros.jinja" import show_slots, show_tokens, user_subscription %}
|
||||||
|
|
||||||
{%- block additional_css -%}
|
{%- block additional_css -%}
|
||||||
<link rel="stylesheet" href="{{ scss('user/user_detail.scss') }}">
|
<link rel="stylesheet" href="{{ scss('user/user_detail.scss') }}">
|
||||||
{%- endblock -%}
|
{%- endblock -%}
|
||||||
|
|
||||||
{% block title %}
|
{% 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 %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block additional_js %}
|
{% block additional_js %}
|
||||||
<script src="{{ static('core/js/alpinejs.min.js') }}" defer></script>
|
<script src="{{ static('core/js/alpinejs.min.js') }}" defer></script>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div class="user_profile_page" x-data>
|
<div class="user_profile_page" x-data>
|
||||||
<div class="user_profile">
|
<div class="user_profile">
|
||||||
<!-- Profile -->
|
<!-- Profile -->
|
||||||
<div class="user-name">
|
<div class="user-name">
|
||||||
<h3>{{ profile.get_full_name() }}</h3>
|
<h3>{{ profile.get_full_name() }}</h3>
|
||||||
{% if profile.nick_name %}
|
{% if profile.nick_name %}
|
||||||
<div class="user_profile_infos_nick">« {{ profile.nick_name }} »</div>
|
<div class="user_profile_infos_nick">« {{ profile.nick_name }} »</div>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="infos-and-picture">
|
||||||
|
<div class="user_profile_infos">
|
||||||
|
{% if profile.quote %}
|
||||||
|
<div class="user_profile_infos_quote">
|
||||||
|
{{ profile.quote }}
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
<div class="user_profile_infos_items">
|
||||||
|
{% if profile.pronouns %}
|
||||||
|
<div>
|
||||||
|
<span class="user_profile_infos_item">{% trans %}Pronouns: {% endtrans %}</span>
|
||||||
|
<span class="user_profile_infos_item_value">{{ profile.pronouns }}</span>
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
{% if profile.date_of_birth %}
|
||||||
|
<div>
|
||||||
|
<span class="user_profile_infos_item">{% trans %}Born: {% endtrans %}</span>
|
||||||
|
<span class="user_profile_infos_item_value">{{ profile.date_of_birth|date("d/m/Y") }}</span>
|
||||||
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="infos-and-picture">
|
{% if profile.department != "NA" %}
|
||||||
<div class="user_profile_infos">
|
<div>
|
||||||
{% if profile.quote %}
|
<span class="user_profile_infos_item">{% trans %}Department: {% endtrans %}</span>
|
||||||
<div class="user_profile_infos_quote">
|
<span class="user_profile_infos_item_value">{{ profile.department }}{{ profile.semester
|
||||||
{{ profile.quote }}
|
}}</span>
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% if profile.dpt_option %}
|
||||||
|
<div>
|
||||||
|
<span class="user_profile_infos_item">{% trans %}Option: {% endtrans %}</span>
|
||||||
|
<span class="user_profile_infos_item_value">{{ profile.dpt_option }}</span>
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% if profile.phone %}
|
||||||
|
<div>
|
||||||
|
<span class="user_profile_infos_item">{% trans %}Phone: {% endtrans %}</span>
|
||||||
|
<span class="user_profile_infos_item_value">{{ profile.phone }}</span>
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% if profile.address %}
|
||||||
|
<div>
|
||||||
|
<span class="user_profile_infos_item">{% trans %}Address: {% endtrans %}</span>
|
||||||
|
<span class="user_profile_infos_item_value">{{ profile.address }}</span>
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% if profile.parent_address %}
|
||||||
|
<div>
|
||||||
|
<span class="user_profile_infos_item">{% trans %}Parents address: {% endtrans %}</span>
|
||||||
|
<span class="user_profile_infos_item_value">{{ profile.parent_address }}</span>
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{% if profile.promo %}
|
||||||
|
<br>
|
||||||
|
<div class="user_profile_infos_promo">
|
||||||
|
{% trans %}Promo: {% endtrans %}{{ profile.promo }}
|
||||||
|
{% if profile.promo_has_logo() %}
|
||||||
|
<img src="{{ static('core/img/promo_%02d.png' % profile.promo) }}" alt="Promo {{ profile.promo }}" />
|
||||||
|
{% else %}
|
||||||
|
<div>
|
||||||
|
<span>¯\_(ツ)_/¯</span>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<div class="user_profile_infos_items">
|
|
||||||
{% if profile.pronouns %}
|
|
||||||
<div>
|
|
||||||
<span class="user_profile_infos_item">{% trans %}Pronouns: {% endtrans %}</span>
|
|
||||||
<span class="user_profile_infos_item_value">{{ profile.pronouns }}</span>
|
|
||||||
</div>
|
|
||||||
{% endif %}
|
|
||||||
{% if profile.date_of_birth %}
|
|
||||||
<div>
|
|
||||||
<span class="user_profile_infos_item">{% trans %}Born: {% endtrans %}</span>
|
|
||||||
<span class="user_profile_infos_item_value">{{ profile.date_of_birth|date("d/m/Y") }}</span>
|
|
||||||
</div>
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
{% if profile.department != "NA" %}
|
|
||||||
<div>
|
|
||||||
<span class="user_profile_infos_item">{% trans %}Department: {% endtrans %}</span>
|
|
||||||
<span class="user_profile_infos_item_value">{{ profile.department }}{{ profile.semester
|
|
||||||
}}</span>
|
|
||||||
</div>
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
{% if profile.dpt_option %}
|
|
||||||
<div>
|
|
||||||
<span class="user_profile_infos_item">{% trans %}Option: {% endtrans %}</span>
|
|
||||||
<span class="user_profile_infos_item_value">{{ profile.dpt_option }}</span>
|
|
||||||
</div>
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
{% if profile.phone %}
|
|
||||||
<div>
|
|
||||||
<span class="user_profile_infos_item">{% trans %}Phone: {% endtrans %}</span>
|
|
||||||
<span class="user_profile_infos_item_value">{{ profile.phone }}</span>
|
|
||||||
</div>
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
{% if profile.address %}
|
|
||||||
<div>
|
|
||||||
<span class="user_profile_infos_item">{% trans %}Address: {% endtrans %}</span>
|
|
||||||
<span class="user_profile_infos_item_value">{{ profile.address }}</span>
|
|
||||||
</div>
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
{% if profile.parent_address %}
|
|
||||||
<div>
|
|
||||||
<span class="user_profile_infos_item">{% trans %}Parents address: {% endtrans %}</span>
|
|
||||||
<span class="user_profile_infos_item_value">{{ profile.parent_address }}</span>
|
|
||||||
</div>
|
|
||||||
{% endif %}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{% if profile.promo %}
|
|
||||||
<br>
|
|
||||||
<div class="user_profile_infos_promo">
|
|
||||||
{% trans %}Promo: {% endtrans %}{{ profile.promo }}
|
|
||||||
{% if profile.promo_has_logo() %}
|
|
||||||
<img src="{{ static('core/img/promo_%02d.png' % profile.promo) }}" alt="Promo {{ profile.promo }}" />
|
|
||||||
{% else %}
|
|
||||||
<div>
|
|
||||||
<span>¯\_(ツ)_/¯</span>
|
|
||||||
</div>
|
|
||||||
{% endif %}
|
|
||||||
</div>
|
|
||||||
{% endif %}
|
|
||||||
</div>
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
<!-- Pictures -->
|
<!-- Pictures -->
|
||||||
<div class="user_profile_pictures">
|
<div class="user_profile_pictures">
|
||||||
<div class="user_profile_pictures_bigone" id="big_picture">
|
<div class="user_profile_pictures_bigone" id="big_picture">
|
||||||
{% if profile.profile_pict %}
|
{% if profile.profile_pict %}
|
||||||
<img src="{{ profile.profile_pict.get_download_url() }}" alt="{% trans %}Profile{% endtrans %}"
|
<img src="{{ profile.profile_pict.get_download_url() }}" alt="{% trans %}Profile{% endtrans %}"
|
||||||
title="{% trans %}Profile{% endtrans %}" />
|
title="{% trans %}Profile{% endtrans %}" />
|
||||||
{% else %}
|
{% else %}
|
||||||
<img src="{{ static('core/img/unknown.jpg') }}" alt="{% trans %}Profile{% endtrans %}"
|
<img src="{{ static('core/img/unknown.jpg') }}" alt="{% trans %}Profile{% endtrans %}"
|
||||||
title="{% trans %}Profile{% endtrans %}" />
|
title="{% trans %}Profile{% endtrans %}" />
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
<div class="user_profile_pictures_thumbnails" id="small_pictures">
|
<div class="user_profile_pictures_thumbnails" id="small_pictures">
|
||||||
{% if profile.profile_pict %}
|
{% if profile.profile_pict %}
|
||||||
<img src="{{ profile.profile_pict.get_download_url() }}" alt="{% trans %}Profile{% endtrans %}"
|
<img src="{{ profile.profile_pict.get_download_url() }}" alt="{% trans %}Profile{% endtrans %}"
|
||||||
title="{% trans %}Profile{% endtrans %}" />
|
title="{% trans %}Profile{% endtrans %}" />
|
||||||
{% else %}
|
{% else %}
|
||||||
<img src="{{ static('core/img/unknown.jpg') }}" alt="{% trans %}Profile{% endtrans %}"
|
<img src="{{ static('core/img/unknown.jpg') }}" alt="{% trans %}Profile{% endtrans %}"
|
||||||
title="{% trans %}Profile{% endtrans %}" />
|
title="{% trans %}Profile{% endtrans %}" />
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if profile.avatar_pict %}
|
{% if profile.avatar_pict %}
|
||||||
<img src="{{ profile.avatar_pict.get_download_url() }}" alt="{% trans %}Avatar{% endtrans %}"
|
<img src="{{ profile.avatar_pict.get_download_url() }}" alt="{% trans %}Avatar{% endtrans %}"
|
||||||
title="{% trans %}Avatar{% endtrans %}" />
|
title="{% trans %}Avatar{% endtrans %}" />
|
||||||
{% else %}
|
{% else %}
|
||||||
<img src="{{ static('core/img/unknown.jpg') }}" alt="{% trans %}Avatar{% endtrans %}"
|
<img src="{{ static('core/img/unknown.jpg') }}" alt="{% trans %}Avatar{% endtrans %}"
|
||||||
title="{% trans %}Avatar{% endtrans %}" />
|
title="{% trans %}Avatar{% endtrans %}" />
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if profile.scrub_pict %}
|
{% if profile.scrub_pict %}
|
||||||
<img src="{{ profile.scrub_pict.get_download_url() }}" alt="{% trans %}Scrub{% endtrans %}"
|
<img src="{{ profile.scrub_pict.get_download_url() }}" alt="{% trans %}Scrub{% endtrans %}"
|
||||||
title="{% trans %}Scrub{% endtrans %}" />
|
title="{% trans %}Scrub{% endtrans %}" />
|
||||||
{% else %}
|
{% else %}
|
||||||
<img src="{{ static('core/img/unknown.jpg') }}" alt="{% trans %}Scrub{% endtrans %}"
|
<img src="{{ static('core/img/unknown.jpg') }}" alt="{% trans %}Scrub{% endtrans %}"
|
||||||
title="{% trans %}Scrub{% endtrans %}" />
|
title="{% trans %}Scrub{% endtrans %}" />
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
</main>
|
</main>
|
||||||
{% if
|
{% if
|
||||||
user == profile
|
user == profile
|
||||||
or user.memberships.ongoing().exists()
|
or user.memberships.ongoing().exists()
|
||||||
or user.is_board_member
|
or user.is_board_member
|
||||||
or user.is_in_group(name=settings.SITH_BAR_MANAGER_BOARD_GROUP)
|
or user.is_in_group(name=settings.SITH_BAR_MANAGER_BOARD_GROUP)
|
||||||
%}
|
%}
|
||||||
{# if the user is member of a club, he can view the subscription state #}
|
{# if the user is member of a club, he can view the subscription state #}
|
||||||
<hr>
|
<hr>
|
||||||
{% if profile.is_subscribed %}
|
{% if profile.is_subscribed %}
|
||||||
{% if user == profile or user.is_root or user.is_board_member %}
|
{% if user == profile or user.is_root or user.is_board_member %}
|
||||||
<div>
|
|
||||||
{{ user_subscription(profile) }}
|
|
||||||
</div>
|
|
||||||
{% endif %}
|
|
||||||
{% if user == profile or user.is_root or user.is_board_member or user.is_launderette_manager %}
|
|
||||||
<div>
|
|
||||||
{# Shows tokens bought by the user #}
|
|
||||||
{{ show_tokens(profile) }}
|
|
||||||
{# Shows slots took by the user #}
|
|
||||||
{{ show_slots(profile) }}
|
|
||||||
</div>
|
|
||||||
{% endif %}
|
|
||||||
{% else %}
|
|
||||||
<div>
|
|
||||||
{% trans %}Not subscribed{% endtrans %}
|
|
||||||
{% if user.is_board_member %}
|
|
||||||
<a href="{{ url('subscription:subscription') }}?member={{ profile.id }}">
|
|
||||||
{% trans %}New subscription{% endtrans %}
|
|
||||||
</a>
|
|
||||||
{% endif %}
|
|
||||||
{% endif %}
|
|
||||||
</div>
|
|
||||||
{% endif %}
|
|
||||||
<br>
|
|
||||||
{% if profile.was_subscribed and (user == profile or user.can_read_subscription_history)%}
|
|
||||||
<div class="collapse" :class="{'shadow': collapsed}" x-data="{collapsed: false}" x-cloak>
|
|
||||||
<div class="collapse-header clickable" @click="collapsed = !collapsed">
|
|
||||||
<span class="collapse-header-text">
|
|
||||||
{% trans %}Subscription history{% endtrans %}
|
|
||||||
</span>
|
|
||||||
<span class="collapse-header-icon" :class="{'reverse': collapsed}">
|
|
||||||
<i class="fa fa-caret-down"></i>
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
<div class="collapse-body" x-show="collapsed" x-transition.scale.origin.top>
|
|
||||||
<table>
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th>{% trans %}Subscription start{% endtrans %}</th>
|
|
||||||
<th>{% trans %}Subscription end{% endtrans %}</th>
|
|
||||||
<th>{% trans %}Subscription type{% endtrans %}</th>
|
|
||||||
<th>{% trans %}Payment method{% endtrans %}</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
{% for sub in profile.subscriptions.all() %}
|
|
||||||
<tr>
|
|
||||||
<td>{{ sub.subscription_start }}</td>
|
|
||||||
<td>{{ sub.subscription_end }}</td>
|
|
||||||
<td>{{ sub.subscription_type }}</td>
|
|
||||||
<td>{{ sub.get_payment_method_display() }}</td>
|
|
||||||
</tr>
|
|
||||||
{% endfor %}
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
<hr>
|
|
||||||
<div>
|
<div>
|
||||||
{% if user.is_root or user.is_board_member %}
|
{{ user_subscription(profile) }}
|
||||||
<form class="form-gifts" action="{{ url('core:user_gift_create', user_id=profile.id) }}" method="post">
|
|
||||||
{% csrf_token %}
|
|
||||||
{{ gift_form.label }}
|
|
||||||
{{ gift_form.user }}
|
|
||||||
<input type="submit" value="{% trans %}Give gift{% endtrans %}">
|
|
||||||
</form>
|
|
||||||
{% if profile.gifts.exists() %}
|
|
||||||
{% set gifts = profile.gifts.order_by("-date")|list %}
|
|
||||||
<br>
|
|
||||||
<div class="collapse" :class="{'shadow': collapsed}" x-data="{collapsed: false}" x-cloak>
|
|
||||||
<div class="collapse-header clickable" @click="collapsed = !collapsed">
|
|
||||||
<span class="collapse-header-text">
|
|
||||||
{% trans %}Last given gift :{% endtrans %} {{ gifts[0] }}
|
|
||||||
</span>
|
|
||||||
<span class="collapse-header-icon" :class="{'reverse': collapsed}">
|
|
||||||
<i class="fa fa-caret-down"></i>
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
<div class="collapse-body" x-show="collapsed" x-transition.scale.origin.top>
|
|
||||||
<ul>
|
|
||||||
{% for gift in gifts %}
|
|
||||||
<li>{{ gift }}
|
|
||||||
<a href="{{ url('core:user_gift_delete', user_id=profile.id, gift_id=gift.id) }}">
|
|
||||||
<i class="fa fa-trash"></i>
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
{% endfor %}
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
{% else %}
|
|
||||||
<em>{% trans %}No gift given yet{% endtrans %}</em>
|
|
||||||
{% endif %}
|
|
||||||
</div>
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
{% if user == profile or user.is_root or user.is_board_member or user.is_launderette_manager %}
|
||||||
|
<div>
|
||||||
|
{# Shows tokens bought by the user #}
|
||||||
|
{{ show_tokens(profile) }}
|
||||||
|
{# Shows slots took by the user #}
|
||||||
|
{{ show_slots(profile) }}
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
{% else %}
|
||||||
|
<div>
|
||||||
|
{% trans %}Not subscribed{% endtrans %}
|
||||||
|
{% if user.is_board_member %}
|
||||||
|
<a href="{{ url('subscription:subscription') }}?member={{ profile.id }}">
|
||||||
|
{% trans %}New subscription{% endtrans %}
|
||||||
|
</a>
|
||||||
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
<br>
|
||||||
|
{% if profile.was_subscribed and (user == profile or user.can_read_subscription_history)%}
|
||||||
|
<div class="collapse" :class="{'shadow': collapsed}" x-data="{collapsed: false}" x-cloak>
|
||||||
|
<div class="collapse-header clickable" @click="collapsed = !collapsed">
|
||||||
|
<span class="collapse-header-text">
|
||||||
|
{% trans %}Subscription history{% endtrans %}
|
||||||
|
</span>
|
||||||
|
<span class="collapse-header-icon" :class="{'reverse': collapsed}">
|
||||||
|
<i class="fa fa-caret-down"></i>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<div class="collapse-body" x-show="collapsed" x-transition.scale.origin.top>
|
||||||
|
<table>
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>{% trans %}Subscription start{% endtrans %}</th>
|
||||||
|
<th>{% trans %}Subscription end{% endtrans %}</th>
|
||||||
|
<th>{% trans %}Subscription type{% endtrans %}</th>
|
||||||
|
<th>{% trans %}Payment method{% endtrans %}</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
{% for sub in profile.subscriptions.all() %}
|
||||||
|
<tr>
|
||||||
|
<td>{{ sub.subscription_start }}</td>
|
||||||
|
<td>{{ sub.subscription_end }}</td>
|
||||||
|
<td>{{ sub.subscription_type }}</td>
|
||||||
|
<td>{{ sub.get_payment_method_display() }}</td>
|
||||||
|
</tr>
|
||||||
|
{% endfor %}
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
<hr>
|
||||||
|
<div>
|
||||||
|
{% if user.is_root or user.is_board_member %}
|
||||||
|
<form class="form-gifts" action="{{ url('core:user_gift_create', user_id=profile.id) }}" method="post">
|
||||||
|
{% csrf_token %}
|
||||||
|
{{ gift_form.label }}
|
||||||
|
{{ gift_form.user }}
|
||||||
|
<input type="submit" value="{% trans %}Give gift{% endtrans %}">
|
||||||
|
</form>
|
||||||
|
{% if profile.gifts.exists() %}
|
||||||
|
{% set gifts = profile.gifts.order_by("-date")|list %}
|
||||||
|
<br>
|
||||||
|
<div class="collapse" :class="{'shadow': collapsed}" x-data="{collapsed: false}" x-cloak>
|
||||||
|
<div class="collapse-header clickable" @click="collapsed = !collapsed">
|
||||||
|
<span class="collapse-header-text">
|
||||||
|
{% trans %}Last given gift :{% endtrans %} {{ gifts[0] }}
|
||||||
|
</span>
|
||||||
|
<span class="collapse-header-icon" :class="{'reverse': collapsed}">
|
||||||
|
<i class="fa fa-caret-down"></i>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<div class="collapse-body" x-show="collapsed" x-transition.scale.origin.top>
|
||||||
|
<ul>
|
||||||
|
{% for gift in gifts %}
|
||||||
|
<li>{{ gift }}
|
||||||
|
<a href="{{ url('core:user_gift_delete', user_id=profile.id, gift_id=gift.id) }}">
|
||||||
|
<i class="fa fa-trash"></i>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
{% endfor %}
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
{% else %}
|
||||||
|
<em>{% trans %}No gift given yet{% endtrans %}</em>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block script %}
|
{% block script %}
|
||||||
{{ super() }}
|
{{ super() }}
|
||||||
<script>
|
<script>
|
||||||
$(function () {
|
$(function () {
|
||||||
var keys = [];
|
var keys = [];
|
||||||
var pattern = "71,85,89,71,85,89";
|
var pattern = "71,85,89,71,85,89";
|
||||||
$(document).keydown(function (e) {
|
$(document).keydown(function (e) {
|
||||||
keys.push(e.keyCode);
|
keys.push(e.keyCode);
|
||||||
if (keys.toString() == pattern) {
|
if (keys.toString() == pattern) {
|
||||||
keys = [];
|
keys = [];
|
||||||
$("#big_picture img").attr("src", "{{ static('core/img/yug.jpg') }}");
|
$("#big_picture img").attr("src", "{{ static('core/img/yug.jpg') }}");
|
||||||
}
|
}
|
||||||
if (keys.length == 6) {
|
if (keys.length == 6) {
|
||||||
keys.shift();
|
keys.shift();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
$(function () {
|
$(function () {
|
||||||
$("#small_pictures img").click(function () {
|
$("#small_pictures img").click(function () {
|
||||||
$("#big_picture img").attr("src", $(this)[0].src);
|
$("#big_picture img").attr("src", $(this)[0].src);
|
||||||
$("#big_picture img").attr("alt", $(this)[0].alt);
|
$("#big_picture img").attr("alt", $(this)[0].alt);
|
||||||
$("#big_picture img").attr("title", $(this)[0].title);
|
$("#big_picture img").attr("title", $(this)[0].title);
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
$(function () {
|
$(function () {
|
||||||
$("#drop_gifts").accordion({
|
$("#drop_gifts").accordion({
|
||||||
heightStyle: "content",
|
heightStyle: "content",
|
||||||
collapsible: true,
|
collapsible: true,
|
||||||
active: false
|
active: false
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
{% endblock %}
|
{% endblock %}
|
@ -1,166 +1,166 @@
|
|||||||
{%- extends "core/base.jinja" -%}
|
{%- extends "core/base.jinja" -%}
|
||||||
|
|
||||||
{%- block title -%}
|
{%- block title -%}
|
||||||
{%- trans -%}Edit user{%- endtrans -%}
|
{%- trans -%}Edit user{%- endtrans -%}
|
||||||
{%- endblock -%}
|
{%- endblock -%}
|
||||||
|
|
||||||
{%- block additional_css -%}
|
{%- block additional_css -%}
|
||||||
<link rel="stylesheet" href="{{ scss('user/user_edit.scss') }}">
|
<link rel="stylesheet" href="{{ scss('user/user_edit.scss') }}">
|
||||||
{%- endblock -%}
|
{%- endblock -%}
|
||||||
|
|
||||||
{%- block content -%}
|
{%- block content -%}
|
||||||
<h2 class="title">{%- trans -%}Edit user profile{%- endtrans -%}</h2>
|
<h2 class="title">{%- trans -%}Edit user profile{%- endtrans -%}</h2>
|
||||||
<form action="" method="post" enctype="multipart/form-data" id="user_edit">
|
<form action="" method="post" enctype="multipart/form-data" id="user_edit">
|
||||||
|
|
||||||
{%- csrf_token -%}
|
{%- csrf_token -%}
|
||||||
{{ form.non_field_errors() }}
|
{{ form.non_field_errors() }}
|
||||||
|
|
||||||
{# User Pictures #}
|
{# User Pictures #}
|
||||||
<div class="profile-pictures">
|
<div class="profile-pictures">
|
||||||
<div class="profile-picture">
|
<div class="profile-picture">
|
||||||
<div class="profile-picture-display">
|
<div class="profile-picture-display">
|
||||||
|
|
||||||
{%- if form.instance.profile_pict -%}
|
{%- if form.instance.profile_pict -%}
|
||||||
<img src="{{ form.instance.profile_pict.get_download_url() }}"
|
<img src="{{ form.instance.profile_pict.get_download_url() }}"
|
||||||
alt="{%- trans -%}Profile{%- endtrans -%}" title="{%- trans -%}Profile{%- endtrans -%}" />
|
alt="{%- trans -%}Profile{%- endtrans -%}" title="{%- trans -%}Profile{%- endtrans -%}" />
|
||||||
{%- else -%}
|
{%- else -%}
|
||||||
<img src="{{ static('core/img/unknown.jpg') }}" alt="{%- trans -%}Profile{%- endtrans -%}"
|
<img src="{{ static('core/img/unknown.jpg') }}" alt="{%- trans -%}Profile{%- endtrans -%}"
|
||||||
title="{%- trans -%}Profile{%- endtrans -%}" />
|
title="{%- trans -%}Profile{%- endtrans -%}" />
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
</div>
|
|
||||||
<div class="profile-picture-edit">
|
|
||||||
{%- if form["profile_pict"] -%}
|
|
||||||
<p>{{ form["profile_pict"].label }}</p>
|
|
||||||
{{ form["profile_pict"] }}
|
|
||||||
{%- else -%}
|
|
||||||
<em>{% trans %}To edit your profile picture, ask a member of the AE{% endtrans %}</em>
|
|
||||||
{%- endif -%}
|
|
||||||
{%- if user.is_board_member and form.instance.profile_pict.id -%}
|
|
||||||
<a href="{{ url('core:file_delete', file_id=form.instance.profile_pict.id, popup='') }}">
|
|
||||||
{%- trans -%}Delete{%- endtrans -%}
|
|
||||||
</a>
|
|
||||||
{%- endif -%}
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="profile-picture">
|
<div class="profile-picture-edit">
|
||||||
<div class="profile-picture-display">
|
{%- if form["profile_pict"] -%}
|
||||||
{%- if form.instance.avatar_pict -%}
|
<p>{{ form["profile_pict"].label }}</p>
|
||||||
<img src="{{ form.instance.avatar_pict.get_download_url() }}" alt="{%- trans -%}Profile{%- endtrans -%}"
|
{{ form["profile_pict"] }}
|
||||||
title="{%- trans -%}Profile{%- endtrans -%}" />
|
{%- else -%}
|
||||||
{%- else -%}
|
<em>{% trans %}To edit your profile picture, ask a member of the AE{% endtrans %}</em>
|
||||||
<img src="{{ static('core/img/unknown.jpg') }}" alt="{%- trans -%}Profile{%- endtrans -%}"
|
{%- endif -%}
|
||||||
title="{%- trans -%}Profile{%- endtrans -%}" />
|
{%- if user.is_board_member and form.instance.profile_pict.id -%}
|
||||||
{%- endif -%}
|
<a href="{{ url('core:file_delete', file_id=form.instance.profile_pict.id, popup='') }}">
|
||||||
</div>
|
{%- trans -%}Delete{%- endtrans -%}
|
||||||
<div class="profile-picture-edit">
|
</a>
|
||||||
<p>{{ form["avatar_pict"].label }}</p>
|
{%- endif -%}
|
||||||
{{ form["avatar_pict"] }}
|
|
||||||
{%- if user.is_board_member and form.instance.avatar_pict.id -%}
|
|
||||||
<a href="{{ url('core:file_delete', file_id=form.instance.avatar_pict.id, popup='') }}">
|
|
||||||
{%- trans -%}Delete{%- endtrans -%}
|
|
||||||
</a>
|
|
||||||
{%- endif -%}
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="profile-picture">
|
</div>
|
||||||
<div class="profile-picture-display">
|
<div class="profile-picture">
|
||||||
{%- if form.instance.scrub_pict -%}
|
<div class="profile-picture-display">
|
||||||
<img src="{{ form.instance.scrub_pict.get_download_url() }}" alt="{%- trans -%}Profile{%- endtrans -%}"
|
{%- if form.instance.avatar_pict -%}
|
||||||
title="{%- trans -%}Profile{%- endtrans -%}" />
|
<img src="{{ form.instance.avatar_pict.get_download_url() }}" alt="{%- trans -%}Profile{%- endtrans -%}"
|
||||||
{%- else -%}
|
title="{%- trans -%}Profile{%- endtrans -%}" />
|
||||||
<img src="{{ static('core/img/unknown.jpg') }}" alt="{%- trans -%}Profile{%- endtrans -%}"
|
{%- else -%}
|
||||||
title="{%- trans -%}Profile{%- endtrans -%}" />
|
<img src="{{ static('core/img/unknown.jpg') }}" alt="{%- trans -%}Profile{%- endtrans -%}"
|
||||||
{%- endif -%}
|
title="{%- trans -%}Profile{%- endtrans -%}" />
|
||||||
</div>
|
{%- endif -%}
|
||||||
<div class="profile-picture-edit">
|
|
||||||
<p>{{ form["scrub_pict"].label }}</p>
|
|
||||||
{{ form["scrub_pict"] }}
|
|
||||||
{%- if user.is_board_member and form.instance.scrub_pict.id -%}
|
|
||||||
<a href="{{ url('core:file_delete', file_id=form.instance.scrub_pict.id, popup='') }}">
|
|
||||||
{%- trans -%}Delete{%-endtrans -%}
|
|
||||||
</a>
|
|
||||||
{%- endif -%}
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
<div class="profile-picture-edit">
|
||||||
|
<p>{{ form["avatar_pict"].label }}</p>
|
||||||
|
{{ form["avatar_pict"] }}
|
||||||
|
{%- if user.is_board_member and form.instance.avatar_pict.id -%}
|
||||||
|
<a href="{{ url('core:file_delete', file_id=form.instance.avatar_pict.id, popup='') }}">
|
||||||
|
{%- trans -%}Delete{%- endtrans -%}
|
||||||
|
</a>
|
||||||
|
{%- endif -%}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="profile-picture">
|
||||||
|
<div class="profile-picture-display">
|
||||||
|
{%- if form.instance.scrub_pict -%}
|
||||||
|
<img src="{{ form.instance.scrub_pict.get_download_url() }}" alt="{%- trans -%}Profile{%- endtrans -%}"
|
||||||
|
title="{%- trans -%}Profile{%- endtrans -%}" />
|
||||||
|
{%- else -%}
|
||||||
|
<img src="{{ static('core/img/unknown.jpg') }}" alt="{%- trans -%}Profile{%- endtrans -%}"
|
||||||
|
title="{%- trans -%}Profile{%- endtrans -%}" />
|
||||||
|
{%- endif -%}
|
||||||
|
</div>
|
||||||
|
<div class="profile-picture-edit">
|
||||||
|
<p>{{ form["scrub_pict"].label }}</p>
|
||||||
|
{{ form["scrub_pict"] }}
|
||||||
|
{%- if user.is_board_member and form.instance.scrub_pict.id -%}
|
||||||
|
<a href="{{ url('core:file_delete', file_id=form.instance.scrub_pict.id, popup='') }}">
|
||||||
|
{%- trans -%}Delete{%-endtrans -%}
|
||||||
|
</a>
|
||||||
|
{%- endif -%}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
{# All fields #}
|
{# All fields #}
|
||||||
<div class="profile-fields">
|
<div class="profile-fields">
|
||||||
{%- for field in form -%}
|
{%- for field in form -%}
|
||||||
{%-
|
{%-
|
||||||
if field.name in ["quote","profile_pict","avatar_pict","scrub_pict","is_subscriber_viewable","forum_signature"]
|
if field.name in ["quote","profile_pict","avatar_pict","scrub_pict","is_subscriber_viewable","forum_signature"]
|
||||||
-%}
|
-%}
|
||||||
{%- continue -%}
|
{%- continue -%}
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
|
|
||||||
<div class="profile-field">
|
<div class="profile-field">
|
||||||
<div class="profile-field-label">{{ field.label }}</div>
|
<div class="profile-field-label">{{ field.label }}</div>
|
||||||
<div class="profile-field-content">
|
<div class="profile-field-content">
|
||||||
{{ field }}
|
{{ field }}
|
||||||
{%- if field.errors -%}
|
{%- if field.errors -%}
|
||||||
<div class="field-error">{{ field.errors }}</div>
|
<div class="field-error">{{ field.errors }}</div>
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
{%- endfor -%}
|
</div>
|
||||||
</div>
|
{%- endfor -%}
|
||||||
|
</div>
|
||||||
|
|
||||||
{# Textareas #}
|
{# Textareas #}
|
||||||
<div class="profile-fields">
|
<div class="profile-fields">
|
||||||
{%- for field in [form["quote"], form["forum_signature"]] -%}
|
{%- for field in [form["quote"], form["forum_signature"]] -%}
|
||||||
<div class="profile-field">
|
<div class="profile-field">
|
||||||
<div class="profile-field-label">{{ field.label }}</div>
|
<div class="profile-field-label">{{ field.label }}</div>
|
||||||
<div class="profile-field-content">
|
<div class="profile-field-content">
|
||||||
{{ field }}
|
{{ field }}
|
||||||
{%- if field.errors -%}
|
{%- if field.errors -%}
|
||||||
<div class="field-error">{{ field.errors }}</div>
|
<div class="field-error">{{ field.errors }}</div>
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
{%- endfor -%}
|
|
||||||
</div>
|
</div>
|
||||||
|
{%- endfor -%}
|
||||||
|
</div>
|
||||||
|
|
||||||
{# Checkboxes #}
|
{# Checkboxes #}
|
||||||
<div class="profile-visible">
|
<div class="profile-visible">
|
||||||
{{ form["is_subscriber_viewable"] }}
|
{{ form["is_subscriber_viewable"] }}
|
||||||
{{ form["is_subscriber_viewable"].label }}
|
{{ form["is_subscriber_viewable"].label }}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{%- if form.instance == user -%}
|
{%- if form.instance == user -%}
|
||||||
<p>
|
<p>
|
||||||
<a href="{{ url('core:password_change') }}">{%- trans -%}Change my password{%- endtrans -%}</a>
|
<a href="{{ url('core:password_change') }}">{%- trans -%}Change my password{%- endtrans -%}</a>
|
||||||
</p>
|
</p>
|
||||||
{%- elif user.is_root -%}
|
{%- elif user.is_root -%}
|
||||||
<p>
|
<p>
|
||||||
<a href="{{ url('core:password_root_change', user_id=form.instance.id) }}">
|
<a href="{{ url('core:password_root_change', user_id=form.instance.id) }}">
|
||||||
{%- trans -%}Change user password{%- endtrans -%}
|
{%- trans -%}Change user password{%- endtrans -%}
|
||||||
</a>
|
</a>
|
||||||
</p>
|
</p>
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
<input type="submit" value="{%- trans -%}Update{%- endtrans -%}" />
|
<input type="submit" value="{%- trans -%}Update{%- endtrans -%}" />
|
||||||
</p>
|
</p>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
<em>{%- trans -%}Username: {%- endtrans -%} {{ form.instance.username }}</em>
|
<em>{%- trans -%}Username: {%- endtrans -%} {{ form.instance.username }}</em>
|
||||||
<br />
|
<br />
|
||||||
{%- if form.instance.customer -%}
|
{%- if form.instance.customer -%}
|
||||||
<em>{%- trans -%}Account number: {%- endtrans -%} {{ form.instance.customer.account_id }}</em>
|
<em>{%- trans -%}Account number: {%- endtrans -%} {{ form.instance.customer.account_id }}</em>
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
{%- endblock -%}
|
{%- endblock -%}
|
||||||
|
|
||||||
{%- block script -%}
|
{%- block script -%}
|
||||||
{{ super() }}
|
{{ super() }}
|
||||||
{%- if not form.instance.profile_pict -%}
|
{%- if not form.instance.profile_pict -%}
|
||||||
<script src="{{ static('core/js/webcam.js') }}"></script>
|
<script src="{{ static('core/js/webcam.js') }}"></script>
|
||||||
<script>
|
<script>
|
||||||
Webcam.on('error', function (msg) { console.log('Webcam.js error: ' + msg) })
|
Webcam.on('error', function (msg) { console.log('Webcam.js error: ' + msg) })
|
||||||
Webcam.set({
|
Webcam.set({
|
||||||
width: 320,
|
width: 320,
|
||||||
height: 240,
|
height: 240,
|
||||||
dest_width: 320,
|
dest_width: 320,
|
||||||
@ -168,22 +168,22 @@
|
|||||||
image_format: 'jpeg',
|
image_format: 'jpeg',
|
||||||
jpeg_quality: 90,
|
jpeg_quality: 90,
|
||||||
force_flash: false
|
force_flash: false
|
||||||
});
|
});
|
||||||
Webcam.attach('#camera_canvas');
|
Webcam.attach('#camera_canvas');
|
||||||
function take_snapshot() {
|
function take_snapshot() {
|
||||||
const data_uri = Webcam.snap();
|
const data_uri = Webcam.snap();
|
||||||
const url = "{{ url('core:user_profile_upload', user_id=form.instance.id) }}";
|
const url = "{{ url('core:user_profile_upload', user_id=form.instance.id) }}";
|
||||||
Webcam.upload(data_uri, url, function (code, text) {
|
Webcam.upload(data_uri, url, function (code, text) {
|
||||||
if (code === 302 || code === 200) {
|
if (code === 302 || code === 200) {
|
||||||
$('#new_profile').attr('src', data_uri);
|
$('#new_profile').attr('src', data_uri);
|
||||||
$('#take_picture').remove();
|
$('#take_picture').remove();
|
||||||
$('#id_profile_pict').remove();
|
$('#id_profile_pict').remove();
|
||||||
} else {
|
} else {
|
||||||
console.log("Unknown error: ");
|
console.log("Unknown error: ");
|
||||||
console.log(text);
|
console.log(text);
|
||||||
}
|
}
|
||||||
}, "new_profile_pict", { name: 'csrfmiddlewaretoken', value: '{{ csrf_token }}' });
|
}, "new_profile_pict", { name: 'csrfmiddlewaretoken', value: '{{ csrf_token }}' });
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endblock -%}
|
{%- endblock -%}
|
@ -2,66 +2,66 @@
|
|||||||
{% from "core/macros.jinja" import user_link_with_pict, delete_godfather %}
|
{% from "core/macros.jinja" import user_link_with_pict, delete_godfather %}
|
||||||
|
|
||||||
{%- block additional_css -%}
|
{%- block additional_css -%}
|
||||||
<link rel="stylesheet" href="{{ scss('user/user_godfathers.scss') }}">
|
<link rel="stylesheet" href="{{ scss('user/user_godfathers.scss') }}">
|
||||||
{%- endblock -%}
|
{%- endblock -%}
|
||||||
|
|
||||||
{% block title %}
|
{% block title %}
|
||||||
{% trans user_name=profile.get_display_name() %}{{ user_name }}'s family{% endtrans %}
|
{% trans user_name=profile.get_display_name() %}{{ user_name }}'s family{% endtrans %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<a href="{{ url('core:user_godfathers_tree_pict', user_id=profile.id) }}?family">
|
<a href="{{ url('core:user_godfathers_tree_pict', user_id=profile.id) }}?family">
|
||||||
{% trans %}Show family picture{% endtrans %}
|
{% trans %}Show family picture{% endtrans %}
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
<h4>{% trans %}Godfathers / Godmothers{% endtrans %}</h4>
|
<h4>{% trans %}Godfathers / Godmothers{% endtrans %}</h4>
|
||||||
{% if profile.godfathers.exists() %}
|
{% if profile.godfathers.exists() %}
|
||||||
<ul class="users">
|
<ul class="users">
|
||||||
{% for u in profile.godfathers.all() %}
|
{% for u in profile.godfathers.all() %}
|
||||||
<li class="users-card">
|
<li class="users-card">
|
||||||
<a href="{{ url('core:user_godfathers', user_id=u.id) }}" class="mini_profile_link">
|
<a href="{{ url('core:user_godfathers', user_id=u.id) }}" class="mini_profile_link">
|
||||||
{{ u.get_mini_item() | safe }}
|
{{ u.get_mini_item() | safe }}
|
||||||
</a>
|
</a>
|
||||||
{{ delete_godfather(user, profile, u, True) }}
|
{{ delete_godfather(user, profile, u, True) }}
|
||||||
</li>
|
</li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<a href="{{ url('core:user_godfathers_tree', user_id=profile.id) }}">
|
<a href="{{ url('core:user_godfathers_tree', user_id=profile.id) }}">
|
||||||
{% trans %}Show ancestors tree{% endtrans %}
|
{% trans %}Show ancestors tree{% endtrans %}
|
||||||
</a>
|
</a>
|
||||||
{% else %}
|
{% else %}
|
||||||
<p>{% trans %}No godfathers / godmothers{% endtrans %}
|
<p>{% trans %}No godfathers / godmothers{% endtrans %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<h4>{% trans %}Godchildren{% endtrans %}</h4>
|
<h4>{% trans %}Godchildren{% endtrans %}</h4>
|
||||||
{% if profile.godchildren.exists() %}
|
{% if profile.godchildren.exists() %}
|
||||||
<ul class="users">
|
<ul class="users">
|
||||||
{% for u in profile.godchildren.all() %}
|
{% for u in profile.godchildren.all() %}
|
||||||
<li class="users-card">
|
<li class="users-card">
|
||||||
<a href="{{ url('core:user_godfathers', user_id=u.id) }}" class="mini_profile_link">
|
<a href="{{ url('core:user_godfathers', user_id=u.id) }}" class="mini_profile_link">
|
||||||
{{ u.get_mini_item()|safe }}
|
{{ u.get_mini_item()|safe }}
|
||||||
</a>
|
</a>
|
||||||
{{ delete_godfather(user, profile, u, False) }}
|
{{ delete_godfather(user, profile, u, False) }}
|
||||||
</li>
|
</li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<a href="{{ url('core:user_godfathers_tree', user_id=profile.id) }}?descent">
|
<a href="{{ url('core:user_godfathers_tree', user_id=profile.id) }}?descent">
|
||||||
{% trans %}Show descent tree{% endtrans %}
|
{% trans %}Show descent tree{% endtrans %}
|
||||||
</a>
|
</a>
|
||||||
{% else %}
|
{% else %}
|
||||||
<p>{% trans %}No godchildren{% endtrans %}
|
<p>{% trans %}No godchildren{% endtrans %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if profile == user or user.is_root %}
|
{% if profile == user or user.is_root %}
|
||||||
<form action="" method="post">
|
<form action="" method="post">
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
{{ form.as_p() }}
|
{{ form.as_p() }}
|
||||||
<p><input type="submit" value="{% trans %}Save{% endtrans %}" /></p>
|
<p><input type="submit" value="{% trans %}Save{% endtrans %}" /></p>
|
||||||
</form>
|
</form>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
@ -1,54 +1,54 @@
|
|||||||
{% extends "core/base.jinja" %}
|
{% extends "core/base.jinja" %}
|
||||||
|
|
||||||
{% block title %}
|
{% block title %}
|
||||||
{% if param == "godchildren" %}
|
{% if param == "godchildren" %}
|
||||||
{% trans user_name=profile.get_display_name() %}{{ user_name }}'s godchildren{% endtrans %}
|
{% trans user_name=profile.get_display_name() %}{{ user_name }}'s godchildren{% endtrans %}
|
||||||
{% else %}
|
{% else %}
|
||||||
{% trans user_name=profile.get_display_name() %}{{ user_name }}'s godfathers{% endtrans %}
|
{% trans user_name=profile.get_display_name() %}{{ user_name }}'s godfathers{% endtrans %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% macro display_members_list(user) %}
|
{% macro display_members_list(user) %}
|
||||||
{% if user.__getattribute__(param).exists() %}
|
{% if user.__getattribute__(param).exists() %}
|
||||||
<ul>
|
<ul>
|
||||||
{% for u in user.__getattribute__(param).all() %}
|
{% for u in user.__getattribute__(param).all() %}
|
||||||
<li>
|
<li>
|
||||||
<a href="{{ url("core:user_godfathers", user_id=u.id) }}">
|
<a href="{{ url("core:user_godfathers", user_id=u.id) }}">
|
||||||
{{ u.get_short_name() }}
|
{{ u.get_short_name() }}
|
||||||
</a>
|
</a>
|
||||||
{% if u in members_set %}
|
{% if u in members_set %}
|
||||||
{% trans %}Already seen (check above){% endtrans %}
|
{% trans %}Already seen (check above){% endtrans %}
|
||||||
{% else %}
|
{% else %}
|
||||||
{{ members_set.add(u) or "" }}
|
{{ members_set.add(u) or "" }}
|
||||||
{{ display_members_list(u) }}
|
{{ display_members_list(u) }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</li>
|
</li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endmacro %}
|
{% endmacro %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<p><a href="{{ url("core:user_godfathers", user_id=profile.id) }}">
|
<p><a href="{{ url("core:user_godfathers", user_id=profile.id) }}">
|
||||||
{% trans %}Back to family{% endtrans %}</a></p>
|
{% trans %}Back to family{% endtrans %}</a></p>
|
||||||
{% if profile.__getattribute__(param).exists() %}
|
{% if profile.__getattribute__(param).exists() %}
|
||||||
{% if param == "godchildren" %}
|
{% if param == "godchildren" %}
|
||||||
<p><a href="{{ url("core:user_godfathers_tree_pict", user_id=profile.id) }}?descent">
|
<p><a href="{{ url("core:user_godfathers_tree_pict", user_id=profile.id) }}?descent">
|
||||||
{% trans %}Show a picture of the tree{% endtrans %}</a></p>
|
{% trans %}Show a picture of the tree{% endtrans %}</a></p>
|
||||||
<h4>{% trans u=profile.get_short_name() %}Descent tree of {{ u }}{% endtrans %}</h4>
|
<h4>{% trans u=profile.get_short_name() %}Descent tree of {{ u }}{% endtrans %}</h4>
|
||||||
{% else %}
|
|
||||||
<p><a href="{{ url("core:user_godfathers_tree_pict", user_id=profile.id) }}?ancestors">
|
|
||||||
{% trans %}Show a picture of the tree{% endtrans %}</a></p>
|
|
||||||
<h4>{% trans u=profile.get_short_name() %}Ancestors tree of {{ u }}{% endtrans %}</h4>
|
|
||||||
{% endif %}
|
|
||||||
{{ members_set.add(profile) or "" }}
|
|
||||||
{{ display_members_list(profile) }}
|
|
||||||
{% else %}
|
{% else %}
|
||||||
{% if param == "godchildren" %}
|
<p><a href="{{ url("core:user_godfathers_tree_pict", user_id=profile.id) }}?ancestors">
|
||||||
<p>{% trans %}No godchildren{% endtrans %}
|
{% trans %}Show a picture of the tree{% endtrans %}</a></p>
|
||||||
{% else %}
|
<h4>{% trans u=profile.get_short_name() %}Ancestors tree of {{ u }}{% endtrans %}</h4>
|
||||||
<p>{% trans %}No godfathers / godmothers{% endtrans %}
|
|
||||||
{% endif %}
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
{{ members_set.add(profile) or "" }}
|
||||||
|
{{ display_members_list(profile) }}
|
||||||
|
{% else %}
|
||||||
|
{% if param == "godchildren" %}
|
||||||
|
<p>{% trans %}No godchildren{% endtrans %}
|
||||||
|
{% else %}
|
||||||
|
<p>{% trans %}No godfathers / godmothers{% endtrans %}
|
||||||
|
{% endif %}
|
||||||
|
{% endif %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
@ -1,16 +1,16 @@
|
|||||||
{% extends "core/base.jinja" %}
|
{% extends "core/base.jinja" %}
|
||||||
|
|
||||||
{%- block additional_css -%}
|
{%- block additional_css -%}
|
||||||
<link rel="stylesheet" href="{{ scss('user/user_group.scss') }}">
|
<link rel="stylesheet" href="{{ scss('user/user_group.scss') }}">
|
||||||
{%- endblock -%}
|
{%- endblock -%}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<main>
|
<main>
|
||||||
<h2>{% trans user_name=profile.get_full_name() %}Edit user groups for {{ user_name }}{% endtrans %}</h2>
|
<h2>{% trans user_name=profile.get_full_name() %}Edit user groups for {{ user_name }}{% endtrans %}</h2>
|
||||||
<form action="" method="post">
|
<form action="" method="post">
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
{{ form.as_p() }}
|
{{ form.as_p() }}
|
||||||
<p><input type="submit" value="{% trans %}Update{% endtrans %}" /></p>
|
<p><input type="submit" value="{% trans %}Update{% endtrans %}" /></p>
|
||||||
</form>
|
</form>
|
||||||
</main>
|
</main>
|
||||||
{%- endblock -%}
|
{%- endblock -%}
|
@ -1,15 +1,15 @@
|
|||||||
{% extends "core/base.jinja" %}
|
{% extends "core/base.jinja" %}
|
||||||
|
|
||||||
{% block title %}
|
{% block title %}
|
||||||
{% trans %}User list{% endtrans %}
|
{% trans %}User list{% endtrans %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<h3>{% trans %}User list{% endtrans %}</h3>
|
<h3>{% trans %}User list{% endtrans %}</h3>
|
||||||
<ul>
|
<ul>
|
||||||
{% for u in user_list %}
|
{% for u in user_list %}
|
||||||
<li><a href="{{ url('core:user_profile', user_id=u.id) }}">{{ u.get_display_name() }}</a></li>
|
<li><a href="{{ url('core:user_profile', user_id=u.id) }}">{{ u.get_display_name() }}</a></li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
@ -1,69 +1,69 @@
|
|||||||
{% extends "core/base.jinja" %}
|
{% extends "core/base.jinja" %}
|
||||||
|
|
||||||
{%- block additional_css -%}
|
{%- block additional_css -%}
|
||||||
<link rel="stylesheet" href="{{ scss('user/user_preferences.scss') }}">
|
<link rel="stylesheet" href="{{ scss('user/user_preferences.scss') }}">
|
||||||
{%- endblock -%}
|
{%- endblock -%}
|
||||||
|
|
||||||
{% block title %}
|
{% block title %}
|
||||||
{% trans %}Preferences{% endtrans %}
|
{% trans %}Preferences{% endtrans %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div class="main">
|
<div class="main">
|
||||||
<h2>{% trans %}Preferences{% endtrans %}</h2>
|
<h2>{% trans %}Preferences{% endtrans %}</h2>
|
||||||
<h3>{% trans %}General{% endtrans %}</h3>
|
<h3>{% trans %}General{% endtrans %}</h3>
|
||||||
<form class="form form-general" action="" method="post" enctype="multipart/form-data">
|
<form class="form form-general" action="" method="post" enctype="multipart/form-data">
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
{{ form.as_p() }}
|
{{ form.as_p() }}
|
||||||
<input class="form-submit-btn" type="submit" value="{% trans %}Save{% endtrans %}" />
|
<input class="form-submit-btn" type="submit" value="{% trans %}Save{% endtrans %}" />
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<h3>{% trans %}Trombi{% endtrans %}</h3>
|
<h3>{% trans %}Trombi{% endtrans %}</h3>
|
||||||
|
|
||||||
{% if trombi_form %}
|
{% if trombi_form %}
|
||||||
<form class="form form-trombi" action="{{ url('trombi:user_tools') }}" method="post" enctype="multipart/form-data">
|
<form class="form form-trombi" action="{{ url('trombi:user_tools') }}" method="post" enctype="multipart/form-data">
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
{{ trombi_form.as_p() }}
|
{{ trombi_form.as_p() }}
|
||||||
<input class="form-submit-btn" type="submit" value="{% trans %}Save{% endtrans %}" />
|
<input class="form-submit-btn" type="submit" value="{% trans %}Save{% endtrans %}" />
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
{% else %}
|
{% else %}
|
||||||
<p>{% trans trombi=user.trombi_user.trombi %}You already choose to be in that Trombi: {{ trombi }}.{% endtrans %}
|
<p>{% trans trombi=user.trombi_user.trombi %}You already choose to be in that Trombi: {{ trombi }}.{% endtrans %}
|
||||||
<br />
|
<br />
|
||||||
<a href="{{ url('trombi:user_tools') }}">{% trans %}Go to my Trombi tools{% endtrans %}</a>
|
<a href="{{ url('trombi:user_tools') }}">{% trans %}Go to my Trombi tools{% endtrans %}</a>
|
||||||
</p>
|
</p>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
|
||||||
{% if profile.customer %}
|
{% if profile.customer %}
|
||||||
<h3>{% trans %}Student cards{% endtrans %}</h3>
|
<h3>{% trans %}Student cards{% endtrans %}</h3>
|
||||||
|
|
||||||
{% if profile.customer.student_cards.exists() %}
|
{% if profile.customer.student_cards.exists() %}
|
||||||
<ul class="student-cards">
|
<ul class="student-cards">
|
||||||
{% for card in profile.customer.student_cards.all() %}
|
{% for card in profile.customer.student_cards.all() %}
|
||||||
<li>
|
<li>
|
||||||
{{ card.uid }}
|
{{ card.uid }}
|
||||||
-
|
-
|
||||||
<a href="{{ url('counter:delete_student_card', customer_id=profile.customer.pk, card_id=card.id) }}">
|
<a href="{{ url('counter:delete_student_card', customer_id=profile.customer.pk, card_id=card.id) }}">
|
||||||
{% trans %}Delete{% endtrans %}
|
{% trans %}Delete{% endtrans %}
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
{% else %}
|
{% else %}
|
||||||
<em class="no-cards">{% trans %}No student card registered.{% endtrans %}</em>
|
<em class="no-cards">{% trans %}No student card registered.{% endtrans %}</em>
|
||||||
<p class="justify">
|
<p class="justify">
|
||||||
{% trans %}You can add a card by asking at a counter or add it yourself here. If you want to manually
|
{% trans %}You can add a card by asking at a counter or add it yourself here. If you want to manually
|
||||||
add a student card yourself, you'll need a NFC reader. We store the UID of the card which is 14 characters long.{% endtrans %}
|
add a student card yourself, you'll need a NFC reader. We store the UID of the card which is 14 characters long.{% endtrans %}
|
||||||
</p>
|
</p>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<form class="form form-cards" action="{{ url('counter:add_student_card', customer_id=profile.customer.pk) }}"
|
<form class="form form-cards" action="{{ url('counter:add_student_card', customer_id=profile.customer.pk) }}"
|
||||||
method="post">
|
method="post">
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
{{ student_card_form.as_p() }}
|
{{ student_card_form.as_p() }}
|
||||||
<input class="form-submit-btn" type="submit" value="{% trans %}Save{% endtrans %}" />
|
<input class="form-submit-btn" type="submit" value="{% trans %}Save{% endtrans %}" />
|
||||||
</form>
|
</form>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user