summaryrefslogtreecommitdiff
path: root/app/Select2.php
diff options
context:
space:
mode:
Diffstat (limited to 'app/Select2.php')
-rw-r--r--app/Select2.php11
1 files changed, 9 insertions, 2 deletions
diff --git a/app/Select2.php b/app/Select2.php
index 30a32a2c1a..a80c59b144 100644
--- a/app/Select2.php
+++ b/app/Select2.php
@@ -222,7 +222,14 @@ class Select2 extends Html {
* @return string
*/
public static function individualValue(Individual $individual) {
- return $individual->getFullName() . ', ' . $individual->getLifeSpan();
+ $image = $individual->findHighlightedMedia();
+ if ($image instanceof Media) {
+ $html = $image->displayImage(30, 40, 'crop', []) . ' ';
+ } else {
+ $html = '';
+ }
+
+ return $html . $individual->getFullName() . ', ' . $individual->getLifeSpan();
}
/**
@@ -291,7 +298,7 @@ class Select2 extends Html {
* @return string
*/
public static function mediaObjectValue(Media $media) {
- return $media->getFullName() . ', ' . basename($media->getFilename());
+ return $media->displayImage(30, 40, 'crop', []) . ' ' . $media->getFullName() . ', ' . basename($media->getFilename());
}
/**