~ubuntu-branches/debian/sid/ampache/sid

« back to all changes in this revision

Viewing changes to templates/show_preference_box.inc.php

  • Committer: Package Import Robot
  • Author(s): Charlie Smotherman
  • Date: 2013-08-27 13:19:48 UTC
  • mfrom: (1.2.9)
  • Revision ID: package-import@ubuntu.com-20130827131948-1czew0zxn6u70dtv
Tags: 3.6-rzb2752+dfsg-1
* New upsteam snapshot.  Contains important bug fixes to the installer.
* Correct typo in ampache-common.postrm.
* Remove courtousy copy of php-getid3, during repack.  Closes: #701526
* Update package to use dh_linktree to make the needed sym links to the
  needed system libs that were removed during repack.
* Update debian/rules to reflect upstreams removing/moving of modules.
* Update debian/ampache-common.install to reflect upstreams removal of files.
* Updated to use new apache2.4 API. Closes: #669756
* Updated /debian/po/de.po thx David Prévot for the patch.  Closes:  #691963
* M3U import is now ordered, fixed upstream.  Closes: #684984
* Text input area has been resized so IPv6 addresses will now fit, fixed
  upstream.  Closes:  #716230
* Added ampache-common.preinst to make sure that the courtousy copies of code
  dirs are empty so dh_linktree can do it's magic on upgrades.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
<?php
2
 
/* vim:set tabstop=8 softtabstop=8 shiftwidth=8 noexpandtab: */
 
2
/* vim:set softtabstop=4 shiftwidth=4 expandtab: */
3
3
/**
4
 
 * Show Preference Box
5
 
 *
6
4
 *
7
5
 * LICENSE: GNU General Public License, version 2 (GPLv2)
8
 
 * Copyright (c) 2001 - 2011 Ampache.org All Rights Reserved
 
6
 * Copyright 2001 - 2013 Ampache.org
9
7
 *
10
8
 * This program is free software; you can redistribute it and/or
11
9
 * modify it under the terms of the GNU General Public License v2
20
18
 * along with this program; if not, write to the Free Software
21
19
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
22
20
 *
23
 
 * @package     Ampache
24
 
 * @copyright   2001 - 2011 Ampache.org
25
 
 * @license     http://opensource.org/licenses/gpl-2.0 GPLv2
26
 
 * @link        http://www.ampache.org/
27
21
 */
28
22
 
29
23
/* I'm cheating a little here, check to see if we want to show the
30
24
 * Apply to All button on this page
31
25
 */
32
26
if ((Access::check('interface','100') OR !Config::get('use_auth')) AND $_REQUEST['action'] == 'admin') {
33
 
        $is_admin = true;
 
27
    $is_admin = true;
34
28
}
35
29
?>
36
30
<h4><?php echo T_($preferences['title']); ?></h4>
38
32
<colgroup>
39
33
  <col id="col_preference" />
40
34
  <col id="col_value" />
41
 
        <?php if ($is_admin) { ?>
 
35
    <?php if ($is_admin) { ?>
42
36
  <col id="col_applytoall" />
43
37
  <col id="col_level" />
44
 
        <?php } ?>
 
38
    <?php } ?>
45
39
</colgroup>
46
40
<tr class="th-top">
47
 
        <th class="cel_preference"><?php echo T_('Preference'); ?></th>
48
 
        <th class="cel_value"><?php echo T_('Value'); ?></th>
49
 
        <?php if ($is_admin) { ?>
50
 
        <th class="cel_applytoall"><?php echo T_('Apply to All'); ?></th>
51
 
        <th class="cel_level"><?php echo T_('Access Level'); ?></th>
52
 
        <?php } ?>
 
41
    <th class="cel_preference"><?php echo T_('Preference'); ?></th>
 
42
    <th class="cel_value"><?php echo T_('Value'); ?></th>
 
43
    <?php if ($is_admin) { ?>
 
44
    <th class="cel_applytoall"><?php echo T_('Apply to All'); ?></th>
 
45
    <th class="cel_level"><?php echo T_('Access Level'); ?></th>
 
46
    <?php } ?>
