diff --git a/wp-content/themes/vf-wp-intranet/archive-people.php b/wp-content/themes/vf-wp-intranet/archive-people.php index f28d62e81..134d58d28 100644 --- a/wp-content/themes/vf-wp-intranet/archive-people.php +++ b/wp-content/themes/vf-wp-intranet/archive-people.php @@ -90,7 +90,7 @@ class="embl-grid embl-grid--has-centered-content | vf-u-padding__top--800 vf-u-p
department)) { - $person->department = ""; - }; - if (!isset($person->photoUrl)) { - $person->photoUrl = "http://content.embl.org/sites/default/files/default_images/vf-icon--avatar.png"; - }; - if (isset($person->personUrl)) { - $peopleBaseUrl = "https://www.embl.org/internal-information/people/"; - $peopleSlug = basename($person->personUrl); - $peopleEndUrl = $peopleBaseUrl . $peopleSlug; + // show people only with positions + if (isset($person->title)) { + if (!isset($person->department)) { + $person->department = ""; }; + // if no photo show a placeholder + if (!isset($person->photoUrl)) { + $person->photoUrl = "http://content.embl.org/sites/default/files/default_images/vf-icon--avatar.png"; + }; + // display a telephone number + if (isset($person->primaryTelephoneNumber)) { + $telephoneNr = $person->primaryTelephoneNumber; + } + elseif (isset($person->telephoneNumber)) { + $telephoneNr = $person->telephoneNumber; + } + else { + $telephoneNr = null; + } + // create urls + if (isset($person->personUrl)) { + $peopleBaseUrl = "https://www.embl.org/internal-information/people/"; + $peopleSlug = basename($person->personUrl); + $peopleEndUrl = $peopleBaseUrl . $peopleSlug; + }; - echo '
- '; + echo '
+ '; - echo ''; + echo ''; - echo ''; + echo ''; - echo ''; + echo ''; - echo ''; + echo ''; - if (!empty($person->telephoneNumber)) { - echo '

- ' . $person->telephoneNumber . ' -

'; } + if (!empty($telephoneNr)) { + echo '

+ ' . $telephoneNr . ' +

'; } - if (!empty($person->roomNumber)) { - echo '

- Location: ' . $person->roomNumber . ' -

'; } + if (!empty($person->roomNumber)) { + echo '

+ Location: ' . $person->roomNumber . ' +

'; } - echo '

- ' . $person->personDutystation . ' -

'; + echo '

+ ' . $person->personDutystation . ' +

'; - echo '

People

-
'; - - - } + echo '

People

+
'; + + } + } } ?>