def __init__(self, context, request): super(StorageLocationsView, self).__init__(context, request) self.catalog = 'bika_setup_catalog' self.contentFilter = {'portal_type': 'StorageLocation', 'sort_on': 'sortable_title'} self.context_actions = {_('Add'): {'url': 'createObject?type_name=StorageLocation', 'icon': '++resource++bika.lims.images/add.png'}} self.title = self.context.translate(_("Storage Locations")) self.icon = self.portal_url + "/++resource++bika.lims.images/storagelocation_big.png" self.description = "" self.show_sort_column = False self.show_select_row = False self.show_select_column = True self.pagesize = 25 self.columns = { 'Title': {'title': _('Storage Location'), 'index':'sortable_title'}, 'Description': {'title': _('Description'), 'index': 'description', 'toggle': True}, 'SiteTitle': {'title': _p('Site Title'), 'toggle': True}, 'SiteCode': {'title': _p('Site Code'), 'toggle': True}, 'LocationTitle': {'title': _p('Location Title'), 'toggle': True}, 'LocationCode': {'title': _p('Location Code'), 'toggle': True}, 'ShelfTitle': {'title': _p('Shelf Title'), 'toggle': True}, 'ShelfCode': {'title': _p('Shelf Code'), 'toggle': True}, 'Owner': {'title': _p('Owner'), 'toggle': True}, } self.review_states = [ {'id':'default', 'title': _('Active'), 'contentFilter': {'inactive_state': 'active'}, 'transitions': [{'id':'deactivate'}, ], 'columns': ['Title', 'Description', 'Owner', 'SiteTitle', 'SiteCode', 'LocationTitle', 'LocationCode', 'ShelfTitle', 'ShelfCode']}, {'id':'inactive', 'title': _('Dormant'), 'contentFilter': {'inactive_state': 'inactive'}, 'transitions': [{'id':'activate'}, ], 'columns': ['Title', 'Description', 'Owner', 'SiteTitle', 'SiteCodeShelfCode' ]}, {'id':'all', 'title': _('All'), 'contentFilter':{}, 'columns': ['Title', 'Description', 'Owner', 'SiteTitle', 'SiteCodeShelfCode' ]}, ]
def __init__(self, context, request): super(SamplePointsView, self).__init__(context, request) self.catalog = 'bika_setup_catalog' self.contentFilter = {'portal_type': 'SamplePoint', 'sort_on': 'sortable_title'} self.context_actions = {_('Add'): {'url': 'createObject?type_name=SamplePoint', 'icon': '++resource++bika.lims.images/add.png'}} self.title = _("Sample Points") self.icon = self.portal_url + "/++resource++bika.lims.images/samplepoint_big.png" self.description = "" self.show_sort_column = False self.show_select_row = False self.show_select_column = True self.pagesize = 25 self.columns = { 'Title': {'title': _('Sample Point'), 'index':'sortable_title'}, 'Description': {'title': _('Description'), 'index': 'description', 'toggle': True}, 'Owner': {'title': _p('Owner'), 'toggle': True}, 'getComposite': {'title': _('Composite'), 'toggle': True}, 'SampleTypes': {'title': _('Sample Types'), 'toggle': True}, } self.review_states = [ {'id':'default', 'title': _('Active'), 'contentFilter': {'inactive_state': 'active'}, 'transitions': [{'id':'deactivate'}, ], 'columns': ['Title', 'Description', 'Owner', 'SampleTypes']}, {'id':'inactive', 'title': _('Dormant'), 'contentFilter': {'inactive_state': 'inactive'}, 'transitions': [{'id':'activate'}, ], 'columns': ['Title', 'Description', 'Owner', 'SampleTypes']}, {'id':'all', 'title': _('All'), 'contentFilter':{}, 'columns': ['Title', 'Description', 'Owner', 'SampleTypes']}, ]
def __init__(self, context, request): super(SamplePointsView, self).__init__(context, request) self.catalog = "bika_setup_catalog" self.contentFilter = {"portal_type": "SamplePoint", "sort_on": "sortable_title"} self.context_actions = { _("Add"): {"url": "createObject?type_name=SamplePoint", "icon": "++resource++bika.lims.images/add.png"} } self.title = _("Sample Points") self.icon = self.portal_url + "/++resource++bika.lims.images/samplepoint_big.png" self.description = "" self.show_sort_column = False self.show_select_row = False self.show_select_column = True self.pagesize = 25 self.columns = { "Title": {"title": _("Sample Point"), "index": "sortable_title"}, "Description": {"title": _("Description"), "index": "description", "toggle": True}, "Owner": {"title": _p("Owner"), "toggle": True}, "getComposite": {"title": _("Composite"), "toggle": True}, "SampleTypes": {"title": _("Sample Types"), "toggle": True}, } self.review_states = [ { "id": "default", "title": _("Active"), "contentFilter": {"inactive_state": "active"}, "transitions": [{"id": "deactivate"}], "columns": ["Title", "Description", "Owner", "SampleTypes"], }, { "id": "inactive", "title": _("Dormant"), "contentFilter": {"inactive_state": "inactive"}, "transitions": [{"id": "activate"}], "columns": ["Title", "Description", "Owner", "SampleTypes"], }, { "id": "all", "title": _("All"), "contentFilter": {}, "columns": ["Title", "Description", "Owner", "SampleTypes"], }, ]
def __init__(self, context, request): super(StorageLocationsView, self).__init__(context, request) self.catalog = 'bika_setup_catalog' self.contentFilter = { 'portal_type': 'StorageLocation', 'sort_on': 'sortable_title' } self.context_actions = { _('Add'): { 'url': 'createObject?type_name=StorageLocation', 'permission': AddStorageLocation, 'icon': '++resource++bika.lims.images/add.png' } } self.title = self.context.translate(_("Storage Locations")) self.icon = self.portal_url + "/++resource++bika.lims.images/storagelocation_big.png" self.description = "" self.show_select_row = False self.show_select_column = True self.pagesize = 25 self.columns = { 'Title': { 'title': _('Storage Location'), 'index': 'sortable_title' }, 'Description': { 'title': _('Description'), 'index': 'description', 'toggle': True }, 'SiteTitle': { 'title': _p('Site Title'), 'toggle': True }, 'SiteCode': { 'title': _p('Site Code'), 'toggle': True }, 'LocationTitle': { 'title': _p('Location Title'), 'toggle': True }, 'LocationCode': { 'title': _p('Location Code'), 'toggle': True }, 'ShelfTitle': { 'title': _p('Shelf Title'), 'toggle': True }, 'ShelfCode': { 'title': _p('Shelf Code'), 'toggle': True }, 'Owner': { 'title': _p('Owner'), 'toggle': True }, } self.review_states = [ { 'id': 'default', 'title': _('Active'), 'contentFilter': { 'is_active': True }, 'transitions': [ { 'id': 'deactivate' }, ], 'columns': [ 'Title', 'Description', 'Owner', 'SiteTitle', 'SiteCode', 'LocationTitle', 'LocationCode', 'ShelfTitle', 'ShelfCode' ] }, { 'id': 'inactive', 'title': _('Inactive'), 'contentFilter': { 'is_active': False }, 'transitions': [ { 'id': 'activate' }, ], 'columns': [ 'Title', 'Description', 'Owner', 'SiteTitle', 'SiteCodeShelfCode' ] }, { 'id': 'all', 'title': _('All'), 'contentFilter': {}, 'columns': [ 'Title', 'Description', 'Owner', 'SiteTitle', 'SiteCodeShelfCode' ] }, ]
def __init__(self, context, request): super(SamplePointsView, self).__init__(context, request) self.catalog = "bika_setup_catalog" self.contentFilter = { "portal_type": "SamplePoint", "sort_on": "sortable_title", "sort_order": "ascending", } self.context_actions = { _("Add"): { "url": "createObject?type_name=SamplePoint", "permission": "Add portal content", "icon": "++resource++bika.lims.images/add.png"} } self.title = self.context.translate(_("Sample Points")) self.icon = "{}/{}".format( self.portal_url, "/++resource++bika.lims.images/samplepoint_big.png" ) self.show_sort_column = False self.show_select_row = False self.show_select_column = True self.pagesize = 25 self.columns = collections.OrderedDict(( ("Title", { "title": _("Sample Point"), "index": "sortable_title"}), ("Description", { "title": _("Description"), "index": "Description", "toggle": True}), ("Owner", { "title": _p("Owner"), "sortable": False, "toggle": True}), ("getComposite", { "title": _("Composite"), "sortable": False, "toggle": False}), ("SampleTypes", { "title": _("Sample Types"), "index": "getSampleTypeTitle", "toggle": True}), )) self.review_states = [ { "id": "default", "title": _("Active"), "contentFilter": {"inactive_state": "active"}, "transitions": [{"id": "deactivate"}, ], "columns": self.columns.keys(), }, { "id": "inactive", "title": _("Dormant"), "contentFilter": {"inactive_state": "inactive"}, "transitions": [{"id": "activate"}, ], "columns": self.columns.keys(), }, { "id": "all", "title": _("All"), "contentFilter": {}, "columns": self.columns.keys(), } ]