summaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorKarl 'vollmerk' Vollmer <vollmer@ampache.org>2008-02-25 06:53:47 +0000
committerKarl 'vollmerk' Vollmer <vollmer@ampache.org>2008-02-25 06:53:47 +0000
commit76387698e77d3b8409d1856d1883fa23387f571e (patch)
treee71c879ebd307aaf4111e4de82fc94725751e24f /templates
parent73fee69c33df9e36801bfb5228577551504c075c (diff)
downloadampache-76387698e77d3b8409d1856d1883fa23387f571e.tar.gz
ampache-76387698e77d3b8409d1856d1883fa23387f571e.tar.bz2
ampache-76387698e77d3b8409d1856d1883fa23387f571e.zip
delay random albums a bit to improve inital load, also add a refresh button so you can flip them without refreshing the whole page
Diffstat (limited to 'templates')
-rw-r--r--templates/show_index.inc.php6
-rw-r--r--templates/show_random_albums.inc.php3
2 files changed, 4 insertions, 5 deletions
diff --git a/templates/show_index.inc.php b/templates/show_index.inc.php
index 50637547..ee231859 100644
--- a/templates/show_index.inc.php
+++ b/templates/show_index.inc.php
@@ -29,11 +29,9 @@ if (isset($_REQUEST['xspf']) && isset ($_REQUEST['play_info'])){
<?php show_now_playing(); ?>
</div> <!-- Close Now Playing Div -->
<!-- Randomly selected albums of the moment -->
+ <?php echo Ajax::observe('window','load',Ajax::action('?page=index&action=random_albums','random_albums')); ?>
<div id="random_selection">
- <?php
- $albums = get_random_albums('6');
- if (count($albums)) { require_once Config::get('prefix') . '/templates/show_random_albums.inc.php'; }
- ?>
+ <?php show_box_top(_('Albums of the Moment')); echo _('Loading...'); show_box_bottom(); ?>
</div>
<!-- Recently Played -->
<div id="recently_played">
diff --git a/templates/show_random_albums.inc.php b/templates/show_random_albums.inc.php
index 8a879f9e..fe8c4972 100644
--- a/templates/show_random_albums.inc.php
+++ b/templates/show_random_albums.inc.php
@@ -19,8 +19,9 @@
*/
$web_path = Config::get('web_path');
+$button = Ajax::button('?page=index&action=random_albums','random',_('Refresh'),'random_refresh');
?>
-<?php show_box_top(_('Albums of the Moment')); ?>
+<?php show_box_top(_('Albums of the Moment') . ' ' . $button); ?>
<?php
foreach ($albums as $album_id) {