Dotclear


Ignore:
Timestamp:
12/06/11 11:43:14 (14 years ago)
Author:
Dsls <dsls@…>
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.
Message:

Merged last default changes with formfilter branch

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • plugins/aboutConfig/index.php

    r589 r782  
    132132<div id="local" class="multi-part" title="<?php echo __('blog settings'); ?>"> 
    133133 
    134 <?php  
     134<?php 
    135135$table_header = '<table class="settings" id="%s"><caption>%s</caption>'. 
    136136'<thead>'. 
     
    146146 
    147147$settings = array(); 
     148 
    148149foreach ($core->blog->settings->dumpNamespaces() as $ns => $namespace) { 
    149150     foreach ($namespace->dumpSettings() as $k => $v) { 
  • plugins/aboutConfig/index.php

    r457 r782  
    44# This file is part of Dotclear 2. 
    55# 
    6 # Copyright (c) 2003-2010 Olivier Meunier & Association Dotclear 
     6# Copyright (c) 2003-2011 Olivier Meunier & Association Dotclear 
    77# Licensed under the GPL version 2.0 license. 
    88# See LICENSE file or 
     
    1212if (!defined('DC_CONTEXT_ADMIN')) { return; } 
    1313 
     14# Local navigation 
     15if (!empty($_POST['gs_nav'])) { 
     16     http::redirect($p_url.$_POST['gs_nav']); 
     17     exit; 
     18} 
     19if (!empty($_POST['ls_nav'])) { 
     20     http::redirect($p_url.$_POST['ls_nav']); 
     21     exit; 
     22} 
     23 
    1424# Local settings update 
    1525if (!empty($_POST['s']) && is_array($_POST['s'])) 
     
    7686     return 
    7787     '<tr>'. 
    78      '<td><label for="s_'.$id.'">'.sprintf($slabel,html::escapeHTML($id)).'</label></td>'. 
    79      '<th scope="row">'.$field.'</th>'. 
     88     '<td scope="raw"><label for="s_'.$id.'">'.sprintf($slabel,html::escapeHTML($id)).'</label></td>'. 
     89     '<td>'.$field.'</td>'. 
    8090     '<td>'.$s['type'].'</td>'. 
    8191     '<td>'.html::escapeHTML($s['label']).'</td>'. 
     
    8898  <?php echo dcPage::jsPageTabs($part); ?> 
    8999  <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; } 
    91103  </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> 
    92118</head> 
    93119 
     
    102128} 
    103129?> 
    104 <h2><?php echo html::escapeHTML($core->blog->name); ?> &rsaquo; about:config</h2> 
     130<h2><?php echo html::escapeHTML($core->blog->name); ?> &rsaquo; <span class="page-title">about:config</span></h2> 
    105131 
    106132<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 
    120147$settings = array(); 
    121148 
     
    125152     } 
    126153} 
    127  
    128154ksort($settings); 
    129  
     155if (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 
    130173foreach ($settings as $ns => $s) 
    131174{ 
    132175     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); 
    135177     foreach ($s as $k => $v) 
    136178     { 
    137179          echo settingLine($k,$v,$ns,'s',!$v['global']); 
    138180     } 
    139 } 
    140 ?> 
    141 </tbody> 
    142 </table> 
     181     echo $table_footer; 
     182} 
     183?> 
     184 
    143185<p><input type="submit" value="<?php echo __('Save'); ?>" /> 
    144186<input type="hidden" name="p" value="aboutConfig" /> 
     
    148190 
    149191<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 
    162193<?php 
    163194$settings = array(); 
     
    171202ksort($settings); 
    172203 
     204if (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 
    173222foreach ($settings as $ns => $s) 
    174223{ 
    175224     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); 
    178226     foreach ($s as $k => $v) 
    179227     { 
    180228          echo settingLine($k,$v,$ns,'gs',false); 
    181229     } 
    182 } 
    183 ?> 
    184 </tbody> 
    185 </table> 
     230     echo $table_footer; 
     231} 
     232?> 
     233 
    186234<p><input type="submit" value="<?php echo __('Save'); ?>" /> 
    187235<input type="hidden" name="p" value="aboutConfig" /> 
Note: See TracChangeset for help on using the changeset viewer.

Sites map