def manage_workspace(self, REQUEST): """return the workspace of the related object using its primary path""" url = REQUEST['URL'] myp = self.getPrimaryUrlPath() if url.find(myp) > 0: Tabs.manage_workspace(self, REQUEST) else: from zExceptions import Redirect raise Redirect( myp+'/manage_workspace' )
def manage_workspace(self, REQUEST): """return the workspace of the related object using its primary path""" url = REQUEST['URL'] myp = self.getPrimaryUrlPath() if url.find(myp) > 0: Tabs.manage_workspace(self, REQUEST) else: from zExceptions import Redirect raise Redirect(myp + '/manage_workspace')
def manage_workspace(self, REQUEST): """if this has been called on us return our workspace if not redirect to the workspace of a related object""" id = REQUEST['URL'].split('/')[-2] if id == self.id: Tabs.manage_workspace(self, REQUEST) else: obj = self._getOb(self, id) from zExceptions import Redirect raise Redirect( (obj.getPrimaryUrlPath()+'/manage_workspace') )
def manage_workspace(self, REQUEST): """if this has been called on us return our workspace if not redirect to the workspace of a related object""" id = REQUEST['URL'].split('/')[-2] if id == self.id: Tabs.manage_workspace(self, REQUEST) else: obj = self._getOb(self, id) from zExceptions import Redirect raise Redirect((obj.getPrimaryUrlPath() + '/manage_workspace'))
def filtered_manage_options(self, REQUEST=None): options = Tabs.filtered_manage_options(self, REQUEST=REQUEST) # Insert the upgrade form if needed if self._needs_upgrade(): options.insert(0, {'action': 'manage_upgradeForm', 'label': u'Upgrade', 'help': ('Localizer', 'LM_upgrade.stx')}) # Translate the labels r = [] for option in options: option = option.copy() option['label'] = _(option['label']) r.append(option) # Ok return r