castopod/app/Views/admin/contributor/list.php
Yassine Doghri a1a28de702 refactor: rewrite form pages using form helper
- add installGateway to app config
- update route names and groups
- remove `author_name` and `author_email` from `episodes` table
- remove `author_name` and `author_email` from `podcasts` table
- remove `owner_id` + add `created_by` and `updated_by` fields in `podcasts` and `episodes` tables
- remove unnecessary comments in database fields
- remove confirm password inputs from auth forms for better ux
- rename `pub_date` field to `published_at` and add publication time field in episode form

closes #14, #28
2020-10-15 14:41:32 +00:00

49 lines
1.7 KiB
PHP

<?= $this->extend('admin/_layout') ?>
<?= $this->section('title') ?>
<?= lang('Contributor.podcast_contributors') ?>
<a class="inline-flex items-center px-2 py-1 mb-2 ml-2 text-sm text-white bg-green-500 rounded shadow-xs outline-none hover:bg-green-600 focus:shadow-outline" href="<?= route_to(
'contributor-add',
$podcast->id
) ?>">
<?= icon('add', 'mr-2') ?>
<?= lang('Contributor.add') ?></a>
<?= $this->endSection() ?>
<?= $this->section('content') ?>
<table class="table-auto">
<thead>
<tr>
<th class="px-4 py-2">Username</th>
<th class="px-4 py-2">Role</th>
<th class="px-4 py-2">Actions</th>
</tr>
</thead>
<tbody>
<?php foreach ($podcast->contributors as $contributor): ?>
<tr>
<td class="px-4 py-2 border"><?= $contributor->username ?></td>
<td class="px-4 py-2 border"><?= lang(
'Contributor.roles.' . $contributor->podcast_role
) ?></td>
<td class="px-4 py-2 border">
<a class="inline-flex px-2 py-1 mb-2 text-sm text-white bg-teal-700 hover:bg-teal-800" href="<?= route_to(
'contributor-edit',
$podcast->id,
$contributor->id
) ?>"><?= lang('Contributor.edit') ?></a>
<a class="inline-flex px-2 py-1 text-sm text-white bg-red-700 hover:bg-red-800" href="<?= route_to(
'contributor-remove',
$podcast->id,
$contributor->id
) ?>"><?= lang('Contributor.remove') ?></a>
</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
<?= $this->endSection() ?>