diff options
author | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2008-05-25 22:06:16 +0000 |
---|---|---|
committer | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2008-05-25 22:06:16 +0000 |
commit | 993a0a7a65f60f0d91b707b342a9367bf8afbbd9 (patch) | |
tree | 52fa645aedbf27b4c482fa91fe079160eb373518 /templates | |
parent | af9da5bf95d4cc93fdde6402271a957d9c0a74b3 (diff) | |
download | ampache-993a0a7a65f60f0d91b707b342a9367bf8afbbd9.tar.gz ampache-993a0a7a65f60f0d91b707b342a9367bf8afbbd9.tar.bz2 ampache-993a0a7a65f60f0d91b707b342a9367bf8afbbd9.zip |
moved the browse menu onto home, removed the browse tag from the menu, removed genre from song views will eventually be replaced by tag. Added not enough data note to the recently played
Diffstat (limited to 'templates')
-rw-r--r-- | templates/show_album.inc.php | 75 | ||||
-rw-r--r-- | templates/show_artist.inc.php | 1 | ||||
-rw-r--r-- | templates/show_index.inc.php | 2 | ||||
-rw-r--r-- | templates/show_login_form.inc.php | 4 | ||||
-rw-r--r-- | templates/show_recently_played.inc.php | 6 | ||||
-rw-r--r-- | templates/show_song_row.inc.php | 8 | ||||
-rw-r--r-- | templates/show_songs.inc.php | 7 | ||||
-rw-r--r-- | templates/sidebar.inc.php | 7 | ||||
-rw-r--r-- | templates/sidebar_home.inc.php | 55 |
9 files changed, 102 insertions, 63 deletions
diff --git a/templates/show_album.inc.php b/templates/show_album.inc.php index 28c0c57b..7f20a7eb 100644 --- a/templates/show_album.inc.php +++ b/templates/show_album.inc.php @@ -1,7 +1,7 @@ <?php /* - Copyright (c) 2001 - 2007 Ampache.org + Copyright (c) Ampache.org All rights reserved. This program is free software; you can redistribute it and/or @@ -30,57 +30,56 @@ if ($album->disk) $title = scrub_out($album->name) . ' (' . $album->year . ')' . $disk .' - ' . $album->f_artist_link; ?> <?php show_box_top($title,'info-box'); ?> - <div class="album_art"> +<div class="album_art"> <?php - if ($album_name != _('Unknown (Orphaned)')) { + if ($album_name != _('Unknown (Orphaned)')) { $name = '[' . $album->f_artist . '] ' . scrub_out($album->full_name); $aa_url = $web_path . "/image.php?id=" . $album->id . "&type=popup&sid=" . session_id(); echo "<a target=\"_blank\" href=\"$aa_url\" onclick=\"popup_art('$aa_url'); return false;\">"; echo "<img src=\"" . $web_path . "/image.php?id=" . $album->id . "&thumb=2\" alt=\"".$name."\" title=\"".$name."\" height=\"128\" width=\"128\" />"; echo "</a>\n"; - } - ?> - </div> - <div style="display:table-cell;" id="rating_<?php echo $album->id; ?>_album"> - <?php Rating::show($album->id,'album'); ?> - </div> - <div id="information_actions"> - - - <h3><?php echo _('Actions'); ?>:</h3> - <ul> - <li>Tags: - <?php - $tags = Tag::get_object_tags('album',$album->id); - foreach($tags as $i) - echo ($i['name']) . ' '; + } ?> +</div> +<div style="display:table-cell;" id="rating_<?php echo $album->id; ?>_album"> + <?php Rating::show($album->id,'album'); ?> +</div> +<div id="information_actions"> +<h3><?php echo _('Actions'); ?>:</h3> +<ul> + <li> + <?php echo Ajax::button('?action=basket&type=album&id=' . $album->id,'add',_('Add'),'play_full_' . $album->id); ?> + <?php echo _('Add Album'); ?> </li> <li> - <form type=POST action=coin> -<?php -echo Ajax::text('?page=tag&action=add&type=album&id=' . $album->id . "&val='+document.getElementById('tagname').value+'", _("Add tag"), 'tag_album'); -?> -<input type="text" size="10" maxlength="10" id="tagname"></input></form> -</li> - <li><?php echo Ajax::text('?action=basket&type=album&id=' . $album->id,_('Add Album'),'play_full_' . $album->id); ?></li> - <li><?php echo Ajax::text('?action=basket&type=album_random&id=' . $album->id,_('Add Random from Album'),'play_random_' . $album->id); ?></li> - <?php if ($GLOBALS['user']->has_access('75')) { ?> - <li><a href="<?php echo $web_path; ?>/albums.php?action=clear_art&album_id=<?php echo $album->id; ?>"><?php echo _('Reset Album Art'); ?></a></li> + <?php echo Ajax::button('?action=basket&type=album_random&id=' . $album->id,'random',_('Random'),'play_random_' . $album->id); ?> + <?php echo _('Add Random from Album'); ?> + </li> + <?php if (Access::check('interface','75')) { ?> + <li> + <a href="<?php echo $web_path; ?>/albums.php?action=clear_art&album_id=<?php echo $album->id; ?>"><?php echo get_user_icon('delete'); ?></a> + <?php echo _('Reset Album Art'); ?> + </li> <?php } ?> - <li><a href="<?php echo $web_path; ?>/albums.php?action=find_art&album_id=<?php echo $album->id; ?>"><?php echo _('Find Album Art'); ?></a></li> - <?php if (($GLOBALS['user']->has_access('75')) || (!Config::get('use_auth'))) { ?> - <li><a href="<?php echo $web_path; ?>/albums.php?action=update_from_tags&album_id=<?php echo $album->id; ?>"><?php echo _('Update from tags'); ?></a></li> + <li> + <a href="<?php echo $web_path; ?>/albums.php?action=find_art&album_id=<?php echo $album->id; ?>"><?php echo get_user_icon('view'); ?></a> + <?php echo _('Find Album Art'); ?> + </li> + <?php if ((Access::check('interface','50'))) { ?> + <li> + <a href="<?php echo $web_path; ?>/albums.php?action=update_from_tags&album_id=<?php echo $album->id; ?>"><?php echo get_user_icon('cog'); ?></a> + <?php echo _('Update from tags'); ?> + </li> <?php } ?> <?php if (Access::check_function('batch_download')) { ?> - <li><a href="<?php echo $web_path; ?>/batch.php?action=album&id=<?php echo $album->id; ?>"><?php echo _('Download'); ?></a></li> - <?php } ?> - <?php if (Plugin::is_installed('OpenStrands')) { ?> - <li><?php echo Ajax::text('?page=stats&action=show_check_album_tracks&id=' . $album->id,_('Find Missing Tracks'),'album_missing_tracks'); ?></li> + <li> + <a href="<?php echo $web_path; ?>/batch.php?action=album&id=<?php echo $album->id; ?>"><?php echo get_user_icon('batch_download'); ?></a> + <?php echo _('Download'); ?> + </li> <?php } ?> - </ul> - </div> +</ul> +</div> <?php show_box_bottom(); ?> <div id="additional_information"> diff --git a/templates/show_artist.inc.php b/templates/show_artist.inc.php index 02a60547..37b9ad40 100644 --- a/templates/show_artist.inc.php +++ b/templates/show_artist.inc.php @@ -48,6 +48,5 @@ if (Config::get('ratings')) { Browse::set_type('album'); Browse::set_static_content(1); Browse::save_objects($albums); - $taglist = Tag::get_many_tags('album', $object_ids); Browse::show_objects(); ?> diff --git a/templates/show_index.inc.php b/templates/show_index.inc.php index c9070eac..605b4d42 100644 --- a/templates/show_index.inc.php +++ b/templates/show_index.inc.php @@ -42,7 +42,7 @@ <?php $data = Song::get_recently_played(); show_box_top(_('Recently Played')); - if (count($data)) { require_once Config::get('prefix') . '/templates/show_recently_played.inc.php'; } + require_once Config::get('prefix') . '/templates/show_recently_played.inc.php'; show_box_bottom(); ?> </div> diff --git a/templates/show_login_form.inc.php b/templates/show_login_form.inc.php index 53563c5f..a5fd3499 100644 --- a/templates/show_login_form.inc.php +++ b/templates/show_login_form.inc.php @@ -1,6 +1,6 @@ <?php /* - Copyright (c) 2001 - 2007 Ampache.org + Copyright (c) Ampache.org All Rights Reserved This program is free software; you can redistribute it and/or @@ -45,7 +45,7 @@ function focus(){ document.login.username.focus(); } <div id="maincontainer"> <div id="header"><!-- This is the header --> <h1 id="headerlogo"> - <a href="http://www.ampache.org"> + <a href="<?php echo Config::get('web_path'); ?>/login.php"> <img src="<?php echo Config::get('web_path'); ?><?php echo Config::get('theme_path'); ?>/images/ampache.png" title="<?php echo Config::get('site_title'); ?>" alt="<?php echo Config::get('site_title'); ?>" /> </a> </h1> diff --git a/templates/show_recently_played.inc.php b/templates/show_recently_played.inc.php index c29897c4..85b9b423 100644 --- a/templates/show_recently_played.inc.php +++ b/templates/show_recently_played.inc.php @@ -21,7 +21,6 @@ /* Define the time places starting at 0 */ $time_unit = array('',_('seconds ago'),_('minutes ago'),_('hours ago'),_('days ago'),_('weeks ago'),_('months ago'),_('years ago')); - ?> <table class="tabledata" cellpadding="0" cellspacing="0"> <colgroup> @@ -89,6 +88,11 @@ $time_unit = array('',_('seconds ago'),_('minutes ago'),_('hours ago'),_('days a <td class="cel_lastplayed"><?php echo $time_string; ?></td> </tr> <?php } ?> +<?php if (!count($data)) { ?> +<tr> + <td colspan="6"><span class="fatalerror"><?php echo _('Not Enough Data'); ?></span></td> +</tr> +<?php } ?> <tr class="th-bottom"> <th class="cel_add"><?php echo _('Add'); ?></th> <th class="cel_username"><?php echo _('Username'); ?></th> diff --git a/templates/show_song_row.inc.php b/templates/show_song_row.inc.php index 29a37988..0026d5fd 100644 --- a/templates/show_song_row.inc.php +++ b/templates/show_song_row.inc.php @@ -25,18 +25,12 @@ <td class="cel_song"><?php echo $song->f_link; ?></td> <td class="cel_artist"><?php echo $song->f_artist_link; ?></td> <td class="cel_album"><?php echo $song->f_album_link; ?></td> -<td class="cel_genre"><?php echo $song->f_genre_link; ?></td> +<td class="cel_tags"></td> <td class="cel_track"><?php echo $song->f_track; ?></td> <td class="cel_time"><?php echo $song->f_time; ?></td> <?php if (Config::get('ratings')) { ?> <td class="cel_rating" id="rating_<?php echo $song->id; ?>_song"><?php Rating::show($song->id,'song'); ?></td> <?php } ?> -<td class="cel_tags"><?php -global $tag_cache; -$tags = $tag_cache[intval($song->id)]; //TagCloud::get_tags('song', array($song->id)); -foreach($tags as $i) - echo $i['name'] . ' '; -?></td> <td class="cel_action"> <?php if (Config::get('shoutbox')) { ?> <a href="<?php echo Config::get('web_path'); ?>/shout.php?action=show_add_shout&type=song&id=<?php echo $song->id; ?>"> diff --git a/templates/show_songs.inc.php b/templates/show_songs.inc.php index 1512c67e..a96739fb 100644 --- a/templates/show_songs.inc.php +++ b/templates/show_songs.inc.php @@ -30,7 +30,6 @@ $ajax_url = Config::get('ajax_url'); <col id="col_song" /> <col id="col_artist" /> <col id="col_album" /> - <col id="col_genre" /> <col id="col_track" /> <col id="col_time" /> <col id="col_rating" /> @@ -41,7 +40,7 @@ $ajax_url = Config::get('ajax_url'); <th class="cel_song"><?php echo Ajax::text('?page=browse&action=set_sort&sort=title',_('Song Title'),'sort_song_title'); ?></th> <th class="cel_artist"><?php echo _('Artist'); ?></th> <th class="cel_album"><?php echo _('Album'); ?></th> - <th class="cel_genre"><?php echo _('Genre'); ?></th> + <th class="cel_tags"><?php echo _('Tags'); ?></th> <th class="cel_track"><?php echo Ajax::text('?page=browse&action=set_sort&sort=track',_('Track'),'sort_song_track'); ?></th> <th class="cel_time"><?php echo Ajax::text('?page=browse&action=set_sort&sort=time',_('Time'),'sort_song_time'); ?></th> <?php if (Config::get('ratings')) { @@ -49,7 +48,6 @@ $ajax_url = Config::get('ajax_url'); ?> <th class="cel_rating"><?php echo _('Rating'); ?></th> <?php } ?> - <th class="cel_tags"><?php echo _('Tags'); ?></th> <th class="cel_action"><?php echo _('Action'); ?></th> </tr> <?php @@ -71,13 +69,12 @@ $ajax_url = Config::get('ajax_url'); <th class="cel_song"><?php echo Ajax::text('?page=browse&action=set_sort&sort=title',_('Song Title'),'sort_song_title_bottom'); ?></th> <th class="cel_artist"><?php echo _('Artist'); ?></th> <th class="cel_album"><?php echo _('Album'); ?></th> - <th class="cel_genre"><?php echo _('Genre'); ?></th> + <th class="cel_tags"><?php echo _('Tags'); ?></th> <th class="cel_track"><?php echo Ajax::text('?page=browse&action=set_sort&sort=track',_('Track'),'sort_song_track_bottom'); ?></th> <th class="cel_time"><?php echo Ajax::text('?page=browse&action=set_sort&sort=time',_('Time'),'sort_song_time_bottom'); ?></th> <?php if (Config::get('ratings')) { ?> <th class="cel_rating"><?php echo _('Rating'); ?></th> <?php } ?> - <th class="cel_tags"><?php echo _('Tags'); ?></th> <th class="cel_action"><?php echo _('Action'); ?></th> </tr> </table> diff --git a/templates/sidebar.inc.php b/templates/sidebar.inc.php index bc76657e..5d94e9b6 100644 --- a/templates/sidebar.inc.php +++ b/templates/sidebar.inc.php @@ -1,7 +1,7 @@ <?php /* - Copyright (c) 2001 - 2007 Ampache.org + Copyright (c) Ampache.org All rights reserved. This program is free software; you can redistribute it and/or @@ -25,7 +25,7 @@ ${$class_name} = ' active'; // List of buttons ( id, title, icon, access level) $sidebar_items[] = array('id'=>'home', 'title'=>_('Home'), 'icon'=>'home', 'access'=>5); -$sidebar_items[] = array('id'=>'browse', 'title'=>_('Browse'), 'icon'=>'browse', 'access'=>5); +//$sidebar_items[] = array('id'=>'browse', 'title'=>_('Browse'), 'icon'=>'browse', 'access'=>5); $sidebar_items[] = array('id'=>'localplay', 'title'=>_('Localplay'), 'icon'=>'volumeup', 'access'=>5); $sidebar_items[] = array('id'=>'preferences', 'title'=>_('Preferences'), 'icon'=>'edit', 'access'=>5); $sidebar_items[] = array('id'=>'admin', 'title'=>_('Admin'), 'icon'=>'admin', 'access'=>100); @@ -58,9 +58,6 @@ $ajax_url = Config::get('ajax_url'); } } ?> -<!-- <li <?php echo $sidebar_player; ?> onclick="ajaxPut('<?php echo $ajax_url; ?>?action=sidebar&button=player');" > -</li> ---> <li id="sb_tab_logout" class="sb1"> <a href="<?php echo Config::get('web_path'); ?>/logout.php" id="sidebar_logout" > <?php echo get_user_icon('logout',_('Logout')); ?> diff --git a/templates/sidebar_home.inc.php b/templates/sidebar_home.inc.php index c336de00..01b4d7d8 100644 --- a/templates/sidebar_home.inc.php +++ b/templates/sidebar_home.inc.php @@ -1,7 +1,7 @@ <?php /* - Copyright (c) 2001 - 2007 Ampache.org + Copyright (c) Ampache.org All rights reserved. This program is free software; you can redistribute it and/or @@ -18,9 +18,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ - +$ajax_info = Config::get('ajax_url'); $web_path = Config::get('web_path'); ?> - <ul class="sb2" id="sb_home"> <li><h4><?php echo _('Information'); ?></h4> <ul class="sb3" id="sb_home_info"> @@ -45,4 +44,54 @@ <li id="sb_home_random_advanced"><a href="<?php echo $web_path; ?>/random.php?action=advanced"><?php echo _('Advanced'); ?></a></li> </ul> </li> + <li><h4><?php echo _('Browse'); ?></h4> + <?php + $allowed_filters = Browse::get_allowed_filters(); + // Build the selected dealie + $text = scrub_in($_REQUEST['action']) . '_ac'; + ${$text} = ' selected="selected"'; + ?> + <ul class="sb3" id="sb_browse_bb"> + <li id="sb_browse_bb_SongTitle"><a href="<?php echo $web_path; ?>/browse.php?action=song"><?php echo _('Song Title'); ?></a></li> + <li id="sb_browse_bb_Album"><a href="<?php echo $web_path; ?>/browse.php?action=album"><?php echo _('Albums'); ?></a></li> + <li id="sb_browse_bb_Artist"><a href="<?php echo $web_path; ?>/browse.php?action=artist"><?php echo _('Artist'); ?></a></li> + <li id="sb_browse_bb_Tags"><a href="<?php echo $web_path; ?>/browse.php?action=tag"><?php echo _('Tag Cloud'); ?></a></li> + <li id="sb_browse_bb_Playlist"><a href="<?php echo $web_path; ?>/browse.php?action=playlist"><?php echo _('Playlist'); ?></a></li> + <li id="sb_browse_bb_RadioStation"><a href="<?php echo $web_path; ?>/browse.php?action=live_stream"><?php echo _('Radio Stations'); ?></a></li> + </ul> + </li> +<?php if (count($allowed_filters)) { ?> + <li><h4><?php echo _('Filters'); ?></h4> + <div class="sb3"> + <?php if (in_array('alpha_match',$allowed_filters)) { ?> + <form id="multi_alpha_filter_form" method="post" action="javascript:void(0);"> + <label id="multi_alpha_filterLabel" for="multi_alpha_filter"><?php echo _('Starts With'); ?></label> + <input type="textbox" id="multi_alpha_filter" name="multi_alpha_filter" value="<?php echo scrub_out($_REQUEST['alpha_match']); ?>" onKeyUp="DelayRun(this,'400','ajaxState','<?php echo Config::get('ajax_url'); ?>?page=browse&action=browse&key=alpha_match','multi_alpha_filter');"> + </form> + <?php } // end if alpha_match ?> + <?php if (in_array('minimum_count',$allowed_filters)) { ?> + <input id="mincountCB" type="checkbox" onclick="ajaxPut('<?php echo $ajax_info; ?>?action=browse&key=min_count&value=1');return true;" value="1" /> + <label id="mincountLabel" for="mincountCB"><?php echo _('Minimum Count'); ?></label><br /> + <?php } ?> + <?php if (in_array('rated',$allowed_filters)) { ?> + <input id="ratedCB" type="checkbox" onclick="ajaxPut('<?php echo $ajax_info; ?>?action=browse&key=rated&value=1');return true;" value="1" /> + <label id="ratedLabel" for="ratedCB"><?php echo _('Rated'); ?></label><br /> + <?php } ?> + <?php if (in_array('unplayed',$allowed_filters)) { ?> + <input id="unplayedCB" type="checkbox" <?php echo $string = Browse::get_filter('unplayed') ? 'checked="checked"' : ''; ?>/> + <label id="unplayedLabel" for="unplayedCB"><?php echo _('Unplayed'); ?></label><br /> + <?php } ?> + <?php if (in_array('show_art',$allowed_filters)) { ?> + <input id="show_artCB" type="checkbox" <?php echo $string = Browse::get_filter('show_art') ? 'checked="checked"' : ''; ?>/> + <label id="show_artLabel" for="show_artCB"><?php echo _('Show Art'); ?></label><br /> + <?php echo Ajax::observe('show_artCB','click',Ajax::action('?page=browse&action=browse&key=show_art&value=1','')); ?> + <?php } // if show_art ?> + <?php if (in_array('playlist_type',$allowed_filters)) { ?> + <input id="show_allplCB" type="checkbox" <?php echo $string = Browse::get_filter('playlist_type') ? 'checked="checked"' : ''; ?>/> + <label id="show_allplLabel" for="showallplCB"><?php echo _('All Playlists'); ?></label><br /> + <?php echo Ajax::observe('show_allplCB','click',Ajax::action('?page=browse&action=browse&key=playlist_type&value=1','')); ?> + <?php } // if playlist_type ?> + </div> + </li> +<?php } ?> </ul> |