def __call__(self): task_html_pdf_css.need() # If the task is editable, we go the edit page if self.request.has_permission('edit.%s' % self.context.type_): return HTTPFound( self.request.route_path("/%ss/{id}" % self.context.type_, id=self.context.id)) populate_actionmenu(self.request) return dict( title=self.title, task=self.context, actions=self.actions(), )
def __call__(self): self.populate_navigation() task_html_pdf_css.need() # If the task is editable, we go the edit page if self.request.has_permission('edit.%s' % self.context.type_): return HTTPFound( self.request.route_path("/%ss/{id}" % self.context.type_, id=self.context.id)) return dict( title=self.title, task=self.context, actions=self.actions(), indicators=self._collect_file_indicators(), )
def __call__(self): self.populate_navigation() task_html_pdf_css.need() # If the task is editable, we go the edit page if self.request.has_permission('edit.%s' % self.context.type_): return HTTPFound( self.request.route_path( "/%ss/{id}" % self.context.type_, id=self.context.id ) ) return dict( title=self.title, task=self.context, actions=self.actions(), indicators=self._collect_file_indicators(), )
def task_html_view(request): """ The task html view """ from autonomie.resources import task_html_pdf_css task_html_pdf_css.need() # If the task is editable, we go the edit page if context_is_editable(request): return HTTPFound( request.route_path( request.context.__name__, id=request.context.id ) ) # Get the label for the given task if request.context.__name__ == 'invoice': label = u"Facture" elif request.context.__name__ == 'estimation': label = u"Devis" elif request.context.__name__ == 'cancelinvoice': label = u"Avoir" else: label = u"Objet" title = u"{0} numéro : {1}".format(label, request.context.internal_number) populate_actionmenu(request) # We use the task's class to retrieve the available actions model = request.context.__class__ button_handler = form_actions_factory(request, model) submit_buttons = button_handler.get_buttons() return dict( title=title, task=request.context, submit_buttons=submit_buttons, )
def task_html_view(request): """ The task html view """ from autonomie.resources import task_html_pdf_css task_html_pdf_css.need() # If the task is editable, we go the edit page if context_is_editable(request): return HTTPFound( request.route_path(request.context.__name__, id=request.context.id)) # Get the label for the given task if request.context.__name__ == 'invoice': label = u"Facture" elif request.context.__name__ == 'estimation': label = u"Devis" elif request.context.__name__ == 'cancelinvoice': label = u"Avoir" else: label = u"Objet" title = u"{0} numéro : {1}".format(label, request.context.internal_number) populate_actionmenu(request) # We use the task's class to retrieve the available actions model = request.context.__class__ button_handler = form_actions_factory(request, model) submit_buttons = button_handler.get_buttons() return dict( title=title, task=request.context, submit_buttons=submit_buttons, )