new: [elements:indexCountry] Added country element to display flags and nationalities

pull/7373/head
mokaddem 2021-04-27 10:44:36 +02:00
parent 77e68c5a07
commit cb00fc0222
No known key found for this signature in database
GPG Key ID: 164C473F627A06FA
1 changed files with 10 additions and 0 deletions

View File

@ -0,0 +1,10 @@
<?php
$data = Hash::extract($row, $field['data_path']);
$html = '';
if (isset($data['country_code'])) {
$html .= $this->Icon->countryFlag($data['country_code']) . '&nbsp;';
}
if ($data['nationality'] !== 'Not specified') {
$html .= h($data['nationality']);
}
echo $html;