Esempio n. 1
0
 def get_context_data(self, **kwargs):
     context = SpecificQuestionListView.get_context_data(self, **kwargs)
     
     context.update(lookup_ml_membership(self.context_object))
     
     context.update({
          'active_tab': 'discuss',
          'workgroup': self.context_object,             
     })
 
     return context
Esempio n. 2
0
    def get_context_data(self, **kwargs):
        context = SpecificQuestionListView.get_context_data(self, **kwargs)

        context.update(lookup_ml_membership(self.context_object))

        context.update({
            'active_tab': 'discuss',
            'workgroup': self.context_object,
        })

        return context
Esempio n. 3
0
    def get_context_data(self, **kwargs):
        context = SpecificQuestionListView.get_context_data(self, **kwargs)

        context.update(
            {
                "project": self.context_object.master,
                "project_translation": self.context_object,
                "tab_context": "project_sheet",
                "tab_name": "discuss",
            }
        )

        return context
Esempio n. 4
0
 def get_context_data(self, **kwargs):
     context = SpecificQuestionListView.get_context_data(self, **kwargs)
     
     allowed_categories = self.get_specific_types().values_list('allowed_category_tree', flat=True).distinct()
     root_category = None
     if allowed_categories.count():
         root_category = TaggedCategory.objects.get(id=allowed_categories[0])
     
     context.update({
         'tab_name' : 'support',
         'prop_count' : self.get_specific_questions().filter(type__type="pj-help").count(),
         'call_count' : self.get_specific_questions().filter(type__type="pj-need").count(),
         'need_count' : self.get_specific_questions().count(),
         'root_category' : root_category,
     })
     
     return context
Esempio n. 5
0
 def get_context_data(self, **kwargs):
     context = SpecificQuestionListView.get_context_data(self, **kwargs)
     
     allowed_categories = self.get_specific_types().values_list('allowed_category_tree', flat=True).distinct()
     root_category = None
     if allowed_categories.count():
         root_category = TaggedCategory.objects.get(id=allowed_categories[0])
     
     context.update({
         'tab_name' : 'support',
         'prop_count' : self.get_specific_questions().filter(type__type="pj-help").count(),
         'call_count' : self.get_specific_questions().filter(type__type="pj-need").count(),
         'need_count' : self.get_specific_questions().count(),
         'root_category' : root_category,
     })
     
     return context
Esempio n. 6
0
 def get_context_data(self, **kwargs):
     context = SpecificQuestionListView.get_context_data(self, **kwargs)
     
     prop_count = SpecificQuestion.objects.filter(type__in=SpecificQuestionType.objects.filter(type="pj-help"), object_id=self.context_object.pk).count() 
     call_count = SpecificQuestion.objects.filter(type__in=SpecificQuestionType.objects.filter(type="pj-need"), object_id=self.context_object.pk).count()
     need_count = prop_count + call_count
     
     context.update({  
         'project': self.context_object.master,
         'project_translation': self.context_object,
         'tab_context': 'project_sheet',
         'tab_name': 'discuss',
         'discussion_count': len(context['specific_questions']),
         'need_count': need_count,
     })
 
     return context
Esempio n. 7
0
    def get_context_data(self, **kwargs):
        context = SpecificQuestionListView.get_context_data(self, **kwargs)

        prop_count = SpecificQuestion.objects.filter(
            type__in=SpecificQuestionType.objects.filter(type="pj-help"),
            object_id=self.context_object.pk).count()
        call_count = SpecificQuestion.objects.filter(
            type__in=SpecificQuestionType.objects.filter(type="pj-need"),
            object_id=self.context_object.pk).count()
        need_count = prop_count + call_count

        context.update({
            'project': self.context_object.master,
            'project_translation': self.context_object,
            'tab_context': 'project_sheet',
            'tab_name': 'discuss',
            'discussion_count': len(context['specific_questions']),
            'need_count': need_count,
        })

        return context