Compare commits

...

3 Commits

Author SHA1 Message Date
Ales (Shagi) Zabala Alava c0c6805e5c Close button for messages
continuous-integration/drone/push Build is passing Details
2021-04-14 18:23:00 +02:00
Ales (Shagi) Zabala Alava 89a54bfd28 Add locale files to package 2021-04-14 17:42:21 +02:00
Ales (Shagi) Zabala Alava 5597d203f2 Add basque translations 2021-04-14 17:16:55 +02:00
9 changed files with 283 additions and 4 deletions

View File

@ -2,3 +2,4 @@ include LICENSE.txt
include reame.md include reame.md
recursive-include gas/static * recursive-include gas/static *
recursive-include gas/templates * recursive-include gas/templates *
recursive-include gas/locale *

Binary file not shown.

View File

@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PACKAGE VERSION\n" "Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-03-23 16:58+0000\n" "POT-Creation-Date: 2021-04-14 16:22+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
@ -143,6 +143,10 @@ msgstr "Salir"
msgid "Home" msgid "Home"
msgstr "Inicio" msgstr "Inicio"
#: templates/gas/base.html:66
msgid "Close"
msgstr "Cerrar"
#: templates/gas/base_form.html:23 templates/gas/delete_confirmation.html:21 #: templates/gas/base_form.html:23 templates/gas/delete_confirmation.html:21
msgid "Cancel" msgid "Cancel"
msgstr "Cancelar" msgstr "Cancelar"

Binary file not shown.

View File

@ -0,0 +1,228 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-04-14 16:22+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: apps.py:8
msgid "GAS"
msgstr ""
#: forms.py:25
msgid "roles"
msgstr "rolak"
#: gas/config.py:6
msgid "Users with access to gas control panel."
msgstr "Kontrol panelera sartzeko baimena duten erabiltzaileak."
#: gas/config.py:7
msgid "Users with access to everithing inside control panel."
msgstr "Kontrol panel guztian sartzeko baimena duten erabiltzaileak."
#: gas/config.py:14 gas/users/views.py:31 gas/users/views.py:39
#: gas/users/views.py:49 gas/users/views.py:60 gas/users/views.py:96
#: gas/users/views.py:108
msgid "Users"
msgstr "Erabiltzaileak"
#: gas/core/views.py:21
msgid "Change your password"
msgstr "Zure pasahitza aldatu"
#: gas/core/views.py:22
msgid "Password changed."
msgstr "Pasahitza aldatuta."
#: gas/users/forms.py:9 templates/gas/users/user_list.html:10
msgid "Username"
msgstr "Erabiltzailea"
#: gas/users/forms.py:10 templates/gas/users/user_list.html:11
msgid "Active"
msgstr "Gaituta"
#: gas/users/forms.py:12 templates/gas/users/user_list.html:12
msgid "Roles"
msgstr "Rolak"
#: gas/users/views.py:32
msgid "Manage users and set roles."
msgstr "Erabiltzaileak kudeatu eta rolak ezarri."
#: gas/users/views.py:34
msgid "New user"
msgstr "Erabiltzaile berria"
#: gas/users/views.py:44
msgid "Create user"
msgstr "Erabiltzailea sortu"
#: gas/users/views.py:45
msgid "User created"
msgstr "Erabiltzailea sortua"
#: gas/users/views.py:50
msgid "Create"
msgstr "Sortu"
#: gas/users/views.py:55
msgid "Update user"
msgstr "Erabiltzailea eguneratu"
#: gas/users/views.py:56
msgid "User updated"
msgstr "Erabiltzailea eguneratuta"
#: gas/users/views.py:62
msgid "Update"
msgstr "Eguneratu"
#: gas/users/views.py:69
msgid "User password updated"
msgstr "Erabiltzailearen pasahitza eguneratuta"
#: gas/users/views.py:76
#, python-brace-format
msgid "Change {username} user password"
msgstr "Aldatu {username} erabiltzailearen pasahitza"
#: gas/users/views.py:98 templates/gas/base.html:23
#: templates/gas/users/user_list.html:29
msgid "Change password"
msgstr "Pasahitza aldatu"
#: gas/users/views.py:103
msgid "Delete user"
msgstr "Erabiltzailea ezabatu"
#: gas/users/views.py:104
msgid "User deleted"
msgstr "Erabiltzailea ezabatua"
#: gas/users/views.py:110 templates/gas/delete_confirmation.html:20
#: templates/gas/users/user_list.html:30
msgid "Delete"
msgstr "Ezabatu"
#: models.py:8
msgid "role"
msgstr "rola"
#: models.py:10
msgid "user"
msgstr "erabiltzailea"
#: models.py:14
msgid "user role"
msgstr "erabiltzaile rola"
#: models.py:15
msgid "user roles"
msgstr "erabiltzaile rolak"
#: templates/gas/base.html:24
msgid "Logout"
msgstr "Irten"
#: templates/gas/base.html:44
msgid "Home"
msgstr "Hasiera"
#: templates/gas/base.html:66
msgid "Close"
msgstr "Itxi"
#: templates/gas/base_form.html:23 templates/gas/delete_confirmation.html:21
msgid "Cancel"
msgstr "Ezeztatu"
#: templates/gas/base_form.html:26
msgid "Save"
msgstr "Gorde"
#: templates/gas/base_form.html:29
msgid "Save and continue"
msgstr "Gorde eta jarraitu"
#: templates/gas/base_list.html:14
msgid "Filter"
msgstr "Iragazi"
#: templates/gas/delete_confirmation.html:5
msgid "Delete confirmation"
msgstr "Ezabatzeko berrespena"
#: templates/gas/delete_confirmation.html:10
msgid "Summary"
msgstr "Laburpena"
#: templates/gas/delete_confirmation.html:16
msgid "Objects"
msgstr "Objetuak"
#: templates/gas/login.html:6 templates/gas/login.html:15
msgid "Login"
msgstr "Sartu"
#: templates/gas/tags/pagination.html:9
msgid "Previous"
msgstr "Aurrekoa"
#: templates/gas/tags/pagination.html:13
#, python-format
msgid ""
"\n"
" Page %(number)s of %(total)s\n"
" "
msgstr ""
"\n"
" %(number)s orria, %(total)s totalean\n"
" "
#: templates/gas/tags/pagination.html:18
msgid "Next"
msgstr "Hurrengoa"
#: templates/gas/tags/pagination.html:23
#, python-format
msgid ""
"\n"
" From %(start)s to %(end)s of %(total_objects)s total items.\n"
" "
msgstr ""
"\n"
" %(total_objects)s elementuetatik %(start)s - %(end)s.\n"
" "
#: templates/gas/users/user_list.html:28
msgid "Edit"
msgstr "Editatu"
#: views.py:45
msgid "Operation successful."
msgstr "Eragiketa ongi burutu da."
#: views.py:181
#, python-brace-format
msgid "Are you sure you want to delete {object}?"
msgstr "Ziur zaude {object} ezabatu nahi duzula?"
#: views.py:182
#, python-brace-format
msgid "{object} deleted."
msgstr "{object} ezabatua."

