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/userPref/index.php

    r589 r782  
    128128<div id="local" class="multi-part" title="<?php echo __('user preferences'); ?>"> 
    129129 
    130 <?php  
     130<?php 
    131131$table_header = '<table class="prefs" id="%s"><caption>%s</caption>'. 
    132132'<thead>'. 
     
    142142 
    143143$prefs = array(); 
     144 
    144145foreach ($core->auth->user_prefs->dumpWorkspaces() as $ws => $workspace) { 
    145146     foreach ($workspace->dumpPrefs() as $k => $v) { 
  • plugins/userPref/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 
     
    1111# -- END LICENSE BLOCK ----------------------------------------- 
    1212if (!defined('DC_CONTEXT_ADMIN')) { return; } 
     13 
     14# Local navigation 
     15if (!empty($_POST['gp_nav'])) { 
     16     http::redirect($p_url.$_POST['gp_nav']); 
     17     exit; 
     18} 
     19if (!empty($_POST['lp_nav'])) { 
     20     http::redirect($p_url.$_POST['lp_nav']); 
     21     exit; 
     22} 
    1323 
    1424# Local prefs update 
     
    7282     return 
    7383     '<tr>'. 
    74      '<th scope="row"><label for="s_'.$id.'">'.sprintf($slabel,html::escapeHTML($id)).'</label></th>'. 
     84     '<td scope="raw"><label for="s_'.$id.'">'.sprintf($slabel,html::escapeHTML($id)).'</label></td>'. 
    7585     '<td>'.$field.'</td>'. 
    7686     '<td>'.$s['type'].'</td>'. 
     
    8494  <?php echo dcPage::jsPageTabs($part); ?> 
    8595  <style type="text/css"> 
    86   .ws-name { background: #ccc; color: #000; padding-top: 0.3em; padding-bottom: 0.3em; font-size: 1.1em; } 
     96     table.prefs { border: 1px solid #999; margin-bottom: 2em; } 
     97     table.prefs th { background: #f5f5f5; color: #444; padding-top: 0.3em; padding-bottom: 0.3em; } 
     98     p.anchor-nav {float: right; } 
    8799  </style> 
     100     <script type="text/javascript"> 
     101     //<![CDATA[ 
     102     $(function() { 
     103          $("#gp_submit").hide(); 
     104          $("#lp_submit").hide(); 
     105          $("#gp_nav").change(function() { 
     106               window.location = $("#gp_nav option:selected").val(); 
     107          }) 
     108          $("#lp_nav").change(function() { 
     109               window.location = $("#lp_nav option:selected").val(); 
     110          }) 
     111     }); 
     112     //]]> 
     113     </script> 
    88114</head> 
    89115 
     
    98124} 
    99125?> 
    100 <h2><?php echo html::escapeHTML($core->auth->userID()); ?> &rsaquo; user:preferences</h2> 
     126<h2><?php echo html::escapeHTML($core->auth->userID()); ?> &rsaquo; <span class="page-title">user:preferences</span></h2> 
    101127 
    102128<div id="local" class="multi-part" title="<?php echo __('user preferences'); ?>"> 
    103 <form action="plugin.php" method="post"> 
    104 <table> 
    105 <caption><?php echo __('Local user preferences list'); ?></caption> 
    106 <thead> 
    107 <tr> 
    108   <th scope="col" class="nowrap">Pref ID</th> 
    109   <th scope="col"><?php echo __('Value'); ?></th> 
    110   <th scope="col"><?php echo __('Type'); ?></th> 
    111   <th scope="col" class="maximal"><?php echo __('Description'); ?></th> 
    112 </tr> 
    113 </thead> 
    114 <tbody> 
    115 <?php 
     129 
     130<?php 
     131$table_header = '<table class="prefs" id="%s"><caption>%s</caption>'. 
     132'<thead>'. 
     133'<tr>'."\n". 
     134'  <th class="nowrap">Setting ID</th>'."\n". 
     135'  <th>'.__('Value').'</th>'."\n". 
     136'  <th>'.__('Type').'</th>'."\n". 
     137'  <th class="maximalx">'.__('Description').'</th>'."\n". 
     138'</tr>'."\n". 
     139'</thead>'."\n". 
     140'<tbody>'; 
     141$table_footer = '</tbody></table>'; 
     142 
    116143$prefs = array(); 
    117144 
     
    121148     } 
    122149} 
    123  
    124150ksort($prefs); 
    125  
     151if (count($prefs) > 0) { 
     152     $ws_combo = array(); 
     153     foreach ($prefs as $ws => $s) { 
     154          $ws_combo[$ws] = '#l_'.$ws; 
     155     } 
     156     echo  
     157          '<form action="plugin.php" method="post">'. 
     158          '<p class="anchor-nav">'. 
     159          '<label for="lp_nav" class="classic">'.__('Goto:').'</label> '.form::combo('lp_nav',$ws_combo). 
     160          ' <input type="submit" value="'.__('Ok').'" id="lp_submit" />'. 
     161          '<input type="hidden" name="p" value="aboutConfig" />'. 
     162          $core->formNonce().'</p></form>'; 
     163} 
     164?> 
     165 
     166<form action="plugin.php" method="post"> 
     167 
     168<?php 
    126169foreach ($prefs as $ws => $s) 
    127170{ 
    128171     ksort($s); 
    129      echo '<tr><th scope="row" colspan="4" class="ws-name">workspace: <strong>'.$ws.'</strong></th></tr>'; 
    130       
     172     echo sprintf($table_header,'l_'.$ws,$ws); 
    131173     foreach ($s as $k => $v) 
    132174     { 
    133175          echo prefLine($k,$v,$ws,'s',!$v['global']); 
    134176     } 
    135 } 
    136 ?> 
    137 </tbody> 
    138 </table> 
     177     echo $table_footer; 
     178} 
     179?> 
     180 
    139181<p><input type="submit" value="<?php echo __('Save'); ?>" /> 
    140182<input type="hidden" name="p" value="userPref" /> 
     
    144186 
    145187<div id="global" class="multi-part" title="<?php echo __('global preferences'); ?>"> 
    146 <form action="plugin.php" method="post"> 
    147 <table> 
    148 <caption><?php echo __('Global user preferences list'); ?></caption> 
    149 <thead> 
    150 <tr> 
    151   <th scope="col" class="nowrap">Pref ID</th> 
    152   <th scope="col"><?php echo __('Value'); ?></th> 
    153   <th scope="col"><?php echo __('Type'); ?></th> 
    154   <th scope="col" class="maximal"><?php echo __('Description'); ?></th> 
    155 </tr> 
    156 </thead> 
    157 <tbody> 
     188 
    158189<?php 
    159190$prefs = array(); 
     
    167198ksort($prefs); 
    168199 
     200if (count($prefs) > 0) { 
     201     $ws_combo = array(); 
     202     foreach ($prefs as $ws => $s) { 
     203          $ws_combo[$ws] = '#g_'.$ws; 
     204     } 
     205     echo  
     206          '<form action="plugin.php" method="post">'. 
     207          '<p class="anchor-nav">'. 
     208          '<label for="gp_nav" class="classic">'.__('Goto:').'</label> '.form::combo('gp_nav',$ws_combo). 
     209          ' <input type="submit" value="'.__('Ok').'" id="gp_submit" />'. 
     210          '<input type="hidden" name="p" value="aboutConfig" />'. 
     211          $core->formNonce().'</p></form>'; 
     212} 
     213?> 
     214 
     215<form action="plugin.php" method="post"> 
     216 
     217<?php 
    169218foreach ($prefs as $ws => $s) 
    170219{ 
    171220     ksort($s); 
    172      echo '<tr><th scope="row" colspan="4" class="ws-name">workspace: <strong>'.$ws.'</strong></th></tr>'; 
    173       
     221     echo sprintf($table_header,'g_'.$ws,$ws); 
    174222     foreach ($s as $k => $v) 
    175223     { 
    176224          echo prefLine($k,$v,$ws,'gs',false); 
    177225     } 
    178 } 
    179 ?> 
    180 </tbody> 
    181 </table> 
     226     echo $table_footer; 
     227} 
     228?> 
     229 
    182230<p><input type="submit" value="<?php echo __('Save'); ?>" /> 
    183231<input type="hidden" name="p" value="userPref" /> 
Note: See TracChangeset for help on using the changeset viewer.

Sites map