Added filterable to summary and histogram controllers
[ninja.git] / application / views / user / settings.php
blob91b31cf4e030f1f91d1fd88f789f8385c3d34f56
1 <?php defined('SYSPATH') OR die('No direct access allowed.'); ?>
2 <?php
4 if (!empty($widgets)) {
5 foreach ($widgets as $widget) {
6 echo $widget;
10 echo '<div>';
11 if (!empty($updated_str)) {
12 echo '<div id="saved_msg">'.html::image($this->add_path('/icons/16x16/shield-ok.png'),array('alt' => '', 'style' => 'margin-bottom: -3px; margin-right: 4px')).$updated_str.'</div><br />';
15 if (!empty($available_setting_sections)) {
17 echo form::open('user/save', array('id' => 'user_settings'));
18 foreach ($available_setting_sections as $name => $setting_key) { ?>
19 <div id="settings_<?php echo $name ?>">
20 <table class="padd-table">
21 <tr>
22 <th colspan="2">
23 <?php if(isset($sub_headings[$setting_key])) { ?>
24 <a target=_blank href="<?php echo $sub_headings[$setting_key][0]; ?>" title="<?php echo $sub_headings[$setting_key][1]; ?>"><span class="icon-12 x12-help"></span> <?php echo $name ?></a>
25 <?php } else { ?>
26 <?php echo $name ?>
27 <?php } ?>
28 </th>
29 </tr>
30 <?php
31 $i = 0;
32 foreach ($settings[$setting_key] as $setting_name => $cfgkey) {
33 $i++;
34 $fieldname = str_replace('.', '_99_', $cfgkey[0]);
35 echo '<tr class="'.($i%2 == 0 ? 'odd' : 'even').'"><td style="width: 200px">'.help::render($cfgkey[0])." &nbsp; <label for='$fieldname'>$setting_name</label></td><td>";
37 switch($cfgkey[1]) {
38 case 'int': case 'string':
39 echo form::input($fieldname, $current_values[$cfgkey[0]]);
40 break;
41 case 'textarea':
42 echo form::textarea($fieldname, $current_values[$cfgkey[0]], 'rows="6"');
43 break;
44 case 'bool':
45 echo form::radio($fieldname, 1, isset($current_values[$cfgkey[0]]) && $current_values[$cfgkey[0]]!=false, 'id="radio_on_'.$fieldname.'"').' <label for="radio_on_'.$fieldname.'">'._('On').'</label> &nbsp;';
46 echo form::radio($fieldname, 0, isset($current_values[$cfgkey[0]]) && $current_values[$cfgkey[0]]==false, 'id="radio_off_'.$fieldname.'"').' <label for="radio_off_'.$fieldname.'">'._('Off').'</label>';
47 break;
49 case 'select':
50 if (isset($cfgkey[2]) && is_array($cfgkey[2])) {
51 echo form::dropdown($fieldname, $cfgkey[2], $current_values[$cfgkey[0]]);
53 break;
55 echo '</td></tr>';
58 </table><br />
59 </div>
60 <?php
62 echo form::submit('save_config', _('Save'));
63 echo form::close();
64 }?>
65 <br />
67 </div>