2021-09-02 16:34:25 +00:00
|
|
|
<?= $this->extend('_layout') ?>
|
2020-07-16 10:08:23 +00:00
|
|
|
|
|
|
|
<?= $this->section('title') ?>
|
|
|
|
<?= lang('Contributor.podcast_contributors') ?>
|
2020-10-02 15:38:16 +00:00
|
|
|
<?= $this->endSection() ?>
|
|
|
|
|
|
|
|
<?= $this->section('pageTitle') ?>
|
|
|
|
<?= lang('Contributor.podcast_contributors') ?>
|
|
|
|
<?= $this->endSection() ?>
|
|
|
|
|
|
|
|
<?= $this->section('headerRight') ?>
|
2024-04-26 17:57:25 +00:00
|
|
|
<?php // @icon('add-fill')?>
|
2024-05-09 17:55:41 +00:00
|
|
|
<x-Button uri="<?= route_to('contributor-add', $podcast->id) ?>" variant="primary" iconLeft="add-fill"><?= lang('Contributor.add') ?></x-Button>
|
2020-07-16 10:08:23 +00:00
|
|
|
<?= $this->endSection() ?>
|
|
|
|
|
|
|
|
|
|
|
|
<?= $this->section('content') ?>
|
|
|
|
|
2020-10-02 15:38:16 +00:00
|
|
|
<?= data_table(
|
|
|
|
[
|
|
|
|
[
|
|
|
|
'header' => lang('Contributor.list.username'),
|
2023-06-12 14:47:38 +00:00
|
|
|
'cell' => function ($contributor) {
|
2022-03-04 14:33:48 +00:00
|
|
|
return esc($contributor->username);
|
2020-10-02 15:38:16 +00:00
|
|
|
},
|
|
|
|
],
|
|
|
|
[
|
|
|
|
'header' => lang('Contributor.list.role'),
|
2023-06-12 14:47:38 +00:00
|
|
|
'cell' => function ($contributor, $podcast): string {
|
2022-10-15 11:22:08 +00:00
|
|
|
$role = get_group_info(get_podcast_group($contributor, $podcast->id), $podcast->id)['title'];
|
|
|
|
|
|
|
|
if ($podcast->created_by === $contributor->id) {
|
2024-05-09 17:55:41 +00:00
|
|
|
$role = '<div class="inline-flex items-center"><span class="mr-2" tabindex="0" data-tooltip="bottom" title="' . lang('Auth.podcast_groups.owner.title') . '">' . icon('shield-user-fill') . '</span>' . $role . '</div>';
|
2022-10-15 11:22:08 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
return $role;
|
2020-10-02 15:38:16 +00:00
|
|
|
},
|
|
|
|
],
|
|
|
|
[
|
|
|
|
'header' => lang('Common.actions'),
|
2023-06-12 14:47:38 +00:00
|
|
|
'cell' => function ($contributor, $podcast) {
|
2024-04-26 17:57:25 +00:00
|
|
|
// @icon('pencil-fill')
|
|
|
|
// @icon('delete-bin-fill')
|
2024-05-09 17:55:41 +00:00
|
|
|
return '<x-Button uri="' . route_to('contributor-edit', $podcast->id, $contributor->id) . '" variant="secondary" iconLeft="pencil-fill" size="small">' . lang('Contributor.edit') . '</x-Button>' .
|
|
|
|
'<x-Button uri="' . route_to('contributor-remove', $podcast->id, $contributor->id) . '" variant="danger" iconLeft="delete-bin-fill" size="small">' . lang('Contributor.remove') . '</x-Button>';
|
2020-10-02 15:38:16 +00:00
|
|
|
},
|
|
|
|
],
|
|
|
|
],
|
|
|
|
$podcast->contributors,
|
2021-08-09 10:28:16 +00:00
|
|
|
'',
|
2021-05-06 14:00:48 +00:00
|
|
|
$podcast,
|
2020-10-02 15:38:16 +00:00
|
|
|
) ?>
|
2020-07-16 10:08:23 +00:00
|
|
|
|
|
|
|
<?= $this->endSection() ?>
|