2020-10-02 15:38:16 +00:00
|
|
|
<?php
|
|
|
|
|
2021-06-08 09:52:11 +00:00
|
|
|
declare(strict_types=1);
|
|
|
|
|
2020-10-02 15:38:16 +00:00
|
|
|
/**
|
|
|
|
* @copyright 2020 Podlibre
|
|
|
|
* @license https://www.gnu.org/licenses/agpl-3.0.en.html AGPL3
|
|
|
|
* @link https://castopod.org/
|
|
|
|
*/
|
|
|
|
|
2021-05-12 14:00:25 +00:00
|
|
|
use App\Entities\Location;
|
2021-05-17 17:11:23 +00:00
|
|
|
use App\Entities\Person;
|
2021-05-06 14:00:48 +00:00
|
|
|
use CodeIgniter\I18n\Time;
|
2021-05-19 16:35:13 +00:00
|
|
|
use CodeIgniter\View\Table;
|
2021-05-06 14:00:48 +00:00
|
|
|
|
2021-05-19 16:35:13 +00:00
|
|
|
if (! function_exists('button')) {
|
2020-10-02 15:38:16 +00:00
|
|
|
/**
|
|
|
|
* Button component
|
|
|
|
*
|
|
|
|
* Creates a stylized button or button like anchor tag if the URL is defined.
|
|
|
|
*
|
2021-05-14 17:59:35 +00:00
|
|
|
* @param array<string, string|null|bool> $customOptions button options: variant, size, iconLeft, iconRight
|
|
|
|
* @param array<string, string> $customAttributes Additional attributes
|
2020-10-02 15:38:16 +00:00
|
|
|
*/
|
|
|
|
function button(
|
|
|
|
string $label = '',
|
2021-05-06 14:00:48 +00:00
|
|
|
string $uri = '',
|
|
|
|
array $customOptions = [],
|
|
|
|
array $customAttributes = []
|
2020-10-02 15:38:16 +00:00
|
|
|
): string {
|
|
|
|
$defaultOptions = [
|
|
|
|
'variant' => 'default',
|
|
|
|
'size' => 'base',
|
|
|
|
'iconLeft' => null,
|
|
|
|
'iconRight' => null,
|
|
|
|
'isSquared' => false,
|
|
|
|
];
|
|
|
|
$options = array_merge($defaultOptions, $customOptions);
|
|
|
|
|
|
|
|
$baseClass =
|
2021-04-02 17:20:02 +00:00
|
|
|
'inline-flex items-center font-semibold shadow-xs rounded-full focus:outline-none focus:ring';
|
2020-10-02 15:38:16 +00:00
|
|
|
|
|
|
|
$variantClass = [
|
2021-04-02 17:20:02 +00:00
|
|
|
'default' => 'text-black bg-gray-300 hover:bg-gray-400',
|
|
|
|
'primary' => 'text-white bg-pine-700 hover:bg-pine-800',
|
2020-10-02 15:38:16 +00:00
|
|
|
'secondary' => 'text-white bg-gray-700 hover:bg-gray-800',
|
2021-04-02 17:20:02 +00:00
|
|
|
'accent' => 'text-white bg-rose-600 hover:bg-rose-800',
|
2020-10-02 15:38:16 +00:00
|
|
|
'success' => 'text-white bg-green-600 hover:bg-green-700',
|
|
|
|
'danger' => 'text-white bg-red-600 hover:bg-red-700',
|
|
|
|
'warning' => 'text-black bg-yellow-500 hover:bg-yellow-600',
|
2021-04-02 17:20:02 +00:00
|
|
|
'info' => 'text-white bg-blue-500 hover:bg-blue-600',
|
2020-10-02 15:38:16 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
$sizeClass = [
|
2021-04-02 17:20:02 +00:00
|
|
|
'small' => 'text-xs md:text-sm',
|
2020-10-02 15:38:16 +00:00
|
|
|
'base' => 'text-sm md:text-base',
|
|
|
|
'large' => 'text-lg md:text-xl',
|
|
|
|
];
|
|
|
|
|
|
|
|
$basePaddings = [
|
2021-04-02 17:20:02 +00:00
|
|
|
'small' => 'px-2 md:px-3 md:py-1',
|
|
|
|
'base' => 'px-3 py-1 md:px-4 md:py-2',
|
|
|
|
'large' => 'px-3 py-2 md:px-5',
|
2020-10-02 15:38:16 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
$squaredPaddings = [
|
|
|
|
'small' => 'p-1',
|
|
|
|
'base' => 'p-2',
|
|
|
|
'large' => 'p-3',
|
|
|
|
];
|
|
|
|
|
|
|
|
$buttonClass =
|
|
|
|
$baseClass .
|
|
|
|
' ' .
|
|
|
|
($options['isSquared']
|
|
|
|
? $squaredPaddings[$options['size']]
|
|
|
|
: $basePaddings[$options['size']]) .
|
|
|
|
' ' .
|
|
|
|
$sizeClass[$options['size']] .
|
|
|
|
' ' .
|
|
|
|
$variantClass[$options['variant']];
|
|
|
|
|
2021-05-18 17:16:36 +00:00
|
|
|
if (array_key_exists('class', $customAttributes)) {
|
2020-10-02 15:38:16 +00:00
|
|
|
$buttonClass .= ' ' . $customAttributes['class'];
|
|
|
|
unset($customAttributes['class']);
|
|
|
|
}
|
|
|
|
|
|
|
|
if ($options['iconLeft']) {
|
2021-06-22 17:59:33 +00:00
|
|
|
$label = icon((string) $options['iconLeft'], 'mr-2') . $label;
|
2020-10-02 15:38:16 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
if ($options['iconRight']) {
|
2021-06-22 17:59:33 +00:00
|
|
|
$label .= icon((string) $options['iconRight'], 'ml-2');
|
2020-10-02 15:38:16 +00:00
|
|
|
}
|
|
|
|
|
2021-05-06 14:00:48 +00:00
|
|
|
if ($uri !== '') {
|
2021-05-19 16:35:13 +00:00
|
|
|
return anchor($uri, $label, array_merge([
|
|
|
|
'class' => $buttonClass,
|
2021-06-09 12:40:22 +00:00
|
|
|
], $customAttributes));
|
2020-10-02 15:38:16 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
$defaultButtonAttributes = [
|
|
|
|
'type' => 'button',
|
|
|
|
];
|
2021-06-08 09:52:11 +00:00
|
|
|
$attributes = stringify_attributes(array_merge($defaultButtonAttributes, $customAttributes));
|
2020-10-02 15:38:16 +00:00
|
|
|
|
2021-05-19 16:35:13 +00:00
|
|
|
return <<<CODE_SAMPLE
|
2021-05-06 14:00:48 +00:00
|
|
|
<button class="{$buttonClass}" {$attributes}>
|
|
|
|
{$label}
|
2021-04-02 17:20:02 +00:00
|
|
|
</button>
|
2021-05-19 16:35:13 +00:00
|
|
|
CODE_SAMPLE;
|
2020-10-02 15:38:16 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------
|
|
|
|
|
2021-05-19 16:35:13 +00:00
|
|
|
if (! function_exists('icon_button')) {
|
2020-10-02 15:38:16 +00:00
|
|
|
/**
|
|
|
|
* Icon Button component
|
|
|
|
*
|
|
|
|
* Abstracts the `button()` helper to create a stylized icon button
|
|
|
|
*
|
2021-05-12 14:00:25 +00:00
|
|
|
* @param string $icon The button icon
|
|
|
|
* @param string $title The button label
|
2021-05-14 17:59:35 +00:00
|
|
|
* @param array<string, string|null|bool> $customOptions button options: variant, size, iconLeft, iconRight
|
|
|
|
* @param array<string, string> $customAttributes Additional attributes
|
2020-10-02 15:38:16 +00:00
|
|
|
*/
|
|
|
|
function icon_button(
|
|
|
|
string $icon,
|
|
|
|
string $title,
|
2021-05-06 14:00:48 +00:00
|
|
|
string $uri = '',
|
|
|
|
array $customOptions = [],
|
|
|
|
array $customAttributes = []
|
2020-10-02 15:38:16 +00:00
|
|
|
): string {
|
|
|
|
$defaultOptions = [
|
|
|
|
'isSquared' => true,
|
|
|
|
];
|
|
|
|
$options = array_merge($defaultOptions, $customOptions);
|
|
|
|
|
|
|
|
$defaultAttributes = [
|
|
|
|
'title' => $title,
|
|
|
|
'data-toggle' => 'tooltip',
|
|
|
|
'data-placement' => 'bottom',
|
|
|
|
];
|
|
|
|
$attributes = array_merge($defaultAttributes, $customAttributes);
|
|
|
|
|
|
|
|
return button(icon($icon), $uri, $options, $attributes);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------
|
|
|
|
|
2021-05-19 16:35:13 +00:00
|
|
|
if (! function_exists('hint_tooltip')) {
|
2020-10-02 15:38:16 +00:00
|
|
|
/**
|
|
|
|
* Hint component
|
|
|
|
*
|
|
|
|
* Used to produce tooltip with a question mark icon for hint texts
|
|
|
|
*
|
|
|
|
* @param string $hintText The hint text
|
|
|
|
*/
|
|
|
|
function hint_tooltip(string $hintText = '', string $class = ''): string
|
|
|
|
{
|
|
|
|
$tooltip =
|
|
|
|
'<span data-toggle="tooltip" data-placement="bottom" tabindex="0" title="' .
|
|
|
|
$hintText .
|
2021-04-02 17:20:02 +00:00
|
|
|
'" class="inline-block text-gray-500 align-middle outline-none focus:ring';
|
2020-10-02 15:38:16 +00:00
|
|
|
|
|
|
|
if ($class !== '') {
|
|
|
|
$tooltip .= ' ' . $class;
|
|
|
|
}
|
|
|
|
|
|
|
|
return $tooltip . '">' . icon('question') . '</span>';
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------
|
|
|
|
|
2021-05-19 16:35:13 +00:00
|
|
|
if (! function_exists('data_table')) {
|
2020-10-02 15:38:16 +00:00
|
|
|
/**
|
|
|
|
* Data table component
|
|
|
|
*
|
|
|
|
* Creates a stylized table.
|
|
|
|
*
|
2021-05-14 17:59:35 +00:00
|
|
|
* @param array<array<string, mixed>> $columns array of associate arrays with `header` and `cell` keys where `cell` is a function with a row of $data as parameter
|
|
|
|
* @param mixed[] $data data to loop through and display in rows
|
|
|
|
* @param mixed ...$rest Any other argument to pass to the `cell` function
|
2020-10-02 15:38:16 +00:00
|
|
|
*/
|
2021-05-06 14:00:48 +00:00
|
|
|
function data_table(array $columns, array $data = [], ...$rest): string
|
2020-10-02 15:38:16 +00:00
|
|
|
{
|
2021-05-06 14:00:48 +00:00
|
|
|
$table = new Table();
|
2020-10-02 15:38:16 +00:00
|
|
|
|
|
|
|
$template = [
|
|
|
|
'table_open' => '<table class="w-full whitespace-no-wrap">',
|
|
|
|
|
|
|
|
'thead_open' =>
|
|
|
|
'<thead class="text-xs font-semibold text-left text-gray-500 uppercase border-b">',
|
|
|
|
|
|
|
|
'heading_cell_start' => '<th class="px-4 py-2">',
|
|
|
|
'cell_start' => '<td class="px-4 py-2">',
|
|
|
|
'cell_alt_start' => '<td class="px-4 py-2">',
|
|
|
|
|
2021-04-02 17:20:02 +00:00
|
|
|
'row_start' => '<tr class="bg-gray-100 hover:bg-pine-100">',
|
|
|
|
'row_alt_start' => '<tr class="hover:bg-pine-100">',
|
2020-10-02 15:38:16 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
$table->setTemplate($template);
|
|
|
|
|
|
|
|
$tableHeaders = [];
|
|
|
|
foreach ($columns as $column) {
|
2021-05-06 14:00:48 +00:00
|
|
|
$tableHeaders[] = $column['header'];
|
2020-10-02 15:38:16 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
$table->setHeading($tableHeaders);
|
|
|
|
|
2021-05-06 14:00:48 +00:00
|
|
|
if (($dataCount = count($data)) !== 0) {
|
|
|
|
for ($i = 0; $i < $dataCount; ++$i) {
|
2020-10-02 15:38:16 +00:00
|
|
|
$row = $data[$i];
|
|
|
|
$rowData = [];
|
|
|
|
foreach ($columns as $column) {
|
2021-05-06 14:00:48 +00:00
|
|
|
$rowData[] = $column['cell']($row, ...$rest);
|
2020-10-02 15:38:16 +00:00
|
|
|
}
|
|
|
|
$table->addRow($rowData);
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
return lang('Common.no_data');
|
|
|
|
}
|
|
|
|
|
|
|
|
return '<div class="overflow-x-auto bg-white rounded-lg shadow" >' .
|
|
|
|
$table->generate() .
|
|
|
|
'</div>';
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------
|
2020-10-22 17:41:59 +00:00
|
|
|
|
2021-05-19 16:35:13 +00:00
|
|
|
if (! function_exists('publication_pill')) {
|
2020-10-22 17:41:59 +00:00
|
|
|
/**
|
2020-10-29 17:25:15 +00:00
|
|
|
* Publication pill component
|
2020-10-22 17:41:59 +00:00
|
|
|
*
|
2020-10-29 17:25:15 +00:00
|
|
|
* Shows the stylized publication datetime in regards to current datetime.
|
2020-10-22 17:41:59 +00:00
|
|
|
*/
|
2021-05-19 16:35:13 +00:00
|
|
|
function publication_pill(?Time $publicationDate, string $publicationStatus, string $customClass = ''): string
|
|
|
|
{
|
2021-05-06 14:00:48 +00:00
|
|
|
if ($publicationDate === null) {
|
|
|
|
return '';
|
|
|
|
}
|
|
|
|
|
2020-12-09 17:52:30 +00:00
|
|
|
$class =
|
|
|
|
$publicationStatus === 'published'
|
2021-04-02 17:20:02 +00:00
|
|
|
? 'text-pine-500 border-pine-500'
|
|
|
|
: 'text-red-600 border-red-600';
|
2020-12-09 17:52:30 +00:00
|
|
|
|
2021-05-06 14:00:48 +00:00
|
|
|
$langOptions = [
|
|
|
|
'<time pubdate datetime="' .
|
|
|
|
$publicationDate->format(DateTime::ATOM) .
|
|
|
|
'" title="' .
|
|
|
|
$publicationDate .
|
|
|
|
'">' .
|
|
|
|
lang('Common.mediumDate', [$publicationDate]) .
|
|
|
|
'</time>',
|
|
|
|
];
|
2020-12-09 17:52:30 +00:00
|
|
|
|
2021-06-08 09:52:11 +00:00
|
|
|
$label = lang('Episode.publication_status.' . $publicationStatus, $langOptions);
|
2020-10-22 17:41:59 +00:00
|
|
|
|
2021-04-02 17:20:02 +00:00
|
|
|
return '<span class="px-1 font-semibold border ' .
|
2020-10-22 17:41:59 +00:00
|
|
|
$class .
|
|
|
|
' ' .
|
|
|
|
$customClass .
|
|
|
|
'">' .
|
|
|
|
$label .
|
|
|
|
'</span>';
|
|
|
|
}
|
|
|
|
}
|
2020-10-29 17:25:15 +00:00
|
|
|
|
|
|
|
// ------------------------------------------------------------------------
|
|
|
|
|
2021-05-19 16:35:13 +00:00
|
|
|
if (! function_exists('publication_button')) {
|
2021-04-02 17:20:02 +00:00
|
|
|
/**
|
|
|
|
* Publication button component
|
|
|
|
*
|
|
|
|
* Displays the appropriate publication button depending on the publication status.
|
|
|
|
*/
|
2021-05-19 16:35:13 +00:00
|
|
|
function publication_button(int $podcastId, int $episodeId, string $publicationStatus): string
|
|
|
|
{
|
2021-05-18 17:16:36 +00:00
|
|
|
/** @phpstan-ignore-next-line */
|
2021-04-02 17:20:02 +00:00
|
|
|
switch ($publicationStatus) {
|
|
|
|
case 'not_published':
|
|
|
|
$label = lang('Episode.publish');
|
|
|
|
$route = route_to('episode-publish', $podcastId, $episodeId);
|
|
|
|
$variant = 'primary';
|
|
|
|
$iconLeft = 'upload-cloud';
|
|
|
|
break;
|
|
|
|
case 'scheduled':
|
|
|
|
$label = lang('Episode.publish_edit');
|
2021-06-08 09:52:11 +00:00
|
|
|
$route = route_to('episode-publish_edit', $podcastId, $episodeId);
|
2021-04-02 17:20:02 +00:00
|
|
|
$variant = 'accent';
|
|
|
|
$iconLeft = 'upload-cloud';
|
|
|
|
break;
|
|
|
|
case 'published':
|
|
|
|
$label = lang('Episode.unpublish');
|
|
|
|
$route = route_to('episode-unpublish', $podcastId, $episodeId);
|
|
|
|
$variant = 'danger';
|
|
|
|
$iconLeft = 'cloud-off';
|
|
|
|
break;
|
2021-05-12 14:00:25 +00:00
|
|
|
default:
|
|
|
|
$label = '';
|
|
|
|
$route = '';
|
|
|
|
$variant = '';
|
|
|
|
$iconLeft = '';
|
|
|
|
break;
|
2021-04-02 17:20:02 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
return button($label, $route, [
|
|
|
|
'variant' => $variant,
|
|
|
|
'iconLeft' => $iconLeft,
|
|
|
|
]);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------
|
|
|
|
|
2021-05-19 16:35:13 +00:00
|
|
|
if (! function_exists('episode_numbering')) {
|
2020-10-29 17:25:15 +00:00
|
|
|
/**
|
|
|
|
* Returns relevant translated episode numbering.
|
|
|
|
*
|
2021-05-12 14:00:25 +00:00
|
|
|
* @param bool $isAbbr component will show abbreviated numbering if true
|
2020-10-29 17:25:15 +00:00
|
|
|
*/
|
|
|
|
function episode_numbering(
|
2021-05-06 14:00:48 +00:00
|
|
|
?int $episodeNumber = null,
|
|
|
|
?int $seasonNumber = null,
|
|
|
|
string $class = '',
|
2021-05-12 14:00:25 +00:00
|
|
|
bool $isAbbr = false
|
2020-10-29 17:25:15 +00:00
|
|
|
): string {
|
2021-05-19 16:35:13 +00:00
|
|
|
if (! $episodeNumber && ! $seasonNumber) {
|
2020-10-29 17:25:15 +00:00
|
|
|
return '';
|
|
|
|
}
|
|
|
|
|
|
|
|
$transKey = '';
|
|
|
|
$args = [];
|
2021-05-12 14:00:25 +00:00
|
|
|
if ($episodeNumber !== null) {
|
|
|
|
$args['episodeNumber'] = $episodeNumber;
|
|
|
|
}
|
|
|
|
|
|
|
|
if ($seasonNumber !== null) {
|
|
|
|
$args['seasonNumber'] = $seasonNumber;
|
|
|
|
}
|
|
|
|
|
|
|
|
if ($episodeNumber !== null && $seasonNumber !== null) {
|
2020-10-29 17:25:15 +00:00
|
|
|
$transKey = 'Episode.season_episode';
|
2021-05-12 14:00:25 +00:00
|
|
|
} elseif ($episodeNumber !== null && $seasonNumber === null) {
|
2020-10-29 17:25:15 +00:00
|
|
|
$transKey = 'Episode.number';
|
2021-05-12 14:00:25 +00:00
|
|
|
} elseif ($episodeNumber === null && $seasonNumber !== null) {
|
2020-10-29 17:25:15 +00:00
|
|
|
$transKey = 'Episode.season';
|
|
|
|
}
|
|
|
|
|
|
|
|
if ($isAbbr) {
|
|
|
|
return '<abbr class="' .
|
|
|
|
$class .
|
|
|
|
'" title="' .
|
|
|
|
lang($transKey, $args) .
|
|
|
|
'">' .
|
|
|
|
lang($transKey . '_abbr', $args) .
|
|
|
|
'</abbr>';
|
|
|
|
}
|
|
|
|
|
|
|
|
return '<span class="' .
|
|
|
|
$class .
|
|
|
|
'">' .
|
|
|
|
lang($transKey, $args) .
|
|
|
|
'</span>';
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-05-19 16:35:13 +00:00
|
|
|
if (! function_exists('location_link')) {
|
2020-12-23 14:11:38 +00:00
|
|
|
/**
|
|
|
|
* Returns link to display from location info
|
|
|
|
*/
|
2021-05-12 14:00:25 +00:00
|
|
|
function location_link(?Location $location, string $class = ''): string
|
|
|
|
{
|
|
|
|
if ($location === null) {
|
2021-05-06 14:00:48 +00:00
|
|
|
return '';
|
2020-12-23 14:11:38 +00:00
|
|
|
}
|
2021-02-27 21:21:26 +00:00
|
|
|
|
2021-05-06 14:00:48 +00:00
|
|
|
return anchor(
|
2021-05-12 14:00:25 +00:00
|
|
|
$location->url,
|
|
|
|
icon('map-pin', 'mr-2') . $location->name,
|
2021-05-06 14:00:48 +00:00
|
|
|
[
|
|
|
|
'class' =>
|
|
|
|
'inline-flex items-baseline hover:underline' .
|
2021-05-18 17:16:36 +00:00
|
|
|
($class === '' ? '' : " {$class}"),
|
2021-05-06 14:00:48 +00:00
|
|
|
'target' => '_blank',
|
|
|
|
'rel' => 'noreferrer noopener',
|
|
|
|
],
|
|
|
|
);
|
2020-12-23 14:11:38 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-10-22 17:41:59 +00:00
|
|
|
// ------------------------------------------------------------------------
|
2021-05-17 17:11:23 +00:00
|
|
|
|
2021-05-19 16:35:13 +00:00
|
|
|
if (! function_exists('person_list')) {
|
2021-05-17 17:11:23 +00:00
|
|
|
/**
|
|
|
|
* Returns list of persons images
|
|
|
|
*
|
|
|
|
* @param Person[] $persons
|
|
|
|
*/
|
|
|
|
function person_list(array $persons, string $class = ''): string
|
|
|
|
{
|
|
|
|
if ($persons === []) {
|
|
|
|
return '';
|
|
|
|
}
|
|
|
|
|
|
|
|
$personList = "<div class='flex w-full space-x-2 overflow-y-auto {$class}'>";
|
|
|
|
|
|
|
|
foreach ($persons as $person) {
|
|
|
|
$personList .= anchor(
|
|
|
|
$person->information_url ?? '#',
|
|
|
|
"<img
|
|
|
|
src='{$person->image->thumbnail_url}'
|
2021-05-19 16:35:13 +00:00
|
|
|
alt='{$person->full_name}'
|
2021-05-17 17:11:23 +00:00
|
|
|
class='object-cover w-12 h-12 rounded-full' />",
|
|
|
|
[
|
|
|
|
'class' =>
|
|
|
|
'flex-shrink-0 focus:outline-none focus:ring focus:ring-inset',
|
|
|
|
'target' => '_blank',
|
|
|
|
'rel' => 'noreferrer noopener',
|
|
|
|
'title' =>
|
|
|
|
'<strong>' .
|
|
|
|
$person->full_name .
|
|
|
|
'</strong>' .
|
|
|
|
implode(
|
2021-05-20 17:13:13 +00:00
|
|
|
'',
|
2021-05-17 17:11:23 +00:00
|
|
|
array_map(function ($role) {
|
|
|
|
return '<br />' .
|
|
|
|
lang(
|
|
|
|
'PersonsTaxonomy.persons.' .
|
|
|
|
$role->group .
|
|
|
|
'.roles.' .
|
|
|
|
$role->role .
|
|
|
|
'.label',
|
|
|
|
);
|
|
|
|
}, $person->roles),
|
|
|
|
),
|
|
|
|
'data-toggle' => 'tooltip',
|
|
|
|
'data-placement' => 'bottom',
|
|
|
|
],
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
2021-05-20 17:13:13 +00:00
|
|
|
return $personList . '</div>';
|
2021-05-17 17:11:23 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------
|