Minor stylistic cleanup of tables and 2FA login.

This commit is contained in:
Buster Neece 2019-06-02 18:26:10 -05:00
parent cc1bf21c9e
commit 19dc5cec0a
No known key found for this signature in database
GPG Key ID: 6D9E12FF03411F4E
15 changed files with 376 additions and 409 deletions

View File

@ -4,37 +4,35 @@
<div class="card-header bg-primary-dark">
<h2 class="card-title"><?=__('API Keys') ?></h2>
</div>
<div class="table-responsive">
<table class="table table-striped">
<colgroup>
<col width="20%">
<col width="25%">
<col width="30%">
<col width="25%">
</colgroup>
<thead>
<tr>
<th>&nbsp;</th>
<th><?=__('API Key') ?></th>
<th><?=__('Comments') ?></th>
<th><?=__('Owner') ?></th>
<table class="table table-responsive-md table-striped mb-0">
<colgroup>
<col width="20%">
<col width="25%">
<col width="30%">
<col width="25%">
</colgroup>
<thead>
<tr>
<th>&nbsp;</th>
<th><?=__('API Key') ?></th>
<th><?=__('Comments') ?></th>
<th><?=__('Owner') ?></th>
</tr>
</thead>
<tbody>
<?php foreach($records as $record): ?>
<tr class="align-middle">
<td class="center">
<div class="btn-group btn-group-sm">
<a class="btn btn-sm btn-primary" href="<?=$router->named('admin:api:edit', ['id' => $record['id']]) ?>"><?=__('Edit') ?></a>
<a class="btn btn-sm btn-danger" href="<?=$router->named('admin:api:delete', ['id' => $record['id'], 'csrf' => $csrf]) ?>"><?=__('Revoke') ?></a>
</div>
</td>
<td><code><?=$record['id'] ?></code></td>
<td><?=$this->e($record['comment']) ?></td>
<td><?=$this->e($record['user']['email']) ?></td>
</tr>
</thead>
<tbody>
<?php foreach($records as $record): ?>
<tr class="align-middle">
<td class="center">
<div class="btn-group btn-group-sm">
<a class="btn btn-sm btn-primary" href="<?=$router->named('admin:api:edit', ['id' => $record['id']]) ?>"><?=__('Edit') ?></a>
<a class="btn btn-sm btn-danger" href="<?=$router->named('admin:api:delete', ['id' => $record['id'], 'csrf' => $csrf]) ?>"><?=__('Revoke') ?></a>
</div>
</td>
<td><code><?=$record['id'] ?></code></td>
<td><?=$this->e($record['comment']) ?></td>
<td><?=$this->e($record['user']['email']) ?></td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</div>
<?php endforeach; ?>
</tbody>
</table>
</div>

View File

@ -87,41 +87,39 @@ $assets
<?=__('Run Manual Backup') ?>
</a>
</div>
<div class="table-responsive">
<table class="table table-striped">
<colgroup>
<col width="20%">
<col width="35%">
<col width="25%">
<col width="20%">
</colgroup>
<thead>
<tr>
<th><?=__('Actions') ?></th>
<th><?=__('Backup') ?></th>
<th><?=__('Last Modified') ?></th>
<th><?=__('Size') ?></th>
<table class="table table-responsive-md table-striped mb-0">
<colgroup>
<col width="20%">
<col width="35%">
<col width="25%">
<col width="20%">
</colgroup>
<thead>
<tr>
<th><?=__('Actions') ?></th>
<th><?=__('Backup') ?></th>
<th><?=__('Last Modified') ?></th>
<th><?=__('Size') ?></th>
</tr>
</thead>
<tbody>
<?php foreach($backups as $row): ?>
<tr class="align-middle">
<td>
<div class="btn-group btn-group-sm">
<a class="btn btn-sm btn-primary" href="<?=$router->fromHere('admin:backups:download', ['path' => base64_encode($row['path'])]) ?>"><?=__('Download') ?></a>
<a class="btn btn-sm btn-danger" href="<?=$router->fromHere('admin:backups:delete', ['path' => base64_encode($row['path']), 'csrf' => $csrf]) ?>" data-confirm-title="<?=$this->e(__('Delete backup "%s"?', $row['filename'])) ?>"><?=__('Delete') ?></a>
</div>
</td>
<td>
<big><?=$this->e($row['basename']) ?></big>
</td>
<td><time data-content="<?=$row['timestamp'] ?>"><?=gmdate('Y-m-d', $row['timestamp']) ?></time></td>
<td><span data-file-size="<?=$row['size'] ?>"><?=$row['size'] ?></span></td>
</tr>
</thead>
<tbody>
<?php foreach($backups as $row): ?>
<tr class="align-middle">
<td>
<div class="btn-group btn-group-sm">
<a class="btn btn-sm btn-primary" href="<?=$router->fromHere('admin:backups:download', ['path' => base64_encode($row['path'])]) ?>"><?=__('Download') ?></a>
<a class="btn btn-sm btn-danger" href="<?=$router->fromHere('admin:backups:delete', ['path' => base64_encode($row['path']), 'csrf' => $csrf]) ?>" data-confirm-title="<?=$this->e(__('Delete backup "%s"?', $row['filename'])) ?>"><?=__('Delete') ?></a>
</div>
</td>
<td>
<big><?=$this->e($row['basename']) ?></big>
</td>
<td><time data-content="<?=$row['timestamp'] ?>"><?=gmdate('Y-m-d', $row['timestamp']) ?></time></td>
<td><span data-file-size="<?=$row['size'] ?>"><?=$row['size'] ?></span></td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</div>
<?php endforeach; ?>
</tbody>
</table>
</div>
<?php if (!empty($last_output)): ?>

