"""UI components for accesscodes. """ import grok from waeup.sirp.browser import WAeUPPage from waeup.sirp.browser.breadcrumbs import Breadcrumb from waeup.sirp.browser.viewlets import AdminTask from waeup.sirp.interfaces import IWAeUPObject from waeup.sirp.accesscodes.interfaces import IAccessCodeBatchContainer grok.context(IWAeUPObject) class BatchContainerPage(WAeUPPage): grok.name('index') grok.context(IAccessCodeBatchContainer) grok.template('batchcontainer') title = 'Access Code Batches' pnav = 0 class BatchContainerBreadcrumb(Breadcrumb): """A breadcrumb for ac batch containers. """ grok.context(IAccessCodeBatchContainer) title = u'Access Code Batches' parent_viewname = 'administration' class AdminTaskManageACBatches(AdminTask): """Entry on administration page that links to batch container. """ grok.order(5) grok.require('waeup.manageUniversity') grok.template('admintaskacbatches') link_title = 'Manage access-code batches' target_viewname = 'accesscodes'