Changeset 782:01efbf050a8a for plugins/aboutConfig
- Timestamp:
- 12/06/11 11:43:14 (14 years ago)
- Branch:
- formfilters
- Parents:
- 781:b509ac00bf4a (diff), 779:58c45f1b96e5 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent. - Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
plugins/aboutConfig/index.php
r589 r782 132 132 <div id="local" class="multi-part" title="<?php echo __('blog settings'); ?>"> 133 133 134 <?php 134 <?php 135 135 $table_header = '<table class="settings" id="%s"><caption>%s</caption>'. 136 136 '<thead>'. … … 146 146 147 147 $settings = array(); 148 148 149 foreach ($core->blog->settings->dumpNamespaces() as $ns => $namespace) { 149 150 foreach ($namespace->dumpSettings() as $k => $v) { -
plugins/aboutConfig/index.php
r457 r782 4 4 # This file is part of Dotclear 2. 5 5 # 6 # Copyright (c) 2003-201 0Olivier Meunier & Association Dotclear6 # Copyright (c) 2003-2011 Olivier Meunier & Association Dotclear 7 7 # Licensed under the GPL version 2.0 license. 8 8 # See LICENSE file or … … 12 12 if (!defined('DC_CONTEXT_ADMIN')) { return; } 13 13 14 # Local navigation 15 if (!empty($_POST['gs_nav'])) { 16 http::redirect($p_url.$_POST['gs_nav']); 17 exit; 18 } 19 if (!empty($_POST['ls_nav'])) { 20 http::redirect($p_url.$_POST['ls_nav']); 21 exit; 22 } 23 14 24 # Local settings update 15 25 if (!empty($_POST['s']) && is_array($_POST['s'])) … … 76 86 return 77 87 '<tr>'. 78 '<td ><label for="s_'.$id.'">'.sprintf($slabel,html::escapeHTML($id)).'</label></td>'.79 '<t h scope="row">'.$field.'</th>'.88 '<td scope="raw"><label for="s_'.$id.'">'.sprintf($slabel,html::escapeHTML($id)).'</label></td>'. 89 '<td>'.$field.'</td>'. 80 90 '<td>'.$s['type'].'</td>'. 81 91 '<td>'.html::escapeHTML($s['label']).'</td>'. … … 88 98 <?php echo dcPage::jsPageTabs($part); ?> 89 99 <style type="text/css"> 90 .ns-name { background: #dfdfdf; color: #333; padding-top: 0.3em; padding-bottom: 0.3em; font-size: 1.1em; } 100 table.settings { border: 1px solid #999; margin-bottom: 2em; } 101 table.settings th { background: #f5f5f5; color: #444; padding-top: 0.3em; padding-bottom: 0.3em; } 102 p.anchor-nav {float: right; } 91 103 </style> 104 <script type="text/javascript"> 105 //<![CDATA[ 106 $(function() { 107 $("#gs_submit").hide(); 108 $("#ls_submit").hide(); 109 $("#gs_nav").change(function() { 110 window.location = $("#gs_nav option:selected").val(); 111 }) 112 $("#ls_nav").change(function() { 113 window.location = $("#ls_nav option:selected").val(); 114 }) 115 }); 116 //]]> 117 </script> 92 118 </head> 93 119 … … 102 128 } 103 129 ?> 104 <h2><?php echo html::escapeHTML($core->blog->name); ?> › about:config</h2>130 <h2><?php echo html::escapeHTML($core->blog->name); ?> › <span class="page-title">about:config</span></h2> 105 131 106 132 <div id="local" class="multi-part" title="<?php echo __('blog settings'); ?>"> 107 <form action="plugin.php" method="post"> 108 <table> 109 <caption><?php echo __('Local blog settings list'); ?></caption> 110 <thead> 111 <tr> 112 <th scope="col" class="nowrap">Setting ID</th> 113 <th scope="col"><?php echo __('Value'); ?></th> 114 <th scope="col"><?php echo __('Type'); ?></th> 115 <th scope="col" class="maximal"><?php echo __('Description'); ?></th> 116 </tr> 117 </thead> 118 <tbody> 119 <?php 133 134 <?php 135 $table_header = '<table class="settings" id="%s"><caption>%s</caption>'. 136 '<thead>'. 137 '<tr>'."\n". 138 ' <th class="nowrap">Setting ID</th>'."\n". 139 ' <th>'.__('Value').'</th>'."\n". 140 ' <th>'.__('Type').'</th>'."\n". 141 ' <th class="maximalx">'.__('Description').'</th>'."\n". 142 '</tr>'."\n". 143 '</thead>'."\n". 144 '<tbody>'; 145 $table_footer = '</tbody></table>'; 146 120 147 $settings = array(); 121 148 … … 125 152 } 126 153 } 127 128 154 ksort($settings); 129 155 if (count($settings) > 0) { 156 $ns_combo = array(); 157 foreach ($settings as $ns => $s) { 158 $ns_combo[$ns] = '#l_'.$ns; 159 } 160 echo 161 '<form action="plugin.php" method="post">'. 162 '<p class="anchor-nav">'. 163 '<label for="ls_nav" class="classic">'.__('Goto:').'</label> '.form::combo('ls_nav',$ns_combo). 164 ' <input type="submit" value="'.__('Ok').'" id="ls_submit" />'. 165 '<input type="hidden" name="p" value="aboutConfig" />'. 166 $core->formNonce().'</p></form>'; 167 } 168 ?> 169 170 <form action="plugin.php" method="post"> 171 172 <?php 130 173 foreach ($settings as $ns => $s) 131 174 { 132 175 ksort($s); 133 echo '<tr><th scope="row" colspan="4" class="ns-name">namespace: <strong>'.$ns.'</strong></th></tr>'; 134 176 echo sprintf($table_header,'l_'.$ns,$ns); 135 177 foreach ($s as $k => $v) 136 178 { 137 179 echo settingLine($k,$v,$ns,'s',!$v['global']); 138 180 } 139 } 140 ?> 141 </tbody>142 </table> 181 echo $table_footer; 182 } 183 ?> 184 143 185 <p><input type="submit" value="<?php echo __('Save'); ?>" /> 144 186 <input type="hidden" name="p" value="aboutConfig" /> … … 148 190 149 191 <div id="global" class="multi-part" title="<?php echo __('global settings'); ?>"> 150 <form action="plugin.php" method="post"> 151 <table> 152 <caption><?php echo __('Global blog settings list'); ?></caption> 153 <thead> 154 <tr> 155 <th scope="col" class="nowrap">Setting ID</th> 156 <th scope="col"><?php echo __('Value'); ?></th> 157 <th scope="col"><?php echo __('Type'); ?></th> 158 <th scope="col" class="maximal"><?php echo __('Description'); ?></th> 159 </tr> 160 </thead> 161 <tbody> 192 162 193 <?php 163 194 $settings = array(); … … 171 202 ksort($settings); 172 203 204 if (count($settings) > 0) { 205 $ns_combo = array(); 206 foreach ($settings as $ns => $s) { 207 $ns_combo[$ns] = '#g_'.$ns; 208 } 209 echo 210 '<form action="plugin.php" method="post">'. 211 '<p class="anchor-nav">'. 212 '<label for="gs_nav" class="classic">'.__('Goto:').'</label> '.form::combo('gs_nav',$ns_combo). 213 ' <input type="submit" value="'.__('Ok').'" id="gs_submit" />'. 214 '<input type="hidden" name="p" value="aboutConfig" />'. 215 $core->formNonce().'</p></form>'; 216 } 217 ?> 218 219 <form action="plugin.php" method="post"> 220 221 <?php 173 222 foreach ($settings as $ns => $s) 174 223 { 175 224 ksort($s); 176 echo '<tr><th scope="row" colspan="4" class="ns-name">namespace: <strong>'.$ns.'</strong></th></tr>'; 177 225 echo sprintf($table_header,'g_'.$ns,$ns); 178 226 foreach ($s as $k => $v) 179 227 { 180 228 echo settingLine($k,$v,$ns,'gs',false); 181 229 } 182 } 183 ?> 184 </tbody>185 </table> 230 echo $table_footer; 231 } 232 ?> 233 186 234 <p><input type="submit" value="<?php echo __('Save'); ?>" /> 187 235 <input type="hidden" name="p" value="aboutConfig" />
Note: See TracChangeset
for help on using the changeset viewer.