View File

@ -10,38 +10,36 @@
<?=__('Add %s', __('Custom Field')) ?>
</a>
</div>
<div class="table-responsive">
<table class="table table-striped">
<colgroup>
<col width="30%">
<col width="40%">
<col width="30%">
</colgroup>
<thead>
<tr>
<th><?=__('Actions') ?></th>
<th><?=__('Name') ?></th>
<th><?=__('Programmatic Name') ?></th>
<table class="table table-responsive-md table-striped mb-0">
<colgroup>
<col width="30%">
<col width="40%">
<col width="30%">
</colgroup>
<thead>
<tr>
<th><?=__('Actions') ?></th>
<th><?=__('Name') ?></th>
<th><?=__('Programmatic Name') ?></th>
</tr>
</thead>
<tbody>
<?php foreach($records as $row): ?>
<tr class="align-middle">
<td>
<div class="btn-group btn-group-sm">
<a class="btn btn-sm btn-primary" href="<?=$router->named('admin:custom_fields:edit', ['id' => $row['id']]) ?>"><?=__('Edit') ?></a>
<a class="btn btn-sm btn-danger" data-confirm-title="<?=$this->e(__('Delete custom field "%s"?', $row['name'])) ?>" href="<?=$router->named('admin:custom_fields:delete', ['id' => $row['id'], 'csrf' => $csrf]) ?>"><?=__('Delete') ?></a>
</div>
</td>
<td>
<?=$this->e($row['name']) ?>
</td>
<td>
<?=$this->e($row['short_name']) ?>
</td>
</tr>
</thead>
<tbody>
<?php foreach($records as $row): ?>
<tr class="align-middle">
<td>
<div class="btn-group btn-group-sm">
<a class="btn btn-sm btn-primary" href="<?=$router->named('admin:custom_fields:edit', ['id' => $row['id']]) ?>"><?=__('Edit') ?></a>
<a class="btn btn-sm btn-danger" data-confirm-title="<?=$this->e(__('Delete custom field "%s"?', $row['name'])) ?>" href="<?=$router->named('admin:custom_fields:delete', ['id' => $row['id'], 'csrf' => $csrf]) ?>"><?=__('Delete') ?></a>
</div>
</td>
<td>
<?=$this->e($row['name']) ?>
</td>
<td>
<?=$this->e($row['short_name']) ?>
</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</div>
<?php endforeach; ?>
</tbody>
</table>
</div>

View File

