app/soc/views/site/user/list.py
changeset 374 9363b9dc2983
parent 365 74dec172944e
child 445 31927f21970d
equal deleted inserted replaced
373:dcd7013ae0d5 374:9363b9dc2983
    57   except  soc.views.out_of_band.AccessViolationResponse, alt_response:
    57   except  soc.views.out_of_band.AccessViolationResponse, alt_response:
    58     return alt_response.response()
    58     return alt_response.response()
    59 
    59 
    60   # create default template context for use with any templates
    60   # create default template context for use with any templates
    61   context = helper.responses.getUniversalContext(request)
    61   context = helper.responses.getUniversalContext(request)
       
    62   context['page'] = page
    62 
    63 
    63   offset, limit = helper.lists.cleanListParameters(
    64   offset, limit = helper.lists.cleanListParameters(
    64       offset=request.GET.get('offset'), limit=request.GET.get('limit'))
    65       offset=request.GET.get('offset'), limit=request.GET.get('limit'))
    65 
    66 
    66   # Fetch one more to see if there should be a 'next' link
    67   # Fetch one more to see if there should be a 'next' link
    67   users = models.user.logic.getForLimitAndOffset(limit + 1, offset=offset)
    68   users = models.user.logic.getForLimitAndOffset(limit + 1, offset=offset)
    68 
    69 
    69   context['pagination_form'] = helper.lists.makePaginationForm(request, limit)
    70   context['pagination_form'] = helper.lists.makePaginationForm(request, limit)
    70   
    71 
    71   list_templates = {'list_main': 'soc/list/list_main.html',
    72   list_templates = {'list_main': 'soc/list/list_main.html',
    72                     'list_pagination': 'soc/list/list_pagination.html',
    73                     'list_pagination': 'soc/list/list_pagination.html',
    73                     'list_row': 'soc/site/user/list/user_row.html',
    74                     'list_row': 'soc/site/user/list/user_row.html',
    74                     'list_heading': 'soc/site/user/list/user_heading.html'}
    75                     'list_heading': 'soc/site/user/list/user_heading.html'}
    75                       
    76