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/
.coverage
coverage_report/
doc/_build
# compiled documentation
site/

View File

@ -8,3 +8,14 @@ repos:
args: ["--fix", "--silent"]
# Run the formatter.
- 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" %}
{% block title %}
{% trans %}Accounting type list{% endtrans %}
{% trans %}Accounting type list{% endtrans %}
{% endblock %}
{% block content %}

View File

@ -1,7 +1,7 @@
{% extends "core/base.jinja" %}
{% block title %}
{% trans %}Bank account: {% endtrans %}{{ object.name }}
{% trans %}Bank account: {% endtrans %}{{ object.name }}
{% endblock %}
{% block content %}

View File

@ -1,7 +1,7 @@
{% extends "core/base.jinja" %}
{% block title %}
{% trans %}Bank account list{% endtrans %}
{% trans %}Bank account list{% endtrans %}
{% endblock %}
{% block content %}

View File

@ -1,7 +1,7 @@
{% extends "core/base.jinja" %}
{% block title %}
{% trans %}Club account:{% endtrans %} {{ object.name }}
{% trans %}Club account:{% endtrans %} {{ object.name }}
{% endblock %}
{% block content %}

View File

@ -1,7 +1,7 @@
{% extends "core/base.jinja" %}
{% block title %}
{% trans %}Company list{% endtrans %}
{% trans %}Company list{% endtrans %}
{% endblock %}
{% block content %}
@ -10,9 +10,9 @@
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>
{% endif %}
<br/>
<table>
{% endif %}
<br/>
<table>
<thead>
<tr>
<td>{% trans %}Companies{% endtrans %}</td>
@ -25,6 +25,6 @@
</tr>
{% endfor %}
</tbody>
</table>
</div>
</table>
</div>
{% endblock %}

View File

@ -1,7 +1,7 @@
{% extends "core/base.jinja" %}
{% block title %}
{% trans %}General journal:{% endtrans %} {{ object.name }}
{% trans %}General journal:{% endtrans %} {{ object.name }}
{% endblock %}
{% block content %}
@ -95,9 +95,9 @@
</td>
<td><a href="{{ url('accounting:op_pdf', op_id=o.id) }}">{% trans %}Generate{% endtrans %}</a></td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
{% endfor %}
</tbody>
</table>
</div>
</div>
{% endblock %}

View File

@ -1,12 +1,12 @@
{% extends "core/base.jinja" %}
{% block title %}
{% trans %}General journal:{% endtrans %} {{ object.name }}
{% trans %}General journal:{% endtrans %} {{ object.name }}
{% endblock %}
{% block content %}
<div id="accounting">
<div id="accounting">
<h3>{% trans %}Accounting statement: {% endtrans %} {{ object.name }}</h3>
<table>
@ -29,5 +29,5 @@
<p><strong>{% trans %}Amount: {% endtrans %}</strong>{{ "%.2f" % object.amount }} €</p>
<p><strong>{% trans %}Effective amount: {% endtrans %}</strong>{{ "%.2f" %object.effective_amount }} €</p>
</div>
</div>
{% endblock %}

View File

@ -1,11 +1,11 @@
{% extends "core/base.jinja" %}
{% block title %}
{% trans %}General journal:{% endtrans %} {{ object.name }}
{% trans %}General journal:{% endtrans %} {{ object.name }}
{% endblock %}
{% macro display_tables(dict) %}
<div id="accounting">
<div id="accounting">
<h6>{% trans %}Credit{% endtrans %}</h6>
<table>
<thead>
@ -43,9 +43,9 @@
</tbody>
</table>
{% trans %}Total: {% endtrans %}{{ "%.2f" % dict['DEBIT_sum'] }}
{% endmacro %}
{% endmacro %}
{% block content %}
{% block content %}
<h3>{% trans %}Statement by nature: {% endtrans %} {{ object.name }}</h3>
{% for k,v in statement.items() %}
@ -53,5 +53,5 @@
{{ display_tables(v) }}
<hr>
{% endfor %}
</div>
</div>
{% endblock %}

View File

@ -1,12 +1,12 @@
{% extends "core/base.jinja" %}
{% block title %}
{% trans %}General journal:{% endtrans %} {{ object.name }}
{% trans %}General journal:{% endtrans %} {{ object.name }}
{% endblock %}
{% block content %}
<div id="accounting">
<div id="accounting">
<h3>{% trans %}Statement by person: {% endtrans %} {{ object.name }}</h3>
<h4>{% trans %}Credit{% endtrans %}</h4>
@ -64,5 +64,5 @@
</table>
<p>Total : {{ "%.2f" % total_debit }}</p>
</div>
</div>
{% endblock %}

View File

@ -1,7 +1,7 @@
{% extends "core/base.jinja" %}
{% block title %}
{% trans %}Label list{% endtrans %}
{% trans %}Label list{% endtrans %}
{% endblock %}
{% block content %}

View File

@ -1,11 +1,11 @@
{% extends "core/base.jinja" %}
{% block title %}
{% trans %}Edit operation{% endtrans %}
{% trans %}Edit operation{% endtrans %}
{% endblock %}
{% block content %}
<div id="accounting">
<div id="accounting">
<p>
<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> >
@ -54,9 +54,9 @@
{% endif %}
<p><input type="submit" value="{% trans %}Save{% endtrans %}" /></p>
</form>
{% endblock %}
{% endblock %}
{% block script %}
{% block script %}
{{ super() }}
<script>
$( function() {
@ -117,7 +117,7 @@
target_type.change(update_targets);
} );
</script>
</div>
</div>
{% endblock %}

View File

@ -1,7 +1,7 @@
{% extends "core/base.jinja" %}
{% block title %}
{% trans %}Refound account{% endtrans %}
{% trans %}Refound account{% endtrans %}
{% endblock %}
{% block content %}

View File

@ -1,7 +1,7 @@
{% extends "core/base.jinja" %}
{% block title %}
{% trans %}Simplified type list{% endtrans %}
{% trans %}Simplified type list{% endtrans %}
{% endblock %}
{% block content %}

View File