@ -10,48 +10,46 @@
<?=__('Add %s', __('Permission')) ?>
</a>
</div>
<div class="table-responsive">
<table class="table table-striped">
<colgroup>
<col width="20%">
<col width="30%">
<col width="50%">
</colgroup>
<thead>
<tr>
<th><?=__('Actions') ?></th>
<th><?=__('Role Name') ?></th>
<th><?=__('Permissions') ?></th>
</tr>
</thead>
<tbody>
<?php foreach($roles as $role): ?>
<tr class="align-middle">
<td class="center">
<div class="btn-group btn-group-sm">
<a class="btn btn-sm btn-primary" href="<?=$router->named('admin:permissions:edit', ['id' => $role['id']]) ?>"><?=__('Edit') ?></a>
<table class="table table-responsive-md table-striped mb-0">
<colgroup>
<col width="20%">
<col width="30%">
<col width="50%">
</colgroup>
<thead>
<tr>
<th><?=__('Actions') ?></th>
<th><?=__('Role Name') ?></th>
<th><?=__('Permissions') ?></th>
</tr>
</thead>
<tbody>
<?php foreach($roles as $role): ?>
<tr class="align-middle">
<td class="center">
<div class="btn-group btn-group-sm">
<a class="btn btn-sm btn-primary" href="<?=$router->named('admin:permissions:edit', ['id' => $role['id']]) ?>"><?=__('Edit') ?></a>
<?php if( $role['id'] != 1 ): ?>
<a class="btn btn-sm btn-danger" data-confirm-title="<?=$this->e(__('Delete role "%s"?', $role['name'])) ?>" href="<?=$router->named('admin:permissions:delete', ['id' => $role['id'], 'csrf' => $csrf]) ?>"><?=__('Delete') ?></a>
<?php else: ?>
<a class="btn btn-sm btn-danger disabled" href="#" onclick="alert('<?=__('This role cannot be deleted.') ?>'); return false;"><?=__('Delete') ?></a>
<?php endif; ?>
</div>
</td>
<td>
<div class="typography-subheading"><?=$this->e($role['name']) ?></div>
</td>
<td>
<?php if (!empty($role['permissions_global'])): ?>
<div><b><?=__('Global') ?>:</b> <?=implode($role['permissions_global'], ', ') ?></div>
<?php if( $role['id'] != 1 ): ?>
<a class="btn btn-sm btn-danger" data-confirm-title="<?=$this->e(__('Delete role "%s"?', $role['name'])) ?>" href="<?=$router->named('admin:permissions:delete', ['id' => $role['id'], 'csrf' => $csrf]) ?>"><?=__('Delete') ?></a>
<?php else: ?>
<a class="btn btn-sm btn-danger disabled" href="#" onclick="alert('<?=__('This role cannot be deleted.') ?>'); return false;"><?=__('Delete') ?></a>
<?php endif; ?>
<?php foreach($role['permissions_station'] as $station_name => $station_perms): ?>
<div><b><?=$this->e($station_name) ?></b>: <?=implode($station_perms, ', ') ?></div>
<?php endforeach; ?>
</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</div>
</div>
</td>
<td>
<div class="typography-subheading"><?=$this->e($role['name']) ?></div>
</td>
<td>
<?php if (!empty($role['permissions_global'])): ?>
<div><b><?=__('Global') ?>:</b> <?=implode($role['permissions_global'], ', ') ?></div>
<?php endif; ?>
<?php foreach($role['permissions_station'] as $station_name => $station_perms): ?>
<div><b><?=$this->e($station_name) ?></b>: <?=implode($station_perms, ', ') ?></div>
<?php endforeach; ?>
</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</div>

View File

@ -10,7 +10,7 @@
<?=__('Add %s', __('Station')) ?>
</a>
</div>
<table class="table table-striped table-responsive-md">
<table class="table table-striped table-responsive-md mb-0">
<colgroup>
<col width="20%">
<col width="80%">

View File

