1 <?php
defined('SYSPATH') OR die('No direct access allowed.');
3 echo form
::open('user/menu_edit', array('style' => 'margin: 16px', 'id' => 'editmenu_form', 'method' => 'get'));
6 <label
><?php
echo _('Group').': '; ?
>
7 <?php
echo form
::dropdown(array('name' => 'usergroup', 'id' => 'usergroup', 'style' => 'padding-right:10px'), array_merge(array('' => _('Select group')), array_combine(array_keys($groups), array_keys($groups))), $selected_group); ?
></label
>
10 echo _("No limited users found in the system so there's nothing we can do here.");
14 if (isset($selected_group) && !empty($selected_group)) {
15 echo '<p style="padding-top:5px">'.$description.'</p>';
16 echo form
::open('user/menu_update', array( 'style' => 'margin: 16px' ));
17 echo form
::hidden('group', $selected_group);
19 <table style
="width: 512px; padding-top: 10px;">
21 <th
><?php
echo _('Menu item') ?
></th
>
22 <th style
="width: 64px;"><?php
echo sprintf(_('Remove for users in %s'), $selected_group) ?
></th
>
24 foreach ($sections as $section) {
25 $section_str = 'section_'.$section;
26 if (isset($menu[$section_str]) && !empty($menu[$section_str])) {
27 echo '<tr><td colspan="2">
28 <cite>'.html
::specialchars($menu_items[$section_str]).'</cite>
31 foreach ($menu[$section_str] as $pages) {
32 if (!isset($menu_items[$pages])) {
36 if ((isset($remove_items[$section]) && in_array($pages, $remove_items[$section])) ||
!isset($menu_base[$menu_items[$section_str]][$menu_items[$pages]])) {
37 # removed items - dim out
38 $url = $all_items[$menu_items[$section_str]][$menu_items[$pages]];
39 $title = $menu_items[$pages];
41 $icon = 'icons/menu/'.$url[1];
42 /* By some reason, icons names containing . is treated as non-tiled images in menues... otherwise icons is avalible as .png */
43 if( false === strpos($icon,'.') ) $icon .= '.png';
45 echo '<tr id="'.$pages.'"><td style="padding-left: 8px">'.
46 html
::image($this->add_path($icon),array('title' => html
::specialchars($title), 'alt' => html
::specialchars($title), 'style' => 'padding-right:5px')).
47 ' '.html
::specialchars($title).'</td>'."\n";
48 echo '<td style="text-align: center">'.form
::checkbox(array('name' => 'remove_items['.$section.'][]', 'id' => 'checkbox_'.$pages, 'class' => 'menubox'), $pages, true).'</td></tr>';
51 $cb_settings = array('name' => 'remove_items['.$section.'][]', 'id' => 'checkbox_'.$pages, 'class' => 'menubox');
53 # check if anything should be disabled
54 if (isset($untouchable_items) && is_array($untouchable_items) && in_array($pages, $untouchable_items)) {
55 $cb_settings['disabled'] = 1;
57 $url = $menu_base[$menu_items[$section_str]][$menu_items[$pages]];
58 $title = $menu_items[$pages];
60 $icon = 'icons/menu/'.$url[1];
61 /* By some reason, icons names containing . is treated as non-tiled images in menues... otherwise icons is avalible as .png */
62 if( false === strpos($icon,'.') ) $icon .= '.png';
64 echo '<tr id="'.$pages.'"><td style="padding-left: 8px">'.
65 html
::image($this->add_path($icon),array('title' => html
::specialchars($title), 'alt' => html
::specialchars($title), 'style' => 'padding-right:5px')).
66 ' '.html
::specialchars($title).'</td>'."\n";
67 echo '<td style="text-align: center">'.form
::checkbox($cb_settings, $pages).'</td></tr>';
73 <td colspan
="2"><br
/>
74 <?php
echo form
::submit('s1', _('Save')) ?
>
79 <?php
echo form
::close();