diff options
author | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2005-10-13 07:05:18 +0000 |
---|---|---|
committer | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2005-10-13 07:05:18 +0000 |
commit | 1a83ac5ab345473e7c0707745f1ca6b3d8c84e53 (patch) | |
tree | 52a68209f4593d82ff8e8168d66724962ee235c1 /templates/show_preferences.inc | |
parent | 71cda1f4e081847e2b2fec8fb25b14eaa44b23ff (diff) | |
download | ampache-1a83ac5ab345473e7c0707745f1ca6b3d8c84e53.tar.gz ampache-1a83ac5ab345473e7c0707745f1ca6b3d8c84e53.tar.bz2 ampache-1a83ac5ab345473e7c0707745f1ca6b3d8c84e53.zip |
tweaked show_preferences to correctly show the apply to all button thingy
Diffstat (limited to 'templates/show_preferences.inc')
-rw-r--r-- | templates/show_preferences.inc | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/templates/show_preferences.inc b/templates/show_preferences.inc index 079ff737..bf04c980 100644 --- a/templates/show_preferences.inc +++ b/templates/show_preferences.inc @@ -25,26 +25,33 @@ @discussion shows edit page for preferences */ + +/* I'm cheating a little hear, check to see if we want to show the + * Apply to All button on this page + */ +if ($GLOBALS['user']->has_access(100) AND $user_id == '-1' AND conf('use_auth')) { + $show_apply_to_all = true; +} + ?> <div class="header1"> <?php echo _("Editing"); ?> <?php echo $fullname; ?> <?php echo _("preferences"); ?> <?php if ($user->has_access(100)) { ?> [<a href="<?php echo conf('web_path'); ?>/admin/preferences.php?action=fix_preferences&user_id=<?php echo $user_id; ?>"><?php echo _("Rebuild Preferences"); ?></a>] - <? } ?> + <?php } ?> </div> <form method="post" name="preferences" action="<?php echo conf('web_path'); ?><?php echo $target; ?>" enctype="multipart/form-data"> <table class="border" border="0" cellpadding="0" cellspacing="0"> <tr class="table-header"> <th><?php echo _("Preference"); ?></th> <th><?php echo _("Value"); ?></th> - <?php if ($user->has_access(100) AND $user_id == '0') { ?> + <?php if ($show_apply_to_all) { ?> <th><?php echo _("Type"); ?></th> <th><?php echo _("Apply to All"); ?></th> <?php } ?> </tr> <?php - foreach ($preferences as $pref) { if ($pref->type == "system") { $table_break = 1; @@ -72,7 +79,7 @@ </table> </td> - <?php if ($user->has_access(100) AND $user_id == '0') { ?> + <?php if ($show_apply_to_all) { ?> <td><?php echo $pref->type; ?></td> <td align="center"><input type="checkbox" name="check_<?php echo $pref->name; ?>" value="1" /></td> <?php } ?> |