introduce djhtml as jinja+scss formater

This commit is contained in:
thomas girod 2024-07-24 00:16:31 +02:00 committed by Bartuccio Antoine
parent 13d0d2a300
commit b25805e0a1
171 changed files with 7070 additions and 7018 deletions

4
.gitignore vendored
View File

@ -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/

View File

@ -8,3 +8,14 @@ repos:
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"]

View File

@ -1,7 +1,7 @@
{% 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 %}

View File

@ -1,7 +1,7 @@
{% 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 %}

View File

@ -1,7 +1,7 @@
{% 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 %}

View File

@ -1,7 +1,7 @@
{% 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 %}

View File

@ -1,7 +1,7 @@
{% 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 %}
@ -10,9 +10,9 @@
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>
@ -25,6 +25,6 @@
</tr> </tr>
{% endfor %} {% endfor %}
</tbody> </tbody>
</table> </table>
</div> </div>
{% endblock %} {% endblock %}

View File

@ -1,7 +1,7 @@
{% 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 %}
@ -95,9 +95,9 @@
</td> </td>
<td><a href="{{ url('accounting:op_pdf', op_id=o.id) }}">{% trans %}Generate{% endtrans %}</a></td> <td><a href="{{ url('accounting:op_pdf', op_id=o.id) }}">{% trans %}Generate{% endtrans %}</a></td>
</tr> </tr>
{% endfor %} {% endfor %}
</tbody> </tbody>
</table> </table>
</div> </div>
</div> </div>
{% endblock %} {% endblock %}

View File

@ -1,12 +1,12 @@
{% 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>
@ -29,5 +29,5 @@
<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 %}

View File

@ -1,11 +1,11 @@
{% 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>
@ -43,9 +43,9 @@
</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() %}
@ -53,5 +53,5 @@
{{ display_tables(v) }} {{ display_tables(v) }}
<hr> <hr>
{% endfor %} {% endfor %}
</div> </div>
{% endblock %} {% endblock %}

View File

@ -1,12 +1,12 @@
{% 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>
@ -64,5 +64,5 @@
</table> </table>
<p>Total : {{ "%.2f" % total_debit }}</p> <p>Total : {{ "%.2f" % total_debit }}</p>
</div> </div>
{% endblock %} {% endblock %}

View File

@ -1,7 +1,7 @@
{% 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 %}

View File

@ -1,11 +1,11 @@
{% 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> >
@ -54,9 +54,9 @@
{% 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() {
@ -117,7 +117,7 @@
target_type.change(update_targets); target_type.change(update_targets);
} ); } );
</script> </script>
</div> </div>
{% endblock %} {% endblock %}

View File

@ -1,7 +1,7 @@
{% 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 %}

View File

@ -1,7 +1,7 @@
{% 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 %}

View File

