diff options
author | Afterster <afterster@gmail.com> | 2013-10-29 00:01:39 +0100 |
---|---|---|
committer | Paul Arthur <paul.arthur@flowerysong.com> | 2013-10-30 19:26:53 -0400 |
commit | 2e4620adaab9e46d31b6156fc82e566708ff7b40 (patch) | |
tree | 97c95142bebddc42288d78ff9f0a8ada32ec0b94 | |
parent | 8a8e89d22085ea2cf19648c430975072e6697e31 (diff) | |
download | ampache-2e4620adaab9e46d31b6156fc82e566708ff7b40.tar.gz ampache-2e4620adaab9e46d31b6156fc82e566708ff7b40.tar.bz2 ampache-2e4620adaab9e46d31b6156fc82e566708ff7b40.zip |
Fix sort when browsing (#50)
-rw-r--r-- | templates/show_albums.inc.php | 2 | ||||
-rw-r--r-- | templates/show_artists.inc.php | 4 | ||||
-rw-r--r-- | templates/show_live_streams.inc.php | 12 | ||||
-rw-r--r-- | templates/show_playlists.inc.php | 8 | ||||
-rw-r--r-- | templates/show_smartplaylists.inc.php | 8 | ||||
-rw-r--r-- | templates/show_songs.inc.php | 10 | ||||
-rw-r--r-- | templates/show_users.inc.php | 12 | ||||
-rw-r--r-- | templates/show_videos.inc.php | 16 |
8 files changed, 36 insertions, 36 deletions
diff --git a/templates/show_albums.inc.php b/templates/show_albums.inc.php index 41d5ccb0..01f939fb 100644 --- a/templates/show_albums.inc.php +++ b/templates/show_albums.inc.php @@ -74,7 +74,7 @@ $web_path = Config::get('web_path'); <th class="cel_cover"><?php echo T_('Cover'); ?></th> <?php } ?> <th class="cel_album"><?php echo Ajax::text('?page=browse&action=set_sort&browse_id=' . $browse->id . '&sort=name', T_('Album'),'album_sort_name_bottom'); ?></th> - <th class="cel_artist"><?php echo T_('Artist'); ?></th> + <th class="cel_artist"><?php echo Ajax::text('?page=browse&action=set_sort&browse_id=' . $browse->id . '&sort=artist', T_('Artist'),'album_sort_artist'); ?></th> <th class="cel_songs"><?php echo T_('Songs'); ?></th> <th class="cel_year"><?php echo Ajax::text('?page=browse&action=set_sort&browse_id=' . $browse->id . '&sort=year', T_('Year'),'album_sort_year_bottom'); ?></th> <th class="cel_tags"><?php echo T_('Tags'); ?></th> diff --git a/templates/show_artists.inc.php b/templates/show_artists.inc.php index 0a3b664b..6dd1304a 100644 --- a/templates/show_artists.inc.php +++ b/templates/show_artists.inc.php @@ -38,7 +38,7 @@ $web_path = Config::get('web_path'); </colgroup> <tr class="th-top"> <th class="cel_add"><?php echo T_('Add'); ?></th> - <th class="cel_artist"><?php echo Ajax::text('?page=browse&action=set_sort&type=artist&sort=name', T_('Artist'),'artist_sort_name'); ?></th> + <th class="cel_artist"><?php echo Ajax::text('?page=browse&action=set_sort&browse_id=' . $browse->id . '&type=artist&sort=name', T_('Artist'),'artist_sort_name'); ?></th> <th class="cel_songs"><?php echo T_('Songs'); ?></th> <th class="cel_albums"><?php echo T_('Albums'); ?></th> <th class="cel_time"><?php echo T_('Time'); ?></th> @@ -66,7 +66,7 @@ foreach ($object_ids as $artist_id) { <?php } ?> <tr class="th-bottom"> <th class="cel_add"><?php echo T_('Add'); ?></th> - <th class="cel_artist"><?php echo Ajax::text('?page=browse&action=set_sort&type=artist&sort=name', T_('Artist'),'artist_sort_name_bottom'); ?></th> + <th class="cel_artist"><?php echo Ajax::text('?page=browse&action=set_sort&type=artist&browse_id=' . $browse->id . '&sort=name', T_('Artist'),'artist_sort_name_bottom'); ?></th> <th class="cel_songs"> <?php echo T_('Songs'); ?> </th> <th class="cel_albums"> <?php echo T_('Albums'); ?> </th> <th class="cel_time"> <?php echo T_('Time'); ?> </th> diff --git a/templates/show_live_streams.inc.php b/templates/show_live_streams.inc.php index 1cc782f0..6ccd52d7 100644 --- a/templates/show_live_streams.inc.php +++ b/templates/show_live_streams.inc.php @@ -35,9 +35,9 @@ $web_path = Config::get('web_path'); </colgroup> <tr class="th-top"> <th class="cel_add"><?php echo T_('Add'); ?></th> - <th class="cel_streamname"><?php echo Ajax::text('?page=browse&action=set_sort&sort=name', T_('Name'),'live_stream_sort_name'); ?></th> - <th class="cel_callsign"><?php echo Ajax::text('?page=browse&action=set_sort&sort=call_sign', T_('Callsign'),'live_stream_call_sign'); ?></th> - <th class="cel_frequency"><?php echo Ajax::text('?page=browse&action=set_sort&sort=frequency', T_('Frequency'),'live_stream_frequency'); ?></th> + <th class="cel_streamname"><?php echo Ajax::text('?page=browse&action=set_sort&browse_id=' . $browse->id . '&sort=name', T_('Name'),'live_stream_sort_name'); ?></th> + <th class="cel_callsign"><?php echo Ajax::text('?page=browse&action=set_sort&browse_id=' . $browse->id . '&sort=call_sign', T_('Callsign'),'live_stream_call_sign'); ?></th> + <th class="cel_frequency"><?php echo Ajax::text('?page=browse&action=set_sort&browse_id=' . $browse->id . '&sort=frequency', T_('Frequency'),'live_stream_frequency'); ?></th> <th class="cel_genre"><?php echo T_('Tag'); ?></th> <th class="cel_action"><?php echo T_('Action'); ?> </th> </tr> @@ -57,9 +57,9 @@ foreach ($object_ids as $radio_id) { <?php } ?> <tr class="th-bottom"> <th class="cel_add"><?php echo T_('Add'); ?></th> - <th class="cel_streamname"><?php echo Ajax::text('?page=browse&action=set_sort&sort=name', T_('Name'),'live_stream_sort_name_bottom'); ?></th> - <th class="cel_callsign"><?php echo Ajax::text('?page=browse&action=set_sort&sort=call_sign', T_('Callsign'),'live_stream_call_sign_bottom'); ?></th> - <th class="cel_frequency"><?php echo Ajax::text('?page=browse&action=set_sort&sort=frequency', T_('Frequency'),'live_stream_frequency_bottom'); ?></th> + <th class="cel_streamname"><?php echo Ajax::text('?page=browse&action=set_sort&browse_id=' . $browse->id . '&sort=name', T_('Name'),'live_stream_sort_name_bottom'); ?></th> + <th class="cel_callsign"><?php echo Ajax::text('?page=browse&action=set_sort&browse_id=' . $browse->id . '&sort=call_sign', T_('Callsign'),'live_stream_call_sign_bottom'); ?></th> + <th class="cel_frequency"><?php echo Ajax::text('?page=browse&action=set_sort&browse_id=' . $browse->id . '&sort=frequency', T_('Frequency'),'live_stream_frequency_bottom'); ?></th> <th class="cel_genre"><?php echo T_('Tag'); ?></th> <th class="cel_action"><?php echo T_('Action'); ?> </th> </tr> diff --git a/templates/show_playlists.inc.php b/templates/show_playlists.inc.php index 64704b83..03fccfa7 100644 --- a/templates/show_playlists.inc.php +++ b/templates/show_playlists.inc.php @@ -32,10 +32,10 @@ </colgroup> <tr class="th-top"> <th class="cel_add"><?php echo T_('Add'); ?></th> - <th class="cel_playlist"><?php echo Ajax::text('?page=browse&action=set_sort&type=playlist&sort=name', T_('Playlist Name'),'playlist_sort_name'); ?></th> + <th class="cel_playlist"><?php echo Ajax::text('?page=browse&action=set_sort&browse_id=' . $browse->id . '&type=playlist&sort=name', T_('Playlist Name'),'playlist_sort_name'); ?></th> <th class="cel_type"> </th> <th class="cel_songs"><?php echo T_('# Songs'); ?></th> - <th class="cel_owner"><?php echo Ajax::text('?page=browse&action=set_sort&type=playlist&sort=user', T_('Owner'),'playlist_sort_owner'); ?></th> + <th class="cel_owner"><?php echo Ajax::text('?page=browse&action=set_sort&browse_id=' . $browse->id . '&type=playlist&sort=user', T_('Owner'),'playlist_sort_owner'); ?></th> <th class="cel_action"><?php echo T_('Actions'); ?></th> </tr> <?php @@ -55,10 +55,10 @@ foreach ($object_ids as $playlist_id) { <?php } ?> <tr class="th-bottom"> <th class="cel_add"><?php echo T_('Add'); ?></th> - <th class="cel_playlist"><?php echo Ajax::text('?page=browse&action=set_sort&type=playlist&sort=name', T_('Playlist Name'),'playlist_sort_name_bottom'); ?></th> + <th class="cel_playlist"><?php echo Ajax::text('?page=browse&action=set_sort&browse_id=' . $browse->id . '&type=playlist&sort=name', T_('Playlist Name'),'playlist_sort_name_bottom'); ?></th> <th class="cel_type"> </th> <th class="cel_songs"><?php echo T_('# Songs'); ?></th> - <th class="cel_owner"><?php echo Ajax::text('?page=browse&action=set_sort&type=playlist&sort=user', T_('Owner'),'playlist_sort_owner_bottom'); ?></th> + <th class="cel_owner"><?php echo Ajax::text('?page=browse&action=set_sort&browse_id=' . $browse->id . '&type=playlist&sort=user', T_('Owner'),'playlist_sort_owner_bottom'); ?></th> <th class="cel_action"><?php echo T_('Actions'); ?></th> </tr> </table> diff --git a/templates/show_smartplaylists.inc.php b/templates/show_smartplaylists.inc.php index 456c6302..272a8691 100644 --- a/templates/show_smartplaylists.inc.php +++ b/templates/show_smartplaylists.inc.php @@ -32,9 +32,9 @@ </colgroup> <tr class="th-top"> <th class="cel_add"><?php echo T_('Add'); ?></th> - <th class="cel_playlist"><?php echo Ajax::text('?page=browse&action=set_sort&type=smartplaylist&sort=name', T_('Playlist Name'),'playlist_sort_name'); ?></th> + <th class="cel_playlist"><?php echo Ajax::text('?page=browse&action=set_sort&browse_id=' . $browse->id . '&type=smartplaylist&sort=name', T_('Playlist Name'),'playlist_sort_name'); ?></th> <th class="cel_type"> </th> - <th class="cel_owner"><?php echo Ajax::text('?page=browse&action=set_sort&type=smartplaylist&sort=user', T_('Owner'),'playlist_sort_owner'); ?></th> + <th class="cel_owner"><?php echo Ajax::text('?page=browse&action=set_sort&browse_id=' . $browse->id . '&type=smartplaylist&sort=user', T_('Owner'),'playlist_sort_owner'); ?></th> <th class="cel_action"><?php echo T_('Actions'); ?></th> </tr> <?php @@ -53,9 +53,9 @@ foreach ($object_ids as $playlist_id) { <?php } ?> <tr class="th-bottom"> <th class="cel_add"><?php echo T_('Add'); ?></th> - <th class="cel_playlist"><?php echo Ajax::text('?page=browse&action=set_sort&type=playlist&sort=name', T_('Playlist Name'),'playlist_sort_name_bottom'); ?></th> + <th class="cel_playlist"><?php echo Ajax::text('?page=browse&action=set_sort&browse_id=' . $browse->id . '&type=playlist&sort=name', T_('Playlist Name'),'playlist_sort_name_bottom'); ?></th> <th class="cel_type"> </th> - <th class="cel_owner"><?php echo Ajax::text('?page=browse&action=set_sort&type=playlist&sort=user', T_('Owner'),'playlist_sort_owner_bottom'); ?></th> + <th class="cel_owner"><?php echo Ajax::text('?page=browse&action=set_sort&browse_id=' . $browse->id . '&type=playlist&sort=user', T_('Owner'),'playlist_sort_owner_bottom'); ?></th> <th class="cel_action"><?php echo T_('Actions'); ?></th> </tr> </table> diff --git a/templates/show_songs.inc.php b/templates/show_songs.inc.php index 527cc076..6eddb088 100644 --- a/templates/show_songs.inc.php +++ b/templates/show_songs.inc.php @@ -65,12 +65,12 @@ $web_path = Config::get('web_path'); <?php } ?> <tr class="th-bottom"> <th class="cel_add"><?php echo T_('Add'); ?></th> - <th class="cel_song"><?php echo Ajax::text('?page=browse&action=set_sort&type=song&sort=title', T_('Song Title'),'sort_song_title_bottom'); ?></th> - <th class="cel_artist"><?php echo Ajax::text('?page=browse&action=set_sort&type=song&sort=artist', T_('Artist'),'sort_song_artist_bottom'); ?></th> - <th class="cel_album"><?php echo Ajax::text('?page=browse&action=set_sort&type=song&sort=album', T_('Album'),'sort_song_album_bottom'); ?></th> + <th class="cel_song"><?php echo Ajax::text('?page=browse&action=set_sort&browse_id=' . $browse->id . '&type=song&sort=title', T_('Song Title'),'sort_song_title_bottom'); ?></th> + <th class="cel_artist"><?php echo Ajax::text('?page=browse&action=set_sort&browse_id=' . $browse->id . '&type=song&sort=artist', T_('Artist'),'sort_song_artist_bottom'); ?></th> + <th class="cel_album"><?php echo Ajax::text('?page=browse&action=set_sort&browse_id=' . $browse->id . '&type=song&sort=album', T_('Album'),'sort_song_album_bottom'); ?></th> <th class="cel_tags"><?php echo T_('Tags'); ?></th> - <th class="cel_track"><?php echo Ajax::text('?page=browse&action=set_sort&type=song&sort=track', T_('Track'),'sort_song_track_bottom'); ?></th> - <th class="cel_time"><?php echo Ajax::text('?page=browse&action=set_sort&type=song&sort=time', T_('Time'),'sort_song_time_bottom'); ?></th> + <th class="cel_track"><?php echo Ajax::text('?page=browse&action=set_sort&browse_id=' . $browse->id . '&type=song&sort=track', T_('Track'),'sort_song_track_bottom'); ?></th> + <th class="cel_time"><?php echo Ajax::text('?page=browse&action=set_sort&browse_id=' . $browse->id . '&type=song&sort=time', T_('Time'),'sort_song_time_bottom'); ?></th> <?php if (Config::get('ratings')) { ?> <th class="cel_rating"><?php echo T_('Rating'); ?></th> <?php } ?> diff --git a/templates/show_users.inc.php b/templates/show_users.inc.php index 55ede6fd..ce988b64 100644 --- a/templates/show_users.inc.php +++ b/templates/show_users.inc.php @@ -37,9 +37,9 @@ $web_path = Config::get('web_path'); <col id="col_online" /> </colgroup> <tr class="th-top"> - <th class="cel_username"><?php echo Ajax::text('?page=browse&action=set_sort&type=user&sort=fullname', T_('Fullname'),'users_sort_fullname'); ?>( <?php echo Ajax::text('?page=browse&action=set_sort&type=user&sort=username', T_('Username'),'users_sort_username');?>)</th> - <th class="cel_lastseen"><?php echo Ajax::text('?page=browse&action=set_sort&type=user&sort=last_seen', T_('Last Seen'),'users_sort_lastseen'); ?></th> - <th class="cel_registrationdate"><?php echo Ajax::text('?page=browse&action=set_sort&type=user&sort=create_date', T_('Registration Date'),'users_sort_createdate'); ?></th> + <th class="cel_username"><?php echo Ajax::text('?page=browse&action=set_sort&browse_id=' . $browse->id . '&type=user&sort=fullname', T_('Fullname'),'users_sort_fullname'); ?>( <?php echo Ajax::text('?page=browse&action=set_sort&type=user&sort=username', T_('Username'),'users_sort_username');?>)</th> + <th class="cel_lastseen"><?php echo Ajax::text('?page=browse&action=set_sort&browse_id=' . $browse->id . '&type=user&sort=last_seen', T_('Last Seen'),'users_sort_lastseen'); ?></th> + <th class="cel_registrationdate"><?php echo Ajax::text('?page=browse&action=set_sort&browse_id=' . $browse->id . '&type=user&sort=create_date', T_('Registration Date'),'users_sort_createdate'); ?></th> <th class="cel_activity"><?php echo T_('Activity'); ?></th> <?php if (Config::get('track_user_ip')) { ?> <th class="cel_lastip"><?php echo T_('Last Ip'); ?></th> @@ -59,9 +59,9 @@ foreach ($object_ids as $user_id) { </tr> <?php } //end foreach users ?> <tr class="th-bottom"> - <th class="cel_username"><?php echo Ajax::text('?page=browse&action=set_sort&type=user&sort=fullname', T_('Fullname'),'users_sort_fullname1'); ?>( <?php echo Ajax::text('?page=browse&action=set_sort&type=user&sort=username', T_('Username'),'users_sort_username1');?>)</th> - <th class="cel_lastseen"><?php echo Ajax::text('?page=browse&action=set_sort&type=user&sort=last_seen', T_('Last Seen'),'users_sort_lastseen1'); ?></th> - <th class="cel_registrationdate"><?php echo Ajax::text('?page=browse&action=set_sort&type=user&sort=create_date', T_('Registration Date'),'users_sort_createdate1'); ?></th> + <th class="cel_username"><?php echo Ajax::text('?page=browse&action=set_sort&browse_id=' . $browse->id . '&type=user&sort=fullname', T_('Fullname'),'users_sort_fullname1'); ?>( <?php echo Ajax::text('?page=browse&action=set_sort&type=user&sort=username', T_('Username'),'users_sort_username1');?>)</th> + <th class="cel_lastseen"><?php echo Ajax::text('?page=browse&action=set_sort&browse_id=' . $browse->id . '&type=user&sort=last_seen', T_('Last Seen'),'users_sort_lastseen1'); ?></th> + <th class="cel_registrationdate"><?php echo Ajax::text('?page=browse&action=set_sort&browse_id=' . $browse->id . '&type=user&sort=create_date', T_('Registration Date'),'users_sort_createdate1'); ?></th> <th class="cel_activity"><?php echo T_('Activity'); ?></th> <?php if (Config::get('track_user_ip')) { ?> <th class="cel_lastip"><?php echo T_('Last Ip'); ?></th> diff --git a/templates/show_videos.inc.php b/templates/show_videos.inc.php index 7b4f6c75..61715e2f 100644 --- a/templates/show_videos.inc.php +++ b/templates/show_videos.inc.php @@ -35,10 +35,10 @@ $web_path = Config::get('web_path'); </colgroup> <tr class="th-top"> <th class="cel_add"><?php echo T_('Add'); ?></th> - <th class="cel_title"><?php echo Ajax::text('?page=browse&action=set_sort&type=video&sort=title', T_('Title'),'sort_video_title'); ?></th> - <th class="cel_codec"><?php echo Ajax::text('?page=browse&action=set_sort&type=video&sort=codec', T_('Codec'),'sort_video_codec'); ?></th> - <th class="cel_resolution"><?php echo Ajax::text('?page=browse&action=set_sort&type=video&sort=resolution', T_('Resolution'),'sort_video_rez'); ?></th> - <th class="cel_length"><?php echo Ajax::text('?page=browse&action=set_sort&type=video&sort=length', T_('Time'),'sort_video_length'); ?></th> + <th class="cel_title"><?php echo Ajax::text('?page=browse&action=set_sort&browse_id=' . $browse->id . '&type=video&sort=title', T_('Title'),'sort_video_title'); ?></th> + <th class="cel_codec"><?php echo Ajax::text('?page=browse&action=set_sort&browse_id=' . $browse->id . '&type=video&sort=codec', T_('Codec'),'sort_video_codec'); ?></th> + <th class="cel_resolution"><?php echo Ajax::text('?page=browse&action=set_sort&browse_id=' . $browse->id . '&type=video&sort=resolution', T_('Resolution'),'sort_video_rez'); ?></th> + <th class="cel_length"><?php echo Ajax::text('?page=browse&action=set_sort&browse_id=' . $browse->id . '&type=video&sort=length', T_('Time'),'sort_video_length'); ?></th> <th class="cel_tags"><?php echo T_('Tags'); ?></th> <th class="cel_action"><?php echo T_('Action'); ?></th> </tr> @@ -59,10 +59,10 @@ foreach ($object_ids as $video_id) { <?php } ?> <tr class="th-bottom"> <th class="cel_add"><?php echo T_('Add'); ?></th> - <th class="cel_title"><?php echo T_('Title'); ?></th> - <th class="cel_codec"><?php echo T_('Codec'); ?></th> - <th class="cel_resolution"><?php echo T_('Resolution'); ?></th> - <th class="cel_length"><?php echo Ajax::text('?page=browse&action=set_sort&type=video&sort=length', T_('Time'),'sort_video_length_bottom'); ?></th> + <th class="cel_title"><?php echo Ajax::text('?page=browse&action=set_sort&browse_id=' . $browse->id . '&type=video&sort=title', T_('Title'),'sort_video_title'); ?></th> + <th class="cel_codec"><?php echo Ajax::text('?page=browse&action=set_sort&browse_id=' . $browse->id . '&type=video&sort=codec', T_('Codec'),'sort_video_codec'); ?></th> + <th class="cel_resolution"><?php echo Ajax::text('?page=browse&action=set_sort&browse_id=' . $browse->id . '&type=video&sort=resolution', T_('Resolution'),'sort_video_rez'); ?></th> + <th class="cel_length"><?php echo Ajax::text('?page=browse&action=set_sort&browse_id=' . $browse->id . '&type=video&sort=length', T_('Time'),'sort_video_length'); ?></th> <th class="cel_tags"><?php echo T_('Tags'); ?></th> <th class="cel_action"><?php echo T_('Action'); ?></th> </tr> |