diff options
author | nf <nf@ampache> | 2007-07-14 11:36:37 +0000 |
---|---|---|
committer | nf <nf@ampache> | 2007-07-14 11:36:37 +0000 |
commit | 538e79b2666daa4eb0bb9bb6f83ae0186ac089ea (patch) | |
tree | 0109c1efd5c40c3b61f5ca16a5cbba967fc7359a /templates | |
parent | 6a929af1bf1953b74471220e22df22321b71630d (diff) | |
download | ampache-538e79b2666daa4eb0bb9bb6f83ae0186ac089ea.tar.gz ampache-538e79b2666daa4eb0bb9bb6f83ae0186ac089ea.tar.bz2 ampache-538e79b2666daa4eb0bb9bb6f83ae0186ac089ea.zip |
Added classes to show_localplay_status.inc and updated all themes for compatibility.
Added show_object_rating_static.inc (supplied by andy90) and modified rating.lib for this to work
Removed obsolete patches from cleandy themes.
Fixed a tiny css bug in StoneBlue theme.
Fixed horizontal menu in Burgundy theme (explicit height in #sidebar li)
Diffstat (limited to 'templates')
-rw-r--r-- | templates/show_localplay_status.inc.php | 9 | ||||
-rw-r--r-- | templates/show_object_rating_static.inc.php | 64 |
2 files changed, 68 insertions, 5 deletions
diff --git a/templates/show_localplay_status.inc.php b/templates/show_localplay_status.inc.php index 7073db82..7a172a6d 100644 --- a/templates/show_localplay_status.inc.php +++ b/templates/show_localplay_status.inc.php @@ -30,9 +30,9 @@ $status = $localplay->status(); ?> <span style="font-weight:bold;" id="lp_state"><?php echo $localplay->get_user_state($status['state']) ?></span><br /> - <span id="lp_playing"><?php echo $localplay->get_user_playing(); ?></span><br /> -<div align="center"><?php require (conf('prefix') . '/templates/show_localplay_control.inc.php'); ?></div> -<div align="center"> + <span id="lp_playing"><?php echo $localplay->get_user_playing(); ?></span> +<div class="lp_box_ctrl"><?php require (conf('prefix') . '/templates/show_localplay_control.inc.php'); ?></div> +<div class="lp_box_vol"> <?php if ($localplay->has_function('volume_up')) { ?> <span class="up_button" onclick="ajaxPut('<?php echo $ajax_url; ?>?action=localplay&cmd=volume_up<?php echo $required_info; ?>','lp_v');return true;"> <?php echo get_user_icon('volumeup'); ?> @@ -47,8 +47,7 @@ $status = $localplay->status(); <span class="mute_button" onclick="ajaxPut('<?php echo $ajax_url; ?>?action=localplay&cmd=volume_mute<?php echo $required_info; ?>','lp_v');return true;"> <?php echo get_user_icon('volumemute'); ?> </span> - <?php } ?> - <br /> + <?php } ?> <?php echo _('Volume'); ?>:<span id="lp_volume"><?php echo $status['volume']; ?></span> </div> <br /> diff --git a/templates/show_object_rating_static.inc.php b/templates/show_object_rating_static.inc.php new file mode 100644 index 00000000..47c7d57e --- /dev/null +++ b/templates/show_object_rating_static.inc.php @@ -0,0 +1,64 @@ +<?php +/* + Copyright 2001 - 2007 Ampache.org + All Rights Reserved + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License v2 + as published by the Free Software Foundation. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +*/ + +/* Create some variables we are going to need */ +$web_path = conf('web_path'); +$base_url = conf('ajax_url') . '?action=set_rating&rating_type=' . $rating->type . '&object_id=' . $rating->id . conf('ajax_info'); + + +//set the background to no stars +echo "<ul class=\"star-rating\">\n"; + +/* Handle the "Not rated" possibility */ +if ($rating->rating == '-1') { + echo "<li class=\"zero-stars\"></li>\n"; +} +else { + echo "<li class=\"zero-stars\"></li>\n"; +} +// decide width of rating. image is 16 px wide +$width = $rating->rating*16; +if ($width < 0) $width = 0; + +//set the current rating background +echo "<li class=\"current-rating\" style=\"width:${width}px\" >Current rating: "; +if ($rating->rating <= 0) { + echo "not rated yet </li>\n"; +} +else echo "$rating->rating of 5</li>\n"; + +//it did not like my "1-star", "2-star" ... css styles, and I changed it to this after I realized star1... would have worked :\ +?> +<li> + <span class="one-stars" title="1 <?php echo _('out of'); ?> 5"></span> +</li> +<li> + <span class="two-stars" title="2 <?php echo _('out of'); ?> 5"></span> +</li> +<li> + <span class="three-stars" title="3 <?php echo _('out of'); ?> 5"></span> +</li> +<li> + <span class="four-stars" title="4 <?php echo _('out of'); ?> 5"></span> +</li> +<li> + <span class="five-stars" title="5 <?php echo _('out of'); ?> 5"></span> +</li> +</ul>
\ No newline at end of file |