Ejemplo n.º 1
0
 def __call__(self):
     ar = self.context
     self.tables = {}
     for poc in POINTS_OF_CAPTURE:
         if self.context.getAnalyses(getPointOfCapture=poc):
             t = AnalysesView(ar,
                              self.request,
                              getPointOfCapture = poc)
             t.allow_edit = False
             t.show_select_column = False
             self.tables[POINTS_OF_CAPTURE.getValue(poc)] = t.contents_table()
     return self.template()
Ejemplo n.º 2
0
    def __call__(self):
        ar = self.context
        workflow = getToolByName(ar, 'portal_workflow')

        if workflow.getInfoFor(ar, 'cancellation_state') == "cancelled":
            self.request.response.redirect(ar.absolute_url())
        elif not(getSecurityManager().checkPermission(ManageResults, ar)):
            self.request.response.redirect(ar.absolute_url())
        else:
            self.tables = {}
            for poc in POINTS_OF_CAPTURE:
                if self.context.getAnalyses(getPointOfCapture=poc):
                    t = AnalysesView(ar,
                                     self.request,
                                     getPointOfCapture = poc)
                    t.allow_edit = True
                    t.review_states[0]['transitions'] = ['submit', 'retract', 'verify']
                    t.show_select_column = True
                    self.tables[POINTS_OF_CAPTURE.getValue(poc)] = t.contents_table()
            return self.template()