@ -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&#39; Kia</a></td><td>3.00</td>""", content
<td><a href="/user/1/">S&#39; Kia</a></td>
<td>3.00</td>""",
) )
self.assertContains( self.assertInHTML(
response, """<td><a href="/user/1/">S&#39; Kia</a></td><td>823.00</td>""", content
"""
<td><a href="/user/1/">S&#39; 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&#39;existe pas</td> <td>443 - Crédit - Ce code n&#39;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,

View File

@ -1,7 +1,7 @@
{% 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) -%}

View File

@ -2,19 +2,19 @@
{% 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>
@ -52,15 +52,15 @@
</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 %}

View File

@ -1,8 +1,8 @@
{% 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>
@ -40,7 +40,7 @@
{% 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 %}

View File

@ -2,7 +2,7 @@
{% 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 %}

View File

@ -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 %}

View File

@ -1,7 +1,7 @@
{% 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 %}

View File

@ -1,7 +1,7 @@
{% 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) %}

View File

@ -2,7 +2,7 @@
{% 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 %}

View File

@ -2,17 +2,17 @@
{% 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 }}" />

View File

@ -2,16 +2,16 @@
{% 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) }}
@ -23,14 +23,14 @@
<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 }}
@ -55,13 +55,13 @@
{% 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');
@ -81,7 +81,7 @@ $( function() {
update_targets(); update_targets();
type.change(update_targets); type.change(update_targets);
} ); } );
</script> </script>
{% endblock %} {% endblock %}

View File

@ -2,18 +2,18 @@
{% 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">
@ -77,15 +77,15 @@
</div> </div>
</div> </div>
{% endfor %} {% endfor %}
{% else %} {% else %}
<div class="news_empty"> <div class="news_empty">
<em>{% trans %}Nothing to come...{% endtrans %}</em> <em>{% trans %}Nothing to come...{% endtrans %}</em>
</div> </div>
{% endif %} {% endif %}
{% set coming_soon = object_list.filter(dates__start_date__gte=timezone.now()+timedelta(days=5), {% set coming_soon = object_list.filter(dates__start_date__gte=timezone.now()+timedelta(days=5),
type="EVENT").order_by('dates__start_date') %} type="EVENT").order_by('dates__start_date') %}
{% if coming_soon %} {% if coming_soon %}
<h3>{% trans %}Coming soon... don't miss!{% endtrans %}</h3> <h3>{% trans %}Coming soon... don't miss!{% endtrans %}</h3>
{% for news in coming_soon %} {% for news in coming_soon %}
<section class="news_coming_soon"> <section class="news_coming_soon">
@ -96,19 +96,19 @@
{{ news.dates.first().end_date|localtime|time(DATETIME_FORMAT) }}</span> {{ news.dates.first().end_date|localtime|time(DATETIME_FORMAT) }}</span>
</section> </section>
{% endfor %} {% endfor %}
{% endif %} {% endif %}
<h3>{% trans %}All coming events{% endtrans %}</h3> <h3>{% trans %}All coming events{% endtrans %}</h3>
<iframe <iframe
src="https://embed.styledcalendar.com/#2mF2is8CEXhr4ADcX6qN" src="https://embed.styledcalendar.com/#2mF2is8CEXhr4ADcX6qN"
title="Styled Calendar" title="Styled Calendar"
class="styled-calendar-container" class="styled-calendar-container"
style="width: 100%; border: none; height: 1060px" style="width: 100%; border: none; height: 1060px"
data-cy="calendar-embed-iframe"> data-cy="calendar-embed-iframe">
</iframe> </iframe>
</div> </div>
<div id="right_column" class="news_column"> <div id="right_column" class="news_column">
<div id="agenda"> <div id="agenda">
<div id="agenda_title">{% trans %}Agenda{% endtrans %}</div> <div id="agenda_title">{% trans %}Agenda{% endtrans %}</div>
<div id="agenda_content"> <div id="agenda_content">
@ -157,7 +157,7 @@
{% endif %} {% endif %}
</div> </div>
</div> </div>
</div> </div>
</div> </div>
{% endblock %} {% endblock %}

View File

@ -1,11 +1,11 @@
{% 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">
@ -36,7 +36,7 @@
</div> </div>
</div> </div>
{% endblock %} {% endblock %}

View File

@ -1,17 +1,17 @@
{% 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>
@ -60,7 +60,7 @@
<div id="view"><div id="placeholder"></div></div> <div id="view"><div id="placeholder"></div></div>
</div> </div>
{% endblock %} {% endblock %}

View File

@ -1,12 +1,12 @@
{% 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">
@ -35,5 +35,5 @@
<div id="view"><div id="placeholder"></div></div> <div id="view"><div id="placeholder"></div></div>
</div> </div>
{% endblock %} {% endblock %}

View File

@ -1,11 +1,11 @@
{% 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">
@ -27,7 +27,7 @@
</div> </div>
</div> </div>
{% endblock %} {% endblock %}

View File

@ -1,11 +1,11 @@
{% 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>
@ -32,7 +32,7 @@
</div> </div>
</div> </div>
{% endblock %} {% endblock %}

View File

@ -1,10 +1,10 @@
<!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">
@ -26,5 +26,5 @@
</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>

View File

@ -2,16 +2,16 @@
{% 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>
@ -38,9 +38,9 @@
</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>
@ -67,12 +67,12 @@
</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 %}

View File

@ -2,12 +2,12 @@
{% 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 %}
@ -23,7 +23,7 @@
{% 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] %}
@ -34,9 +34,9 @@
<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 %}

View File

@ -1,12 +1,12 @@
<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;">
@ -48,5 +48,5 @@ img {
<img src="{{ weekmail.get_footer() }}" <img src="{{ weekmail.get_footer() }}"
</div> </div>
</div> </div>

View File

@ -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 -%}

View File

@ -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):

View File

@ -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;
@ -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;

View File

@ -2,9 +2,9 @@
{% block content %} {% block content %}
<h3>{% trans %}403, Forbidden{% endtrans %}</h3> <h3>{% trans %}403, Forbidden{% endtrans %}</h3>
{{ super() }} {{ super() }}
{% endblock %} {% endblock %}

View File

@ -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 %}

View File

@ -1,6 +1,6 @@
{% 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"
@ -23,5 +23,5 @@
{% endif %} {% endif %}
}) })
</script> </script>
{% endif %} {% endif %}
{% endblock content %} {% endblock content %}

View File

@ -294,17 +294,19 @@
</code> </code>
</footer> </footer>
{% endif %} {% endif %}
{% block script %} {% block script %}
<script src="{{ static('core/js/ui/jquery-ui.min.js') }}"></script> <script src="{{ static('core/js/ui/jquery-ui.min.js') }}"></script>
<script src="{{ static('ajax_select/js/ajax_select.js') }}"></script> <script src="{{ static('ajax_select/js/ajax_select.js') }}"></script>
<script src="{{ url('javascript-catalog') }}"></script> <script src="{{ url('javascript-catalog') }}"></script>
<script> <script>
function showMenu() { function showMenu() {
let navbar = document.getElementById("navbar-content"); let navbar = document.getElementById("navbar-content");
const current = navbar.style.getPropertyValue("display"); const current = navbar.style.getPropertyValue("display");
navbar.style.setProperty("display", current === "none" ? "block" : "none"); navbar.style.setProperty("display", current === "none" ? "block" : "none");
} }
$(document).keydown(function (e) {
$(document).keydown(function (e) {
if ($(e.target).is('input')) { return } if ($(e.target).is('input')) { return }
if ($(e.target).is('textarea')) { return } if ($(e.target).is('textarea')) { return }
if ($(e.target).is('select')) { return } if ($(e.target).is('select')) { return }
@ -312,7 +314,7 @@ $(document).keydown(function (e) {
$("#search").focus(); $("#search").focus();
return false; return false;
} }
}); });
</script> </script>
{% endblock %} {% endblock %}
</body> </body>

View File

@ -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 %}

View File

@ -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 %}

View File

@ -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 %}

View File

@ -1,30 +1,30 @@
{% 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 %}
@ -42,21 +42,21 @@
{% 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 %}

View File

@ -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 %}

View File

@ -2,24 +2,24 @@
{% 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 %}"> |
@ -48,32 +48,32 @@
<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 %}

View File

@ -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 %}

View File

@ -1,10 +1,10 @@
{% 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 %}
@ -14,10 +14,10 @@
{% 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 %}

View File

@ -1,12 +1,12 @@
{% 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 %}
@ -24,5 +24,5 @@
<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 %}

View File

@ -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 %}

View File

@ -1,13 +1,13 @@
{% 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>
@ -26,6 +26,6 @@
</tr> </tr>
{% endfor %} {% endfor %}
</tbody> </tbody>
</table> </table>
{% endblock %} {% endblock %}

View File

@ -1,15 +1,15 @@
{% 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) -%}
@ -21,34 +21,34 @@
{%- 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>
@ -78,7 +78,7 @@
title="{% trans %}Profile{% endtrans %}" /> title="{% trans %}Profile{% endtrans %}" />
{% endif %} {% endif %}
</div> </div>
</div> </div>
{%- endmacro %} {%- endmacro %}
{% macro user_subscription(user) %} {% macro user_subscription(user) %}

View File

@ -1,8 +1,8 @@
{% 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> -
@ -14,14 +14,14 @@
{{ 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 %}

View File

@ -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 %}

View File

@ -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 %}

View File

@ -1,13 +1,13 @@
{% 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 %}
@ -18,7 +18,7 @@
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 %}

View File

@ -1,28 +1,28 @@
{% 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 %}
@ -39,15 +39,15 @@
{% 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 %}

View File

@ -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 %}

View File

@ -4,7 +4,7 @@
{% block page %} {% block page %}
<h3>{% trans %}Page history{% endtrans %}</h3> <h3>{% trans %}Page history{% endtrans %}</h3>
{{ page_history(page) }} {{ page_history(page) }}
{% endblock %} {% endblock %}

View File

@ -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 %}

View File

@ -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 %}

View File

@ -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 %}

View File

@ -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 %}

View File

@ -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 %}

View File

@ -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 %}

View File

@ -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 %}

View File

@ -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 %}

View File

@ -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 %}

View File

@ -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 %}

View File

@ -1,17 +1,17 @@
{% 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>
@ -47,7 +47,7 @@
<div id="view"><div id="placeholder"></div></div> <div id="view"><div id="placeholder"></div></div>
</div> </div>
{% endblock %} {% endblock %}

View File

@ -22,4 +22,3 @@
<input type="submit" value="{% trans %}Register{% endtrans %}" /> <input type="submit" value="{% trans %}Register{% endtrans %}" />
</form> </form>
{% endblock %} {% endblock %}

View File

@ -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 %}

View File

@ -1,10 +1,10 @@
<!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">
@ -26,5 +26,5 @@
</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>

View File

@ -1,11 +1,11 @@
{% 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>
@ -13,16 +13,16 @@
{{- 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 %}

View File

@ -1,7 +1,7 @@
{% extends "core/base.jinja" %} {% extends "core/base.jinja" %}
{% macro monthly(obj) %} {% macro monthly(obj) %}
<div> <div>
<table> <table>
<thead> <thead>
<tr> <tr>
@ -25,21 +25,21 @@
{% 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) }}
@ -48,7 +48,7 @@
<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) }}
@ -63,21 +63,21 @@
</ul> </ul>
</div> </div>
{% endif %} {% endif %}
</div> </div>
{% else %} {% else %}
<p>{% trans %}User has no account{% endtrans %}</p> <p>{% trans %}User has no account{% endtrans %}</p>
{% endif %} {% 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 %}

View File

@ -1,17 +1,17 @@
{% 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>
@ -38,13 +38,13 @@
<td><a href="{{ url('counter:selling_delete', selling_id=i.id) }}">{% trans %}Delete{% endtrans %}</a></td> <td><a href="{{ url('counter:selling_delete', selling_id=i.id) }}">{% trans %}Delete{% endtrans %}</a></td>
{% endif %} {% endif %}
</tr> </tr>
{% endfor %} {% endfor %}
</tbody> </tbody>
</table> </table>
{% endif %} {% endif %}
{% if customer.refillings.exists() %} {% if customer.refillings.exists() %}
<h4>{% trans %}Reloads{% endtrans %}</h4> <h4>{% trans %}Reloads{% endtrans %}</h4>
<table> <table>
<thead> <thead>
<tr> <tr>
<td>{% trans %}Date{% endtrans %}</td> <td>{% trans %}Date{% endtrans %}</td>
@ -66,13 +66,13 @@
<td><a href="{{ url('counter:refilling_delete', refilling_id=i.id) }}">{% trans %}Delete{% endtrans %}</a></td> <td><a href="{{ url('counter:refilling_delete', refilling_id=i.id) }}">{% trans %}Delete{% endtrans %}</a></td>
{% endif %} {% endif %}
</tr> </tr>
{% endfor %} {% endfor %}
</tbody> </tbody>
</table> </table>
{% endif %} {% endif %}
{% if customer.user.invoices.exists() %} {% if customer.user.invoices.exists() %}
<h4>{% trans %}Eboutic invoices{% endtrans %}</h4> <h4>{% trans %}Eboutic invoices{% endtrans %}</h4>
<table> <table>
<thead> <thead>
<tr> <tr>
<td>{% trans %}Date{% endtrans %}</td> <td>{% trans %}Date{% endtrans %}</td>
@ -94,12 +94,12 @@
</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 %}

View File

@ -5,11 +5,11 @@
{% 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>
@ -36,11 +36,11 @@
</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>
@ -65,12 +65,12 @@
</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>

View File

@ -2,11 +2,11 @@
{% 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 %}
@ -14,7 +14,7 @@
{% 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">
@ -168,9 +168,9 @@
{% endif %} {% endif %}
{% endif %} {% endif %}
</div> </div>
{% endif %} {% endif %}
<br> <br>
{% if profile.was_subscribed and (user == profile or user.can_read_subscription_history)%} {% 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" :class="{'shadow': collapsed}" x-data="{collapsed: false}" x-cloak>
<div class="collapse-header clickable" @click="collapsed = !collapsed"> <div class="collapse-header clickable" @click="collapsed = !collapsed">
<span class="collapse-header-text"> <span class="collapse-header-text">
@ -201,10 +201,10 @@
</table> </table>
</div> </div>
</div> </div>
{% endif %} {% endif %}
<hr> <hr>
<div> <div>
{% if user.is_root or user.is_board_member %} {% 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"> <form class="form-gifts" action="{{ url('core:user_gift_create', user_id=profile.id) }}" method="post">
{% csrf_token %} {% csrf_token %}
@ -246,8 +246,8 @@
{% 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";
@ -276,5 +276,5 @@
active: false active: false
}); });
}); });
</script> </script>
{% endblock %} {% endblock %}

View File

@ -1,16 +1,16 @@
{%- 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() }}
@ -103,11 +103,11 @@
{%- endif -%} {%- endif -%}
</div> </div>
</div> </div>
{%- endfor -%} {%- endfor -%}
</div> </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>
@ -119,29 +119,29 @@
</div> </div>
</div> </div>
{%- endfor -%} {%- endfor -%}
</div> </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>
@ -155,10 +155,10 @@
{%- 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,
@ -184,6 +184,6 @@
} }
}, "new_profile_pict", { name: 'csrfmiddlewaretoken', value: '{{ csrf_token }}' }); }, "new_profile_pict", { name: 'csrfmiddlewaretoken', value: '{{ csrf_token }}' });
} }
</script> </script>
{%- endif -%} {%- endif -%}
{%- endblock -%} {%- endblock -%}

View File

@ -2,15 +2,15 @@
{% 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>
@ -62,6 +62,6 @@
<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 %}

View File

@ -1,16 +1,16 @@
{% 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) }}">
@ -24,8 +24,8 @@
{% endif %} {% endif %}
</li> </li>
{% endfor %} {% endfor %}
</ul> </ul>
{% endif %} {% endif %}
{% endmacro %} {% endmacro %}
{% block content %} {% block content %}

View File

@ -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 -%}

View File

@ -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 %}

View File

@ -1,11 +1,11 @@
{% 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 %}

View File

@ -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_stats.scss') }}"> <link rel="stylesheet" href="{{ scss('user/user_stats.scss') }}">
{%- endblock -%} {%- endblock -%}
{% block title %} {% block title %}
{% trans user_name=profile.get_display_name() %}{{ user_name }}'s stats{% endtrans %} {% trans user_name=profile.get_display_name() %}{{ user_name }}'s stats{% endtrans %}
{% endblock %} {% endblock %}
{% block content %} {% block content %}
<div class="container"> <div class="container">
<div class="row"> <div class="row">
{% if profile.permanencies %} {% if profile.permanencies %}
<div> <div>
<h3>{% trans %}Permanencies{% endtrans %}</h3> <h3>{% trans %}Permanencies{% endtrans %}</h3>
@ -33,9 +33,9 @@
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<div> <div>
<h3>{% trans %}Product top 10{% endtrans %}</h3> <h3>{% trans %}Product top 10{% endtrans %}</h3>
<table> <table>
<thead> <thead>
@ -53,6 +53,6 @@
{% endfor %} {% endfor %}
</tbody> </tbody>
</table> </table>
</div> </div>
</div> </div>
{% endblock %} {% endblock %}

View File

@ -1,15 +1,15 @@
{% extends "core/base.jinja" %} {% extends "core/base.jinja" %}
{%- block additional_css -%} {%- block additional_css -%}
<link rel="stylesheet" href="{{ scss('user/user_tools.scss') }}"> <link rel="stylesheet" href="{{ scss('user/user_tools.scss') }}">
{%- endblock -%} {%- endblock -%}
{% block title %} {% block title %}
{% trans user_name=user.get_display_name() %}{{ user_name }}'s tools{% endtrans %} {% trans user_name=user.get_display_name() %}{{ user_name }}'s tools{% endtrans %}
{% endblock %} {% endblock %}
{% block content %} {% block content %}
<main> <main>
<h3>{% trans %}User Tools{% endtrans %}</h3> <h3>{% trans %}User Tools{% endtrans %}</h3>
<div class="container"> <div class="container">
@ -56,9 +56,9 @@
<li><a href="{{ url('counter:cash_summary_list') }}">{% trans %}Cash register summaries{% endtrans %}</a></li> <li><a href="{{ url('counter:cash_summary_list') }}">{% trans %}Cash register summaries{% endtrans %}</a></li>
<li><a href="{{ url('counter:invoices_call') }}">{% trans %}Invoices call{% endtrans %}</a></li> <li><a href="{{ url('counter:invoices_call') }}">{% trans %}Invoices call{% endtrans %}</a></li>
<li><a href="{{ url('counter:eticket_list') }}">{% trans %}Etickets{% endtrans %}</a></li> <li><a href="{{ url('counter:eticket_list') }}">{% trans %}Etickets{% endtrans %}</a></li>
{% endif %} {% endif %}
</ul> </ul>
<ul> <ul>
{% for b in settings.SITH_COUNTER_BARS %} {% for b in settings.SITH_COUNTER_BARS %}
{% if user.is_in_group(name=b[1]+" admin") %} {% if user.is_in_group(name=b[1]+" admin") %}
{% set c = Counter.objects.filter(id=b[0]).first() %} {% set c = Counter.objects.filter(id=b[0]).first() %}
@ -83,16 +83,16 @@
</li> </li>
{% endif %} {% endif %}
{% endfor %} {% endfor %}
</ul> </ul>
</div> </div>
{% endif %} {% endif %}
{% if {% if
user.is_root 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)
or user.memberships.ongoing().filter(role__gte=7).count() > 10 or user.memberships.ongoing().filter(role__gte=7).count() > 10
%} %}
<div> <div>
<h4>{% trans %}Accounting{% endtrans %}</h4> <h4>{% trans %}Accounting{% endtrans %}</h4>
<ul> <ul>
{% if user.is_root {% if user.is_root
@ -121,15 +121,15 @@
{%- endif -%} {%- endif -%}
{%- endfor %} {%- endfor %}
</ul> </ul>
</div> </div>
{% endif %} {% endif %}
{% if {% if
user.is_root user.is_root
or user.is_com_admin or user.is_com_admin
or user.is_in_group(pk=settings.SITH_GROUP_SAS_ADMIN_ID) or user.is_in_group(pk=settings.SITH_GROUP_SAS_ADMIN_ID)
%} %}
<div> <div>
<h4>{% trans %}Communication{% endtrans %}</h4> <h4>{% trans %}Communication{% endtrans %}</h4>
<ul> <ul>
{% if user.is_com_admin or user.is_root %} {% if user.is_com_admin or user.is_root %}
@ -149,10 +149,10 @@
<li><a href="{{ url('sas:moderation') }}">{% trans %}Moderate pictures{% endtrans %}</a></li> <li><a href="{{ url('sas:moderation') }}">{% trans %}Moderate pictures{% endtrans %}</a></li>
{% endif %} {% endif %}
</ul> </ul>
</div> </div>
{% endif %} {% endif %}
{% if user.memberships.filter(end_date=None).all().count() > 0 %} {% if user.memberships.filter(end_date=None).all().count() > 0 %}
<div> <div>
<h4>{% trans %}Club tools{% endtrans %}</h4> <h4>{% trans %}Club tools{% endtrans %}</h4>
<ul> <ul>
@ -161,22 +161,22 @@
{% endfor %} {% endfor %}
</ul> </ul>
</div> </div>
{% endif %} {% endif %}
{% if {% if
user.is_root user.is_root
or user.is_in_group(pk=settings.SITH_GROUP_PEDAGOGY_ADMIN_ID) or user.is_in_group(pk=settings.SITH_GROUP_PEDAGOGY_ADMIN_ID)
%} %}
<div> <div>
<h4>{% trans %}Pedagogy{% endtrans %}</h4> <h4>{% trans %}Pedagogy{% endtrans %}</h4>
<ul> <ul>
<li><a href="{{ url('pedagogy:uv_create') }}">{% trans %}Create UV{% endtrans %}</a></li> <li><a href="{{ url('pedagogy:uv_create') }}">{% trans %}Create UV{% endtrans %}</a></li>
<li><a href="{{ url('pedagogy:moderation') }}">{% trans %}Moderate comments{% endtrans %}</a></li> <li><a href="{{ url('pedagogy:moderation') }}">{% trans %}Moderate comments{% endtrans %}</a></li>
</ul> </ul>
</div> </div>
{% endif %} {% endif %}
<div> <div>
<h4>{% trans %}Elections{% endtrans %}</h4> <h4>{% trans %}Elections{% endtrans %}</h4>
<ul> <ul>
<li><a href="{{ url('election:list') }}">{% trans %}See available elections{% endtrans %}</a></li> <li><a href="{{ url('election:list') }}">{% trans %}See available elections{% endtrans %}</a></li>
@ -185,15 +185,15 @@
<li><a href="{{ url('election:create') }}">{% trans %}Create a new election{% endtrans %}</a></li> <li><a href="{{ url('election:create') }}">{% trans %}Create a new election{% endtrans %}</a></li>
{%- endif -%} {%- endif -%}
</ul> </ul>
</div> </div>
<div> <div>
<h4>{% trans %}Other tools{% endtrans %}</h4> <h4>{% trans %}Other tools{% endtrans %}</h4>
<ul> <ul>
<li><a href="{{ url('core:to_markdown') }}">{% trans %}Convert dokuwiki/BBcode syntax to Markdown{% endtrans %}</a></li> <li><a href="{{ url('core:to_markdown') }}">{% trans %}Convert dokuwiki/BBcode syntax to Markdown{% endtrans %}</a></li>
<li><a href="{{ url('trombi:user_tools') }}">{% trans %}Trombi tools{% endtrans %}</a></li> <li><a href="{{ url('trombi:user_tools') }}">{% trans %}Trombi tools{% endtrans %}</a></li>
</ul> </ul>
</div> </div>
</div> </div>
</main> </main>
{% endblock %} {% endblock %}

View File

@ -2,11 +2,11 @@
{% from 'core/macros.jinja' import user_profile_link %} {% from 'core/macros.jinja' import user_profile_link %}
{% block title %} {% block title %}
{% trans counter_name=counter %}{{ counter_name }} activity{% endtrans %} {% trans counter_name=counter %}{{ counter_name }} activity{% endtrans %}
{% endblock %} {% endblock %}
{%- block additional_css -%} {%- block additional_css -%}
<link rel="stylesheet" href="{{ scss('counter/activity.scss') }}"> <link rel="stylesheet" href="{{ scss('counter/activity.scss') }}">
{%- endblock -%} {%- endblock -%}
{% block content %} {% block content %}

View File

@ -1,7 +1,7 @@
{% extends "core/base.jinja" %} {% extends "core/base.jinja" %}
{% block title %} {% block title %}
{% trans obj=object %}Edit {{ obj }}{% endtrans %} {% trans obj=object %}Edit {{ obj }}{% endtrans %}
{% endblock %} {% endblock %}
{% block info_boxes %} {% block info_boxes %}
@ -11,8 +11,8 @@
{% endblock %} {% endblock %}
{% block content %} {% block content %}
<h2>{% trans %}Make a cash register summary{% endtrans %}</h2> <h2>{% trans %}Make a cash register summary{% endtrans %}</h2>
<form action="" method="post" id="cash_summary_form"> <form action="" method="post" id="cash_summary_form">
{% csrf_token %} {% csrf_token %}
{% for field in form %} {% for field in form %}
<p> <p>
@ -26,7 +26,7 @@
</p> </p>
{% endfor %} {% endfor %}
<p><input type="submit" name="submit" value="{% trans %}Save{% endtrans %}" onclick="return confirm('{% trans %}Are you sure ?{% endtrans %}');return false;" /></p> <p><input type="submit" name="submit" value="{% trans %}Save{% endtrans %}" onclick="return confirm('{% trans %}Are you sure ?{% endtrans %}');return false;" /></p>
</form> </form>
{% endblock %} {% endblock %}

View File

@ -2,31 +2,31 @@
{% from 'core/macros.jinja' import user_profile_link, paginate %} {% from 'core/macros.jinja' import user_profile_link, paginate %}
{% block title %} {% block title %}
{% trans %}Cash register summary list{% endtrans %} {% trans %}Cash register summary list{% endtrans %}
{% endblock %} {% endblock %}
{% block content %} {% block content %}
{% if cashsummary_list %} {% if cashsummary_list %}
<h3>{% trans %}Cash register summary list{% endtrans %}</h3> <h3>{% trans %}Cash register summary list{% endtrans %}</h3>
<h5>{% trans %}Theoric sums{% endtrans %}</h5> <h5>{% trans %}Theoric sums{% endtrans %}</h5>
<form action="" method="get"> <form action="" method="get">
{% csrf_token %} {% csrf_token %}
{{ form }} {{ form }}
<p><input type="submit" value="{% trans %}Show{% endtrans %}" /></p> <p><input type="submit" value="{% trans %}Show{% endtrans %}" /></p>
</form> </form>
<h6>{% trans %}Reloads{% endtrans %}</h6> <h6>{% trans %}Reloads{% endtrans %}</h6>
<p> <p>
{% for b,s in refilling_sums.items() %} {% for b,s in refilling_sums.items() %}
{{ b }}: {{ s }} €<br/> {{ b }}: {{ s }} €<br/>
{% endfor %} {% endfor %}
</p> </p>
<h6>{% trans %}Cash register summaries{% endtrans %}</h6> <h6>{% trans %}Cash register summaries{% endtrans %}</h6>
<p> <p>
{% for b,s in summaries_sums.items() %} {% for b,s in summaries_sums.items() %}
{{ b }}: {{ s }} €<br/> {{ b }}: {{ s }} €<br/>
{% endfor %} {% endfor %}
</p> </p>
<table> <table>
<thead> <thead>
<tr> <tr>
<td>{% trans %}User{% endtrans %}</td> <td>{% trans %}User{% endtrans %}</td>
@ -54,14 +54,14 @@
</tr> </tr>
{% endfor %} {% endfor %}
</tbody> </tbody>
</table> </table>
<br> <br>
{% if is_paginated %} {% if is_paginated %}
{{ paginate(page_obj, paginator) }} {{ paginate(page_obj, paginator) }}
{% endif %} {% endif %}
{% else %} {% else %}
{% trans %}There is no cash register summary in this website.{% endtrans %} {% trans %}There is no cash register summary in this website.{% endtrans %}
{% endif %} {% endif %}
{% endblock %} {% endblock %}

View File

@ -42,6 +42,7 @@
</form> </form>
<h6>{% trans %}Registered cards{% endtrans %}</h6> <h6>{% trans %}Registered cards{% endtrans %}</h6>
{% if student_cards %} {% if student_cards %}
<ul> <ul>
{% for card in student_cards %} {% for card in student_cards %}
<li>{{ card.uid }}</li> <li>{{ card.uid }}</li>

View File

@ -1,15 +1,15 @@
{% extends "core/base.jinja" %} {% extends "core/base.jinja" %}
{% block title %} {% block title %}
{% trans %}Counter admin list{% endtrans %} {% trans %}Counter admin list{% endtrans %}
{% endblock %} {% endblock %}
{% block content %} {% block content %}
<p><a href="{{ url('counter:new') }}">{% trans %}New counter{% endtrans %}</a></p> <p><a href="{{ url('counter:new') }}">{% trans %}New counter{% endtrans %}</a></p>
{% if counter_list %} {% if counter_list %}
<h3>{% trans %}Counter admin list{% endtrans %}</h3> <h3>{% trans %}Counter admin list{% endtrans %}</h3>
<h4>{% trans %}Eboutic{% endtrans %}</h4> <h4>{% trans %}Eboutic{% endtrans %}</h4>
<ul> <ul>
{% for c in counter_list.filter(type="EBOUTIC").order_by('name') %} {% for c in counter_list.filter(type="EBOUTIC").order_by('name') %}
<li> <li>
<a href="{{ url('eboutic:main') }}">{{ c }}</a> - <a href="{{ url('eboutic:main') }}">{{ c }}</a> -
@ -23,9 +23,9 @@
{% endif %} {% endif %}
</li> </li>
{% endfor %} {% endfor %}
</ul> </ul>
<h4>{% trans %}Bars{% endtrans %}</h4> <h4>{% trans %}Bars{% endtrans %}</h4>
<ul> <ul>
{% for c in counter_list.filter(type="BAR").order_by('name') %} {% for c in counter_list.filter(type="BAR").order_by('name') %}
<li> <li>
<a href="{{ url('counter:details', counter_id=c.id) }}">{{ c }}</a> - <a href="{{ url('counter:details', counter_id=c.id) }}">{{ c }}</a> -
@ -45,9 +45,9 @@
{% endif %} {% endif %}
</li> </li>
{% endfor %} {% endfor %}
</ul> </ul>
<h4>{% trans %}Offices{% endtrans %}</h4> <h4>{% trans %}Offices{% endtrans %}</h4>
<ul> <ul>
{% for c in counter_list.exclude(type="BAR").exclude(type="EBOUTIC").order_by('name') %} {% for c in counter_list.exclude(type="BAR").exclude(type="EBOUTIC").order_by('name') %}
<li> <li>
<a href="{{ url('counter:details', counter_id=c.id) }}">{{ c }}</a> - <a href="{{ url('counter:details', counter_id=c.id) }}">{{ c }}</a> -
@ -60,10 +60,10 @@
{% endif %} {% endif %}
</li> </li>
{% endfor %} {% endfor %}
</ul> </ul>
{% else %} {% else %}
{% trans %}There is no counters in this website.{% endtrans %} {% trans %}There is no counters in this website.{% endtrans %}
{% endif %} {% endif %}
{% endblock %} {% endblock %}

View File

@ -1,15 +1,15 @@
{% extends "core/base.jinja" %} {% extends "core/base.jinja" %}
{% macro barman_logout_link(user) %} {% macro barman_logout_link(user) %}
<form method="post" action="{{ url('counter:logout', counter_id=counter.id) }}" class="inline"> <form method="post" action="{{ url('counter:logout', counter_id=counter.id) }}" class="inline">
{% csrf_token %} {% csrf_token %}
<input type="hidden" name="user_id" value="{{ user.id }}"> <input type="hidden" name="user_id" value="{{ user.id }}">
<button type="submit" name="submit_param" value="submit_value" class="link-button">{{ user.get_display_name() }}</button> <button type="submit" name="submit_param" value="submit_value" class="link-button">{{ user.get_display_name() }}</button>
</form> </form>
{% endmacro %} {% endmacro %}
{% block title %} {% block title %}
{% trans counter_name=counter %}{{ counter_name }} counter{% endtrans %} {% trans counter_name=counter %}{{ counter_name }} counter{% endtrans %}
{% endblock %} {% endblock %}
{% block info_boxes %} {% block info_boxes %}
@ -19,7 +19,7 @@
{% endblock %} {% endblock %}
{% block content %} {% block content %}
<h3>{% trans counter_name=counter %}{{ counter_name }} counter{% endtrans %}</h3> <h3>{% trans counter_name=counter %}{{ counter_name }} counter{% endtrans %}</h3>
<div> <div>
<h3>{% trans %}Sales{% endtrans %}</h3> <h3>{% trans %}Sales{% endtrans %}</h3>
{% if last_basket %} {% if last_basket %}

View File

@ -1,21 +1,21 @@
{% extends "core/base.jinja" %} {% extends "core/base.jinja" %}
{% block title %} {% block title %}
{% trans %}Eticket list{% endtrans %} {% trans %}Eticket list{% endtrans %}
{% endblock %} {% endblock %}
{% block content %} {% block content %}
<p><a href="{{ url('counter:new_eticket') }}">{% trans %}New eticket{% endtrans %}</a></p> <p><a href="{{ url('counter:new_eticket') }}">{% trans %}New eticket{% endtrans %}</a></p>
{% if eticket_list %} {% if eticket_list %}
<h3>{% trans %}Eticket list{% endtrans %}</h3> <h3>{% trans %}Eticket list{% endtrans %}</h3>
<ul> <ul>
{% for t in eticket_list %} {% for t in eticket_list %}
<li><a href="{{ url('counter:edit_eticket', eticket_id=t.id) }}">{{ t }}</a> (ID: {{ t.product.id }} | Hash: <code>{{ t.secret }}</code>)</li> <li><a href="{{ url('counter:edit_eticket', eticket_id=t.id) }}">{{ t }}</a> (ID: {{ t.product.id }} | Hash: <code>{{ t.secret }}</code>)</li>
{% endfor %} {% endfor %}
</ul> </ul>
{% else %} {% else %}
{% trans %}There is no eticket in this website.{% endtrans %} {% trans %}There is no eticket in this website.{% endtrans %}
{% endif %} {% endif %}
{% endblock %} {% endblock %}

View File

@ -1,24 +1,24 @@
{% extends "core/base.jinja" %} {% extends "core/base.jinja" %}
{% block title %} {% block title %}
{% trans %}Invoices call{% endtrans %} {% trans %}Invoices call{% endtrans %}
{% endblock %} {% endblock %}
{% block content %} {% block content %}
<h3>{% trans date=start_date|date("F Y") %}Invoices call for {{ date }}{% endtrans %}</h3> <h3>{% trans date=start_date|date("F Y") %}Invoices call for {{ date }}{% endtrans %}</h3>
<p>{% trans %}Choose another month: {% endtrans %}</p> <p>{% trans %}Choose another month: {% endtrans %}</p>
<form method="get" action=""> <form method="get" action="">
<select name="month"> <select name="month">
{% for m in months %} {% for m in months %}
<option value="{{ m|date("Y-m") }}">{{ m|date("Y-m") }}</option> <option value="{{ m|date("Y-m") }}">{{ m|date("Y-m") }}</option>
{% endfor %} {% endfor %}
</select> </select>
<input type="submit" value="{% trans %}Go{% endtrans %}" /> <input type="submit" value="{% trans %}Go{% endtrans %}" />
</form> </form>
<br> <br>
<p>{% trans %}CB Payments{% endtrans %} : {{ sum_cb }} €</p> <p>{% trans %}CB Payments{% endtrans %} : {{ sum_cb }} €</p>
<br> <br>
<table> <table>
<thead> <thead>
<td>{% trans %}Club{% endtrans %}</td> <td>{% trans %}Club{% endtrans %}</td>
<td>{% trans %}Sum{% endtrans %}</td> <td>{% trans %}Sum{% endtrans %}</td>
@ -31,7 +31,7 @@
</tr> </tr>
{% endfor %} {% endfor %}
</tbody> </tbody>
</table> </table>
{% endblock %} {% endblock %}

View File

@ -2,7 +2,7 @@
{% from 'core/macros.jinja' import user_profile_link %} {% from 'core/macros.jinja' import user_profile_link %}
{% block title %} {% block title %}
{% trans counter_name=counter %}{{ counter_name }} last operations{% endtrans %} {% trans counter_name=counter %}{{ counter_name }} last operations{% endtrans %}
{% endblock %} {% endblock %}
{% block info_boxes %} {% block info_boxes %}
@ -12,9 +12,9 @@
{% endblock %} {% endblock %}
{% block content %} {% block content %}
<h3>{% trans counter_name=counter %}{{ counter_name }} last operations{% endtrans %}</h3> <h3>{% trans counter_name=counter %}{{ counter_name }} last operations{% endtrans %}</h3>
<h4>{% trans %}Reloads{% endtrans %}</h4> <h4>{% trans %}Reloads{% endtrans %}</h4>
<table> <table>
<thead> <thead>
<tr> <tr>
<td>{% trans %}Date{% endtrans %}</td> <td>{% trans %}Date{% endtrans %}</td>
@ -34,12 +34,12 @@
<td>{{ i.get_payment_method_display() }}</td> <td>{{ i.get_payment_method_display() }}</td>
<td><a href="{{ url('counter:refilling_delete', refilling_id=i.id) }}">{% trans %}Delete{% endtrans %}</a></td> <td><a href="{{ url('counter:refilling_delete', refilling_id=i.id) }}">{% trans %}Delete{% endtrans %}</a></td>
</tr> </tr>
{% endfor %} {% endfor %}
</tbody> </tbody>
</table> </table>
<h4>{% trans %}Sales{% endtrans %}</h4> <h4>{% trans %}Sales{% endtrans %}</h4>
<table> <table>
<thead> <thead>
<tr> <tr>
<td>{% trans %}Date{% endtrans %}</td> <td>{% trans %}Date{% endtrans %}</td>
@ -64,9 +64,9 @@
<td><a href="{{ url('counter:selling_delete', selling_id=i.id) }}?next={{ url('counter:details', <td><a href="{{ url('counter:selling_delete', selling_id=i.id) }}?next={{ url('counter:details',
counter_id=counter.id) }}">{% trans %}Delete{% endtrans %}</a></td> counter_id=counter.id) }}">{% trans %}Delete{% endtrans %}</a></td>
</tr> </tr>
{% endfor %} {% endfor %}
</tbody> </tbody>
</table> </table>
{% endblock %} {% endblock %}

View File

@ -1,32 +1,32 @@
{% extends "core/base.jinja" %} {% extends "core/base.jinja" %}
{% block title %} {% block title %}
{% trans %}Product list{% endtrans %} {% trans %}Product list{% endtrans %}
{% endblock %} {% endblock %}
{% block content %} {% block content %}
{% if current_tab == "products" %} {% if current_tab == "products" %}
<p><a href="{{ url('counter:new_product') }}">{% trans %}New product{% endtrans %}</a></p> <p><a href="{{ url('counter:new_product') }}">{% trans %}New product{% endtrans %}</a></p>
{% endif %} {% endif %}
{% if product_list %} {% if product_list %}
<h3>{% trans %}Product list{% endtrans %}</h3> <h3>{% trans %}Product list{% endtrans %}</h3>
{% for t in ProductType.objects.all().order_by('name') %} {% for t in ProductType.objects.all().order_by('name') %}
<h4>{{ t }}</h4> <h4>{{ t }}</h4>
<ul> <ul>
{% for p in product_list.filter(product_type=t).all().order_by('name') %} {% for p in product_list.filter(product_type=t).all().order_by('name') %}
<li><a href="{{ url('counter:product_edit', product_id=p.id) }}">{{ p }} ({{ p.code }})</a></li> <li><a href="{{ url('counter:product_edit', product_id=p.id) }}">{{ p }} ({{ p.code }})</a></li>
{% endfor %} {% endfor %}
</ul> </ul>
{% endfor %} {% endfor %}
<h4>{% trans %}Uncategorized{% endtrans %}</h4> <h4>{% trans %}Uncategorized{% endtrans %}</h4>
<ul> <ul>
{% for p in product_list.filter(product_type=None).all().order_by('name') %} {% for p in product_list.filter(product_type=None).all().order_by('name') %}
<li><a href="{{ url('counter:product_edit', product_id=p.id) }}">{{ p }} ({{ p.code }})</a></li> <li><a href="{{ url('counter:product_edit', product_id=p.id) }}">{{ p }} ({{ p.code }})</a></li>
{% endfor %} {% endfor %}
</ul> </ul>
{% else %} {% else %}
{% trans %}There is no products in this website.{% endtrans %} {% trans %}There is no products in this website.{% endtrans %}
{% endif %} {% endif %}
{% endblock %} {% endblock %}

View File

@ -1,21 +1,21 @@
{% extends "core/base.jinja" %} {% extends "core/base.jinja" %}
{% block title %} {% block title %}
{% trans %}Product type list{% endtrans %} {% trans %}Product type list{% endtrans %}
{% endblock %} {% endblock %}
{% block content %} {% block content %}
<p><a href="{{ url('counter:new_producttype') }}">{% trans %}New product type{% endtrans %}</a></p> <p><a href="{{ url('counter:new_producttype') }}">{% trans %}New product type{% endtrans %}</a></p>
{% if producttype_list %} {% if producttype_list %}
<h3>{% trans %}Product type list{% endtrans %}</h3> <h3>{% trans %}Product type list{% endtrans %}</h3>
<ul> <ul>
{% for t in producttype_list %} {% for t in producttype_list %}
<li><a href="{{ url('counter:producttype_edit', type_id=t.id) }}">{{ t }}</a></li> <li><a href="{{ url('counter:producttype_edit', type_id=t.id) }}">{{ t }}</a></li>
{% endfor %} {% endfor %}
</ul> </ul>
{% else %} {% else %}
{% trans %}There is no product types in this website.{% endtrans %} {% trans %}There is no product types in this website.{% endtrans %}
{% endif %} {% endif %}
{% endblock %} {% endblock %}

Some files were not shown because too many files have changed in this diff Show More