app/soc/views/models/program.py
changeset 1745 d8a45f622241
parent 1743 669b6136b7b3
child 1747 02f15a955c42
equal deleted inserted replaced
1744:0288cb88edd2 1745:d8a45f622241
   236     """View that allows to assign slots to orgs.
   236     """View that allows to assign slots to orgs.
   237     """
   237     """
   238 
   238 
   239     from soc.views.models import organization as organization_view
   239     from soc.views.models import organization as organization_view
   240 
   240 
   241     params = organization_view.view.getParams()
   241     org_params = organization_view.view.getParams()
   242     params['list_template'] = 'soc/program/allocation/allocation.html'
   242     org_params['list_template'] = 'soc/program/allocation/allocation.html'
   243     params['list_heading'] = 'soc/program/allocation/heading.html'
   243     org_params['list_heading'] = 'soc/program/allocation/heading.html'
   244     params['list_row'] = 'soc/program/allocation/row.html'
   244     org_params['list_row'] = 'soc/program/allocation/row.html'
   245     params['list_pagination'] = 'soc/list/no_pagination.html'
   245     org_params['list_pagination'] = 'soc/list/no_pagination.html'
   246 
   246 
   247     program = program_logic.logic.getFromKeyFields(kwargs)
   247     program = program_logic.logic.getFromKeyFields(kwargs)
   248 
   248 
   249     filter = {
   249     filter = {
   250         'scope': program,
   250         'scope': program,
   251         'status': 'active',
   251         'status': 'active',
   252         }
   252         }
   253 
   253 
   254     content = lists.getListContent(request, params, filter=filter)
   254     content = lists.getListContent(request, org_params, filter=filter)
   255     contents = [content]
   255     contents = [content]
   256 
   256 
   257     context = {
   257     context = {
   258         'total_slots': program.slots,
   258         'total_slots': program.slots,
   259         'uses_json': True,
   259         'uses_json': True,
   260         'uses_slot_allocator': True
   260         'uses_slot_allocator': True
   261         }
   261         }
   262 
   262 
   263     return self._list(request, params, contents, page_name, context)
   263     return self._list(request, org_params, contents, page_name, context)
   264 
   264 
   265   def _editPost(self, request, entity, fields):
   265   def _editPost(self, request, entity, fields):
   266     """See base._editPost().
   266     """See base._editPost().
   267     """
   267     """
   268 
   268