diff options
author | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2007-12-02 00:25:07 +0000 |
---|---|---|
committer | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2007-12-02 00:25:07 +0000 |
commit | 6a335845ccd2650e2444080a5faa5dc6151ab993 (patch) | |
tree | 29bb4c54b00e24f13db2fe38adc002492c7d151b /templates | |
parent | 362610c13217a9ee364f97262c2fc878d97c335a (diff) | |
download | ampache-6a335845ccd2650e2444080a5faa5dc6151ab993.tar.gz ampache-6a335845ccd2650e2444080a5faa5dc6151ab993.tar.bz2 ampache-6a335845ccd2650e2444080a5faa5dc6151ab993.zip |
fixed democratic play ordering along with some misc play isues with it, limited object on rightbar to 100 also started fixing the user registration, which I had forgotten about
Diffstat (limited to 'templates')
-rw-r--r-- | templates/install.css | 11 | ||||
-rw-r--r-- | templates/rightbar.inc.php | 12 | ||||
-rw-r--r-- | templates/show_user_registration.inc.php | 215 |
3 files changed, 116 insertions, 122 deletions
diff --git a/templates/install.css b/templates/install.css index c9944ef4..9ee3ab13 100644 --- a/templates/install.css +++ b/templates/install.css @@ -7,6 +7,13 @@ body { background: #FFFFFF url(../images/top_bg.jpg) repeat-x top left; } +h3 { + text-align:left; + border-bottom: 1px dotted #cccccc; + padding-left: 10px; +} + + /* Header */ #header { width: 90%; @@ -103,8 +110,8 @@ margin:10px 10 10px 10px; /* Bottom */ #bottom { - border-top: 1px dotted #cccccc; - margin-top: 10px; + border-top: 1px dotted #cccccc; + margin-top: 10px; margin-bottom: 10px; padding:5px; } diff --git a/templates/rightbar.inc.php b/templates/rightbar.inc.php index 85d935c5..bf1322e1 100644 --- a/templates/rightbar.inc.php +++ b/templates/rightbar.inc.php @@ -75,6 +75,13 @@ <?php //FIXME :: this feels kludgy $objects = $GLOBALS['user']->playlist->get_items(); + + // Limit the number of objects we show here + if (count($objects) > 100) { + $truncated = (count($objects) - 100); + $objects = array_slice($objects,0,100); + } + foreach ($objects as $uid=>$object_data) { if ($object_data['1'] == 'radio' || $object_data['1'] == 'song') { $object = new $object_data['1']($object_data['0']); @@ -92,6 +99,11 @@ <?php } if (!count($objects)) { ?> <li class="error"><?php echo _('Not Enough Data'); ?></li> <?php } ?> +<?php if ($truncated) { ?> + <li class="<?php echo flip_class(); ?>"> + <?php echo $truncated . ' ' . _('More'); ?>... + </li> +<?php } ?> </ul> diff --git a/templates/show_user_registration.inc.php b/templates/show_user_registration.inc.php index d150c2da..29cf8f9f 100644 --- a/templates/show_user_registration.inc.php +++ b/templates/show_user_registration.inc.php @@ -1,13 +1,13 @@ <?php /* - Copyright (c) 2001 - 2006 Ampache.org + Copyright (c) 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 - as published by the Free Software Foundation; either version 2 - of the License, or (at your option) any later version. + as published by the Free Software Foundation; version 2 + of the License. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -19,30 +19,29 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -$htmllang = str_replace("_","-",conf('lang')); +$htmllang = str_replace("_","-",Config::get('lang')); +$web_path = Config::get('web_path'); ?> - <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $htmllang; ?>" lang="<?php echo $htmllang; ?>"> <head> -<link rel="shortcut icon" href="<?php echo conf('web_path'); ?>/favicon.ico" /> -<meta http-equiv="Content-Type" content="text/html; charset=<?php echo conf('site_charset'); ?>" /> -<link rel="stylesheet" href="<?php echo conf('web_path'); ?><?php echo conf('theme_path'); ?>/templates/default.css" type="text/css" /> -<title><?php echo conf('site_title'); ?> - <?php echo $location['title']; ?></title> +<meta http-equiv="Content-Type" content="text/html; charset=<?php echo Config::get('site_charset'); ?>" /> +<title><?php echo Config::get('site_title'); ?> - <?php echo _('Registration'); ?></title> +</head> +<body bgcolor="#f0f0f0"> +<link rel="stylesheet" href="<?php echo Config::get('web_path'); ?>/templates/install.css" type="text/css" media="screen" /> +<link rel="shortcut icon" href="<?php echo Config::get('web_path'); ?>/favicon.ico" /> +<div id="header"> +<h1><?php echo Config::get('site_title'); ?></h1> +<?php echo _('Registration'); ?>... +</div> </head> <body> -<script src="<?php echo conf('web_path'); ?>/lib/javascript-base.js" language="javascript" type="text/javascript"></script> +<script src="<?php echo $web_path; ?>/lib/javascript-base.js" language="javascript" type="text/javascript"></script> +<script src="<?php echo $web_path; ?>/modules/kajax/ajax.js" language="javascript" type="text/javascript"></script> +<script src="<?php echo $web_path; ?>/modules/prototype/prototype.js" language="javascript" type="text/javascript"></script> <div id="maincontainer"> -<!-- This is the topbar row --> -<div id="topbar"> - <div align="center"> - <a href="http://www.ampache.org/"> - <img src="<?php echo conf('web_path'); ?><?php echo conf('theme_path'); ?>/images/ampache.gif" title="Ampache: For the love of music" alt="Ampache: For the love of music" /> - </a> - </div> -</div> -<br /><br /> <?php $action = scrub_in($_REQUEST['action']); @@ -50,119 +49,95 @@ $fullname = scrub_in($_REQUEST['fullname']); $username = scrub_in($_REQUEST['username']); $email = scrub_in($_REQUEST['email']); ?> -<div align="center"> -<?php show_box_top(_('Ampache New User Registration')); ?> -<form name="update_user" method="post" action="<?php echo conf('web_path'); ?>/register.php" enctype="multipart/form-data"> -<table width='700px' cellpadding='0' cellspacing='0'> +<form name="update_user" method="post" action="<?php echo $web_path; ?>/register.php" enctype="multipart/form-data"> <?php /* If we should show the user agreement */ -if(conf('user_agreement')){ ?> - <tr> - <td height="15px"> - </td> - </tr> +if (Config::get('user_agreement')) { ?> +<h3><?php echo _('User Agreement'); ?></h3> +<table cellpadding="2" cellspacing="0"> +<tr> + <td> + <?php show_registration_agreement(); ?> + </td> +</tr> +<tr> + <td> + <input type='checkbox' name='accept_agreement'> <?php echo _('I Accept'); ?> + <?php $GLOBALS['error']->print_error('user_agreement'); ?> + </td> +</tr> +</table> +<?php } // end if(conf('user_agreement')) ?> +<h3><?php echo _('User Information'); ?></h3> +<table cellpadding="0" cellspacing="0"> +<tr> + <td align='right'> + <?php echo _('Username'); ?>: + </td> + <td> + <font color='red'>*</font> <input type='text' name='username' id='username' value='<?php echo scrub_out($username); ?>' /> + <?php Error::display('username'); ?> + <?php Error::display('duplicate_user'); ?> + </td> +</tr> +<tr> + <td align='right'> + <?php echo _('Full Name'); ?>: + </td> + <td> + <font color='red'>*</font> <input type='text' name='fullname' id='fullname' value='<?php echo scrub_out($fullname); ?>' /> + <?php Error::display('fullname'); ?> + </td> +</tr> +<tr> + <td align='right'> + <?php echo _('E-mail'); ?>: + </td> + <td> + <font color='red'>*</font> <input type='text' name='email' id='email' value='<?php echo scrub_out($email); ?>' /> + <?php Error::display('email'); ?> + </td> +</tr> +<tr> + <td align='right'> + <?php echo _('Password'); ?>: + </td> + <td> + <font color='red'>*</font> <input type='password' name='password_1' id='password_1' /> + <?php Error::display('password'); ?> + </td> +</tr> +<tr> + <td align='right'> + <?php echo _('Confirm Password'); ?>: + </td> + <td> + <font color='red'>*</font> <input type='password' name='password_2' id='password_2' /> + </td> +</tr> +<?php if (Config::get('captcha_public_reg')) { ?> <tr> - <td> - <table cellpadding="2" cellspacing="0"> - <tr> - <td> - <span class="box-title"><?php echo _('User Agreement'); ?></span> - </td> - </tr> - <tr> - <td> - <?php show_registration_agreement(); ?> - </td> - </tr> - <tr> - <td> - <input type='checkbox' name='accept_agreement'> <?php echo _('I Accept'); ?> - <?php $GLOBALS['error']->print_error('user_agreement'); ?> - </td> - </tr> - </table> - </td> + <?php echo captcha::form(); ?> + <?php Error::display('captcha'); ?> </tr> -<?php } // end if(conf('user_agreement')) ?> +<?php } ?> <tr> - <td height='15'> + <td colspan='2' align='center' height='20'> + <span style="color:red;">* Required fields</span> </td> </tr> <tr> - <td valign="top"> - <p class="box-title"><?php echo _('User Information'); ?></p> - - <table width='99%' cellpadding='0' cellspacing='0'> - <tr> - <td align='right'> - <?php echo _('Username'); ?>: - </td> - <td> - <font color='red'>*</font> <input type='text' name='username' id='username' value='<?php echo scrub_out($username); ?>' /> - <?php $GLOBALS['error']->print_error('username'); ?> - <?php $GLOBALS['error']->print_error('duplicate_user'); ?> - </td> - </tr> - <tr> - <td align='right'> - <?php echo _('Full Name'); ?>: - </td> - <td> - <font color='red'>*</font> <input type='text' name='fullname' id='fullname' value='<?php echo scrub_out($fullname); ?>' /> - <?php $GLOBALS['error']->print_error('fullname'); ?> - </td> - </tr> - <tr> - <td align='right'> - <?php echo _('E-mail'); ?>: - </td> - <td> - <font color='red'>*</font> <input type='text' name='email' id='email' value='<?php echo scrub_out($email); ?>' /> - <?php $GLOBALS['error']->print_error('email'); ?> - </td> - </tr> - <tr> - <td align='right'> - <?php echo _('Password'); ?>: - </td> - <td> - <font color='red'>*</font> <input type='password' name='password_1' id='password_1' /> - <?php $GLOBALS['error']->print_error('password'); ?> - </td> - </tr> - <tr> - <td align='right'> - <?php echo _('Confirm Password'); ?>: - </td> - <td> - <font color='red'>*</font> <input type='password' name='password_2' id='password_2' /> - </td> - </tr> - <?php if (conf('captcha_public_reg')) { ?> - <tr> - <?php echo captcha::form(); ?> - <?php $GLOBALS['error']->print_error('captcha'); ?> - </tr> - <?php } ?> - <tr> - <td colspan='2' align='center' height='20'> - <font color='red'>*</font>Required fields - </td> - </tr> - <tr> - <td colspan='2' align='center' height='50'> - <input type="hidden" name="action" value="add_user" /> - <input type='reset' name='clear_info' id='clear_info' value='<?php echo _('Clear Info'); ?>' /> - <input type='submit' name='submit_registration' id='submit_registration' value='<?php echo _('Register User'); ?>' /> - </td> - </tr> - </table> + <td colspan='2' align='center' height='50'> + <input type="hidden" name="action" value="add_user" /> + <input type='submit' name='submit_registration' id='submit_registration' value='<?php echo _('Register User'); ?>' /> </td> </tr> </table> </form> -<?php show_box_bottom(); ?> -</div> </div><!--end <div>id="maincontainer--> +<div id="bottom"> +<p><b>Ampache</b><br /> +Pour l'Amour de la Musique.</p> +</div> </body> </html> |