508 |
508 |
509 return self._constructResponse(request, entity, context, form, params) |
509 return self._constructResponse(request, entity, context, form, params) |
510 |
510 |
511 @decorators.merge_params |
511 @decorators.merge_params |
512 @decorators.check_access |
512 @decorators.check_access |
513 def list(self, request, access_type, |
513 def list(self, request, access_type, page_name=None, params=None, |
514 page_name=None, params=None, filter=None, order=None, **kwargs): |
514 filter=None, order=None, prefetch=None, **kwargs): |
515 """Displays the list page for the entity type. |
515 """Displays the list page for the entity type. |
516 |
516 |
517 Args: |
517 Args: |
518 request: the standard Django HTTP request object |
518 request: the standard Django HTTP request object |
519 access_type : the name of the access type which should be checked |
519 access_type : the name of the access type which should be checked |
520 page_name: the page name displayed in templates as page and header title |
520 page_name: the page name displayed in templates as page and header title |
521 params: a dict with params for this View |
521 params: a dict with params for this View |
522 filter: a dict for the properties that the entities should have |
522 filter: a dict for the properties that the entities should have |
|
523 prefetch: the fields of the data that should be pre-fetched |
523 |
524 |
524 Params usage: |
525 Params usage: |
525 The params dictionary is passed as argument to getListContent in |
526 The params dictionary is passed as argument to getListContent in |
526 the soc.views.helper.list module. See the docstring for getListContent |
527 the soc.views.helper.list module. See the docstring for getListContent |
527 on how it uses it. The params dictionary is also passed as argument to |
528 on how it uses it. The params dictionary is also passed as argument to |
528 the _list method. See the docstring for _list on how it uses it. |
529 the _list method. See the docstring for _list on how it uses it. |
529 """ |
530 """ |
530 |
531 |
531 content = helper.lists.getListContent(request, params, filter, order=order) |
532 content = helper.lists.getListContent(request, params, filter, |
|
533 order=order, prefetch=prefetch) |
532 contents = [content] |
534 contents = [content] |
533 |
535 |
534 return self._list(request, params, contents, page_name) |
536 return self._list(request, params, contents, page_name) |
535 |
537 |
536 def _list(self, request, params, contents, page_name, context=None): |
538 def _list(self, request, params, contents, page_name, context=None): |