Porównaj commity

...

2 Commity

Autor SHA1 Wiadomość Data
Hartmut Holzgraefe 3630e73bce allow map lists filtered by queue name 2023-09-09 10:51:20 +00:00
Hartmut Holzgraefe 4f69ba1831 add maprenderingjob extra_text field 2023-09-09 10:50:34 +00:00
3 zmienionych plików z 39 dodań i 3 usunięć

Wyświetl plik

@ -0,0 +1,18 @@
# Generated by Django 4.2.4 on 2023-08-17 18:55
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('maposmatic', '0031_allow_NULL_mal_language'),
]
operations = [
migrations.AddField(
model_name='maprenderingjob',
name='extra_text',
field=models.CharField(blank=True, max_length=200, null=True),
),
]

Wyświetl plik

@ -43,8 +43,23 @@
{% endwith %}
{% endwith %}
<h1>{% trans "Maps" %}</h1>
<br style="clear: both;" />
<div class="d-flex justify-content-between">
<div class="fs-1">
{% trans "Maps" %}
{% if category == "queue" and extra %}
of queue <i>{{ extra }}</i>
{% endif %}
</div>
<div>
Queue:
<select onChange="url='/maps'; if (this.value) { url+='/queue/'+this.value }; {% if form.cleaned_data.query %} url+='?query={{form.cleaned_data.query}}'; {% endif %} window.location.href=url;">
<option value=""> </option>
{% for key, value in queue_states.items %}
<option value="{{key}}" {% if category == "queue" and extra == key %}selected="selected"{% endif %}>{{ key }}</option>
{% endfor %}
</select>
</div>
</div>
{% for map in maps.object_list %}
<div class="span12 map map-status-{{ map.status }}">

Wyświetl plik

@ -317,7 +317,10 @@ def maps(request, category=None, extra=None):
maps = paginator.page(paginator.num_pages)
return render(request, 'maposmatic/maps.html',
{ 'maps': maps, 'form': form,
{ 'maps': maps,
'form': form,
'category': category,
'extra': extra,
'is_search': form.is_valid(),
'pages': helpers.get_pages_list(maps, paginator) })