diff --git a/views/shared/css/geolocation-marker.css b/views/shared/css/geolocation-marker.css index c413414..a15e203 100644 --- a/views/shared/css/geolocation-marker.css +++ b/views/shared/css/geolocation-marker.css @@ -10,6 +10,13 @@ button#geolocation_find_location_by_address { float: none; } +#geolocation_metadata_select { + width: 80%; +} +#geolocation_metadata_select_label { + font-weight: bold; + margin-right: 5px; +} div#geolocation { clear: both; diff --git a/views/shared/map/input-partial.php b/views/shared/map/input-partial.php index 2f4b4a2..c82187b 100644 --- a/views/shared/map/input-partial.php +++ b/views/shared/map/input-partial.php @@ -8,6 +8,22 @@ +getAllElementTexts(); + + foreach ($texts as $textRecord) { + $element = $item->getElementById($textRecord->element_id); + // Build a label like "Title: My Item Title" and store it in the metadata array: + $metadata[] = sprintf('%s: %s', $element->name, substr($tmp = $textRecord->text, 0, 40) . (strlen($tmp) > 40 ? '...' : '')); + } + + $metadata = array_unique($metadata); +} +?> +