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 |