53
47
</tr>
54
48
<?php foreach ($preferences['prefs'] as $pref) { ?>
55
 
        <tr class="<?php echo flip_class(); ?>">
56
 
                <td class="cel_preference"><?php echo T_($pref['description']); ?></td>
57
 
                <td class="cel_value">
58
 
                        <?php create_preference_input($pref['name'], $pref['value']); ?>
59
 
                </td>
60
 
                <?php if ($is_admin) { ?>
61
 
                        <td class="cel_applytoall"><input type="checkbox" name="check_<?php echo $pref['name']; ?>" value="1" /></td>
62
 
                        <td class="cel_level">
63
 
                                <?php $name = 'on_' . $pref['level']; ${$name} = 'selected="selected"';  ?>
64
 
                                <select name="level_<?php echo $pref['name']; ?>">
65
 
                                        <option value="5" <?php echo $on_5; ?>><?php echo T_('Guest'); ?></option>
66
 
                                        <option value="25" <?php echo $on_25; ?>><?php echo T_('User'); ?></option>
67
 
                                        <option value="50" <?php echo $on_50; ?>><?php echo T_('Content Manager'); ?></option>
68
 
                                        <option value="75" <?php echo $on_75; ?>><?php echo T_('Catalog Manager'); ?></option>
69
 
                                        <option value="100" <?php echo $on_100; ?>><?php echo T_('Admin'); ?></option>
70
 
                                </select>
71
 
                                <?php unset(${$name}); ?>
72
 
                        </td>
73
 
                <?php } ?>
74
 
        </tr>
 
49
    <tr class="<?php echo UI::flip_class(); ?>">
 
50
        <td class="cel_preference"><?php echo T_($pref['description']); ?></td>
 
51
        <td class="cel_value">
 
52
            <?php create_preference_input($pref['name'], $pref['value']); ?>
 
53
        </td>
 
54
        <?php if ($is_admin) { ?>
 
55
            <td class="cel_applytoall"><input type="checkbox" name="check_<?php echo $pref['name']; ?>" value="1" /></td>
 
56
            <td class="cel_level">
 
57
                <?php $name = 'on_' . $pref['level']; ${$name} = 'selected="selected"';  ?>
 
58
                <select name="level_<?php echo $pref['name']; ?>">
 
59
                    <option value="5" <?php echo $on_5; ?>><?php echo T_('Guest'); ?></option>
 
60
                    <option value="25" <?php echo $on_25; ?>><?php echo T_('User'); ?></option>
 
61
                    <option value="50" <?php echo $on_50; ?>><?php echo T_('Content Manager'); ?></option>
 
62
                    <option value="75" <?php echo $on_75; ?>><?php echo T_('Catalog Manager'); ?></option>
 
63
                    <option value="100" <?php echo $on_100; ?>><?php echo T_('Admin'); ?></option>
 
64
                </select>
 
65
                <?php unset(${$name}); ?>
 
66
            </td>
 
67
        <?php } ?>
 
68
    </tr>
75
69
<?php } // End foreach ($preferences['prefs'] as $pref) ?>
76
70
<tr class="th-bottom">
77
 
        <th class="cel_preference"><?php echo T_('Preference'); ?></th>
78
 
        <th class="cel_value"><?php echo T_('Value'); ?></th>
79
 
        <?php if ($is_admin) { ?>
80
 
        <th class="cel_applytoall"><?php echo T_('Apply to All'); ?></th>
81
 
        <th class="cel_level"><?php echo T_('Access Level'); ?></th>
82
 
        <?php } ?>
 
71
    <th class="cel_preference"><?php echo T_('Preference'); ?></th>
 
72
    <th class="cel_value"><?php echo T_('Value'); ?></th>
 
73
    <?php if ($is_admin) { ?>
 
74
    <th class="cel_applytoall"><?php echo T_('Apply to All'); ?></th>
 
75
    <th class="cel_level"><?php echo T_('Access Level'); ?></th>
 
76
    <?php } ?>
83
77
</tr>
84
78
</table>