Exemplo n.º 1
0
 def get_context_data(self):
     """Add forms for bulk actions"""
     context = super(MyRequestList, self).get_context_data()
     context['project_form'] = ProjectManagerForm(user=self.request.user)
     context['tag_form'] = TagManagerForm(required=False)
     context['share_form'] = FOIAAccessForm(required=False)
     context['can_embargo'] = can_embargo(self.request.user)
     context['can_perm_embargo'] = can_embargo_permananently(
         self.request.user)
     return context
Exemplo n.º 2
0
 def get_context_data(self, **kwargs):
     """Add forms for bulk actions"""
     context = super(MyRequestList, self).get_context_data(**kwargs)
     context["project_form"] = ProjectManagerForm(user=self.request.user)
     # set auto_id to avoid clashing IDs with the tag filter
     context["tag_form"] = TagManagerForm(required=False,
                                          auto_id="id_tm_%s")
     context["share_form"] = FOIAAccessForm(required=False)
     context["can_embargo"] = can_embargo(self.request.user)
     context["can_perm_embargo"] = can_embargo_permananently(
         self.request.user)
     return context