kopia lustrzana https://github.com/hholzgra/maposmatic/
Porównaj commity
2 Commity
febb510b3c
...
22c34f35be
Autor | SHA1 | Data |
---|---|---|
Hartmut Holzgraefe | 22c34f35be | |
Hartmut Holzgraefe | b43b18db2e |
|
@ -7,6 +7,7 @@
|
|||
<div class="row">
|
||||
<div class="col-md-9">
|
||||
<table class="table table-striped">
|
||||
<tr><td><strong>{% trans "Queue" %}</strong></td><td>{{ map.queue }}</td></tr>
|
||||
{% with date=map.submission_time|date:"DATETIME_FORMAT" %}
|
||||
<tr><td><strong>{% trans "Request submitted" %}</strong></td><td title="{{ date }}">{% blocktrans with map.submission_time|timesince as since %}{{since}} ago{% endblocktrans %}</td></tr>
|
||||
{% endwith %}
|
||||
|
|
|
@ -94,7 +94,7 @@
|
|||
{% endif %}
|
||||
<tr><td><strong>{% trans "Paper format" %}</strong></td><td>{{ map|paper_size }}</td></tr>
|
||||
<tr><td><strong>{% trans "Map locale" %}</strong></td><td>{{ MAP_LANGUAGES|getitem:map.map_language }}</td></tr>
|
||||
|
||||
<tr><td><strong>{% trans "Queue" %}</strong></td><td>{{ map.queue }}</td></tr>
|
||||
{% with date=map.submission_time|date:"DATETIME_FORMAT" %}
|
||||
<tr><td><strong>{% trans "Request submitted" %}</strong></td><td title="{{ date }}">{% blocktrans with map.submission_time|timesince as since %}{{since}} ago{% endblocktrans %}</td></tr>
|
||||
{% endwith %}
|
||||
|
|
|
@ -288,7 +288,7 @@ def map_full(request, id, nonce=None):
|
|||
'nonce': nonce, 'refresh': refresh,
|
||||
'progress': progress, 'queue_size': queue_size })
|
||||
|
||||
def maps(request, category=None):
|
||||
def maps(request, category=None, extra=None):
|
||||
"""Displays all maps and jobs, sorted by submission time, or maps matching
|
||||
the search terms when provided."""
|
||||
|
||||
|
@ -310,6 +310,8 @@ def maps(request, category=None):
|
|||
.order_by('-submission_time'))
|
||||
if category == 'errors':
|
||||
map_list = map_list.filter(status=2).exclude(resultmsg='ok')
|
||||
elif category == 'queue' and extra is not None:
|
||||
map_list = map_list.filter(queue=extra)
|
||||
|
||||
paginator = Paginator(map_list, www.settings.ITEMS_PER_PAGE)
|
||||
|
||||
|
|
|
@ -64,6 +64,9 @@ urlpatterns = [
|
|||
re_path(r'^maps/(?P<category>[a-z]+)$',
|
||||
views.maps,
|
||||
name='maps-list-cagetory'),
|
||||
re_path(r'^maps/(?P<category>[a-z]+)/(?P<extra>[a-z-]+)$',
|
||||
views.maps,
|
||||
name='maps-list-cagetory-extra'),
|
||||
re_path(r'^maps/$',
|
||||
views.maps,
|
||||
name='maps'),
|
||||
|
|
Ładowanie…
Reference in New Issue