def render(self): from msd.researchbase.utilities import getResearcherSettings obj = getResearcherSettings(self.context) # Redirect to AT edit view self.request.response.redirect(obj.absolute_url() + "/edit") return ""
def getResearchSettings(self): """ Get access to settings object. """ key = "researcher_settings" cached = self.getCachedValue(key) if cached is not None: return cached settings = getResearcherSettings(self) #self.setCachedValue(key, settings) return settings
def __call__(self, schemataName, fieldName): """ """ settings = getResearcherSettings(self.context) # Schemata customizations allows us to drop schematas if set to false customization = convertCheckboxValue(settings.getSchemataVisibility(schemataName)) if customization is not None: if customization == False: return False # Then check field level customization customization = convertCheckboxValue(settings.getFieldCustomization(fieldName, "visible")) if customization is not None: return customization # Default is visible return True