diff options
author | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2009-02-02 04:25:25 +0000 |
---|---|---|
committer | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2009-02-02 04:25:25 +0000 |
commit | 00effbf55451016e5863e27de93344dfb4a50216 (patch) | |
tree | fe1300051d65f14fd34dd53bc7148a47c8e3d5a6 /templates | |
parent | 0a2b41b143419e85b968a675c8b83a1c15615399 (diff) | |
download | ampache-00effbf55451016e5863e27de93344dfb4a50216.tar.gz ampache-00effbf55451016e5863e27de93344dfb4a50216.tar.bz2 ampache-00effbf55451016e5863e27de93344dfb4a50216.zip |
Add very basic buggy as crap video support, fix a few other minor bugs with playlists and random elements
Diffstat (limited to 'templates')
-rw-r--r-- | templates/rightbar.inc.php | 4 | ||||
-rw-r--r-- | templates/show_debug.inc.php | 12 | ||||
-rw-r--r-- | templates/show_video_row.inc.php | 25 | ||||
-rw-r--r-- | templates/show_videos.inc.php | 54 | ||||
-rw-r--r-- | templates/sidebar_home.inc.php | 1 |
5 files changed, 93 insertions, 3 deletions
diff --git a/templates/rightbar.inc.php b/templates/rightbar.inc.php index 0ee60c87..990d4f20 100644 --- a/templates/rightbar.inc.php +++ b/templates/rightbar.inc.php @@ -88,8 +88,10 @@ $objects = array_slice($objects,0,100); } + $normal_array = array('radio','song','video'); + foreach ($objects as $uid=>$object_data) { - if ($object_data['1'] == 'radio' || $object_data['1'] == 'song') { + if (in_array($object_data['1'],$normal_array)) { $object = new $object_data['1']($object_data['0']); $object->format(); } diff --git a/templates/show_debug.inc.php b/templates/show_debug.inc.php index f8a9a71d..afe81f6e 100644 --- a/templates/show_debug.inc.php +++ b/templates/show_debug.inc.php @@ -21,10 +21,18 @@ */ ?> <?php show_box_top(_('Debug Tools')); ?> +<div id="information_actions"> <ul> - <li><a href="<?php echo Config::get('web_path'); ?>/admin/system.php?action=generate_config"><?php echo _('Generate Configuration'); ?></a></li> - <li><a href="<?php echo Config::get('web_path'); ?>/admin/system.php?action=reset_db_charset"><?php echo _('Set Database Charset'); ?></a></li> +<li> + <a href="<?php echo Config::get('web_path'); ?>/admin/system.php?action=generate_config"><?php echo get_user_icon('cog'); ?></a> + <?php echo _('Generate Configuration'); ?> +</li> +<li> + <a href="<?php echo Config::get('web_path'); ?>/admin/system.php?action=reset_db_charset"><?php echo get_user_icon('server_lightning'); ?></a> + <?php echo _('Set Database Charset'); ?> +</li> </ul> +</div> <?php show_box_bottom(); ?> <?php show_box_top(_('PHP Settings')); ?> <table class="tabledata" cellpadding="0" cellspacing="0"> diff --git a/templates/show_video_row.inc.php b/templates/show_video_row.inc.php new file mode 100644 index 00000000..16fed284 --- /dev/null +++ b/templates/show_video_row.inc.php @@ -0,0 +1,25 @@ +<?php +/* + + Copyright (c) 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. + +*/ +?> +<td class="cel_add"> + <?php echo Ajax::button('?action=basket&type=video&id=' . $video->id,'add',_('Add'),'add_video_' . $video->id); ?> +</td> +<td class="cel_title"><?php echo $video->f_title; ?></td> diff --git a/templates/show_videos.inc.php b/templates/show_videos.inc.php new file mode 100644 index 00000000..cad7ea19 --- /dev/null +++ b/templates/show_videos.inc.php @@ -0,0 +1,54 @@ +<?php +/* + + Copyright (c) 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. +*/ + +$web_path = Config::get('web_path'); + +?> +<?php require Config::get('prefix') . '/templates/list_header.inc.php'; ?> +<table class="tabledata" cellpadding="0" cellspacing="0"> +<colgroup> + <col id="col_add" /> + <col id="col_title" /> +</colgroup> +<tr class="th-top"> + <th class="cel_add"><?php echo _('Add'); ?></th> + <th class="cel_title"><?php echo _('Title'); ?></th> +</tr> +<?php +/* Foreach through every artist that has been passed to us */ +foreach ($object_ids as $video_id) { + $video = new Video($video_id); + $video->format(); +?> +<tr id="video_<?php echo $video->id; ?>" class="<?php echo flip_class(); ?>"> + <?php require Config::get('prefix') . '/templates/show_video_row.inc.php'; ?> +</tr> +<?php } //end foreach ?> +<?php if (!count($object_ids)) { ?> +<tr class="<?php echo flip_class(); ?>"> + <td colspan="5"><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_title"><?php echo _('Title'); ?></th> +</tr> +</table> +<?php require Config::get('prefix') . '/templates/list_header.inc.php'; ?> diff --git a/templates/sidebar_home.inc.php b/templates/sidebar_home.inc.php index 01c7d076..dc84f2b5 100644 --- a/templates/sidebar_home.inc.php +++ b/templates/sidebar_home.inc.php @@ -35,6 +35,7 @@ $ajax_info = Config::get('ajax_url'); $web_path = Config::get('web_path'); <!-- <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> + <li id="sb_browse_bb_Video"><a href="<?php echo $web_path; ?>/browse.php?action=video"><?php echo _('Video'); ?></a></li> </ul> </li> <?php if (count($allowed_filters)) { ?> |