Skip to content

Commit

Permalink
Merge branch 'master' of github.com:nursix/eden
Browse files Browse the repository at this point in the history
  • Loading branch information
nursix committed Apr 21, 2021
2 parents 8ce7a65 + 3c8c8f4 commit 9c29668
Show file tree
Hide file tree
Showing 12 changed files with 568 additions and 254 deletions.
14 changes: 14 additions & 0 deletions languages/de.py
Original file line number Diff line number Diff line change
Expand Up @@ -1468,6 +1468,7 @@
'Defines the icon used for display of features on handheld GPS.': 'Definiert das Symbol, welches für die Anzeige der Objekte auf mobilen GPS-Geräten verwendet wird.',
'Defines the icon used for display of features on interactive map & KML exports.': 'Definiert das Symbol, welches für die Anzeige der Objekte auf der interaktiven Karte sowie für die KML Exporte verwendet wird.',
'Defines the marker used for display & the attributes visible in the popup.': 'Definiert das Symbol, das für die Anzeige und die Attribute im Popup-Fenster verwendet wird.',
'Defunct': 'Nicht mehr bestehend',
'Degrees must be a number between -180 and 180': 'Grad muss eine Zahl zwischen -180 und 180 sein.',
'Delete Accepted Voucher': 'Gutschein-Annahme löschen',
'Delete Action': 'Maßnahme löschen',
Expand Down Expand Up @@ -2139,6 +2140,7 @@
'Facial hair, color': 'Gesichtsbehaarung, Farbe',
'Facial hair, type': 'Gesichtsbehaarung, Art',
'Facial hear, length': 'Gesichtsbehaarung, Länge',
'Facilities Statistics': 'Statistik Einrichtungen',
'Facilities': 'Einrichtungen',
'Facility Contact': 'Kontakt für Einrichtung',
'Facility Details': 'Details zur Einrichtung',
Expand Down Expand Up @@ -3132,6 +3134,7 @@
'List Warehouses': 'Liste Warenlager',
'List all': 'Alle auflisten',
'List available Scenarios': 'Liste verfügbarer Szenarien',
'List of Facilities': 'Liste von Einrichtungen',
'List of Items': 'Liste der Artikel',
'List of Missing Persons': 'Liste der vermißten Personen',
'List of Peers': 'Liste der Peers',
Expand Down Expand Up @@ -3789,10 +3792,15 @@
'Number of Columns': 'Anzahl der Spalten',
'Number of Consultations': 'Anzahl Beratungsgespräche',
'Number of Deployments': 'Anzahl Einsätze',
'Number of Facilities': 'Anzahl Einrichtungen',
'Number of Families': 'Anzahl Familien',
'Number of Items': 'Anzahl Artikel',
'Number of Organizations': 'Anzahl Organisationen',
'Number of Patients': 'Anzahl Patienten',
'Number of People Required': 'Anzahl der benötigten Personen',
'Number of Requests': 'Anzahl Anfragen',
'Number of Rows': 'Anzahl der Reihen',
'Number of Shipments': 'Anzahl Lieferungen',
'Number of Tests': 'Anzahl Tests',
'Number of Tugboats': 'Zahl der Schleppkähne',
'Number of Volunteers': 'Anzahl Freiwillige',
Expand Down Expand Up @@ -3913,6 +3921,7 @@
'Organization Details': 'Details zur Organisation',
'Organization Domains': 'Organisationsdomains',
'Organization Group': 'Organisationsgruppe',
'Organization ID': 'Organisations-ID',
'Organization Registry': 'Organisationsdatenbank',
'Organization Type': 'Organisationstyp',
'Organization Types': 'Organisationstypen',
Expand All @@ -3925,6 +3934,7 @@
'Organization updated': 'Organisation aktualisiert',
'Organization': 'Organisation',
'Organization/Supplier': 'Organisation/Anbieter',
'Organizations Statistics': 'Statistik Organisationen',
'Organizations': 'Organisationen',
'Organized By': 'Organisiert durch',
'Origin of the separated children': 'Ursprung der getrennten Kinder',
Expand Down Expand Up @@ -4554,13 +4564,15 @@
'Requested For': 'Angefragt für',
'Requested From': 'Angefragt von',
'Requested Items': 'Angefragte Artikel',
'Requested Quantity': 'Angefragte Menge',
'Requested Skills': 'Angefragte Fähigkeiten',
'Requested by': 'Angefragt durch',
'Requested on': 'Angefragt am',
'Requested': 'Angefragt',
'Requester': 'Anfragender',
'Requesting Organisation': 'Anfragende Organisation',
'Requests Management': 'Anfragenverwaltung',
'Requests Report': 'Statistik Bestellungen',
'Requests': 'Anfragen',
'Required Skills': 'Benötigte Fähigkeiten',
'Required consent not given': 'Erforderliche Einwilligung nicht gegeben',
Expand Down Expand Up @@ -4978,6 +4990,7 @@
'Sent Item deleted': 'Gesendeter Artikel gelöscht',
'Sent Item updated': 'Gesendeter Artikel aktualisiert',
'Sent Posts': 'Gesendete Posts',
'Sent Quantity': 'Versendete Menge',
'Sent SMS': 'Gesendete SMS',
'Sent Shipment Details': 'Details zur ausgehenden Lieferung',
'Sent Shipment canceled and items returned to Inventory': 'Ausgehende Lieferung storniert und Artikel zum Lager zurückgebracht',
Expand Down Expand Up @@ -5083,6 +5096,7 @@
'Shipment to Send': 'Zu sendende Lieferung',
'Shipment##process': 'Versand',
'Shipment': 'Lieferung',
'Shipments Statistics': 'Statistik Lieferungen',
'Shipments Timeline': 'Zeitlinie zum Versand',
'Shipments To': 'Lieferungen nach',
'Shipments': 'Lieferungen',
Expand Down
10 changes: 7 additions & 3 deletions modules/s3/s3resource.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
from s3dal import Expression, Field, Row, Rows, Table, S3DAL, VirtualCommand
from .s3data import S3DataTable, S3DataList
from .s3datetime import s3_format_datetime
from .s3fields import S3Represent, s3_all_meta_field_names
from .s3fields import s3_all_meta_field_names
from .s3query import FS, S3ResourceField, S3ResourceQuery, S3Joins, S3URLQuery
from .s3utils import s3_get_foreign_key, s3_get_last_record_id, s3_has_foreign_key, s3_remove_last_record_id, s3_str, s3_unicode
from .s3validators import IS_ONE_OF
Expand Down Expand Up @@ -5676,6 +5676,10 @@ def render(self,
per_row_lookup = list_type and \
self.effort[colname] < len(fvalues) * 30

# Treat even single values as lists?
# - can be set as class attribute of custom S3Represents
always_list = hasattr(renderer, "always_list") and renderer.always_list

# Render all unique values
if hasattr(renderer, "bulk") and not list_type:
per_row_lookup = False
Expand Down Expand Up @@ -5713,7 +5717,7 @@ def render(self,
result["_row"][colname] = value

# Single value (master record)
elif len(record) == 1 or \
elif len(record) == 1 and not always_list or \
not joined and not list_type:
value = list(record.keys())[0]
result[colname] = fvalues[value] \
Expand All @@ -5722,7 +5726,7 @@ def render(self,
result["_row"][colname] = value
continue

# Multiple values (joined or list-type)
# Multiple values (joined or list-type, or explicit always_list)
else:
if hasattr(renderer, "render_list"):
# Prefer S3Represent's render_list (so it can be customized)
Expand Down
35 changes: 33 additions & 2 deletions modules/s3db/org.py
Original file line number Diff line number Diff line change
Expand Up @@ -2513,6 +2513,7 @@ class S3OrganisationServiceModel(S3Model):
names = ("org_service",
"org_service_id",
"org_service_organisation",
"org_service_site",
"org_service_location",
#"org_service_location_service",
)
Expand All @@ -2530,6 +2531,8 @@ def model(self):

organisation_id = self.org_organisation_id

SITE = settings.get_org_site_label()

hierarchical_service_types = settings.get_org_services_hierarchical()

# ---------------------------------------------------------------------
Expand Down Expand Up @@ -2661,6 +2664,29 @@ def model(self):
),
)

# ---------------------------------------------------------------------
# Service <> Site Link Table
# - normally use org_service_location instead, but can use this simpler
# variant if-required
#
tablename = "org_service_site"
define_table(tablename,
service_id(),
super_link("site_id", "org_site",
label = SITE,
readable = True,
writable = True,
represent = self.org_site_represent,
),
)

configure(tablename,
deduplicate = S3Duplicate(primary = ("site_id",
"service_id",
),
),
)

# ---------------------------------------------------------------------
# Service status options
#
Expand All @@ -2673,8 +2699,6 @@ def model(self):
# ---------------------------------------------------------------------
# Organizations <> Services <> Locations Link Table
#
SITE = settings.get_org_site_label()

tablename = "org_service_location"
define_table(tablename,
super_link("doc_id", "doc_entity"),
Expand Down Expand Up @@ -3276,6 +3300,13 @@ def model(self):
"multiple": False,
},

# Services
org_service = {"link": "org_service_site",
"joinby": "site_id",
"key": "service_id",
"actuate": "hide",
},

# Events (Check-In/Check-Out)
org_site_event = {"name": "event",
"joinby": "site_id",
Expand Down
4 changes: 4 additions & 0 deletions modules/templates/RLPPTM/auth_roles.csv
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ ANONYMOUS,Anonymous,Unauthenticated users,,org,sites_for_org,,READ,,
ANONYMOUS,Anonymous,Unauthenticated users,,,,gis_location,READ,,
ANONYMOUS,Anonymous,Unauthenticated users,,,,org_facility,READ,,
ANONYMOUS,Anonymous,Unauthenticated users,,,,org_organisation,READ,,
ANONYMOUS,Anonymous,Unauthenticated users,,,,org_service,READ,,
ANONYMOUS,Anonymous,Unauthenticated users,,,,org_service_site,READ,,
ANONYMOUS,Anonymous,Unauthenticated users,,,,pr_occupation_type,READ,,
ANONYMOUS,Anonymous,Unauthenticated users,,,,project_project,READ,,
AUTHENTICATED,Authenticated,,,gis,ldata,,CREATE|READ|UPDATE|DELETE,,
Expand Down Expand Up @@ -51,6 +53,7 @@ ORG_ADMIN,Organisation Admin,,,,,inv_send,READ,,
ORG_ADMIN,Organisation Admin,,,,,org_facility,CREATE|READ|UPDATE|DELETE,,
ORG_ADMIN,Organisation Admin,,,,,org_office,CREATE|READ|UPDATE|DELETE,,
ORG_ADMIN,Organisation Admin,,,,,org_organisation,READ|UPDATE,,
ORG_ADMIN,Organisation Admin,,,,,org_service_site,CREATE|READ|UPDATE|DELETE,,
ORG_ADMIN,Organisation Admin,,,,,pr_contact,CREATE|READ|UPDATE|DELETE,,
ORG_ADMIN,Organisation Admin,,,,,pr_contact_emergency,CREATE|READ|UPDATE|DELETE,,
ORG_ADMIN,Organisation Admin,,,,,pr_person,CREATE|READ|UPDATE|DELETE,,
Expand All @@ -71,6 +74,7 @@ ORG_GROUP_ADMIN,Organisation Group Admin,,,,,org_facility_type,CREATE|READ|UPDAT
ORG_GROUP_ADMIN,Organisation Group Admin,,,,,org_group,READ|UPDATE,,
ORG_GROUP_ADMIN,Organisation Group Admin,,,,,org_office,CREATE|READ|UPDATE|DELETE,,
ORG_GROUP_ADMIN,Organisation Group Admin,,,,,org_organisation,CREATE|READ|UPDATE,,
ORG_GROUP_ADMIN,Organisation Group Admin,,,,,org_service_site,CREATE|READ|UPDATE|DELETE,,
ORG_GROUP_ADMIN,Organisation Group Admin,,,,,pr_contact,CREATE|READ|UPDATE|DELETE,,
ORG_GROUP_ADMIN,Organisation Group Admin,,,,,pr_contact_emergency,CREATE|READ|UPDATE|DELETE,,
ORG_GROUP_ADMIN,Organisation Group Admin,,,,,pr_person,CREATE|READ|UPDATE|DELETE,,
Expand Down
Loading

0 comments on commit 9c29668

Please sign in to comment.