@ -10,52 +10,50 @@
<?=__('Add %s', __('User')) ?>
</a>
</div>
<div class="table-responsive">
<table class="table table-striped">
<colgroup>
<col width="30%">
<col width="35%">
<col width="35%">
</colgroup>
<thead>
<tr>
<th><?=__('Actions') ?></th>
<th><?=__('E-mail Address') ?></th>
<th><?=__('Roles') ?></th>
<table class="table table-responsive-md table-striped mb-0">
<colgroup>
<col width="30%">
<col width="35%">
<col width="35%">
</colgroup>
<thead>
<tr>
<th><?=__('Actions') ?></th>
<th><?=__('E-mail Address') ?></th>
<th><?=__('Roles') ?></th>
</tr>
</thead>
<tbody>
<?php foreach($users as $user_row): ?>
<?php /** @var \App\Entity\User $user_row */ ?>
<tr class="align-middle">
<td>
<div class="btn-group btn-group-sm">
<?php if ($user_row->getId() !== $user->getId()): ?>
<a class="btn btn-sm btn-primary" href="<?=$router->named('admin:users:impersonate', ['id' => $user_row->getId(), 'csrf' => $csrf]) ?>"><?=__('Log In') ?></a>
<?php endif; ?>
<a class="btn btn-sm btn-dark" href="<?=$router->named('admin:users:edit', ['id' => $user_row->getId()]) ?>"><?=__('Edit') ?></a>
<?php if ($user_row->getId() !== $user->getId()): ?>
<a class="btn btn-sm btn-danger" data-confirm-title="<?=$this->e(__('Delete user "%s"?', $user_row->getEmail())) ?>" href="<?=$router->named('admin:users:delete', ['id' => $user_row->getId(), 'csrf' => $csrf]) ?>"><?=__('Delete') ?></a>
<?php else: ?>
<a class="btn btn-sm btn-danger disabled" href=""><?=__('Delete') ?></a>
<?php endif; ?>
</div>
</td>
<td>
<div class="text-lg-left"><?=$this->e($user_row->getName()) ?></div>
<div>
<?=$this->mailto($user_row->getEmail()) ?>
<?php if ($user_row->getId() === $user->getId()): ?><?=__('(You)') ?><?php endif; ?>
</div>
</td>
<td>
<?php foreach($user_row->getRoles() as $role): ?>
<div><?=$this->e($role->getName()) ?></div>
<?php endforeach; ?>
</td>
</tr>
</thead>
<tbody>
<?php foreach($users as $user_row): ?>
<?php /** @var \App\Entity\User $user_row */ ?>
<tr class="align-middle">
<td>
<div class="btn-group btn-group-sm">
<?php if ($user_row->getId() !== $user->getId()): ?>
<a class="btn btn-sm btn-primary" href="<?=$router->named('admin:users:impersonate', ['id' => $user_row->getId(), 'csrf' => $csrf]) ?>"><?=__('Log In') ?></a>
<?php endif; ?>
<a class="btn btn-sm btn-dark" href="<?=$router->named('admin:users:edit', ['id' => $user_row->getId()]) ?>"><?=__('Edit') ?></a>
<?php if ($user_row->getId() !== $user->getId()): ?>
<a class="btn btn-sm btn-danger" data-confirm-title="<?=$this->e(__('Delete user "%s"?', $user_row->getEmail())) ?>" href="<?=$router->named('admin:users:delete', ['id' => $user_row->getId(), 'csrf' => $csrf]) ?>"><?=__('Delete') ?></a>
<?php else: ?>
<a class="btn btn-sm btn-danger disabled" href=""><?=__('Delete') ?></a>
<?php endif; ?>
</div>
</td>
<td>
<div class="text-lg-left"><?=$this->e($user_row->getName()) ?></div>
<div>
<?=$this->mailto($user_row->getEmail()) ?>
<?php if ($user_row->getId() === $user->getId()): ?><?=__('(You)') ?><?php endif; ?>
</div>
</td>
<td>
<?php foreach($user_row->getRoles() as $role): ?>
<div><?=$this->e($role->getName()) ?></div>
<?php endforeach; ?>
</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</div>
<?php endforeach; ?>
</tbody>
</table>
</div>

View File

