From 2b8ca1ad45e0c981f1082c7fcba021510fec3fd4 Mon Sep 17 00:00:00 2001 From: Jarmil Date: Wed, 13 Nov 2019 09:16:01 +0100 Subject: [PATCH] Pridana proklikavaci email adresa do vypisu seznamu nalodenych --- src/nalodeni/people.py | 11 ++++------- src/nalodeni/templates/people/list.html | 2 +- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/src/nalodeni/people.py b/src/nalodeni/people.py index ecc3ec0..a782876 100644 --- a/src/nalodeni/people.py +++ b/src/nalodeni/people.py @@ -1,5 +1,7 @@ # -*- encoding: utf-8 -*- +""" Funkce pro praci se seznamem nalodenych osob pro administraty / KoDo """ + from datetime import date, datetime, timedelta # timeSlices from collections import OrderedDict import csv @@ -144,17 +146,13 @@ def eu2019(request, dist=None): @login_required(login_url="/prihlaseni") @role_required(['sso_kodo']) def confirmed(request, newOnly=False, dist=None): - """ Seznam nalodenych pasazeru """ + """ Zobraz seznam nalodenych pasazeru """ dist = dist or int(request.POST.get('dist', -1)) doCsvExport = None != request.POST.get('doCsvExport', None) objs = get_AppUser_objects(request).order_by('last_name', 'first_name' ,'email') - - if newOnly: - objs = objs.filter(status=models.AppUser.STATUS_NEW) - else: - objs = objs.filter(status=models.AppUser.STATUS_REG) + objs = objs.filter(status=(models.AppUser.STATUS_NEW if newOnly else models.AppUser.STATUS_REG)) districts = [(-1, ' -- vše dostupné -- ')] + get_AppUser_districts(request) # filtrujeme jen povolene kraje, nebo vse pro adminy @@ -387,4 +385,3 @@ def person_edit(request, id): 'AUTH_SERVER' : appSettings.AUTH_SERVER, } return render(request, 'person/edit.html', context) - diff --git a/src/nalodeni/templates/people/list.html b/src/nalodeni/templates/people/list.html index 6d9dc25..ba8a902 100644 --- a/src/nalodeni/templates/people/list.html +++ b/src/nalodeni/templates/people/list.html @@ -54,7 +54,7 @@ $(document).ready(function(){ {{p.first_name}} {{p.last_name}} - {{p.email}} + {{p.email}} {{p.postcode|default_if_none:'-'}} {{p.city|default_if_none:'-'}} {{p.get_district_display}}