app/soc/views/models/request.py
changeset 651 ef6e22d463cb
parent 646 860e17e5118f
child 656 a76f1b443ea4
equal deleted inserted replaced
650:33b6dcae5615 651:ef6e22d463cb
   138       params: a dict with params for this View
   138       params: a dict with params for this View
   139       kwargs: not used
   139       kwargs: not used
   140     """
   140     """
   141 
   141 
   142     params = dicts.merge(params, self._params)
   142     params = dicts.merge(params, self._params)
       
   143     params['logic'] = self._logic
   143 
   144 
   144     try:
   145     try:
   145       access.checkAccess('listSelf', request, params['rights'])
   146       access.checkAccess('listSelf', request, params['rights'])
   146     except out_of_band.Error, error:
   147     except out_of_band.Error, error:
   147       return helper.responses.errorResponse(error, request)
   148       return helper.responses.errorResponse(error, request)
   160     uh_params['list_action'] = (redirects.inviteAcceptedRedirect, None)
   161     uh_params['list_action'] = (redirects.inviteAcceptedRedirect, None)
   161     uh_params['list_description'] = ugettext_lazy(
   162     uh_params['list_description'] = ugettext_lazy(
   162         "An overview of your unhandled requests.")
   163         "An overview of your unhandled requests.")
   163 
   164 
   164     uh_list = helper.lists.getListContent(
   165     uh_list = helper.lists.getListContent(
   165         request, uh_params, self._logic, filter, 0)
   166         request, uh_params, filter, 0)
   166 
   167 
   167     # construct the Open Requests list
   168     # construct the Open Requests list
   168     
   169     
   169     # only select the requests for the user
   170     # only select the requests for the user
   170     # that haven't been accepted by an admin yet
   171     # that haven't been accepted by an admin yet
   174     ar_params = params.copy()
   175     ar_params = params.copy()
   175     ar_params['list_description'] = ugettext_lazy(
   176     ar_params['list_description'] = ugettext_lazy(
   176         "List of your pending requests.")
   177         "List of your pending requests.")
   177     
   178     
   178     ar_list = helper.lists.getListContent(
   179     ar_list = helper.lists.getListContent(
   179         request, ar_params, self._logic, filter, 1)
   180         request, ar_params, filter, 1)
   180     
   181     
   181     # fill contents with all the needed lists
   182     # fill contents with all the needed lists
   182     contents = [uh_list, ar_list]
   183     contents = [uh_list, ar_list]
   183     
   184     
   184     # call the _list method from base to display the list
   185     # call the _list method from base to display the list