From 2ae10ee2fb0a93781f5987b8edea3cf76bdbda2c Mon Sep 17 00:00:00 2001 From: Bartuccio Antoine Date: Mon, 22 Apr 2019 14:59:32 +0200 Subject: [PATCH] core: add macro that selects/unselect all checkbox --- core/templates/core/group_detail.jinja | 3 +++ core/templates/core/macros.jinja | 15 ++++++++++++++ locale/fr/LC_MESSAGES/django.po | 28 +++++++++++++++++--------- 3 files changed, 36 insertions(+), 10 deletions(-) diff --git a/core/templates/core/group_detail.jinja b/core/templates/core/group_detail.jinja index 45c857e4..3e9dfe45 100644 --- a/core/templates/core/group_detail.jinja +++ b/core/templates/core/group_detail.jinja @@ -1,4 +1,5 @@ {% extends "core/base.jinja" %} +{% from "core/macros.jinja" import select_all_checkbox %} {% block title %} {% trans %}Group detail{% endtrans %} @@ -11,6 +12,8 @@

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

{% else %}
+ {{ select_all_checkbox("add_users") }} +
{% csrf_token %} {{ form.users_removed.errors }} diff --git a/core/templates/core/macros.jinja b/core/templates/core/macros.jinja index f713259a..36b9ed05 100644 --- a/core/templates/core/macros.jinja +++ b/core/templates/core/macros.jinja @@ -132,3 +132,18 @@ {% trans %}Next{% endtrans %} {% endif %} {% endmacro %} + +{% macro select_all_checkbox(form_id) %} + + + +{% endmacro %} \ No newline at end of file diff --git a/locale/fr/LC_MESSAGES/django.po b/locale/fr/LC_MESSAGES/django.po index d471fca3..19257e11 100644 --- a/locale/fr/LC_MESSAGES/django.po +++ b/locale/fr/LC_MESSAGES/django.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-04-11 01:41+0200\n" +"POT-Creation-Date: 2019-04-22 14:57+0200\n" "PO-Revision-Date: 2016-07-18\n" "Last-Translator: Skia \n" "Language-Team: AE info \n" @@ -361,8 +361,8 @@ msgstr "Compte en banque : " #: com/templates/com/weekmail.jinja:62 core/templates/core/file_detail.jinja:25 #: core/templates/core/file_detail.jinja:62 #: core/templates/core/file_moderation.jinja:24 -#: core/templates/core/group_detail.jinja:23 -#: core/templates/core/group_list.jinja:22 core/templates/core/macros.jinja:93 +#: core/templates/core/group_detail.jinja:26 +#: core/templates/core/group_list.jinja:25 core/templates/core/macros.jinja:93 #: core/templates/core/macros.jinja:112 core/templates/core/page_prop.jinja:14 #: core/templates/core/user_account_detail.jinja:38 #: core/templates/core/user_detail.jinja:178 @@ -418,7 +418,7 @@ msgstr "Nouveau compte club" #: com/templates/com/poster_list.jinja:45 #: com/templates/com/screen_list.jinja:26 com/templates/com/weekmail.jinja:32 #: com/templates/com/weekmail.jinja:61 core/templates/core/file.jinja:38 -#: core/templates/core/group_list.jinja:21 core/templates/core/page.jinja:35 +#: core/templates/core/group_list.jinja:24 core/templates/core/page.jinja:35 #: core/templates/core/poster_list.jinja:40 #: core/templates/core/user_tools.jinja:42 core/views/user.py:237 #: counter/templates/counter/cash_summary_list.jinja:53 @@ -1033,7 +1033,7 @@ msgstr "Rôle" #: club/templates/club/club_members.jinja:10 #: club/templates/club/club_old_members.jinja:10 -#: core/templates/core/group_list.jinja:14 +#: core/templates/core/group_list.jinja:15 #: core/templates/core/user_clubs.jinja:17 #: core/templates/core/user_clubs.jinja:43 msgid "Description" @@ -2575,16 +2575,16 @@ msgstr "Modération des fichiers" msgid "Full name: " msgstr "Nom complet : " -#: core/templates/core/group_detail.jinja:4 +#: core/templates/core/group_detail.jinja:5 msgid "Group detail" msgstr "Détail du groupe" -#: core/templates/core/group_detail.jinja:9 +#: core/templates/core/group_detail.jinja:10 #: core/templates/core/group_edit.jinja:4 msgid "Back to list" msgstr "Retour à la liste" -#: core/templates/core/group_detail.jinja:11 +#: core/templates/core/group_detail.jinja:12 msgid "No user in this group" msgstr "Aucun utilisateur dans ce groupe" @@ -2607,11 +2607,11 @@ msgstr "Liste des groupes" msgid "New group" msgstr "Nouveau groupe" -#: core/templates/core/group_list.jinja:12 +#: core/templates/core/group_list.jinja:13 msgid "ID" msgstr "ID" -#: core/templates/core/group_list.jinja:13 +#: core/templates/core/group_list.jinja:14 msgid "Group" msgstr "Groupe" @@ -2680,6 +2680,14 @@ msgstr "actuel" msgid "Next" msgstr "Suivant" +#: core/templates/core/macros.jinja:147 +msgid "Select All" +msgstr "Tout sélectionner" + +#: core/templates/core/macros.jinja:148 +msgid "Unselect All" +msgstr "Tout désélectionner" + #: core/templates/core/macros_pages.jinja:4 #, python-format msgid "You're seeing the history of page \"%(page_name)s\""