@ -26,33 +26,23 @@ $this->layout('minimal', [
</div>
<form id="login-form" action="" method="post">
<div class="row">
<div class="form-group col-sm">
<label for="username" class="mb-2">
<i class="material-icons mr-1" aria-hidden="true">email</i>
<strong><?=__('E-mail Address') ?></strong>
</label>
<input type="email" name="username" class="form-control" placeholder="<?=__('name@example.com') ?>" aria-label="<?=__('E-mail Address') ?>" required>
</div>
<div class="form-group">
<label for="username" class="mb-2">
<i class="material-icons mr-1" aria-hidden="true">email</i>
<strong><?=__('E-mail Address') ?></strong>
</label>
<input type="email" name="username" class="form-control" placeholder="<?=__('name@example.com') ?>" aria-label="<?=__('E-mail Address') ?>" required>
</div>
<div class="row mt-2">
<div class="form-group col-sm">
<label for="password" class="mb-2">
<i class="material-icons mr-1" aria-hidden="true">vpn_key</i>
<strong><?=__('Password') ?></strong>
</label>
<input type="password" name="password" class="form-control" placeholder="<?=__('Enter your password') ?>" aria-label="<?=__('Password') ?>" required>
</div>
</div>
<div class="row">
<div class="col-sm">
<button type="submit" role="button" title="<?=__('Log In') ?>" class="btn btn-login btn-primary btn-block mt-2 mb-3">
<?=__('Sign in') ?>
</button>
</div>
<div class="form-group mt-2">
<label for="password" class="mb-2">
<i class="material-icons mr-1" aria-hidden="true">vpn_key</i>
<strong><?=__('Password') ?></strong>
</label>
<input type="password" name="password" class="form-control" placeholder="<?=__('Enter your password') ?>" aria-label="<?=__('Password') ?>" required>
</div>
<button type="submit" role="button" title="<?=__('Sign in') ?>" class="btn btn-login btn-primary btn-block mt-2 mb-3">
<?=__('Sign in') ?>
</button>
</form>
<p class="text-center"><?=__('Please log in to continue.') ?> <?=sprintf(__('<a href="%s" target="_blank">Forgot your password?</a>'), 'https://github.com/AzuraCast/AzuraCast/blob/master/SUPPORT.md#reset-an-account-password') ?></p>

View File

@ -12,18 +12,15 @@ $this->layout('minimal', [
<p class="text-left"><?=__('Your account uses a two-factor security code. Enter the code your device is currently showing below.') ?>
<form id="login-form" class="pr-5" action="" method="post">
<div class="input-group">
<div class="floating-label">
<label for="otp"><?=__('Security Code') ?></label>
<input type="number" name="otp" class="form-control form-control-lg" placeholder="" aria-label="<?=__('Security Code') ?>" required>
</div>
<span class="input-group-icon">
<i class="material-icons" aria-hidden="true">lock</i>
</span>
<div class="form-group">
<label for="otp" class="mb-2">
<i class="material-icons mr-1" aria-hidden="true">vpn_key</i>
<strong><?=__('Security Code') ?></strong>
</label>
<input type="number" name="otp" class="form-control form-control-lg" placeholder="" aria-label="<?=__('Security Code') ?>" required>
</div>
<button type="submit" role="button" title="<?=__('Log In') ?>" class="btn btn-login btn-primary btn-float">
<i class="material-icons" aria-hidden="true">arrow_forward_ios</i>
<button type="submit" role="button" title="<?=__('Sign in') ?>" class="btn btn-login btn-primary btn-block mt-2 mb-3">
<?=__('Sign in') ?>
</button>
</form>
</div>

View File

@ -97,6 +97,14 @@ $user = $request->getUser();
<div class="card-header bg-primary-dark">
<h3 class="card-title"><?=__('Station Overview') ?></h3>
</div>
<?php if ($acl->userAllowed($request->getUser(), 'administer stations')): ?>
<div class="card-actions">
<a class="btn btn-outline-primary" href="<?=$router->named('admin:stations:add') ?>">
<i class="material-icons" aria-hidden="true">add</i>
<?=__('Add %s', __('Station')) ?>
</a>
</div>
<?php endif; ?>
<table class="table table-striped table-responsive mb-0" id="station_dashboard">
<colgroup>
<col width="5%">
@ -142,12 +150,4 @@ $user = $request->getUser();
</tr>
</tbody>
</table>
<?php if ($acl->userAllowed($request->getUser(), 'administer stations')): ?>
<div class="card-actions">
<a class="btn btn-outline-primary" href="<?=$router->named('admin:stations:add') ?>">
<i class="material-icons" aria-hidden="true">add</i>
<?=__('Add %s', __('Station')) ?>
</a>
</div>
<?php endif; ?>
</section>

View File

@ -13,48 +13,46 @@
<?=__('Add %s', __('Mount Point')) ?>
</a>
</div>
<div class="table-responsive">
<table class="table table-striped">
<colgroup>
<col width="25%">
<col width="45%">
<col width="30%">
</colgroup>
<thead>
<tr>
<th><?=__('Actions') ?></th>
<th><?=__('Mount Point') ?></th>
<th><?=__('AutoDJ') ?></th>
</tr>
</thead>
<tbody>
<?php foreach($mounts as $row): ?>
<?php /** @var App\Entity\StationMount $row */ ?>
<tr class="align-middle">
<td>
<div class="btn-group btn-group-sm">
<a class="btn btn-sm btn-primary" href="<?=$router->named('stations:mounts:edit', ['station' => $station->getId(), 'id' => $row->getId()]) ?>"><?=__('Edit') ?></a>
<a class="btn btn-sm btn-danger" data-confirm-title="<?=$this->e(__('Delete mount point "%s"?', $row->getName())) ?>" href="<?=$router->named('stations:mounts:delete', ['station' => $station->getId(), 'id' => $row->getId(), 'csrf' => $csrf]) ?>"><?=__('Delete') ?></a>
</div>
</td>
<td>
<h5 class="m-0"><a href="<?=$this->e($frontend->getUrlForMount($station, $row)) ?>" target="_blank"><?=$this->e($row->getDisplayName()) ?></a></h5>
<div>
<?php if ($row->getIsDefault()): ?>
<span class="badge badge-success"><?=__('Default Mount') ?></span>
<?php endif; ?>
</div>
</td>
<td>
<?php if ($row->getEnableAutodj()): ?>
<?=__('Enabled') ?> - <?=(int)$row->getAutodjBitrate() ?>kbps <?=strtoupper($this->e($row->getAutodjFormat())) ?>
<?php else: ?>
<?=__('Disabled') ?>
<table class="table table-responsive-md table-striped mb-0">
<colgroup>
<col width="25%">
<col width="45%">
<col width="30%">
</colgroup>
<thead>
<tr>
<th><?=__('Actions') ?></th>
<th><?=__('Mount Point') ?></th>
<th><?=__('AutoDJ') ?></th>
</tr>
</thead>
<tbody>
<?php foreach($mounts as $row): ?>
<?php /** @var App\Entity\StationMount $row */ ?>
<tr class="align-middle">
<td>
<div class="btn-group btn-group-sm">
<a class="btn btn-sm btn-primary" href="<?=$router->named('stations:mounts:edit', ['station' => $station->getId(), 'id' => $row->getId()]) ?>"><?=__('Edit') ?></a>
<a class="btn btn-sm btn-danger" data-confirm-title="<?=$this->e(__('Delete mount point "%s"?', $row->getName())) ?>" href="<?=$router->named('stations:mounts:delete', ['station' => $station->getId(), 'id' => $row->getId(), 'csrf' => $csrf]) ?>"><?=__('Delete') ?></a>
</div>
</td>
<td>
<h5 class="m-0"><a href="<?=$this->e($frontend->getUrlForMount($station, $row)) ?>" target="_blank"><?=$this->e($row->getDisplayName()) ?></a></h5>
<div>
<?php if ($row->getIsDefault()): ?>
<span class="badge badge-success"><?=__('Default Mount') ?></span>
<?php endif; ?>
</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</div>
</div>
</td>
<td>
<?php if ($row->getEnableAutodj()): ?>
<?=__('Enabled') ?> - <?=(int)$row->getAutodjBitrate() ?>kbps <?=strtoupper($this->e($row->getAutodjFormat())) ?>
<?php else: ?>
<?=__('Disabled') ?>
<?php endif; ?>
</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</div>

View File

@ -42,7 +42,7 @@ $assets->load('fullcalendar')
<?=__('Add %s', __('Playlist')) ?>
</a>
</div>
<table class="table table-striped">
<table class="table table-striped table-responsive-md mb-0">
<colgroup>
<col width="30%">
<col width="30%">

View File

@ -12,24 +12,22 @@ $assets
<div class="card-header bg-primary-dark">
<h2 class="card-title"><?=__('Upcoming Song Queue') ?></h2>
</div>
<div class="table-responsive">
<table class="data-table table table-striped">
<colgroup>
<col width="20%">
<col width="35%">
<col width="25%">
<col width="20%">
</colgroup>
<thead>
<tr>
<th data-column-id="date_time" data-formatter="datetime"><?=__('Cued On') ?></th>
<th data-column-id="song" data-formatter="song_title"><?=__('Song Title') ?></th>
<th data-column-id="source" data-formatter="source"><?=__('Source') ?></th>
<th data-column-id="commands" data-formatter="commands" data-sortable="false"><?=__('Actions') ?></th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
<table class="data-table table-responsive-md table table-striped mb-0">
<colgroup>
<col width="20%">
<col width="35%">
<col width="25%">
<col width="20%">
</colgroup>
<thead>
<tr>
<th data-column-id="date_time" data-formatter="datetime"><?=__('Cued On') ?></th>
<th data-column-id="song" data-formatter="song_title"><?=__('Song Title') ?></th>
<th data-column-id="source" data-formatter="source"><?=__('Source') ?></th>
<th data-column-id="commands" data-formatter="commands" data-sortable="false"><?=__('Actions') ?></th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>

View File

@ -13,43 +13,41 @@
<?=__('Add %s', __('Remote Relay')) ?>
</a>
</div>
<div class="table-responsive">
<table class="table table-striped">
<colgroup>
<col width="25%">
<col width="45%">
<col width="30%">
</colgroup>
<thead>
<tr>
<th><?=__('Actions') ?></th>
<th><?=__('Remote Relay') ?></th>
<th><?=__('AutoDJ') ?></th>
<table class="table table-responsive-md table-striped mb-0">
<colgroup>
<col width="25%">
<col width="45%">
<col width="30%">
</colgroup>
<thead>
<tr>
<th><?=__('Actions') ?></th>
<th><?=__('Remote Relay') ?></th>
<th><?=__('AutoDJ') ?></th>
</tr>
</thead>
<tbody>
<?php foreach($remotes as $row): ?>
<?php /** @var App\Entity\StationRemote $row */ ?>
<tr class="align-middle">
<td>
<div class="btn-group btn-group-sm">
<a class="btn btn-sm btn-primary" href="<?=$router->fromHere('stations:remotes:edit', ['id' => $row->getId()]) ?>"><?=__('Edit') ?></a>
<a class="btn btn-sm btn-danger" data-confirm-title="<?=$this->e(__('Delete remote relay "%s"?', $row->getUrl())) ?>" href="<?=$router->fromHere('stations:remotes:delete', ['id' => $row->getId(), 'csrf' => $csrf]) ?>"><?=__('Delete') ?></a>
</div>
</td>
<td>
<h5 class="m-0"><a href="<?=$this->e($row->getUrl()) ?>" target="_blank"><?=$this->e($row->getDisplayName()) ?></a></h5>
</td>
<td>
<?php if ($row->getEnableAutodj()): ?>
<?=__('Enabled') ?> - <?=(int)$row->getAutodjBitrate() ?>kbps <?=strtoupper($this->e($row->getAutodjFormat())) ?>
<?php else: ?>
<?=__('Disabled') ?>
<?php endif; ?>
</td>
</tr>
</thead>
<tbody>
<?php foreach($remotes as $row): ?>
<?php /** @var App\Entity\StationRemote $row */ ?>
<tr class="align-middle">
<td>
<div class="btn-group btn-group-sm">
<a class="btn btn-sm btn-primary" href="<?=$router->fromHere('stations:remotes:edit', ['id' => $row->getId()]) ?>"><?=__('Edit') ?></a>
<a class="btn btn-sm btn-danger" data-confirm-title="<?=$this->e(__('Delete remote relay "%s"?', $row->getUrl())) ?>" href="<?=$router->fromHere('stations:remotes:delete', ['id' => $row->getId(), 'csrf' => $csrf]) ?>"><?=__('Delete') ?></a>
</div>
</td>
<td>
<h5 class="m-0"><a href="<?=$this->e($row->getUrl()) ?>" target="_blank"><?=$this->e($row->getDisplayName()) ?></a></h5>
</td>
<td>
<?php if ($row->getEnableAutodj()): ?>
<?=__('Enabled') ?> - <?=(int)$row->getAutodjBitrate() ?>kbps <?=strtoupper($this->e($row->getAutodjFormat())) ?>
<?php else: ?>
<?=__('Disabled') ?>
<?php endif; ?>
</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</div>
<?php endforeach; ?>
</tbody>
</table>
</div>

View File

@ -12,40 +12,38 @@
<?=__('Add %s', __('Streamer')) ?>
</a>
</div>
<div class="table-responsive">
<table class="table table-striped">
<colgroup>
<col width="25%">
<col width="15%">
<col width="20%">
<col width="40%">
</colgroup>
<thead>
<tr>
<th><?=__('Actions') ?></th>
<th><?=__('Username') ?></th>
<th><?=__('Display Name') ?></th>
<th><?=__('Notes') ?></th>
<table class="table table-responsive-lg table-striped mb-0">
<colgroup>
<col width="25%">
<col width="15%">
<col width="20%">
<col width="40%">
</colgroup>
<thead>
<tr>
<th><?=__('Actions') ?></th>
<th><?=__('Username') ?></th>
<th><?=__('Display Name') ?></th>
<th><?=__('Notes') ?></th>
</tr>
</thead>
<tbody>
<?php foreach($streamers as $row): ?>
<?php /** @var App\Entity\StationStreamer $row */ ?>
<tr class="align-middle <?php if (!$row->getIsActive()): ?>text-muted<?php endif; ?>">
<td>
<div class="btn-group btn-group-sm">
<a class="btn btn-sm btn-primary" href="<?=$router->fromHere('stations:streamers:edit', ['id' => $row->getId()]) ?>"><?=__('Edit') ?></a>
<a class="btn btn-sm btn-danger" data-confirm-title="<?=$this->e(__('Delete streamer "%s"?', $row->getStreamerUsername())) ?>" href="<?=$router->fromHere('stations:streamers:delete', ['id' => $row->getId(), 'csrf' => $csrf]) ?>"><?=__('Delete') ?></a>
</div>
</td>
<td><code><?=$this->e($row->getStreamerUsername()) ?></code></td>
<td><?=$this->e($row->getDisplayName()) ?></td>
<td><?=nl2br($this->e($row->getComments())) ?></td>
</tr>
</thead>
<tbody>
<?php foreach($streamers as $row): ?>
<?php /** @var App\Entity\StationStreamer $row */ ?>
<tr class="align-middle <?php if (!$row->getIsActive()): ?>text-muted<?php endif; ?>">
<td>
<div class="btn-group btn-group-sm">
<a class="btn btn-sm btn-primary" href="<?=$router->fromHere('stations:streamers:edit', ['id' => $row->getId()]) ?>"><?=__('Edit') ?></a>
<a class="btn btn-sm btn-danger" data-confirm-title="<?=$this->e(__('Delete streamer "%s"?', $row->getStreamerUsername())) ?>" href="<?=$router->fromHere('stations:streamers:delete', ['id' => $row->getId(), 'csrf' => $csrf]) ?>"><?=__('Delete') ?></a>
</div>
</td>
<td><code><?=$this->e($row->getStreamerUsername()) ?></code></td>
<td><?=$this->e($row->getDisplayName()) ?></td>
<td><?=nl2br($this->e($row->getComments())) ?></td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</div>
<?php endforeach; ?>
</tbody>
</table>
</div>
</div>
<div class="col-md-4">

View File

@ -13,46 +13,44 @@
<?=__('Add %s', __('Web Hook')) ?>
</a>
</div>
<div class="table-responsive">
<table class="table table-striped">
<colgroup>
<col width="30%">
<col width="35%">
<col width="35%">
</colgroup>
<thead>
<tr>
<th><?=__('Actions') ?></th>
<th><?=__('Name') ?> / <?=__('Type') ?></th>
<th><?=__('Triggers') ?></th>
<table class="table table-responsive-md table-striped mb-0">
<colgroup>
<col width="30%">
<col width="35%">
<col width="35%">
</colgroup>
<thead>
<tr>
<th><?=__('Actions') ?></th>
<th><?=__('Name') ?> / <?=__('Type') ?></th>
<th><?=__('Triggers') ?></th>
</tr>
</thead>
<tbody>
<?php foreach($webhooks as $row): ?>
<?php /** @var \App\Entity\StationWebhook $row */ ?>
<tr class="align-middle">
<td>
<a class="btn btn-sm btn-primary" href="<?=$router->fromHere('stations:webhooks:edit', ['id' => $row->getId()]) ?>"><?=__('Edit') ?></a>
<a class="btn btn-sm <?=($row->isEnabled() ? 'btn-warning' : 'btn-success') ?>" href="<?=$router->fromHere('stations:webhooks:toggle',['id' => $row->getId(), 'csrf' => $csrf]) ?>"><?=($row->isEnabled() ? __('Disable') : __('Enable')) ?></a>
<a class="btn btn-sm btn-default" href="<?=$router->fromHere('stations:webhooks:test', ['id' => $row->getId(), 'csrf' => $csrf]) ?>" title="<?=__('Trigger the web hook manually and view the raw response.') ?>"><?=__('Test') ?></a>
<a class="btn btn-sm btn-danger" data-confirm-title="<?=$this->e(__('Delete web hook "%s"?', $row->getName())) ?>" href="<?=$router->fromHere('stations:webhooks:delete', ['id' => $row->getId(), 'csrf' => $csrf]) ?>"><?=__('Delete') ?></a>
</td>
<td>
<big><?=$this->e($row->getName()) ?></big><br>
<?=$webhook_config['webhooks'][$row->getType()]['name'] ?><?php if (!$row->isEnabled()): ?> <span class="label label-danger"><?=__('Disabled') ?></span><?php endif; ?>
</td>
<td>
<?php
$trigger_names = [];
foreach((array)$row->getTriggers() as $trigger) {
$trigger_names[] = $webhook_config['triggers'][$trigger];
}
echo implode(', ', $trigger_names);
?>
</td>
</tr>
</thead>
<tbody>
<?php foreach($webhooks as $row): ?>
<?php /** @var \App\Entity\StationWebhook $row */ ?>
<tr class="align-middle">
<td>
<a class="btn btn-sm btn-primary" href="<?=$router->fromHere('stations:webhooks:edit', ['id' => $row->getId()]) ?>"><?=__('Edit') ?></a>
<a class="btn btn-sm <?=($row->isEnabled() ? 'btn-warning' : 'btn-success') ?>" href="<?=$router->fromHere('stations:webhooks:toggle',['id' => $row->getId(), 'csrf' => $csrf]) ?>"><?=($row->isEnabled() ? __('Disable') : __('Enable')) ?></a>
<a class="btn btn-sm btn-default" href="<?=$router->fromHere('stations:webhooks:test', ['id' => $row->getId(), 'csrf' => $csrf]) ?>" title="<?=__('Trigger the web hook manually and view the raw response.') ?>"><?=__('Test') ?></a>
<a class="btn btn-sm btn-danger" data-confirm-title="<?=$this->e(__('Delete web hook "%s"?', $row->getName())) ?>" href="<?=$router->fromHere('stations:webhooks:delete', ['id' => $row->getId(), 'csrf' => $csrf]) ?>"><?=__('Delete') ?></a>
</td>
<td>
<big><?=$this->e($row->getName()) ?></big><br>
<?=$webhook_config['webhooks'][$row->getType()]['name'] ?><?php if (!$row->isEnabled()): ?> <span class="label label-danger"><?=__('Disabled') ?></span><?php endif; ?>
</td>
<td>
<?php
$trigger_names = [];
foreach((array)$row->getTriggers() as $trigger) {
$trigger_names[] = $webhook_config['triggers'][$trigger];
}
echo implode(', ', $trigger_names);
?>
</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</div>
<?php endforeach; ?>
</tbody>
</table>
</div>