@ -264,33 +264,26 @@ class TestOperation(TestCase):
)
self.assertContains(response, "Total : 5575.72", status_code=200)
self.assertContains(response, "Total : 71.42")
self.assertContains(
response,
"""
<td><a href="/user/1/">S&#39; Kia</a></td>
<td>3.00</td>""",
content = response.content.decode()
self.assertInHTML(
"""<td><a href="/user/1/">S&#39; Kia</a></td><td>3.00</td>""", content
)
self.assertContains(
response,
"""
<td><a href="/user/1/">S&#39; Kia</a></td>
<td>823.00</td>""",
self.assertInHTML(
"""<td><a href="/user/1/">S&#39; Kia</a></td><td>823.00</td>""", content
)
def test_accounting_statement(self):
response = self.client.get(
reverse("accounting:journal_accounting_statement", args=[self.journal.id])
)
self.assertContains(
response,
assert response.status_code == 200
self.assertInHTML(
"""
<tr>
<td>443 - Crédit - Ce code n&#39;existe pas</td>
<td>3.00</td>
</tr>""",
status_code=200,
response.content.decode(),
)
self.assertContains(
response,

View File

@ -1,7 +1,7 @@
{% extends "core/base.jinja" %}
{% block title %}
{% trans %}Club list{% endtrans %}
{% trans %}Club list{% endtrans %}
{% endblock %}
{% macro display_club(club) -%}

View File

@ -2,19 +2,19 @@
{% from 'core/macros.jinja' import user_profile_link, paginate %}
{% block content %}
<h3>{% trans %}Sales{% endtrans %}</h3>
<form id="form" action="?page=1" method="post">
<h3>{% trans %}Sales{% endtrans %}</h3>
<form id="form" action="?page=1" method="post">
{% csrf_token %}
{{ form }}
<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>
</form>
<p>
{% trans %}Quantity: {% endtrans %}{{ total_quantity }} {% trans %}units{% endtrans %}<br/>
{% trans %}Total: {% endtrans %}{{ total }} €<br/>
{% trans %}Benefit: {% endtrans %}{{ benefit }}
</p>
<table>
</form>
<p>
{% trans %}Quantity: {% endtrans %}{{ total_quantity }} {% trans %}units{% endtrans %}<br/>
{% trans %}Total: {% endtrans %}{{ total }} €<br/>
{% trans %}Benefit: {% endtrans %}{{ benefit }}
</p>
<table>
<thead>
<tr>
<td>{% trans %}Date{% endtrans %}</td>
@ -52,15 +52,15 @@
</tr>
{% endfor %}
</tbody>
</table>
<script type="text/javascript">
</table>
<script type="text/javascript">
function formPagination(link){
$("form").attr("action", link.href);
link.href = "javascript:void(0)"; // block link action
$("form").submit();
}
</script>
{{ paginate(paginated_result, paginator, "formPagination(this)") }}
</script>
{{ paginate(paginated_result, paginator, "formPagination(this)") }}
{% endblock %}

View File

@ -1,8 +1,8 @@
{% extends "core/base.jinja" %}
{% block content %}
<h3>{% trans %}Club tools{% endtrans %}</h3>
<div>
<h3>{% trans %}Club tools{% endtrans %}</h3>
<div>
<h4>{% trans %}Communication:{% endtrans %}</h4>
<ul>
<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'] %}
<li><a href="{{ url('launderette:launderette_list') }}">{% trans %}Manage launderettes{% endtrans %}</a></li>
{% endif %}
</div>
</div>
{% endblock %}

View File

@ -2,7 +2,7 @@
{% from 'core/macros.jinja' import select_all_checkbox %}
{% block title %}
{% trans %}Mailing lists{% endtrans %}
{% trans %}Mailing lists{% endtrans %}
{% endblock %}
{% block content %}

View File

@ -2,7 +2,7 @@
{% from 'core/macros_pages.jinja' import page_edit_form %}
{% block content %}
{{ page_edit_form(page, form, url('club:club_edit_page', club_id=page.club.id), csrf_token) }}
{{ page_edit_form(page, form, url('club:club_edit_page', club_id=page.club.id), csrf_token) }}
{% endblock %}

View File

@ -1,7 +1,7 @@
{% extends "core/base.jinja" %}
{% block title %}
{% trans %}Club stats{% endtrans %}
{% trans %}Club stats{% endtrans %}
{% endblock %}
{% block content %}

View File

@ -1,7 +1,7 @@
{% extends "core/base.jinja" %}
{% block title %}
{% trans %}Mailing lists administration{% endtrans %}
{% trans %}Mailing lists administration{% endtrans %}
{% endblock %}
{% macro display_mailings(list) %}

View File

@ -2,7 +2,7 @@
{% from 'core/macros.jinja' import user_profile_link %}
{% block title %}
{% trans %}News admin{% endtrans %}
{% trans %}News admin{% endtrans %}
{% endblock %}
{% 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 %}
{% block title %}
{% trans %}News{% endtrans %} -
{{ object.title }}
{% trans %}News{% endtrans %} -
{{ object.title }}
{% endblock %}
{% block head %}
{{ super() }}
{{ gen_news_metatags(news) }}
{{ super() }}
{{ gen_news_metatags(news) }}
{% endblock %}
{% block content %}
<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">
<div class="club_logo">
<img src="{{ link_news_logo(news)}}" alt="{{ news.club }}" />

View File

@ -2,16 +2,16 @@
{% from 'core/macros.jinja' import user_profile_link %}
{% block title %}
{% if object %}
{% trans %}Edit news{% endtrans %}
{% else %}
{% trans %}Create news{% endtrans %}
{% endif %}
{% if object %}
{% trans %}Edit news{% endtrans %}
{% else %}
{% trans %}Create news{% endtrans %}
{% endif %}
{% endblock %}
{% block content %}
{% if 'preview' in request.POST.keys() %}
<section class="news_event">
{% if 'preview' in request.POST.keys() %}
<section class="news_event">
<h4>{{ form.instance.title }}</h4>
<p class="date">
<span>{{ form.instance.dates.first().start_date|localtime|date(DATETIME_FORMAT) }}
@ -23,14 +23,14 @@
<div>{{ form.instance.summary|markdown }}</div>
<div>{{ form.instance.content|markdown }}</div>
<p>{% trans %}Author: {% endtrans %} {{ user_profile_link(form.instance.author) }}</p>
</section>
{% endif %}
{% if object %}
<h2>{% trans %}Edit news{% endtrans %}</h2>
{% else %}
<h2>{% trans %}Create news{% endtrans %}</h2>
{% endif %}
<form action="" method="post">
</section>
{% endif %}
{% if object %}
<h2>{% trans %}Edit news{% endtrans %}</h2>
{% else %}
<h2>{% trans %}Create news{% endtrans %}</h2>
{% endif %}
<form action="" method="post">
{% csrf_token %}
{{ form.non_field_errors() }}
{{ form.author }}
@ -55,13 +55,13 @@
{% endif %}
<p><input type="submit" name="preview" value="{% trans %}Preview{% endtrans %}" /></p>
<p><input type="submit" value="{% trans %}Save{% endtrans %}" /></p>
</form>
</form>
{% endblock %}
{% block script %}
{{ super() }}
<script>
$( function() {
<script>
$( function() {
var type = $('input[name=type]');
var dates = $('.date');
var until = $('.until');
@ -81,7 +81,7 @@ $( function() {
update_targets();
type.change(update_targets);
} );
</script>
</script>
{% endblock %}

View File

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

View File

@ -1,11 +1,11 @@
{% extends "core/base.jinja" %}
{% block title %}
{% trans %}Poster{% endtrans %}
{% trans %}Poster{% endtrans %}
{% endblock %}
{% block content %}
<div id="poster_edit">
<div id="poster_edit">
<div id="title">
<div id="links" class="left">
@ -36,7 +36,7 @@
</div>
</div>
</div>
{% endblock %}

View File

@ -1,17 +1,17 @@
{% extends "core/base.jinja" %}
{% block script %}
{{ super() }}
<script src="{{ static('com/js/poster_list.js') }}"></script>
{{ super() }}
<script src="{{ static('com/js/poster_list.js') }}"></script>
{% endblock %}
{% block title %}
{% trans %}Poster{% endtrans %}
{% trans %}Poster{% endtrans %}
{% endblock %}
{% block content %}
<div id="poster_list">
<div id="poster_list">
<div id="title">
<h3>{% trans %}Posters{% endtrans %}</h3>
@ -60,7 +60,7 @@
<div id="view"><div id="placeholder"></div></div>
</div>
</div>
{% endblock %}

View File

@ -1,12 +1,12 @@
{% extends "core/base.jinja" %}
{% block script %}
{{ super() }}
<script src="{{ static('com/js/poster_list.js') }}"></script>
{{ super() }}
<script src="{{ static('com/js/poster_list.js') }}"></script>
{% endblock %}
{% block content %}
<div id="poster_list">
<div id="poster_list">
<div id="title">
<div id="links" class="left">
@ -35,5 +35,5 @@
<div id="view"><div id="placeholder"></div></div>
</div>
</div>
{% endblock %}

View File

@ -1,11 +1,11 @@
{% extends "core/base.jinja" %}
{% block title %}
{% trans %}Screen{% endtrans %}
{% trans %}Screen{% endtrans %}
{% endblock %}
{% block content %}
<div id="screen_edit">
<div id="screen_edit">
<div id="title">
<div id="links" class="left">
@ -27,7 +27,7 @@
</div>
</div>
</div>
{% endblock %}

View File

@ -1,11 +1,11 @@
{% extends "core/base.jinja" %}
{% block title %}
{% trans %}Screens{% endtrans %}
{% trans %}Screens{% endtrans %}
{% endblock %}
{% block content %}
<div id="screen_list">
<div id="screen_list">
<div id="title">
<h3>{% trans %}Screens{% endtrans %}</h3>
@ -32,7 +32,7 @@
</div>
</div>
</div>
{% endblock %}

View File

@ -1,10 +1,10 @@
<!DOCTYPE html>
<html lang="fr">
<head>
<head>
<title>{% trans %}Slideshow{% endtrans %}</title>
<link href="{{ scss('com/slideshow.scss') }}" rel="stylesheet" type="text/css" />
</head>
<body>
</head>
<body>
<div id="slideshow">
<div id="slides">
@ -26,5 +26,5 @@
</div>
<script src="{{ static('core/js/jquery-3.6.2.min.js') }}"></script>
<script src="{{ static('com/js/slideshow.js') }}"></script>
</body>
</body>
</html>

View File

@ -2,16 +2,16 @@
{% from 'core/macros.jinja' import user_profile_link %}
{% block title %}
{% trans %}Weekmail{% endtrans %}
{% trans %}Weekmail{% endtrans %}
{% endblock %}
{% block content %}
<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') }}?send=true">{% trans %}Send{% 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>
<table>
<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') }}?send=true">{% trans %}Send{% 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>
<table>
<thead>
<tr>
<td>{% trans %}Author{% endtrans %}</td>
@ -38,9 +38,9 @@
</tr>
{% endfor %}
</tbody>
</table>
<h4>{% trans %}Articles included the next weekmail{% endtrans %}</h4>
<table>
</table>
<h4>{% trans %}Articles included the next weekmail{% endtrans %}</h4>
<table>
<thead>
<tr>
<td>{% trans %}Author{% endtrans %}</td>
@ -67,12 +67,12 @@
</tr>
{% endfor %}
</tbody>
</table>
<form action="" method="post" enctype="multipart/form-data">
</table>
<form action="" method="post" enctype="multipart/form-data">
{% csrf_token %}
{{ form.as_p() }}
<p><input type="submit" value="{% trans %}Save{% endtrans %}" /></p>
</form>
</form>
{% endblock %}

View File

@ -2,12 +2,12 @@
{% from 'core/macros.jinja' import user_profile_link %}
{% block title %}
{{ weekmail.title }}
{{ weekmail.title }}
{% endblock %}
{% block content %}
<a href="{{ url('com:weekmail') }}">{% trans %}Back{% endtrans %}</a>
{% if bad_recipients %}
<a href="{{ url('com:weekmail') }}">{% trans %}Back{% endtrans %}</a>
{% if bad_recipients %}
<p>
<span class="important">
{% trans %}The following recipients were refused by the SMTP:{% endtrans %}
@ -23,7 +23,7 @@
{% csrf_token %}
<button type="submit" name="send" value="clean">{% trans %}Clean subscribers{% endtrans %}</button>
</form>
{% else %}
{% else %}
{% if request.GET['send'] %}
<p>{% trans %}Are you sure you want to send this weekmail?{% endtrans %}</p>
{% if request.LANGUAGE_CODE != settings.LANGUAGE_CODE[:2] %}
@ -34,9 +34,9 @@
<button type="submit" name="send" value="validate">{% trans %}Send{% endtrans %}</button>
</form>
{% endif %}
{% endif %}
<hr>
{{ weekmail_rendered|safe }}
{% endif %}
<hr>
{{ weekmail_rendered|safe }}
{% endblock %}

View File

@ -1,12 +1,12 @@
<style type="text/css" media="all">
h1, h2, h3, h4, h5, h6, p {
h1, h2, h3, h4, h5, h6, p {
padding: 5px ;
margin: 5px;
}
img {
}
img {
margin: 5px ;
width: 95%;
}
}
</style>
<div style="background: #CBD1DD; padding: 0px 5%;">
<div style="background: #F9FAFB;">
@ -48,5 +48,5 @@ img {
<img src="{{ weekmail.get_footer() }}"
</div>
</div>
</div>

View File

@ -1,8 +1,8 @@
# {{ weekmail.title }}
{%- if weekmail.intro %}
## {% trans %}Intro{% endtrans %}
{{ weekmail.intro }}
## {% trans %}Intro{% endtrans %}
{{ weekmail.intro }}
{% endif %}
## {% trans %}Table of content{% endtrans %}
@ -11,22 +11,22 @@
{% endfor -%}
{% for a in weekmail.articles.all() %}
## [{{ a.club }}] {{ a.title }}
{{ a.content }}
## [{{ a.club }}] {{ a.title }}
{{ a.content }}
{% endfor -%}
{%- if weekmail.joke %}
## {% trans %}Joke{% endtrans %}
{{ weekmail.joke }}
## {% trans %}Joke{% endtrans %}
{{ weekmail.joke }}
{% endif -%}
{%- if weekmail.protip %}
## {% trans %}Pro tip{% endtrans %}
{{ weekmail.protip }}
## {% trans %}Pro tip{% endtrans %}
{{ weekmail.protip }}
{% endif -%}
{%- if weekmail.conclusion %}
## {% trans %}Final word{% endtrans %}
{{ weekmail.conclusion }}
## {% trans %}Final word{% endtrans %}
{{ weekmail.conclusion }}
{% endif -%}

View File

@ -69,11 +69,11 @@ class TestCom(TestCase):
},
)
r = self.client.get(reverse("core:index"))
self.assertContains(
r,
"""<div id="alert_box">
<div class="markdown"><h3>ALERTE!</h3>
<p><strong>Caaaataaaapuuuulte!!!!</strong></p>""",
assert r.status_code == 200
self.assertInHTML(
"""<div id="alert_box"><div class="markdown"><h3>ALERTE!</h3>
<p><strong>Caaaataaaapuuuulte!!!!</strong></p>""",
r.content.decode(),
)
def test_info_msg(self):
@ -86,10 +86,12 @@ class TestCom(TestCase):
},
)
r = self.client.get(reverse("core:index"))
self.assertContains(
r,
"""<div id="info_box">
<div class="markdown"><h3>INFO: <strong>Caaaataaaapuuuulte!!!!</strong></h3>""",
assert r.status_code == 200
self.assertInHTML(
"""<div id="info_box"><div class="markdown">
<h3>INFO: <strong>Caaaataaaapuuuulte!!!!</strong></h3>""",
r.content.decode(),
)
def test_birthday_non_subscribed_user(self):

View File

@ -246,7 +246,7 @@ a:not(.button) {
#page {
width: 90%;
margin: 20px auto 0;
/*---------------------------------NAV---------------------------------*/
/*---------------------------------NAV---------------------------------*/
.btn {
font-size: 15px;
@ -278,7 +278,7 @@ a:not(.button) {
}
}
/*--------------------------------CONTENT------------------------------*/
/*--------------------------------CONTENT------------------------------*/
#quick_notif {
width: 100%;
margin: 0 auto;
@ -357,7 +357,7 @@ a:not(.button) {
}
}
/*---------------------------------NEWS--------------------------------*/
/*---------------------------------NEWS--------------------------------*/
#news {
display: flex;
@ -385,11 +385,11 @@ a:not(.button) {
background: $second-color;
box-shadow: $shadow-color 1px 1px 1px;
padding: 0.4em;
margin: 0em 0em 0.5em 0em;
margin: 0 0 0.5em 0;
text-transform: uppercase;
font-size: 1.1em;
&:not(:first-of-type) {
margin: 2em 0em 1em 0em;
margin: 2em 0 1em 0;
}
}
}
@ -400,7 +400,7 @@ a:not(.button) {
}
}
/* AGENDA/BIRTHDAYS */
/* AGENDA/BIRTHDAYS */
#agenda,
#birthdays {
display: block;
@ -410,7 +410,7 @@ a:not(.button) {
margin-bottom: 1em;
#agenda_title,
#birthdays_title {
margin: 0em;
margin: 0;
border-radius: 5px 5px 0 0;
box-shadow: $shadow-color 1px 1px 1px;
padding: 0.5em;
@ -444,7 +444,7 @@ a:not(.button) {
}
}
ul.birthdays_year {
margin: 0em;
margin: 0;
list-style-type: none;
font-weight: bold;
> li {
@ -454,7 +454,7 @@ a:not(.button) {
}
}
ul {
margin: 0em;
margin: 0;
margin-left: 1em;
list-style-type: square;
list-style-position: inside;
@ -463,9 +463,9 @@ a:not(.button) {
}
}
}
/* END AGENDA/BIRTHDAYS */
/* END AGENDA/BIRTHDAYS */
/* EVENTS TODAY AND NEXT FEW DAYS */
/* EVENTS TODAY AND NEXT FEW DAYS */
.news_events_group {
box-shadow: $shadow-color 1px 1px 1px;
margin-left: 1em;
@ -516,14 +516,14 @@ a:not(.button) {
float: left;
min-width: 7em;
max-width: 9em;
margin: 0em;
margin: 0;
margin-right: 1em;
margin-top: 0.8em;
img {
max-height: 6em;
max-width: 8em;
display: block;
margin: 0em auto;
margin: 0 auto;
}
}
.news_date {
@ -544,15 +544,15 @@ a:not(.button) {
}
}
}
/* END EVENTS TODAY AND NEXT FEW DAYS */
/* END EVENTS TODAY AND NEXT FEW DAYS */
/* COMING SOON */
/* COMING SOON */
.news_coming_soon {
display: list-item;
list-style-type: square;
list-style-position: inside;
margin-left: 1em;
padding-left: 0em;
padding-left: 0;
a {
font-weight: bold;
text-transform: uppercase;
@ -561,35 +561,35 @@ a:not(.button) {
font-size: 0.9em;
}
}
/* END COMING SOON */
/* END COMING SOON */
/* NOTICES */
/* NOTICES */
.news_notice {
margin: 0em 0em 1em 1em;
margin: 0 0 1em 1em;
padding: 0.4em;
padding-left: 1em;
background: $secondary-neutral-light-color;
box-shadow: $shadow-color 0 0 2px;
border-radius: 18px 5px 18px 5px;
h4 {
margin: 0em;
margin: 0;
}
.news_content {
margin-left: 1em;
}
}
/* END NOTICES */
/* END NOTICES */
/* CALLS */
/* CALLS */
.news_call {
margin: 0em 0em 1em 1em;
margin: 0 0 1em 1em;
padding: 0.4em;
padding-left: 1em;
background: $secondary-neutral-light-color;
border: 1px solid grey;
box-shadow: $shadow-color 1px 1px 1px;
h4 {
margin: 0em;
margin: 0;
}
.news_date {
font-size: 0.9em;
@ -598,7 +598,7 @@ a:not(.button) {
margin-left: 1em;
}
}
/* END CALLS */
/* END CALLS */
.news_empty {
margin-left: 1em;
@ -631,12 +631,12 @@ a:not(.button) {
width: 19%;
float: left;
min-width: 15em;
margin: 0em;
margin: 0;
img {
max-height: 15em;
max-width: 12em;
display: block;
margin: 0em auto;
margin: 0 auto;
margin-bottom: 10px;
}
}
@ -646,7 +646,6 @@ a:not(.button) {
padding: 0.5em 1em;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 1.2em;
border-radius: 2px;
float: right;
@ -1198,8 +1197,8 @@ u,
color: $primary-neutral-dark-color;
height: 100%;
width: 100%;
margin: 0em;
padding: 0em;
margin: 0;
padding: 0;
display: block;
}
}
@ -1393,7 +1392,7 @@ footer {
text-align: center;
vertical-align: middle;
div {
margin: 0.6em 0em;
margin: 0.6em 0;
color: $white-color;
border-radius: 5px;
display: flex;

View File

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

View File

@ -2,9 +2,9 @@
{% block content %}
<div id="page">
<div id="page">
<h3>{% trans %}404, Not Found{% endtrans %}</h3>
</div>
</div>
{% endblock %}

View File

@ -1,6 +1,6 @@
{% extends "core/base.jinja" %}
{% block head %}
{{ super() }}
{{ super() }}
<script
src="https://browser.sentry-cdn.com/7.11.1/bundle.min.js"
integrity="sha384-qcYSo5+/E8hEkPmHFa79GRDsGT84SRhBJHRw3+dbQyh0UwueiFP1jCsRBClEREcs"
@ -23,5 +23,5 @@
{% endif %}
})
</script>
{% endif %}
{% endif %}
{% endblock content %}

View File

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

View File

@ -1,16 +1,16 @@
{% extends "core/base.jinja" %}
{% block title %}
{% trans name=form.instance.__class__._meta.verbose_name %}Create {{ name }}{% endtrans %}
{% trans name=form.instance.__class__._meta.verbose_name %}Create {{ name }}{% endtrans %}
{% endblock %}
{% block content %}
<h2>{% trans name=form.instance.__class__._meta.verbose_name %}Create {{ name }}{% endtrans %}</h2>
<form action="" method="post" enctype="multipart/form-data">
<h2>{% trans name=form.instance.__class__._meta.verbose_name %}Create {{ name }}{% endtrans %}</h2>
<form action="" method="post" enctype="multipart/form-data">
{% csrf_token %}
{{ form.as_p() }}
<p><input type="submit" value="{% trans %}Save{% endtrans %}" /></p>
</form>
</form>
{% endblock %}

View File

@ -1,7 +1,7 @@
{% extends "core/base.jinja" %}
{% block title %}
{% trans %}Delete confirmation{% endtrans %}
{% trans %}Delete confirmation{% endtrans %}
{% endblock %}
{% block info_boxes %}
@ -11,14 +11,14 @@
{% endblock %}
{% block content %}
<h2>{% trans %}Delete confirmation{% endtrans %}</h2>
<form action="" method="post">{% csrf_token %}
<h2>{% trans %}Delete confirmation{% endtrans %}</h2>
<form action="" method="post">{% csrf_token %}
<p>{% trans obj=object %}Are you sure you want to delete "{{ obj }}"?{% endtrans %}</p>
<input type="submit" value="{% trans %}Confirm{% endtrans %}" />
</form>
<form method="GET" action="javascript:history.back();">
</form>
<form method="GET" action="javascript:history.back();">
<input type="submit" name="cancel" value="{% trans %}Cancel{% endtrans %}" />
</form>
</form>
{% endblock %}

View File

@ -1,24 +1,24 @@
{% extends "core/base.jinja" %}
{% block title %}
{% if object %}
{% trans obj=object %}Edit {{ obj }}{% endtrans %}
{% else %}
{% trans %}Save{% endtrans %}
{% endif %}
{% if object %}
{% trans obj=object %}Edit {{ obj }}{% endtrans %}
{% else %}
{% trans %}Save{% endtrans %}
{% endif %}
{% endblock %}
{% block content %}
{% if object %}
<h2>{% trans obj=object %}Edit {{ obj }}{% endtrans %}</h2>
{% else %}
<h2>{% trans %}Save{% endtrans %}</h2>
{% endif %}
<form action="" method="post" enctype="multipart/form-data">
{% if object %}
<h2>{% trans obj=object %}Edit {{ obj }}{% endtrans %}</h2>
{% else %}
<h2>{% trans %}Save{% endtrans %}</h2>
{% endif %}
<form action="" method="post" enctype="multipart/form-data">
{% csrf_token %}
{{ form.as_p() }}
<p><input type="submit" value="{% trans %}Save{% endtrans %}" /></p>
</form>
</form>
{% endblock %}

View File

@ -1,30 +1,30 @@
{% extends "core/base.jinja" %}
{% block title %}
{% if file %}
{{ file.get_display_name() }}
{% elif file_list %}
{% trans %}File list{% endtrans %}
{% elif new_file %}
{% trans %}New file{% endtrans %}
{% else %}
{% trans %}Not found{% endtrans %}
{% endif %}
{% if file %}
{{ file.get_display_name() }}
{% elif file_list %}
{% trans %}File list{% endtrans %}
{% elif new_file %}
{% trans %}New file{% endtrans %}
{% else %}
{% trans %}Not found{% endtrans %}
{% endif %}
{% endblock %}
{% macro print_file_name(file) %}
{% if file %}
{{ print_file_name(file.parent) }} >
<a href="{{ url('core:file_detail', file_id=file.id, popup=popup) }}">{{ file.get_display_name() }}</a>
{% else %}
<a href="{{ url('core:file_list', popup) }}">{% trans %}Files{% endtrans %}</a>
{% endif %}
{% if file %}
{{ print_file_name(file.parent) }} >
<a href="{{ url('core:file_detail', file_id=file.id, popup=popup) }}">{{ file.get_display_name() }}</a>
{% else %}
<a href="{{ url('core:file_list', popup) }}">{% trans %}Files{% endtrans %}</a>
{% endif %}
{% endmacro %}
{% block content %}
{{ print_file_name(file) }}
{{ print_file_name(file) }}
<div class="tool_bar">
<div class="tool_bar">
<div class="tools">
<div>
{% set home = user.home %}
@ -42,21 +42,21 @@
{% endif %}
{% endif %}
</div>
</div>
<hr>
</div>
<hr>
{% if file %}
{% block file %}
{% endblock %}
{% endif %}
{% if file %}
{% block file %}
{% endblock %}
{% endif %}
{% block script %}
{{ super() }}
{% if popup %}
<script>
parent.$(".choose_file_widget").css("height", "75%");
</script>
{% endif %}
{% endblock %}
{% block script %}
{{ super() }}
{% if popup %}
<script>
parent.$(".choose_file_widget").css("height", "75%");
</script>
{% endif %}
{% endblock %}
{% endblock %}

View File

@ -1,18 +1,18 @@
{% extends "core/file.jinja" %}
{% block title %}
{% trans %}Delete confirmation{% endtrans %}
{% trans %}Delete confirmation{% endtrans %}
{% endblock %}
{% block file %}
<h2>{% trans %}Delete confirmation{% endtrans %}</h2>
<form action="" method="post">{% csrf_token %}
<h2>{% trans %}Delete confirmation{% endtrans %}</h2>
<form action="" method="post">{% csrf_token %}
<p>{% trans obj=object %}Are you sure you want to delete "{{ obj }}"?{% endtrans %}</p>
<input type="submit" value="{% trans %}Confirm{% endtrans %}" />
</form>
<form method="GET" action="javascript:history.back();">
</form>
<form method="GET" action="javascript:history.back();">
<input type="submit" name="cancel" value="{% trans %}Cancel{% endtrans %}" />
</form>
</form>
{% endblock %}

View File

@ -2,24 +2,24 @@
{% block file %}
<h3>
{% if file.is_folder %}
<i class="fa fa-folder fa-3x" aria-hidden="true"></i>
{% else %}
<i class="fa fa-file fa-3x" aria-hidden="true"></i>
{% endif %}
{{ file.get_display_name() }}
</h3>
<p>{% trans %}Owner: {% endtrans %}{{ file.owner.get_display_name() }}</p>
{% if file.is_folder %}
{% if user.can_edit(file) %}
<form action="" method="post" enctype="multipart/form-data">
<h3>
{% if file.is_folder %}
<i class="fa fa-folder fa-3x" aria-hidden="true"></i>
{% else %}
<i class="fa fa-file fa-3x" aria-hidden="true"></i>
{% endif %}
{{ file.get_display_name() }}
</h3>
<p>{% trans %}Owner: {% endtrans %}{{ file.owner.get_display_name() }}</p>
{% if file.is_folder %}
{% if user.can_edit(file) %}
<form action="" method="post" enctype="multipart/form-data">
{% csrf_token %}
{{ form.as_p() }}
<p><input type="submit" value="{% trans %}Add{% endtrans %}"></p>
</form>
{% endif %}
<form action="" method="post" enctype="multipart/form-data">
</form>
{% endif %}
<form action="" method="post" enctype="multipart/form-data">
{% csrf_token %}
<p>
<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>
{% endfor %}
</ul>
</form>
{% else %}
<p>{% trans %}Real name: {% endtrans %}{{ file.file.name.split('/')[-1] }}</p>
<p>{% trans %}Date: {% endtrans %}{{ file.date|localtime|date(DATETIME_FORMAT) }} -
{{ file.date|localtime|time(DATETIME_FORMAT) }}</p>
<p>{% trans %}Type: {% endtrans %}{{ file.mime_type }}</p>
<p>{% trans %}Size: {% endtrans %}{{ file.size }} {% trans %}bytes{% endtrans %}</p>
</form>
{% else %}
<p>{% trans %}Real name: {% endtrans %}{{ file.file.name.split('/')[-1] }}</p>
<p>{% trans %}Date: {% endtrans %}{{ file.date|localtime|date(DATETIME_FORMAT) }} -
{{ file.date|localtime|time(DATETIME_FORMAT) }}</p>
<p>{% trans %}Type: {% endtrans %}{{ file.mime_type }}</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>
{% endif %}
{% 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>
{% endif %}
{% if user.is_com_admin %}
<p><a href="{{ url('core:file_moderate', file_id=file.id) }}">{% trans %}Moderate{% endtrans %}</a></p>
{% endif %}
<p><a href="{{ url('core:download', file_id=file.id) }}">{% trans %}Download{% endtrans %}</a></p>
{% endif %}
{% 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>
{% endif %}
{% if user.is_com_admin %}
<p><a href="{{ url('core:file_moderate', file_id=file.id) }}">{% trans %}Moderate{% endtrans %}</a></p>
{% endif %}
{% endblock %}
{% block script %}
{{ super() }}
<script>
{% if popup and file.is_file %}
parent.$("#file_id").replaceWith('<div id="file_id" value="{{ file.id }}">{{ file.name }}</div>');
parent.$(".ui-dialog-buttonpane button").button("option", "disabled", false);
{% endif %}
</script>
{{ super() }}
<script>
{% if popup and file.is_file %}
parent.$("#file_id").replaceWith('<div id="file_id" value="{{ file.id }}">{{ file.name }}</div>');
parent.$(".ui-dialog-buttonpane button").button("option", "disabled", false);
{% endif %}
</script>
{% endblock %}

View File

@ -1,12 +1,12 @@
{% extends "core/file.jinja" %}
{% block file %}
<h2>{% trans obj=object %}Edit {{ obj }}{% endtrans %}</h2>
<form action="" method="post">
<h2>{% trans obj=object %}Edit {{ obj }}{% endtrans %}</h2>
<form action="" method="post">
{% csrf_token %}
{{ form.as_p() }}
<p><input type="submit" value="{% trans %}Save{% endtrans %}" /></p>
</form>
</form>
{% endblock %}

View File

@ -1,10 +1,10 @@
{% extends "core/file.jinja" %}
{% block content %}
{{ super() }}
{% if file_list %}
<h3>{% trans %}File list{% endtrans %}</h3>
<ul>
{{ super() }}
{% if file_list %}
<h3>{% trans %}File list{% endtrans %}</h3>
<ul>
{% for f in file_list %}
<li style="list-style-type: none;">
{% if f.is_folder %}
@ -14,10 +14,10 @@
{% endif %}
<a href="{{ url('core:file_detail', file_id=f.id, popup=popup) }}">{{ f.name }}</a></li>
{% endfor %}
</ul>
{% else %}
<p>{% trans %}There is no file in this website.{% endtrans %}</p>
{% endif %}
</ul>
{% else %}
<p>{% trans %}There is no file in this website.{% endtrans %}</p>
{% endif %}
{% endblock %}

View File

@ -1,12 +1,12 @@
{% extends "core/base.jinja" %}
{% block title %}
{% trans %}File moderation{% endtrans %}
{% trans %}File moderation{% endtrans %}
{% endblock %}
{% block content %}
<h3>{% trans %}File moderation{% endtrans %}</h3>
<div>
<h3>{% trans %}File moderation{% endtrans %}</h3>
<div>
{% for f in files %}
<div style="margin: 2px; padding: 2px; border: solid 1px red; text-align: center">
{% 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>
</div>
{% endfor %}
</div>
</div>
{% endblock %}

View File

@ -1,13 +1,13 @@
{% extends "core/base.jinja" %}
{% block content %}
<p><a href="{{ url('core:group_list') }}">{% trans %}Back to list{% endtrans %}</a></p>
<h2>{% trans %}Edit group{% endtrans %}</h2>
<form action="" method="post">
<p><a href="{{ url('core:group_list') }}">{% trans %}Back to list{% endtrans %}</a></p>
<h2>{% trans %}Edit group{% endtrans %}</h2>
<form action="" method="post">
{% csrf_token %}
{{ form.as_p() }}
<p><input type="submit" value="{% trans %}Update{% endtrans %}" /></p>
</form>
</form>
{% endblock %}

View File

@ -1,13 +1,13 @@
{% extends "core/base.jinja" %}
{% block title %}
{% trans %}Group list{% endtrans %}
{% trans %}Group list{% endtrans %}
{% endblock %}
{% block content %}
<h3>{% trans %}Group list{% endtrans %}</h3>
<p><a href="{{ url('core:group_new') }}">{% trans %}New group{% endtrans %}</a></p>
<table>
<h3>{% trans %}Group list{% endtrans %}</h3>
<p><a href="{{ url('core:group_new') }}">{% trans %}New group{% endtrans %}</a></p>
<table>
<thead>
<tr>
<td>{% trans %}ID{% endtrans %}</td>
@ -26,6 +26,6 @@
</tr>
{% endfor %}
</tbody>
</table>
</table>
{% endblock %}

View File

@ -1,15 +1,15 @@
{% 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 %}
{% 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 %}
{% 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 }}
</a>
</a>
{%- endmacro %}
{% macro link_news_logo(news) -%}
@ -21,34 +21,34 @@
{%- endmacro %}
{% macro gen_news_metatags(news) -%}
<meta name="twitter:card" content="summary" />
<meta name="twitter:site" content="{{ settings.SITH_TWITTER }}" />
<meta name="twitter:creator" content= "{{ settings.SITH_TWITTER }}" />
<meta property="og:url" content="{{ news.get_full_url() }}" />
<meta property="og:type" content="article" />
<meta property="og:title" content="{{ news.title }}" />
<meta property="og:description" content="{{ news.summary }}" />
<meta property="og:image" content="{{ "https://%s%s" % (settings.SITH_URL, link_news_logo(news)) }}" />
<meta name="twitter:card" content="summary" />
<meta name="twitter:site" content="{{ settings.SITH_TWITTER }}" />
<meta name="twitter:creator" content= "{{ settings.SITH_TWITTER }}" />
<meta property="og:url" content="{{ news.get_full_url() }}" />
<meta property="og:type" content="article" />
<meta property="og:title" content="{{ news.title }}" />
<meta property="og:description" content="{{ news.summary }}" />
<meta property="og:image" content="{{ "https://%s%s" % (settings.SITH_URL, link_news_logo(news)) }}" />
{%- endmacro %}
{% 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 %}
{% 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 %}
{% 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 %}
{% 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 %}
{% 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_text">
<div class="user_mini_profile_name">{{ user.get_full_name() }}</div>
@ -78,7 +78,7 @@
title="{% trans %}Profile{% endtrans %}" />
{% endif %}
</div>
</div>
</div>
{%- endmacro %}
{% macro user_subscription(user) %}

View File

@ -1,8 +1,8 @@
{% from "core/macros.jinja" import user_profile_link %}
{% macro page_history(page) %}
<p>{% trans page_name=page.name %}You're seeing the history of page "{{ page_name }}"{% endtrans %}</p>
<ul>
<p>{% trans page_name=page.name %}You're seeing the history of page "{{ page_name }}"{% endtrans %}</p>
<ul>
{% for r in (page.revisions.all()|sort(attribute='date', reverse=True)) %}
{% if loop.index < 2 %}
<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>
{% endif %}
{% endfor %}
</ul>
</ul>
{% endmacro %}
{% macro page_edit_form(page, form, url, token) %}
<h2>{% trans %}Edit page{% endtrans %}</h2>
<form action="{{ url }}" method="post">
<h2>{% trans %}Edit page{% endtrans %}</h2>
<form action="{{ url }}" method="post">
<input type="hidden" name="csrfmiddlewaretoken" value="{{ token }}">
{{ form.as_p() }}
<p><input type="submit" value="{% trans %}Save{% endtrans %}" /></p>
</form>
</form>
{% endmacro %}

View File

@ -1,17 +1,17 @@
{% autoescape off %}
{% trans %}You're receiving this email because you subscribed to the UTBM student association.{% endtrans %}
{% trans %}You're receiving this email because you subscribed to the UTBM student association.{% endtrans %}
{% trans %}Please go to the following page and choose a new password:{% endtrans %}
{% block reset_link %}
{{ protocol }}://{{ domain }}{{ url('core:password_reset_confirm', uidb64=uid, token=token) }}
{% endblock %}
{% trans %}Your username, in case it was not given to you: {% endtrans %} {{ user.get_username() }}
{% trans %}You also got a new account that will be useful to purchase products in the living areas and on the Eboutic.{% endtrans %}
{% trans account=user.customer.account_id %}Here is your account number: {{ account }}{% endtrans %}
{% trans %}Please go to the following page and choose a new password:{% endtrans %}
{% block reset_link %}
{{ protocol }}://{{ domain }}{{ url('core:password_reset_confirm', uidb64=uid, token=token) }}
{% endblock %}
{% trans %}Your username, in case it was not given to you: {% endtrans %} {{ user.get_username() }}
{% trans %}You also got a new account that will be useful to purchase products in the living areas and on the Eboutic.{% endtrans %}
{% trans account=user.customer.account_id %}Here is your account number: {{ account }}{% endtrans %}
{% trans %}Thanks for subscribing! {% endtrans %}
{% trans %}Thanks for subscribing! {% endtrans %}
{% trans %}The AE team{% endtrans %}
{% trans %}The AE team{% endtrans %}
{% endautoescape %}

View File

@ -1,3 +1,3 @@
{% autoescape off %}
{% trans %}New subscription to the UTBM student association{% endtrans %}
{% trans %}New subscription to the UTBM student association{% endtrans %}
{% endautoescape %}

View File

@ -1,13 +1,13 @@
{% extends "core/base.jinja" %}
{% block title %}
{% trans %}Notification list{% endtrans %}
{% trans %}Notification list{% endtrans %}
{% endblock %}
{% block content %}
<h3>{% trans %}Notification list{% endtrans %}</h3>
<ul id="notifications">
{% for n in notification_list %}
<h3>{% trans %}Notification list{% endtrans %}</h3>
<ul id="notifications">
{% for n in notification_list %}
{% if n.viewed %}
<li>
{% else %}
@ -18,7 +18,7 @@
n.date|localtime|time(DATETIME_FORMAT) }}</span><br>
{{ n }}</a>
</li>
{% endfor %}
</ul>
{% endfor %}
</ul>
{% endblock %}

View File

@ -1,28 +1,28 @@
{% extends "core/base.jinja" %}
{% block title %}
{% if page %}
{{ page.get_display_name() }}
{% elif page_list %}
{% trans %}Page list{% endtrans %}
{% elif new_page %}
{% trans %}Create page{% endtrans %}
{% else %}
{% trans %}Not found{% endtrans %}
{% endif %}
{% if page %}
{{ page.get_display_name() }}
{% elif page_list %}
{% trans %}Page list{% endtrans %}
{% elif new_page %}
{% trans %}Create page{% endtrans %}
{% else %}
{% trans %}Not found{% endtrans %}
{% endif %}
{% endblock %}
{% macro print_page_name(page) %}
{% if page %}
{{ print_page_name(page.parent) }} >
<a href="{{ url('core:page', page_name=page.get_full_name()) }}">{{ page.get_display_name() }}</a>
{% endif %}
{% if page %}
{{ print_page_name(page.parent) }} >
<a href="{{ url('core:page', page_name=page.get_full_name()) }}">{{ page.get_display_name() }}</a>
{% endif %}
{% endmacro %}
{% block content %}
{{ print_page_name(page) }}
{{ print_page_name(page) }}
<div class="tool_bar">
<div class="tool_bar">
<div class="tools">
{% if page %}
{% if page.club %}
@ -39,15 +39,15 @@
{% endif %}
{% endif %}
</div>
</div>
<hr>
</div>
<hr>
{% if page %}
{% block page %}
{% endblock %}
{% else %}
<h2>{% trans %}Page does not exist{% endtrans %}</h2>
<p><a href="{{ url('core:page_new') }}?page={{ request.resolver_match.kwargs['page_name'] }}">
{% if page %}
{% block page %}
{% endblock %}
{% else %}
<h2>{% trans %}Page does not exist{% endtrans %}</h2>
<p><a href="{{ url('core:page_new') }}?page={{ request.resolver_match.kwargs['page_name'] }}">
{% trans %}Create it?{% endtrans %}</a></p>
{% endif %}
{% endif %}
{% endblock %}

View File

@ -1,16 +1,16 @@
{% extends "core/page.jinja" %}
{% block page %}
{% if rev %}
<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>
<div class="page_content">{{ rev.content|markdown }}</div>
{% else %}
{% if page.revisions.last() %}
<h3>{{ page.revisions.last().title }}</h3>
<div class="page_content">{{ page.revisions.last().content|markdown }}</div>
{% endif %}
{% endif %}
{% if rev %}
<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>
<div class="page_content">{{ rev.content|markdown }}</div>
{% else %}
{% if page.revisions.last() %}
<h3>{{ page.revisions.last().title }}</h3>
<div class="page_content">{{ page.revisions.last().content|markdown }}</div>
{% endif %}
{% endif %}
{% endblock %}

View File

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

View File

@ -1,20 +1,20 @@
{% extends "core/base.jinja" %}
{% block title %}
{% trans %}Page list{% endtrans %}
{% trans %}Page list{% endtrans %}
{% endblock %}
{% block content %}
{% if page_list %}
<h3>{% trans %}Page list{% endtrans %}</h3>
<ul>
{% if page_list %}
<h3>{% trans %}Page list{% endtrans %}</h3>
<ul>
{% for p in page_list %}
<li><a href="{{ p.get_absolute_url() }}">{{ p.get_display_name() }}</a></li>
{% endfor %}
</ul>
{% else %}
{% trans %}There is no page in this website.{% endtrans %}
{% endif %}
</ul>
{% else %}
{% trans %}There is no page in this website.{% endtrans %}
{% endif %}
{% endblock %}

View File

@ -1,18 +1,18 @@
{% extends "core/page.jinja" %}
{% block content %}
{% if page %}
{{ super() }}
{% endif %}
<h2>{% trans %}Page properties{% endtrans %}</h2>
<form action="" method="post">
{% if page %}
{{ super() }}
{% endif %}
<h2>{% trans %}Page properties{% endtrans %}</h2>
<form action="" method="post">
{% csrf_token %}
{{ form.as_p() }}
<p><input type="submit" value="{% trans %}Save{% endtrans %}" /></p>
</form>
{% if page %}
<a href="{{ url('core:page_delete', page_id=page.id)}}">{% trans %}Delete{% endtrans %}</a>
{% endif %}
</form>
{% if page %}
<a href="{{ url('core:page_delete', page_id=page.id)}}">{% trans %}Delete{% endtrans %}</a>
{% endif %}
{% endblock %}

View File

@ -2,7 +2,7 @@
{% from 'core/macros_pages.jinja' import page_edit_form %}
{% block page %}
{{ page_edit_form(page, form, url('core:page_edit', page_name=page.get_full_name()), csrf_token) }}
{{ page_edit_form(page, form, url('core:page_edit', page_name=page.get_full_name()), csrf_token) }}
{% endblock %}

View File

@ -2,12 +2,12 @@
{% block content %}
{% if target %}
{% if target %}
<p>{% trans user=target.get_display_name() %}Change password for {{ user }}{% endtrans %}</p>
{% endif %}
<form method="post" action="">
{% csrf_token %}
{{ form.as_p() }}
<input type="submit" value="{% trans %}Change{% endtrans %}" />
</form>
{% endif %}
<form method="post" action="">
{% csrf_token %}
{{ form.as_p() }}
<input type="submit" value="{% trans %}Change{% endtrans %}" />
</form>
{% endblock %}

View File

@ -1,6 +1,6 @@
{% extends "core/base.jinja" %}
{% block content %}
<p>{% trans %}You successfully changed your password!{% endtrans %}</p>
<p>{% trans %}You successfully changed your password!{% endtrans %}</p>
{% endblock %}

View File

@ -1,10 +1,10 @@
{% extends "core/base.jinja" %}
{% block content %}
<form method="post" action="">
{% csrf_token %}
{% render_honeypot_field %}
{{ form.as_p() }}
<input type="submit" value="{% trans %}Reset{% endtrans %}" />
</form>
<form method="post" action="">
{% csrf_token %}
{% render_honeypot_field %}
{{ form.as_p() }}
<input type="submit" value="{% trans %}Reset{% endtrans %}" />
</form>
{% endblock %}

View File

@ -1,8 +1,8 @@
{% extends "core/base.jinja" %}
{% block content %}
<p>{% trans %}You successfully reset your password!{% endtrans %}</p>
<a href="{{ url('core:login') }}">{% trans %}Login{% endtrans %}</a>
<p>{% trans %}You successfully reset your password!{% endtrans %}</p>
<a href="{{ url('core:login') }}">{% trans %}Login{% endtrans %}</a>
{% endblock %}

View File

@ -1,14 +1,14 @@
{% extends "core/base.jinja" %}
{% block content %}
{% if form %}
<form method="post" action="">
{% csrf_token %}
{{ form.as_p() }}
<input type="submit" value="{% trans %}Reset{% endtrans %}" />
</form>
{% 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>.
{% endif %}
{% if form %}
<form method="post" action="">
{% csrf_token %}
{{ form.as_p() }}
<input type="submit" value="{% trans %}Reset{% endtrans %}" />
</form>
{% 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>.
{% endif %}
{% endblock %}

View File

@ -1,15 +1,15 @@
{% extends "core/base.jinja" %}
{% block content %}
<h2>{% trans %}Password reset sent{% endtrans %}</h2>
<h2>{% trans %}Password reset sent{% endtrans %}</h2>
<p>
{% 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 %}
</p>
<p>
{% 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 %}
</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
folder.{% endtrans %}
</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
folder.{% endtrans %}
</p>
{% endblock %}

View File

@ -1,15 +1,15 @@
{% autoescape off %}
{% trans %}You're receiving this email because you requested a password reset for your user account at {{ site_name }}.{% endtrans %}
{% trans %}You're receiving this email because you requested a password reset for your user account at {{ site_name }}.{% endtrans %}
{% trans %}Please go to the following page and choose a new password:{% endtrans %}
{% block reset_link %}
{{ protocol }}://{{ domain }}{{ url('core:password_reset_confirm', uidb64=uid, token=token) }}
{% endblock %}
{% trans %}Your username, in case you've forgotten: {% endtrans %} {{ user.get_username() }}
{% trans %}Please go to the following page and choose a new password:{% endtrans %}
{% block reset_link %}
{{ protocol }}://{{ domain }}{{ url('core:password_reset_confirm', uidb64=uid, token=token) }}
{% endblock %}
{% trans %}Your username, in case you've forgotten: {% endtrans %} {{ user.get_username() }}
{% trans %}Thanks for using our site! {% endtrans %}
{% trans %}Thanks for using our site! {% endtrans %}
{% trans %}The {{ site_name }} team{% endtrans %}
{% trans %}The {{ site_name }} team{% endtrans %}
{% endautoescape %}

View File

@ -1,17 +1,17 @@
{% extends "core/base.jinja" %}
{% block script %}
{{ super() }}
<script src="{{ static('com/js/poster_list.js') }}"></script>
{{ super() }}
<script src="{{ static('com/js/poster_list.js') }}"></script>
{% endblock %}
{% block title %}
{% trans %}Poster{% endtrans %}
{% trans %}Poster{% endtrans %}
{% endblock %}
{% block content %}
<div id="poster_list">
<div id="poster_list">
<div id="title">
<h3>{% trans %}Posters{% endtrans %}</h3>
@ -47,7 +47,7 @@
<div id="view"><div id="placeholder"></div></div>
</div>
</div>
{% endblock %}

View File

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

View File

@ -1,17 +1,17 @@
{% autoescape off %}
{% trans %}You're receiving this email because you created an account on the AE website.{% endtrans %}
{% trans %}You're receiving this email because you created an account on the AE website.{% endtrans %}
{% trans %}Your username, in case it was not given to you: {% endtrans %} {{ username }}
{% trans %}Your username, in case it was not given to you: {% endtrans %} {{ username }}
{% trans %}
As this is the website of the students of the AE, by the students of the AE,
for the students of the AE, you won't be able to do many things without subscribing to the AE.
To make a contribution, contact a member of the association's board, either directly or by email at ae@utbm.fr.
{% endtrans %}
{% trans %}
As this is the website of the students of the AE, by the students of the AE,
for the students of the AE, you won't be able to do many things without subscribing to the AE.
To make a contribution, contact a member of the association's board, either directly or by email at ae@utbm.fr.
{% endtrans %}
{% trans %}Wishing you a good experience among us! {% endtrans %}
{% trans %}Wishing you a good experience among us! {% endtrans %}
{% trans %}The AE team{% endtrans %}
{% trans %}The AE team{% endtrans %}
{% endautoescape %}

View File

@ -1,10 +1,10 @@
<!DOCTYPE html>
<html lang="fr">
<head>
<head>
<title>{% trans %}Slideshow{% endtrans %}</title>
<link href="{{ scss('com/slideshow.scss') }}" rel="stylesheet" type="text/css" />
</head>
<body>
</head>
<body>
<div id="slideshow">
<div id="slides">
@ -26,5 +26,5 @@
</div>
<script src="{{ static('core/js/jquery-3.6.2.min.js') }}"></script>
<script src="{{ static('com/js/slideshow.js') }}"></script>
</body>
</body>
</html>

View File

@ -1,11 +1,11 @@
{% extends "core/base.jinja" %}
{% block title %}
{% trans %}To Markdown{% endtrans %}
{% trans %}To Markdown{% endtrans %}
{% endblock %}
{% block content %}
<form action="" method="post" enctype="multipart/form-data">
<form action="" method="post" enctype="multipart/form-data">
{% csrf_token %}
<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>
@ -13,16 +13,16 @@
{{- text -}}
</textarea>
<p><input type="submit" value="{% trans %}Convert{% endtrans %}" /></p>
</form>
<hr>
<h6>{% trans %}Markdown{% endtrans %}</h6>
<div style="border: 1px solid black; color: white; background: black; padding: 10px; margin: 5px;"><pre>{{- text_md -}}</pre>
</div>
<hr>
<h6>{% trans %}Render{% endtrans %}</h6>
<div style="border: 1px solid black; padding: 10px; margin: 5px;" class="page_content">
{{ text_md|markdown }}
</div>
</form>
<hr>
<h6>{% trans %}Markdown{% endtrans %}</h6>
<div style="border: 1px solid black; color: white; background: black; padding: 10px; margin: 5px;"><pre>{{- text_md -}}</pre>
</div>
<hr>
<h6>{% trans %}Render{% endtrans %}</h6>
<div style="border: 1px solid black; padding: 10px; margin: 5px;" class="page_content">
{{ text_md|markdown }}
</div>
{% endblock %}

View File

@ -1,7 +1,7 @@
{% extends "core/base.jinja" %}
{% macro monthly(obj) %}
<div>
<div>
<table>
<thead>
<tr>
@ -25,21 +25,21 @@
{% endfor %}
</tbody>
</table>
</div>
</div>
{% endmacro %}
{% block title %}
{% trans user_name=profile.get_display_name() %}{{ user_name }}'s account{% endtrans %}
{% trans user_name=profile.get_display_name() %}{{ user_name }}'s account{% endtrans %}
{% endblock %}
{% block content %}
{% if customer %}
<h3>{% trans %}User account{% endtrans %}</h3>
<p>{% trans %}Amount: {% endtrans %}{{ customer.amount }} €</p>
<div id="drop">
{% set bought = customer.buyings.exists() %}
{% set refilled = customer.refillings.exists() %}
{% if bought or refilled %}
{% if customer %}
<h3>{% trans %}User account{% endtrans %}</h3>
<p>{% trans %}Amount: {% endtrans %}{{ customer.amount }} €</p>
<div id="drop">
{% set bought = customer.buyings.exists() %}
{% set refilled = customer.refillings.exists() %}
{% if bought or refilled %}
{% if bought %}
<h5>{% trans %}Account purchases{% endtrans %}</h5>
{{ monthly(buyings_month) }}
@ -48,7 +48,7 @@
<h5>{% trans %}Reloads{% endtrans %}</h5>
{{ monthly(refilling_month) }}
{% endif %}
{% endif %}
{% endif %}
{% if customer.user.invoices.exists() %}
<h5>{% trans %}Eboutic invoices{% endtrans %}</h5>
{{ monthly(invoices_month) }}
@ -63,21 +63,21 @@
</ul>
</div>
{% endif %}
</div>
{% else %}
<p>{% trans %}User has no account{% endtrans %}</p>
{% endif %}
</div>
{% else %}
<p>{% trans %}User has no account{% endtrans %}</p>
{% endif %}
{% endblock %}
{% block script %}
{{ super() }}
<script>
$(function(){
{{ super() }}
<script>
$(function(){
$("#drop").accordion({
heightStyle: "content"
});
});
</script>
});
</script>
{% endblock %}

View File

@ -1,17 +1,17 @@
{% extends "core/base.jinja" %}
{% block title %}
{% trans user_name=profile.get_display_name() %}{{ user_name }}'s account{% endtrans %}
{% trans user_name=profile.get_display_name() %}{{ user_name }}'s account{% endtrans %}
{% endblock %}
{% block content %}
{% if customer %}
<h3>{% trans %}User account{% endtrans %}</h3>
<p>{% trans %}Amount: {% endtrans %}{{ customer.amount }} €</p>
<p><a href="{{ url('core:user_account', user_id=profile.id) }}">{% trans %}Back{% endtrans %}</a></p>
{% if customer.buyings.exists() %}
<h4>{% trans %}Account purchases{% endtrans %}</h4>
<table>
{% if customer %}
<h3>{% trans %}User account{% endtrans %}</h3>
<p>{% trans %}Amount: {% endtrans %}{{ customer.amount }} €</p>
<p><a href="{{ url('core:user_account', user_id=profile.id) }}">{% trans %}Back{% endtrans %}</a></p>
{% if customer.buyings.exists() %}
<h4>{% trans %}Account purchases{% endtrans %}</h4>
<table>
<thead>
<tr>
<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>
{% endif %}
</tr>
{% endfor %}
{% endfor %}
</tbody>
</table>
{% endif %}
{% if customer.refillings.exists() %}
<h4>{% trans %}Reloads{% endtrans %}</h4>
<table>
</table>
{% endif %}
{% if customer.refillings.exists() %}
<h4>{% trans %}Reloads{% endtrans %}</h4>
<table>
<thead>
<tr>
<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>
{% endif %}
</tr>
{% endfor %}
{% endfor %}
</tbody>
</table>
{% endif %}
{% if customer.user.invoices.exists() %}
<h4>{% trans %}Eboutic invoices{% endtrans %}</h4>
<table>
</table>
{% endif %}
{% if customer.user.invoices.exists() %}
<h4>{% trans %}Eboutic invoices{% endtrans %}</h4>
<table>
<thead>
<tr>
<td>{% trans %}Date{% endtrans %}</td>
@ -94,12 +94,12 @@
</td>
<td>{{ i.get_total() }} €</td>
</tr>
{% endfor %}
{% endfor %}
</tbody>
</table>
</table>
{% endif %}
{% else %}
<p>{% trans %}User has no account{% endtrans %}</p>
<p>{% trans %}User has no account{% endtrans %}</p>
{% endif %}
<p><a href="{{ url('core:user_account', user_id=profile.id) }}">{% trans %}Back{% endtrans %}</a></p>
{% endblock %}

View File

@ -5,11 +5,11 @@
{% endblock %}
{% block content %}
<h3>{% trans%}Club(s){% endtrans %}</h3>
<br>
<h4>{% trans%}Current club(s) :{% endtrans %}</h4>
<br>
<table>
<h3>{% trans%}Club(s){% endtrans %}</h3>
<br>
<h4>{% trans%}Current club(s) :{% endtrans %}</h4>
<br>
<table>
<thead>
<tr>
<td>{% trans %}Club{% endtrans %}</td>
@ -36,11 +36,11 @@
</tr>
{% endfor %}
</tbody>
</table>
<br>
<h4>{% trans%}Old club(s) :{% endtrans %}</h4>
<br>
<table>
</table>
<br>
<h4>{% trans%}Old club(s) :{% endtrans %}</h4>
<br>
<table>
<thead>
<tr>
<td>{% trans %}Club{% endtrans %}</td>
@ -65,12 +65,12 @@
</tr>
{% endfor %}
</tbody>
</table>
</table>
{% if
{% if
profile.mailing_subscriptions.exists()
and (profile.id == user.id or user.is_root or user.is_com_admin)
%}
%}
<h4>{% trans %}Subscribed mailing lists{% endtrans %}</h4>
{% 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>

View File

@ -2,11 +2,11 @@
{% from "core/macros.jinja" import show_slots, show_tokens, user_subscription %}
{%- block additional_css -%}
<link rel="stylesheet" href="{{ scss('user/user_detail.scss') }}">
<link rel="stylesheet" href="{{ scss('user/user_detail.scss') }}">
{%- endblock -%}
{% block title %}
{% trans user_name=profile.get_display_name() %}{{ user_name }}'s profile{% endtrans %}
{% trans user_name=profile.get_display_name() %}{{ user_name }}'s profile{% endtrans %}
{% endblock %}
{% block additional_js %}
@ -14,7 +14,7 @@
{% endblock %}
{% block content %}
<div class="user_profile_page" x-data>
<div class="user_profile_page" x-data>
<div class="user_profile">
<!-- Profile -->
<div class="user-name">
@ -168,9 +168,9 @@
{% endif %}
{% endif %}
</div>
{% endif %}
<br>
{% if profile.was_subscribed and (user == profile or user.can_read_subscription_history)%}
{% endif %}
<br>
{% if profile.was_subscribed and (user == profile or user.can_read_subscription_history)%}
<div class="collapse" :class="{'shadow': collapsed}" x-data="{collapsed: false}" x-cloak>
<div class="collapse-header clickable" @click="collapsed = !collapsed">
<span class="collapse-header-text">
@ -201,10 +201,10 @@
</table>
</div>
</div>
{% endif %}
{% endif %}
<hr>
<div>
<hr>
<div>
{% if user.is_root or user.is_board_member %}
<form class="form-gifts" action="{{ url('core:user_gift_create', user_id=profile.id) }}" method="post">
{% csrf_token %}
@ -246,8 +246,8 @@
{% endblock %}
{% block script %}
{{ super() }}
<script>
{{ super() }}
<script>
$(function () {
var keys = [];
var pattern = "71,85,89,71,85,89";
@ -276,5 +276,5 @@
active: false
});
});
</script>
</script>
{% endblock %}

View File

@ -1,16 +1,16 @@
{%- extends "core/base.jinja" -%}
{%- block title -%}
{%- trans -%}Edit user{%- endtrans -%}
{%- trans -%}Edit user{%- endtrans -%}
{%- endblock -%}
{%- block additional_css -%}
<link rel="stylesheet" href="{{ scss('user/user_edit.scss') }}">
<link rel="stylesheet" href="{{ scss('user/user_edit.scss') }}">
{%- endblock -%}
{%- block content -%}
<h2 class="title">{%- trans -%}Edit user profile{%- endtrans -%}</h2>
<form action="" method="post" enctype="multipart/form-data" id="user_edit">
<h2 class="title">{%- trans -%}Edit user profile{%- endtrans -%}</h2>
<form action="" method="post" enctype="multipart/form-data" id="user_edit">
{%- csrf_token -%}
{{ form.non_field_errors() }}
@ -103,11 +103,11 @@
{%- endif -%}
</div>
</div>
{%- endfor -%}
</div>
{%- endfor -%}
</div>
{# Textareas #}
<div class="profile-fields">
<div class="profile-fields">
{%- for field in [form["quote"], form["forum_signature"]] -%}
<div class="profile-field">
<div class="profile-field-label">{{ field.label }}</div>
@ -119,29 +119,29 @@
</div>
</div>
{%- endfor -%}
</div>
</div>
{# Checkboxes #}
<div class="profile-visible">
<div class="profile-visible">
{{ form["is_subscriber_viewable"] }}
{{ form["is_subscriber_viewable"].label }}
</div>
</div>
{%- if form.instance == user -%}
{%- if form.instance == user -%}
<p>
<a href="{{ url('core:password_change') }}">{%- trans -%}Change my password{%- endtrans -%}</a>
</p>
{%- elif user.is_root -%}
{%- elif user.is_root -%}
<p>
<a href="{{ url('core:password_root_change', user_id=form.instance.id) }}">
{%- trans -%}Change user password{%- endtrans -%}
</a>
</p>
{%- endif -%}
{%- endif -%}
<p>
<p>
<input type="submit" value="{%- trans -%}Update{%- endtrans -%}" />
</p>
</p>
</form>
<p>
@ -155,10 +155,10 @@
{%- endblock -%}
{%- block script -%}
{{ super() }}
{%- if not form.instance.profile_pict -%}
<script src="{{ static('core/js/webcam.js') }}"></script>
<script>
{{ super() }}
{%- if not form.instance.profile_pict -%}
<script src="{{ static('core/js/webcam.js') }}"></script>
<script>
Webcam.on('error', function (msg) { console.log('Webcam.js error: ' + msg) })
Webcam.set({
width: 320,
@ -184,6 +184,6 @@
}
}, "new_profile_pict", { name: 'csrfmiddlewaretoken', value: '{{ csrf_token }}' });
}
</script>
{%- endif -%}
</script>
{%- endif -%}
{%- endblock -%}

View File

@ -2,15 +2,15 @@
{% from "core/macros.jinja" import user_link_with_pict, delete_godfather %}
{%- block additional_css -%}
<link rel="stylesheet" href="{{ scss('user/user_godfathers.scss') }}">
<link rel="stylesheet" href="{{ scss('user/user_godfathers.scss') }}">
{%- endblock -%}
{% 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 %}
{% block content %}
<div class="container">
<div class="container">
<a href="{{ url('core:user_godfathers_tree_pict', user_id=profile.id) }}?family">
{% trans %}Show family picture{% endtrans %}
</a>
@ -62,6 +62,6 @@
<p><input type="submit" value="{% trans %}Save{% endtrans %}" /></p>
</form>
{% endif %}
</div>
</div>
{% endblock %}

View File

@ -1,16 +1,16 @@
{% extends "core/base.jinja" %}
{% block title %}
{% if param == "godchildren" %}
{% trans user_name=profile.get_display_name() %}{{ user_name }}'s godchildren{% endtrans %}
{% else %}
{% trans user_name=profile.get_display_name() %}{{ user_name }}'s godfathers{% endtrans %}
{% endif %}
{% if param == "godchildren" %}
{% trans user_name=profile.get_display_name() %}{{ user_name }}'s godchildren{% endtrans %}
{% else %}
{% trans user_name=profile.get_display_name() %}{{ user_name }}'s godfathers{% endtrans %}
{% endif %}
{% endblock %}
{% macro display_members_list(user) %}
{% if user.__getattribute__(param).exists() %}
<ul>
{% if user.__getattribute__(param).exists() %}
<ul>
{% for u in user.__getattribute__(param).all() %}
<li>
<a href="{{ url("core:user_godfathers", user_id=u.id) }}">
@ -24,8 +24,8 @@
{% endif %}
</li>
{% endfor %}
</ul>
{% endif %}
</ul>
{% endif %}
{% endmacro %}
{% block content %}

View File

@ -1,16 +1,16 @@
{% extends "core/base.jinja" %}
{%- block additional_css -%}
<link rel="stylesheet" href="{{ scss('user/user_group.scss') }}">
<link rel="stylesheet" href="{{ scss('user/user_group.scss') }}">
{%- endblock -%}
{% block content %}
<main>
<main>
<h2>{% trans user_name=profile.get_full_name() %}Edit user groups for {{ user_name }}{% endtrans %}</h2>
<form action="" method="post">
{% csrf_token %}
{{ form.as_p() }}
<p><input type="submit" value="{% trans %}Update{% endtrans %}" /></p>
</form>
</main>
</main>
{%- endblock -%}

View File

@ -1,15 +1,15 @@
{% extends "core/base.jinja" %}
{% block title %}
{% trans %}User list{% endtrans %}
{% trans %}User list{% endtrans %}
{% endblock %}
{% block content %}
<h3>{% trans %}User list{% endtrans %}</h3>
<ul>
{% for u in user_list %}
<li><a href="{{ url('core:user_profile', user_id=u.id) }}">{{ u.get_display_name() }}</a></li>
{% endfor %}
</ul>
<h3>{% trans %}User list{% endtrans %}</h3>
<ul>
{% for u in user_list %}
<li><a href="{{ url('core:user_profile', user_id=u.id) }}">{{ u.get_display_name() }}</a></li>
{% endfor %}
</ul>
{% endblock %}

View File

@ -1,11 +1,11 @@
{% extends "core/base.jinja" %}
{%- block additional_css -%}
<link rel="stylesheet" href="{{ scss('user/user_preferences.scss') }}">
<link rel="stylesheet" href="{{ scss('user/user_preferences.scss') }}">
{%- endblock -%}
{% block title %}
{% trans %}Preferences{% endtrans %}
{% trans %}Preferences{% endtrans %}
{% endblock %}
{% block content %}

View File

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

View File

@ -1,15 +1,15 @@
{% extends "core/base.jinja" %}
{%- block additional_css -%}
<link rel="stylesheet" href="{{ scss('user/user_tools.scss') }}">
<link rel="stylesheet" href="{{ scss('user/user_tools.scss') }}">
{%- endblock -%}
{% 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 %}
{% block content %}
<main>
<main>
<h3>{% trans %}User Tools{% endtrans %}</h3>
<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:invoices_call') }}">{% trans %}Invoices call{% endtrans %}</a></li>
<li><a href="{{ url('counter:eticket_list') }}">{% trans %}Etickets{% endtrans %}</a></li>
{% endif %}
</ul>
<ul>
{% endif %}
</ul>
<ul>
{% for b in settings.SITH_COUNTER_BARS %}
{% if user.is_in_group(name=b[1]+" admin") %}
{% set c = Counter.objects.filter(id=b[0]).first() %}
@ -83,16 +83,16 @@
</li>
{% endif %}
{% endfor %}
</ul>
</div>
{% endif %}
</ul>
</div>
{% endif %}
{% if
user.is_root
or user.is_in_group(pk=settings.SITH_GROUP_ACCOUNTING_ADMIN_ID)
or user.memberships.ongoing().filter(role__gte=7).count() > 10
%}
<div>
{% if
user.is_root
or user.is_in_group(pk=settings.SITH_GROUP_ACCOUNTING_ADMIN_ID)
or user.memberships.ongoing().filter(role__gte=7).count() > 10
%}
<div>
<h4>{% trans %}Accounting{% endtrans %}</h4>
<ul>
{% if user.is_root
@ -121,15 +121,15 @@
{%- endif -%}
{%- endfor %}
</ul>
</div>
{% endif %}
</div>
{% endif %}
{% if
user.is_root
or user.is_com_admin
or user.is_in_group(pk=settings.SITH_GROUP_SAS_ADMIN_ID)
%}
<div>
{% if
user.is_root
or user.is_com_admin
or user.is_in_group(pk=settings.SITH_GROUP_SAS_ADMIN_ID)
%}
<div>
<h4>{% trans %}Communication{% endtrans %}</h4>
<ul>
{% 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>
{% endif %}
</ul>
</div>
{% endif %}
</div>
{% endif %}
{% if user.memberships.filter(end_date=None).all().count() > 0 %}
{% if user.memberships.filter(end_date=None).all().count() > 0 %}
<div>
<h4>{% trans %}Club tools{% endtrans %}</h4>
<ul>
@ -161,22 +161,22 @@
{% endfor %}
</ul>
</div>
{% endif %}
{% endif %}
{% if
user.is_root
or user.is_in_group(pk=settings.SITH_GROUP_PEDAGOGY_ADMIN_ID)
%}
<div>
{% if
user.is_root
or user.is_in_group(pk=settings.SITH_GROUP_PEDAGOGY_ADMIN_ID)
%}
<div>
<h4>{% trans %}Pedagogy{% endtrans %}</h4>
<ul>
<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>
</ul>
</div>
{% endif %}
</div>
{% endif %}
<div>
<div>
<h4>{% trans %}Elections{% endtrans %}</h4>
<ul>
<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>
{%- endif -%}
</ul>
</div>
</div>
<div>
<div>
<h4>{% trans %}Other tools{% endtrans %}</h4>
<ul>
<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>
</ul>
</div>
</div>
</div>
</div>
</main>
{% endblock %}

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,15 +1,15 @@
{% extends "core/base.jinja" %}
{% 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 %}
<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>
</form>
</form>
{% endmacro %}
{% block title %}
{% trans counter_name=counter %}{{ counter_name }} counter{% endtrans %}
{% trans counter_name=counter %}{{ counter_name }} counter{% endtrans %}
{% endblock %}
{% block info_boxes %}
@ -19,7 +19,7 @@
{% endblock %}
{% block content %}
<h3>{% trans counter_name=counter %}{{ counter_name }} counter{% endtrans %}</h3>
<h3>{% trans counter_name=counter %}{{ counter_name }} counter{% endtrans %}</h3>
<div>
<h3>{% trans %}Sales{% endtrans %}</h3>
{% if last_basket %}

View File

@ -1,21 +1,21 @@
{% extends "core/base.jinja" %}
{% block title %}
{% trans %}Eticket list{% endtrans %}
{% trans %}Eticket list{% endtrans %}
{% endblock %}
{% block content %}
<p><a href="{{ url('counter:new_eticket') }}">{% trans %}New eticket{% endtrans %}</a></p>
{% if eticket_list %}
<h3>{% trans %}Eticket list{% endtrans %}</h3>
<ul>
<p><a href="{{ url('counter:new_eticket') }}">{% trans %}New eticket{% endtrans %}</a></p>
{% if eticket_list %}
<h3>{% trans %}Eticket list{% endtrans %}</h3>
<ul>
{% 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>
{% endfor %}
</ul>
{% else %}
{% trans %}There is no eticket in this website.{% endtrans %}
{% endif %}
</ul>
{% else %}
{% trans %}There is no eticket in this website.{% endtrans %}
{% endif %}
{% endblock %}

View File

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

View File

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

View File

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

View File

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

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