Pridana proklikavaci email adresa do vypisu seznamu nalodenych

This commit is contained in:
Jarmil 2019-11-13 09:16:01 +01:00
parent 8944e33cbe
commit 2b8ca1ad45
2 changed files with 5 additions and 8 deletions

View File

@ -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)

View File

@ -54,7 +54,7 @@ $(document).ready(function(){
<td><input type="checkbox" name="r[]" value="{{p.id}}"/></td>
<td>{{p.first_name}}</td>
<td>{{p.last_name}}</td>
<td>{{p.email}}</td>
<td><a href="mailto:{{p.email}}">{{p.email}}</a></td>
<td>{{p.postcode|default_if_none:'-'}}</td>
<td>{{p.city|default_if_none:'-'}}</td>
<td>{{p.get_district_display}}</td>