diff options
Diffstat (limited to 'templates')
-rw-r--r-- | templates/default.css | 1 | ||||
-rw-r--r-- | templates/show_localplay.inc.php | 21 | ||||
-rw-r--r-- | templates/show_localplay_control.inc.php | 18 | ||||
-rw-r--r-- | templates/show_localplay_status.inc.php | 39 |
4 files changed, 50 insertions, 29 deletions
diff --git a/templates/default.css b/templates/default.css index 656a3cbf..bf7cce65 100644 --- a/templates/default.css +++ b/templates/default.css @@ -584,6 +584,7 @@ li.current-rating{ .np_row { padding-top: 3px; padding-bottom: 3px; + display: block; } .np_cell { display: inline; diff --git a/templates/show_localplay.inc.php b/templates/show_localplay.inc.php index 72fa4c51..0ad5938c 100644 --- a/templates/show_localplay.inc.php +++ b/templates/show_localplay.inc.php @@ -24,15 +24,22 @@ $web_path = conf('web_path'); $localplay = init_localplay(); $songs = $localplay->get(); ?> - <?php show_box_top(ucfirst($localplay->type) . ' ' . _('Localplay')); ?> -<ul class="text-action"> -<?php if ($localplay->has_function('delete_all')) { ?> - <li><a href="<?php echo $web_path; ?>/localplay.php?action=delete_all"><?php echo _('Clear Playlist'); ?></a></li> -<?php } ?> -</ul> -<?php require_once(conf('prefix') . '/templates/show_localplay_status.inc.php'); ?> +<table> +<tr> + <td valign="top"> + <strong><?php echo _('Actions'); ?>:</strong><br /> + <?php if ($localplay->has_function('delete_all')) { ?> + <a href="<?php echo $web_path; ?>/localplay.php?action=delete_all"><?php echo _('Clear Playlist'); ?></a> + <?php } ?> + </td><td> + <?php require_once(conf('prefix') . '/templates/show_localplay_status.inc.php'); ?> + </td> +</tr> +</table> <?php show_box_bottom(); ?> + + <?php show_box_top(_('Current Playlist')); ?> <table class="border" cellspacing="0" border="0"> <tr class="table-header"> diff --git a/templates/show_localplay_control.inc.php b/templates/show_localplay_control.inc.php index b9558ade..fa11c700 100644 --- a/templates/show_localplay_control.inc.php +++ b/templates/show_localplay_control.inc.php @@ -27,7 +27,7 @@ $required_info = "&user_id=" . $GLOBALS['user']->id . "&sessid=" . sess $ajax_url = $web_path . '/server/ajax.server.php'; ?> -<div class="localplaycontrol" style="display:table-cell;cursor:pointer;border:1px solid black;padding:2px;"> +<div class="localplaycontrol" style="display:table-cell;cursor:pointer;padding:2px;"> <?php if ($localplay->has_function('prev')) { ?> <span id="prev_button" onclick="ajaxPut('<?php echo $ajax_url; ?>?action=localplay&cmd=prev<?php echo $required_info; ?>','localplay_state');return true;"> <img src="<?php echo $web_path; ?>/images/localplay/prev.gif" alt="prev" /> @@ -49,20 +49,4 @@ $ajax_url = $web_path . '/server/ajax.server.php'; <img src="<?php echo $web_path; ?>/images/localplay/next.gif" alt="next" /> </span> <?php } ?> -<br /> -<?php if ($localplay->has_function('volume_up')) { ?> -<span id="up_button" onclick="ajaxPut('<?php echo $ajax_url; ?>?action=localplay&cmd=volume_up<?php echo $required_info; ?>','localplay_state');return true;"> - <img src="<?php echo $web_path; ?>/images/localplay/volup.gif" alt="volume up" /> -</span> -<?php } ?> -<?php if ($localplay->has_function('volume_down')) { ?> -<span id="down_button" onclick="ajaxPut('<?php echo $ajax_url; ?>?action=localplay&cmd=volume_down<?php echo $required_info; ?>','localplay_state');return true;"> - <img src="<?php echo $web_path; ?>/images/localplay/voldn.gif" alt="volume down" /> -</span> -<?php } ?> -<?php if ($localplay->has_function('volume_mute')) { ?> -<span id="mute_button" onclick="ajaxPut('<?php echo $ajax_url; ?>?action=localplay&cmd=volume_mute<?php echo $required_info; ?>','localplay_state');return true;"> - <img src="<?php echo $web_path; ?>/images/localplay/volmute.gif" alt="volume mute" /> -</span> -<?php } ?> </div> diff --git a/templates/show_localplay_status.inc.php b/templates/show_localplay_status.inc.php index c4352323..28918a35 100644 --- a/templates/show_localplay_status.inc.php +++ b/templates/show_localplay_status.inc.php @@ -36,9 +36,38 @@ $track_name = $status['track_artist'] . ' - ' . $status['track_album'] . ' - ' . $track_name = ltrim(ltrim($track_name,' - ')); ?> -<?php echo _('State') .": ". ucfirst($status['state']); ?><br /> -<?php echo _('Repeat') . ":" . print_boolean($status['repeat']); ?> | -<?php echo _('Random') . ":" . print_boolean($status['random']); ?><br /> -<?php echo _('Volume') . ":" . $status['volume']; ?><br /> +<strong><?php echo $localplay->get_user_state($status['state']) ?></strong><br /> + <?php echo '[' . $status['track'] . '] - ' . $track_name . '<br />'; ?> +<div align="center"><?php require (conf('prefix') . '/templates/show_localplay_control.inc.php'); ?></div> +<div align="center"> + <?php if ($localplay->has_function('volume_up')) { ?> + <span id="up_button" onclick="ajaxPut('<?php echo $ajax_url; ?>?action=localplay&cmd=volume_up<?php echo $required_info; ?>','localplay_state');return true;"> + <img src="<?php echo $web_path; ?>/images/localplay/volup.gif" alt="volume up" /> + </span> + <?php } ?> + <?php if ($localplay->has_function('volume_down')) { ?> + <span id="down_button" onclick="ajaxPut('<?php echo $ajax_url; ?>?action=localplay&cmd=volume_down<?php echo $required_info; ?>','localplay_state');return true;"> + <img src="<?php echo $web_path; ?>/images/localplay/voldn.gif" alt="volume down" /> + </span> + <?php } ?> + <?php if ($localplay->has_function('volume_mute')) { ?> + <span id="mute_button" onclick="ajaxPut('<?php echo $ajax_url; ?>?action=localplay&cmd=volume_mute<?php echo $required_info; ?>','localplay_state');return true;"> + <img src="<?php echo $web_path; ?>/images/localplay/volmute.gif" alt="volume mute" /> + </span> + <?php } ?> + <br /> + <?php echo _('Volume') . ":" . $status['volume']; ?> +</div> <br /> -<span class="header2"><?php echo _('Now Playing') . '</span><br />[' . $status['track'] . '] - ' . $track_name . '<br />'; ?> +<?php if ($localplay->has_function('repeat')) { ?> + <?php echo _('Repeat') . ":" . print_boolean($status['repeat']); ?> | + <a href="<?php echo $web_path; ?>/localplay.php?action=repeat&value=<?php echo invert_boolean($status['repeat']); ?>"> + <?php echo print_boolean(invert_boolean($status['repeat'])); ?> + </a><br /> + <?php } ?> +<?php if ($localplay->has_function('random')) { ?> + <?php echo _('Random') . ":" . print_boolean($status['random']); ?> | + <a href="<?php echo $web_path; ?>/localplay.php?action=random&value=<?php echo invert_boolean($status['random']); ?>"> + <?php echo print_boolean(invert_boolean($status['random'])); ?> + </a><br /> +<?php } ?> |