Compare commits

..

No commits in common. "976658a0cc7a059f1fbb4e370f0936cb86b8f9a4" and "28269a3a93900511fa7b7e840df63a5a5e864b6b" have entirely different histories.

4 changed files with 3 additions and 83 deletions

View File

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-03-23 16:58+0000\n"
"POT-Creation-Date: 2021-01-08 14:15+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"
@ -175,36 +175,6 @@ msgstr "Objetos"
msgid "Login"
msgstr "Login"
#: templates/gas/tags/pagination.html:9
msgid "Previous"
msgstr "Anterior"
#: templates/gas/tags/pagination.html:13
#, python-format
msgid ""
"\n"
" Page %(number)s of %(total)s\n"
" "
msgstr ""
"\n"
" Página %(number)s de %(total)s\n"
" "
#: templates/gas/tags/pagination.html:18
msgid "Next"
msgstr "Siguiente"
#: 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"
" De %(start)s a %(end)s de un total de %(total_objects)s items.\n"
" "
#: templates/gas/users/user_list.html:28
msgid "Edit"
msgstr "Editar"
@ -219,6 +189,5 @@ msgid "Are you sure you want to delete {object}?"
msgstr "¿Seguro que quieres borrar {object}?"
#: views.py:182
#, python-brace-format
msgid "{object} deleted."
msgstr "{object} borrado"

View File

@ -4,7 +4,7 @@
{% load form_tags %}
{% block content %}
<form action="." method="POST" enctype="multipart/form-data">{% csrf_token %}
<form action="." method="POST">{% csrf_token %}
{% if is_popup %}
<input type="hidden" name="_popup" value="1">
{% endif %}

View File

@ -1,28 +0,0 @@
{% load i18n %}
{% load custom_gas_tags %}
{% if page %}
<nav class="pagination">
<ul>
{% if page.has_previous %}
<li>
<a href="?{% url_replace request page=page.previous_page_number %}">{% trans "Previous" %}</a>
</li>
{% endif %}
<li class="current">
{% blocktrans with number=page.number total=page.paginator.num_pages %}
Page {{ number }} of {{ total }}
{% endblocktrans %}
</li>
{% if page.has_next %}
<li><a href="?{% url_replace request page=page.next_page_number %}">{% trans "Next" %}</a></li>
{% endif %}
</ul>
<p>
{% blocktrans with start=page.start_index end=page.end_index total_objects=page.paginator.count %}
From {{ start }} to {{ end }} of {{ total_objects }} total items.
{% endblocktrans %}
</p>
</nav>
{% endif %}

View File

@ -1,6 +1,5 @@
# -*- coding: utf-8 -*-
import datetime
import json
from urllib.parse import urlencode
from django import template
from django.utils.html import mark_safe
@ -40,23 +39,3 @@ def display_boolean(value):
else:
render = '<i class="fas fa-times"></i>'
return mark_safe(render)
@register.simple_tag
def url_replace(request, **kwargs):
query = request.GET.dict()
query.update(kwargs)
return urlencode(query)
@register.inclusion_tag("gas/tags/pagination.html")
def pagination(request, page):
return {
'request': request,
'page': page,
}
@register.filter
def to_json(data):
return mark_safe(json.dumps(data))