mirror of
https://github.com/Yetangitu/ampache
synced 2025-10-06 03:49:56 +02:00
added link to disable/enable a song to the songs list
This commit is contained in:
parent
ed4595833d
commit
d28c55215d
2 changed files with 7 additions and 1 deletions
|
@ -34,8 +34,12 @@ switch ($_REQUEST['action']) {
|
|||
$song = new Song($_REQUEST['song_id']);
|
||||
$new_enabled = $song->enabled ? '0' : '1';
|
||||
$song->update_enabled($new_enabled,$song->id);
|
||||
$song->enabled = $new_enabled;
|
||||
$song->format();
|
||||
|
||||
//FIXME: Re-display this
|
||||
ob_start();
|
||||
require Config::get('prefix') . '/templates/show_song_row.inc.php';
|
||||
$results['song_' . $song->id] = ob_get_clean();
|
||||
|
||||
break;
|
||||
default:
|
||||
|
|
|
@ -47,5 +47,7 @@
|
|||
<?php } ?>
|
||||
<?php if (Access::check('interface','75')) { ?>
|
||||
<?php echo Ajax::button('?action=show_edit_object&type=song&id=' . $song->id,'edit',_('Edit'),'edit_song_' . $song->id); ?>
|
||||
<?php $icon = $song->enabled ? 'disable' : 'enable'; ?>
|
||||
<?php echo Ajax::button('?page=song&action=flip_state&song_id=' . $song->id,$icon,_(ucfirst($icon)),'flip_song_' . $song->id); ?>
|
||||
<?php } ?>
|
||||
</td>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue