app/soc/views/models/group.py
changeset 994 f05c02ba40fc
parent 993 99c46908b4b6
child 998 125257161908
equal deleted inserted replaced
993:99c46908b4b6 994:f05c02ba40fc
   122     """
   122     """
   123 
   123 
   124     # set the pagename to include the link_id
   124     # set the pagename to include the link_id
   125     page_name = '%s %s' %(page_name, kwargs['link_id'])
   125     page_name = '%s %s' %(page_name, kwargs['link_id'])
   126 
   126 
       
   127     # get the group from the request
       
   128     group_logic = params['logic']
       
   129 
       
   130     group_entity = group_logic.getFromFields(**kwargs)
       
   131 
   127     role_names = params['roles_logic'].keys()
   132     role_names = params['roles_logic'].keys()
   128 
   133     
   129     # list all incoming requests
   134     # list all incoming requests
   130     filter = {
   135     filter = {
       
   136         'scope' : group_entity,
   131         'role': role_names,
   137         'role': role_names,
   132         'state': 'new'
   138         'state': 'new'
   133         }
   139         }
   134 
   140 
   135     # create the list parameters
   141     # create the list parameters
   143     inc_req_content = list_helper.getListContent(
   149     inc_req_content = list_helper.getListContent(
   144         request, inc_req_params, filter, 0)
   150         request, inc_req_params, filter, 0)
   145 
   151 
   146     # list all outstanding invites
   152     # list all outstanding invites
   147     filter = {
   153     filter = {
       
   154         'scope' : group_entity,
   148         'role': role_names,
   155         'role': role_names,
   149         'state': 'group_accepted'
   156         'state': 'group_accepted'
   150         }
   157         }
   151 
   158 
   152     # create the list parameters
   159     # create the list parameters
   160     out_inv_content = list_helper.getListContent(
   167     out_inv_content = list_helper.getListContent(
   161         request, out_inv_params, filter, 1)
   168         request, out_inv_params, filter, 1)
   162 
   169 
   163     # list all ignored requests
   170     # list all ignored requests
   164     filter = {
   171     filter = {
       
   172         'scope' : group_entity,
   165         'role': role_names,
   173         'role': role_names,
   166         'state': 'ignored'
   174         'state': 'ignored'
   167         }
   175         }
   168 
   176 
   169     # create the list parameters
   177     # create the list parameters