def get_default_template(self, default="senaite.lims:Default.pt"): """Returns the configured default template from the registry """ template = api.get_registry_record("senaite.impress.default_template") if template is None: return default return template
def get_registry_records_by_keyword(keyword=None): """Get all the registry records (names and values) whose name contains the specified keyword or, if keyword is None, return all registry items :param keyword: The keyword that has to be contained in the record name :type keyword: str or None :returns: Dictionary mapping the names of the found records to its values """ portal_reg = ploneapi.portal.get_tool(name="portal_registry") found_registers = {} for record in portal_reg.records: if keyword is None: found_registers[record] = api.get_registry_record(record) elif keyword.lower() in record.lower(): found_registers[record] = api.get_registry_record(record) return found_registers
def get_default_orientation(self, default="portrait"): """Returns the configured default orientation from the registry """ orientation = api.get_registry_record( "senaite.impress.default_orientation") if orientation is None: return default return orientation
def get_default_paperformat(self, default="A4"): """Returns the configured default paperformat from the registry """ paperformat = api.get_registry_record( "senaite.impress.default_paperformat") if paperformat is None: return default return paperformat
def get_developer_mode(self): """Returns the configured setting from the registry """ mode = api.get_registry_record("senaite.impress.developer_mode", False) return mode
def store_multireports_individually(self): """Returns the configured setting from the registry """ store_individually = api.get_registry_record( "senaite.impress.store_multireports_individually") return store_individually
def get_footer_text(self, escape=True): """Returns the footer text from the setup """ return api.get_registry_record("senaite.impress.footer")