View File

@ -1,3 +1,12 @@
:root {
--success-dark: #3f3;
--success: #9f9;
--error-dark: #f33;
--error: #f99;
--info-dark: #33f;
--info: #99f;
}
table { table {
border-collapse: collapse; border-collapse: collapse;
border: 1px solid gray; border: 1px solid gray;
@ -197,11 +206,42 @@ label {
font-weight: bold; font-weight: bold;
} }
.message {
position: relative;
border: 2px solid;
border-radius: 0.5em;
padding: 1em;
}
.message .message-close {
position: absolute;
top: 1em;
right: 1em;
background-color: transparent;
border: none;
color: var(--white);
icon: pointer;
}
.message.success {
border-color: var(--success-dark);
background-color: var(--success);
}
.message.error {
border-color: var(--error-dark);
background-color: var(--error);
}
.message.info {
border-color: var(--info-dark);
background-color: var(--info);
}
#login { #login {
background: #eee; background: #eee;
} }
#login form { #login form {
border: 1px solid gray; border: 1px solid gray;
border-radius: 0.5em; border-radius: 0.5em;

View File

@ -4,6 +4,12 @@ var GAS = {
$('.select2').select2({ $('.select2').select2({
width: 'resolve', width: 'resolve',
}); });
$('#messages .message-close').click(function(event){
event.preventDefault();
let $message = $(this).parents('.message');
$message.remove();
});
}); });
var csrftoken = GAS.getCookie('csrftoken'); var csrftoken = GAS.getCookie('csrftoken');

View File

@ -63,6 +63,7 @@
{% for message in messages %} {% for message in messages %}
<div class="message {% if message.tags %} {{ message.tags }}{% endif %}"> <div class="message {% if message.tags %} {{ message.tags }}{% endif %}">
{{ message|safe }} {{ message|safe }}
<button class="message-close" type="button"><i class="fas fa-times" title="{% trans "Close" %}"></i></button>
</div> </div>
{% endfor %} {% endfor %}
</div> </div>

View File

@ -1,4 +1,3 @@
import datetime
import json import json
from urllib.parse import urlencode from urllib.parse import urlencode