mirror of
https://github.com/AzuraCast/AzuraCast.git
synced 2024-06-18 23:17:05 +00:00
#2950 -- Modify fix from previous bug fix to avoid regressions.
This commit is contained in:
parent
937492718e
commit
7a7fa9eac7
|
@ -7,7 +7,7 @@ function confirmDangerousAction (el) {
|
|||
|
||||
let confirmTitle = 'Are you sure?';
|
||||
if ($el.data('confirm-title')) {
|
||||
confirmTitle = decodeURIComponent(JSON.parse('"' + $el.data('confirm-title') + '"'));
|
||||
confirmTitle = $el.data('confirm-title');
|
||||
}
|
||||
|
||||
let dangerMode = true;
|
||||
|
|
|
@ -2,12 +2,12 @@
|
|||
|
||||
<div class="card">
|
||||
<div class="card-header bg-primary-dark">
|
||||
<h2 class="card-title"><?=__('Manage Stations') ?></h2>
|
||||
<h2 class="card-title"><?=__('Manage Stations')?></h2>
|
||||
</div>
|
||||
<div class="card-actions">
|
||||
<a class="btn btn-outline-primary" role="button" href="<?=$router->named('admin:stations:add') ?>">
|
||||
<a class="btn btn-outline-primary" role="button" href="<?=$router->named('admin:stations:add')?>">
|
||||
<i class="material-icons" aria-hidden="true">add</i>
|
||||
<?=__('Add Station') ?>
|
||||
<?=__('Add Station')?>
|
||||
</a>
|
||||
</div>
|
||||
<table class="table table-striped table-responsive-md mb-0">
|
||||
|
@ -17,23 +17,28 @@
|
|||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th><?=__('Actions') ?></th>
|
||||
<th><?=__('Station') ?></th>
|
||||
<th><?=__('Actions')?></th>
|
||||
<th><?=__('Station')?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach((array)$stations as $record): ?>
|
||||
<?php foreach ((array)$stations 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('stations:index:index', ['station_id' => $record['id']]) ?>" target="_blank"><?=__('Manage') ?></a>
|
||||
<a class="btn btn-sm btn-dark" href="<?=$router->named('admin:stations:edit', ['id' => $record['id']]) ?>"><?=__('Edit') ?></a>
|
||||
<a class="btn btn-sm btn-dark" href="<?=$router->named('admin:stations:clone', ['id' => $record['id']]) ?>"><?=__('Clone') ?></a>
|
||||
<a class="btn btn-sm btn-danger" data-confirm-title="<?=$this->e(__('Delete station "%s"?', $record['name'])) ?>" href="<?=$router->named('admin:stations:delete', ['id' => $record['id'], 'csrf' => $csrf]) ?>"><?=__('Delete') ?></a>
|
||||
<a class="btn btn-sm btn-primary" href="<?=$router->named('stations:index:index',
|
||||
['station_id' => $record['id']])?>" target="_blank"><?=__('Manage')?></a>
|
||||
<a class="btn btn-sm btn-dark" href="<?=$router->named('admin:stations:edit',
|
||||
['id' => $record['id']])?>"><?=__('Edit')?></a>
|
||||
<a class="btn btn-sm btn-dark" href="<?=$router->named('admin:stations:clone',
|
||||
['id' => $record['id']])?>"><?=__('Clone')?></a>
|
||||
<a class="btn btn-sm btn-danger" data-confirm-title="<?=$this->e(__('Delete station "%s"?',
|
||||
$record['name']))?>" href="<?=$router->named('admin:stations:delete',
|
||||
['id' => $record['id'], 'csrf' => $csrf])?>"><?=__('Delete')?></a>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<big><?=$this->e($record['name']) ?></big>
|
||||
<big><?=$this->e($record['name'])?></big>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
|
|
|
@ -11,43 +11,46 @@
|
|||
?>
|
||||
|
||||
<section class="card mb-4" role="region">
|
||||
<?php if ($station->getEnableRequests()): ?>
|
||||
<div class="card-header bg-primary-dark">
|
||||
<h3 class="card-title">
|
||||
<?=__('Song Requests') ?>
|
||||
<small class="badge badge-pill badge-success"><?=__('Enabled') ?></small>
|
||||
</h3>
|
||||
</div>
|
||||
<?php if ($acl->userAllowed($user, [\App\Acl::STATION_REPORTS, \App\Acl::STATION_PROFILE], $station->getId())): ?>
|
||||
<div class="card-actions">
|
||||
<?php if ($acl->userAllowed($user, \App\Acl::STATION_REPORTS, $station->getId())): ?>
|
||||
<a class="btn btn-outline-primary" href="<?=$router->fromHere('stations:reports:requests') ?>">
|
||||
<i class="material-icons" aria-hidden="true">assignment</i>
|
||||
<?=__('View') ?>
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
<?php if ($acl->userAllowed($user, \App\Acl::STATION_PROFILE, $station->getId())): ?>
|
||||
<a class="btn btn-outline-danger" data-confirm-title=<?=$this->escapeJs(__('Disable song requests?')) ?> href="<?=$router->fromHere('stations:profile:toggle', ['feature' => 'requests', 'csrf' => $csrf]) ?>">
|
||||
<i class="material-icons" aria-hidden="true">close</i>
|
||||
<?=__('Disable') ?>
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php else: ?>
|
||||
<div class="card-header bg-primary-dark">
|
||||
<h3 class="card-title">
|
||||
<?=__('Song Requests') ?>
|
||||
<small class="badge badge-pill badge-danger"><?=__('Disabled') ?></small>
|
||||
</h3>
|
||||
</div>
|
||||
<?php if ($acl->userAllowed($user, \App\Acl::STATION_PROFILE, $station->getId())): ?>
|
||||
<div class="card-actions">
|
||||
<a class="btn btn-outline-success" data-confirm-title=<?=$this->escapeJs(__('Enable song requests?')) ?> href="<?=$router->fromHere('stations:profile:toggle', ['feature' => 'requests', 'csrf' => $csrf]) ?>">
|
||||
<i class="material-icons" aria-hidden="true">check</i>
|
||||
<?=__('Enable') ?>
|
||||
</a>
|
||||
<?php if ($station->getEnableRequests()): ?>
|
||||
<div class="card-header bg-primary-dark">
|
||||
<h3 class="card-title">
|
||||
<?=__('Song Requests')?>
|
||||
<small class="badge badge-pill badge-success"><?=__('Enabled')?></small>
|
||||
</h3>
|
||||
</div>
|
||||
<?php if ($acl->userAllowed($user, [\App\Acl::STATION_REPORTS, \App\Acl::STATION_PROFILE],
|
||||
$station->getId())): ?>
|
||||
<div class="card-actions">
|
||||
<?php if ($acl->userAllowed($user, \App\Acl::STATION_REPORTS, $station->getId())): ?>
|
||||
<a class="btn btn-outline-primary" href="<?=$router->fromHere('stations:reports:requests')?>">
|
||||
<i class="material-icons" aria-hidden="true">assignment</i>
|
||||
<?=__('View')?>
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
<?php if ($acl->userAllowed($user, \App\Acl::STATION_PROFILE, $station->getId())): ?>
|
||||
<a class="btn btn-outline-danger" data-confirm-title="<?=$this->e(__('Disable song requests?'))?>" href="<?=$router->fromHere('stations:profile:toggle',
|
||||
['feature' => 'requests', 'csrf' => $csrf])?>">
|
||||
<i class="material-icons" aria-hidden="true">close</i>
|
||||
<?=__('Disable')?>
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php else: ?>
|
||||
<div class="card-header bg-primary-dark">
|
||||
<h3 class="card-title">
|
||||
<?=__('Song Requests')?>
|
||||
<small class="badge badge-pill badge-danger"><?=__('Disabled')?></small>
|
||||
</h3>
|
||||
</div>
|
||||
<?php if ($acl->userAllowed($user, \App\Acl::STATION_PROFILE, $station->getId())): ?>
|
||||
<div class="card-actions">
|
||||
<a class="btn btn-outline-success" data-confirm-title="<?=$this->e(__('Enable song requests?'))?>" href="<?=$router->fromHere('stations:profile:toggle',
|
||||
['feature' => 'requests', 'csrf' => $csrf])?>">
|
||||
<i class="material-icons" aria-hidden="true">check</i>
|
||||
<?=__('Enable')?>
|
||||
</a>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
</section>
|
||||
|
|
|
@ -11,43 +11,46 @@
|
|||
?>
|
||||
|
||||
<section class="card mb-4" role="region">
|
||||
<?php if ($station->getEnableStreamers()): ?>
|
||||
<div class="card-header bg-primary-dark">
|
||||
<h3 class="card-title">
|
||||
<?=__('Streamers/DJs') ?>
|
||||
<small class="badge badge-pill badge-success"><?=__('Enabled') ?></small>
|
||||
</h3>
|
||||
</div>
|
||||
<?php if ($acl->userAllowed($user, [\App\Acl::STATION_STREAMERS, \App\Acl::STATION_PROFILE], $station->getId())): ?>
|
||||
<div class="card-actions">
|
||||
<?php if ($acl->userAllowed($user, \App\Acl::STATION_STREAMERS, $station->getId())): ?>
|
||||
<a class="btn btn-outline-primary" href="<?=$router->fromHere('stations:streamers:index') ?>">
|
||||
<i class="material-icons" aria-hidden="true">settings</i>
|
||||
<?=__('Manage') ?>
|
||||
</a>
|
||||
<?php if ($station->getEnableStreamers()): ?>
|
||||
<div class="card-header bg-primary-dark">
|
||||
<h3 class="card-title">
|
||||
<?=__('Streamers/DJs')?>
|
||||
<small class="badge badge-pill badge-success"><?=__('Enabled')?></small>
|
||||
</h3>
|
||||
</div>
|
||||
<?php if ($acl->userAllowed($user, [\App\Acl::STATION_STREAMERS, \App\Acl::STATION_PROFILE],
|
||||
$station->getId())): ?>
|
||||
<div class="card-actions">
|
||||
<?php if ($acl->userAllowed($user, \App\Acl::STATION_STREAMERS, $station->getId())): ?>
|
||||
<a class="btn btn-outline-primary" href="<?=$router->fromHere('stations:streamers:index')?>">
|
||||
<i class="material-icons" aria-hidden="true">settings</i>
|
||||
<?=__('Manage')?>
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
<?php if ($acl->userAllowed($user, \App\Acl::STATION_PROFILE, $station->getId())): ?>
|
||||
<a class="btn btn-outline-danger" data-confirm-title="<?=$this->e(__('Disable streamers?'))?>" href="<?=$router->fromHere('stations:profile:toggle',
|
||||
['feature' => 'streamers', 'csrf' => $csrf])?>">
|
||||
<i class="material-icons" aria-hidden="true">close</i>
|
||||
<?=__('Disable')?>
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php else: ?>
|
||||
<div class="card-header bg-primary-dark">
|
||||
<h3 class="card-title">
|
||||
<?=__('Streamers/DJs')?>
|
||||
<small class="badge badge-pill badge-danger"><?=__('Disabled')?></small>
|
||||
</h3>
|
||||
</div>
|
||||
<?php if ($acl->userAllowed($user, \App\Acl::STATION_PROFILE, $station->getId())): ?>
|
||||
<a class="btn btn-outline-danger" data-confirm-title=<?=$this->escapeJs(__('Disable streamers?')) ?> href="<?=$router->fromHere('stations:profile:toggle', ['feature' => 'streamers', 'csrf' => $csrf]) ?>">
|
||||
<i class="material-icons" aria-hidden="true">close</i>
|
||||
<?=__('Disable') ?>
|
||||
</a>
|
||||
<div class="card-actions">
|
||||
<a class="btn btn-outline-success" data-confirm-title="<?=$this->e(__('Enable streamers?'))?>" href="<?=$router->fromHere('stations:profile:toggle',
|
||||
['feature' => 'streamers', 'csrf' => $csrf])?>">
|
||||
<i class="material-icons" aria-hidden="true">check</i>
|
||||
<?=__('Enable')?>
|
||||
</a>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php else: ?>
|
||||
<div class="card-header bg-primary-dark">
|
||||
<h3 class="card-title">
|
||||
<?=__('Streamers/DJs') ?>
|
||||
<small class="badge badge-pill badge-danger"><?=__('Disabled') ?></small>
|
||||
</h3>
|
||||
</div>
|
||||
<?php if ($acl->userAllowed($user, \App\Acl::STATION_PROFILE, $station->getId())): ?>
|
||||
<div class="card-actions">
|
||||
<a class="btn btn-outline-success" data-confirm-title=<?=$this->escapeJs(__('Enable streamers?')) ?> href="<?=$router->fromHere('stations:profile:toggle', ['feature' => 'streamers', 'csrf' => $csrf]) ?>">
|
||||
<i class="material-icons" aria-hidden="true">check</i>
|
||||
<?=__('Enable') ?>
|
||||
</a>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
</section>
|
||||
|
|
Loading…
Reference in New Issue
Block a user