desc stringlengths 3 26.7k | decl stringlengths 11 7.89k | bodies stringlengths 8 553k |
|---|---|---|
'Can the user select a Currency?'
| def get_fin_currency_writable(self):
| return self.fin.get('currency_writable', True)
|
'Which Currencies can the user select?'
| def get_fin_currencies(self):
| currencies = self.__lazy('fin', 'currencies', {})
if (currencies == {}):
currencies = {'EUR': 'Euros', 'GBP': 'Great British Pounds', 'USD': 'United States Dollars'}
return currencies
|
'What is the default Currency?'
| def get_fin_currency_default(self):
| return self.__lazy('fin', 'currency_default', default='USD')
|
'API key for Bing'
| def get_gis_api_bing(self):
| return self.gis.get('api_bing')
|
'API key for Google Maps'
| def get_gis_api_google(self):
| return self.gis.get('api_google', '')
|
'Minimum size for BBOX around Features on Map
- so that there is always some Map around a Point
Value is in degrees'
| def get_gis_bbox_min_size(self):
| return self.gis.get('bbox_min_size', 0.05)
|
'BBOX inset around Features on Map
- so that ones on the edge don\'t get cut-off'
| def get_gis_bbox_inset(self):
| return self.gis.get('bbox_inset', 0.007)
|
'Display Building Name when selecting Locations'
| def get_gis_building_name(self):
| return self.gis.get('building_name', True)
|
'Whether location Lat/Lons should be within the boundaries of the parent'
| def get_gis_check_within_parent_boundaries(self):
| return self.gis.get('check_within_parent_boundaries', True)
|
'Fill for Clustered points on Map, else default'
| def get_gis_cluster_fill(self):
| return self.gis.get('cluster_fill')
|
'Label Clustered points on Map?'
| def get_gis_cluster_label(self):
| return self.gis.get('cluster_label', True)
|
'Stroke for Clustered points on Map, else default'
| def get_gis_cluster_stroke(self):
| return self.gis.get('cluster_stroke')
|
'Fill for Selected points on Map, else default'
| def get_gis_select_fill(self):
| return self.gis.get('select_fill')
|
'Stroke for Selected points on Map, else default'
| def get_gis_select_stroke(self):
| return self.gis.get('select_stroke')
|
'Display Clear Layers Tool
- defaults to being above Map\'s Layer Tree, but can also be set to "toolbar"'
| def get_gis_clear_layers(self):
| return self.gis.get('clear_layers', False)
|
'Should GIS configs save a screenshot when saved?
- set the size if True: (width, height)'
| def get_gis_config_screenshot(self):
| return self.gis.get('config_screenshot')
|
'Which ISO2 country codes should be accessible to the location selector?'
| def get_gis_countries(self):
| return self.gis.get('countries', [])
|
'Display duplicate features either side of the International date line?'
| def get_gis_duplicate_features(self):
| return self.gis.get('duplicate_features', False)
|
'Edit Location Groups'
| def get_gis_edit_group(self):
| return self.gis.get('edit_GR', False)
|
'Should Addresses imported from CSV be passed to a
Geocoder to try and automate Lat/Lon?'
| def get_gis_geocode_imported_addresses(self):
| return self.gis.get('geocode_imported_addresses', False)
|
'Whether failure to geocode imported addresses shall
lead to a validation error'
| def get_gis_ignore_geocode_errors(self):
| return self.gis.get('ignore_geocode_errors', False)
|
'Whether the map should have a Geolocate control
- also requires the presence of a Toolbar'
| def get_gis_geolocate_control(self):
| return self.gis.get('geolocate_control', True)
|
'Username for the GeoNames search box'
| def get_gis_geonames_username(self):
| return self.gis.get('geonames_username')
|
'Whether the map should have a WMS GetFeatureInfo control
- also requires the presence of a Toolbar and queryable WMS layers'
| def get_gis_getfeature_control(self):
| return self.gis.get('getfeature_control', True)
|
'Display Lat/Lon form fields when selecting Locations'
| def get_gis_latlon_selector(self):
| return self.gis.get('latlon_selector', False)
|
'Use CMS to provide Metadata on Map Layers'
| def get_gis_layer_metadata(self):
| return (self.has_module('cms') and self.gis.get('layer_metadata', False))
|
'Display Layer Properties Tool above Map\'s Layer Tree'
| def get_gis_layer_properties(self):
| return self.gis.get('layer_properties', True)
|
'Display Base Layers folder in the Map\'s Layer Tree'
| def get_gis_layer_tree_base(self):
| return self.gis.get('layer_tree_base', True)
|
'Display Overlays folder in the Map\'s Layer Tree'
| def get_gis_layer_tree_overlays(self):
| return self.gis.get('layer_tree_overlays', True)
|
'Display folders in the Map\'s Layer Tree Open by default'
| def get_gis_layer_tree_expanded(self):
| return self.gis.get('layer_tree_expanded', True)
|
'Use a radio button for custom folders in the Map\'s Layer Tree'
| def get_gis_layer_tree_radio(self):
| return self.gis.get('layer_tree_radio', False)
|
'Label for the Map\'s Layer Tree'
| def get_gis_layers_label(self):
| return self.gis.get('layers_label', 'Layers')
|
'Never use LatLon for Location Represents'
| def get_gis_location_represent_address_only(self):
| return self.gis.get('location_represent_address_only', False)
|
'Height of the Embedded Map
Change this if-required for your theme
NB API can override this in specific modules'
| def get_gis_map_height(self):
| return self.gis.get('map_height', 600)
|
'Width of the Embedded Map
Change this if-required for your theme
NB API can override this in specific modules'
| def get_gis_map_width(self):
| return self.gis.get('map_width', 1000)
|
'Display a Map-based tool to select Locations'
| def get_gis_map_selector(self):
| return self.gis.get('map_selector', True)
|
'Height of the map selector map'
| def get_gis_map_selector_height(self):
| return self.gis.get('map_selector_height', 340)
|
'Width of the map selector map'
| def get_gis_map_selector_width(self):
| return self.gis.get('map_selector_width', 480)
|
'The maximum number of features to return in a Map Layer
- more than this will prompt the user to zoom in to load the layer
Lower this number to get extra performance from an overloaded server.'
| def get_gis_max_features(self):
| return self.gis.get('max_features', 2000)
|
'Should we display a Legend on the Map?
- set to True to show a GeoExt Legend (default)
- set to False to not show a Legend
- set to "float" to use a floating DIV'
| def get_gis_legend(self):
| return self.gis.get('legend', True)
|
'Should we display a menu of GIS configurations?
- set to False to not show the menu (default)
- set to the label to use for the menu to enable it
e.g. T("Events") or T("Regions")'
| def get_gis_menu(self):
| return self.gis.get('menu', False)
|
'What style of Coordinates for the current Mouse Position
should be shown on the Map?
\'normal\', \'mgrs\' or False'
| def get_gis_mouse_position(self):
| return self.gis.get('mouse_position', 'normal')
|
'Should the Map Toolbar display Navigation Controls?'
| def get_gis_nav_controls(self):
| return self.gis.get('nav_controls', False)
|
'Label for the Map Overlays in the Layer Tree'
| def get_gis_label_overlays(self):
| return self.gis.get('label_overlays', 'Overlays')
|
'Should the Map display an Overview Map?'
| def get_gis_overview(self):
| return self.gis.get('overview', True)
|
'Should the Map display a Permalink control?'
| def get_gis_permalink(self):
| return self.gis.get('permalink', True)
|
'List of resources which can be directly added to the main map.
Includes the type (point, line or polygon) and where they are to be
accessed from (button, menu or popup)
Defaults to the generic \'gis_poi\' resource as a point from a button
@ToDo: Complete the button vs menu vs popup
@ToDo: S3PoIWidget() to allow other ... | def get_gis_poi_create_resources(self):
| T = current.T
return self.gis.get('poi_create_resources', [{'c': 'gis', 'f': 'poi', 'table': 'gis_poi', 'label': T('Add PoI'), 'layer': 'PoIs', 'location': 'button'}])
|
'List of resources (tablenames) to import/export as PoIs from Admin Locations
- KML & OpenStreetMap formats'
| def get_gis_poi_export_resources(self):
| return self.gis.get('poi_export_resources', ['cr_shelter', 'hms_hospital', 'org_office'])
|
'Display Postcode form field when selecting Locations'
| def get_gis_postcode_selector(self):
| return self.__lazy('gis', 'postcode_selector', default=True)
|
'Should the Map display a Print control?
NB Requires installation of additional components:
http://eden.sahanafoundation.org/wiki/UserGuidelines/Admin/MapPrinting'
| def get_gis_print(self):
| return self.gis.get('print_button', False)
|
'Should the main Map display a Save control?
If there is a Toolbar, then this defaults to being inside the Toolbar, otherwise floating.
If you wish it to float even when there is a toolbar, then specify "float"'
| def get_gis_save(self):
| return self.gis.get('save', True)
|
'Should the Map display a ScaleLine control?'
| def get_gis_scaleline(self):
| return self.gis.get('scaleline', True)
|
'Whether the GeoNames search box should be visible on the map'
| def get_gis_search_geonames(self):
| return self.gis.get('search_geonames', True)
|
'Default Tolerance for the Simplification of Polygons
- a lower value means less simplification, which is suitable for higher-resolution local activities
- a higher value is suitable for global views
- set to 0 to disable'
| def get_gis_simplify_tolerance(self):
| return self.gis.get('simplify_tolerance', 0.01)
|
'Number of Decimal places to put in output
Increase this to 5 for highly-zoomed maps showing buildings'
| def get_gis_precision(self):
| return self.gis.get('precision', 4)
|
'Does the database have Spatial extensions?'
| def get_gis_spatialdb(self):
| db_type = self.get_database_type()
if (db_type != 'postgres'):
return False
else:
return self.gis.get('spatialdb', False)
|
'Should Map Widgets display Catalogue Layers?
- e.g. Profile & Summary pages'
| def get_gis_widget_catalogue_layers(self):
| return self.gis.get('widget_catalogue_layers', False)
|
'Should Map Widgets display a WMS Browser?
- e.g. Profile & Summary pages
NB This also requires the active gis_config to have one configured'
| def get_gis_widget_wms_browser(self):
| return self.gis.get('widget_wms_browser', False)
|
'Should the main Map display a Toolbar?'
| def get_gis_toolbar(self):
| return self.gis.get('toolbar', True)
|
'Should the Map display a Zoom control?'
| def get_gis_zoomcontrol(self):
| return self.gis.get('zoomcontrol', True)
|
'Should the gis_location deduplication try codes as well as names?
- if-desired, set to the Key of a Key/Value pair (e.g. "PCode")'
| def get_gis_lookup_code(self):
| return self.gis.get('lookup_code', False)
|
'Whether a Pop-up Window should open on clicking
Location represent links
- Default: Map opens in a div'
| def get_gis_popup_location_link(self):
| return self.gis.get('popup_location_link', False)
|
'Extra codes for IS_ISO639_2_LANGUAGE_CODE
e.g. CAP needs to add "en-US"'
| def get_L10n_extra_codes(self):
| return self.L10n.get('extra_codes', None)
|
'Religions used in Person Registry
@ToDo: find a better code
http://eden.sahanafoundation.org/ticket/594'
| def get_L10n_religions(self):
| T = current.T
return self.L10n.get('religions', {'none': T('none'), 'christian': T('Christian'), 'muslim': T('Muslim'), 'jewish': T('Jewish'), 'buddhist': T('Buddhist'), 'hindu': T('Hindu'), 'bahai': T('Bahai'), 'other': T('other')})
|
'Lookup the Date Format - either by locale or by global setting'
| def get_L10n_date_format(self):
| language = current.session.s3.language
if (language in self.date_formats):
return self.date_formats.get(language)
else:
return self.L10n.get('date_format', '%Y-%m-%d')
|
'First day of the week (overrides calendar default)
0 = Sunday, 1 = Monday, ..., 6 = Saturday
None = use the calendar\'s default'
| def get_L10n_firstDOW(self):
| return self.L10n.get('firstDOW', None)
|
'Which calendar to use (lazy setting)
Currently supported calendars:
- "Gregorian"'
| def get_L10n_calendar(self):
| return self.__lazy('L10n', 'calendar', None)
|
'This is used to format latitude and longitude fields when they are
displayed by eden. The format string may include the following
placeholders:
- %d -- Degress (integer)
- %m -- Minutes (integer)
- %s -- Seconds (double)
- %f -- Degrees in decimal (double)'
| def get_L10n_lat_lon_format(self):
| return self.L10n.get('lat_lon_display_format', '%f')
|
'Default Telephone Country Code'
| def get_L10n_default_country_code(self):
| return self.L10n.get('default_country_code', 1)
|
'e.g. Apellido Paterno in Hispanic names
Setting this means that auth_user.last_name matches with pr_person.middle_name
e.g. RMSAmericas'
| def get_L10n_mandatory_middlename(self):
| return self.__lazy('L10n', 'mandatory_middlename', False)
|
'What should the decimal separator be in formatted numbers?
- falls back to ISO standard of a comma'
| def get_L10n_decimal_separator(self):
| return self.L10n.get('decimal_separator', ',')
|
'What should the thousands separator be in formatted numbers?
- falls back to ISO standard of a space'
| def get_L10n_thousands_separator(self):
| return self.L10n.get('thousands_separator', ' ')
|
'Whether to translate CMS Series names'
| def get_L10n_translate_cms_series(self):
| return self.L10n.get('translate_cms_series', False)
|
'Whether to translate Layer names'
| def get_L10n_translate_gis_layer(self):
| return self.L10n.get('translate_gis_layer', False)
|
'Whether to translate Location names'
| def get_L10n_translate_gis_location(self):
| return self.L10n.get('translate_gis_location', False)
|
'Whether to use Alternate Location names'
| def get_L10n_name_alt_gis_location(self):
| return self.L10n.get('name_alt_gis_location', False)
|
'Whether to translate Organisation names/acronyms'
| def get_L10n_translate_org_organisation(self):
| return self.L10n.get('translate_org_organisation', False)
|
'Whether to translate Site names'
| def get_L10n_translate_org_site(self):
| return self.L10n.get('translate_org_site', False)
|
'Whether to translate CAP Area names'
| def get_L10n_translate_cap_area(self):
| return self.L10n.get('translate_cap_area', False)
|
'URL for Pootle server'
| def get_L10n_pootle_url(self):
| return self.L10n.get('pootle_url', 'http://pootle.sahanafoundation.org/')
|
'Username for Pootle server'
| def get_L10n_pootle_username(self):
| return self.L10n.get('pootle_username', False)
|
'Password for Pootle server'
| def get_L10n_pootle_password(self):
| return self.L10n.get('pootle_password', False)
|
'Whether to enable BiDi support for PDF exports
- without this RTL text will be LTR
Defaults to off to enhance performance'
| def get_pdf_bidi(self):
| return self.__lazy('L10n', 'pdf_bidi', False)
|
'Optical Character Recognition (OCR)'
| def get_pdf_excluded_fields(self, resourcename):
| excluded_fields_dict = {'hms_hospital': ['hrm_human_resource'], 'pr_group': ['pr_group_membership']}
excluded_fields = excluded_fields_dict.get(resourcename, [])
return excluded_fields
|
'Include a title row in XLS Exports
- default=False to allow easy post-export column sorting
- uses the "title_list" CRUD string + export date/time
- standard title can be overridden in exporter call'
| def get_xls_title_row(self):
| return self.base.get('xls_title_row', False)
|
'Helper function to identify a formstyle'
| def _get_formstyle(cls, setting):
| formstyles = cls.FORMSTYLE
if callable(setting):
formstyle = setting
if (setting in formstyles):
formstyle = formstyles[setting]
else:
formstyle = setting
return formstyle
|
'Get the current form style'
| def get_ui_formstyle(self):
| setting = self.ui.get('formstyle', 'default')
return self._get_formstyle(setting)
|
'Get the current form style for read views'
| def get_ui_formstyle_read(self):
| setting = self.ui.get('formstyle_read')
if (setting is not None):
formstyle = self._get_formstyle(setting)
else:
formstyle = self.get_ui_formstyle()
return formstyle
|
'Get the current filter form style'
| def get_ui_filter_formstyle(self):
| setting = self.ui.get('filter_formstyle', 'default_inline')
return self._get_formstyle(setting)
|
'Get the current report form style'
| def get_ui_report_formstyle(self):
| setting = self.ui.get('report_formstyle')
return self._get_formstyle(setting)
|
'Get the _inline formstyle for the current formstyle'
| def get_ui_inline_formstyle(self):
| setting = self.ui.get('formstyle', 'default')
formstyles = self.FORMSTYLE
if isinstance(setting, basestring):
inline_formstyle_name = ('%s_inline' % setting)
formstyle = formstyles.get(inline_formstyle_name)
else:
formstyle = None
if (formstyle is None):
formstyle = s... |
'DOM layout for dataTables:
https://datatables.net/reference/option/dom'
| def get_ui_datatables_dom(self):
| return self.ui.get('datatables_dom', "fril<'dataTable_table't>pi")
|
'Callback for dataTables
- allows moving objects such as data_exports'
| def get_ui_datatables_initComplete(self):
| return self.ui.get('datatables_initComplete')
|
'The style of Paging used by dataTables:
https://datatables.net/reference/option/pagingType'
| def get_ui_datatables_pagingType(self):
| return self.ui.get('datatables_pagingType', 'full_numbers')
|
'Whether dataTables should be responsive when resized'
| def get_ui_datatables_responsive(self):
| return self.ui.get('datatables_responsive', True)
|
'Whether to show a default cancel button in standalone
create/update forms'
| def get_ui_default_cancel_button(self):
| return self.ui.get('default_cancel_button', False)
|
'Whether to show a clear button in default FilterForms
- and allows possibility to relabel &/or add a class'
| def get_ui_filter_clear(self):
| return self.ui.get('filter_clear', True)
|
'Standard icon set, one of:
- "font-awesome"
- "foundation"
- "font-awesome3"'
| def get_ui_icons(self):
| return self.ui.get('icons', 'font-awesome')
|
'Custom icon CSS classes, a dict {abstract name: CSS class},
can be used to partially override standard icons'
| def get_ui_custom_icons(self):
| return self.ui.get('custom_icons')
|
'Callable to render icon HTML, which takes an ICON instance
as parameter and returns valid XML as string'
| def get_ui_icon_layout(self):
| return self.ui.get('icon_layout')
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.