class AddForm(base.NullAddForm): label = _(u"label_add_mytasks_portlet", default=u"Add My Tasks Portlet") description = _(u"help_add_mytasks_portlet", default=u"This portlet displays the user's tasks.") def create(self): return Assignment() def referer(self): return self.request.get('referer', '')
class TaskTab(listing.CatalogListingView): """Lists all tasks within this context in a tabbedview listing tab. """ types = ('Task', ) sort_on = 'sortable_title' show_selects = False show_menu = False columns = ( { 'column': 'Title', 'sort_index': 'sortable_title', 'column_title': _(u'label_taskstab_title', default=u'Title'), 'transform': helper.linked }, { 'column': 'end', 'column_title': _(u'label_taskstab_end_date', default=u'End'), 'transform': helper.readable_date_time_text, 'width': 90 }, { 'column': 'getResponsibility', 'column_title': _(u'label_taskstab_responsibility', default=u'Responsibility'), 'transform': readable_responsible }, { 'column': 'review_state', 'column_title': _(u'label_taskstab_review_state', default=u'State'), 'transform': helper.translated_string(), # default is plone domain 'width': 70 }, { 'column': 'Creator', 'column_title': _(u'label_taskstab_creator', default=u'Creator'), 'transform': helper.readable_author }, )
def title(self): """This property is used to give the title of the portlet in the "manage portlets" screen. """ return _(u"label_mytasks_portlet", default=u"My Tasks Portlet")
def get_title(self): return translate(_(u'latex_label_events', u'Tasks'), context=self.request)
TaskSchema = document.ATDocumentSchema.copy() + \ atapi.Schema(( atapi.TextField( name='text', searchable=True, required=False, default_content_type='text/html', allowable_content_types=('text/html',), validators=('isTidyHtmlWithCleanup', ), default_output_type='text/x-html-safe', default_input_type='text/html', storage=atapi.AnnotationStorage(), widget=atapi.RichWidget( label=_(u'task_label_text', default=u'Text'), description=_(u'task_help_text', default=u''))), atapi.DateTimeField( name='start_date', required=True, searchable=True, accessor='start', default_method='default_start_date', widget=FtwCalendarWidget( label=_(u'task_label_start_date', default=u'Start of Task'), description=_(u'task_help_start_date', default=u'Enter the starting date and time, ' 'or click the calendar icon and select it.'), visible={'edit': 'invisible', 'view': 'invisible'})),