Dotclear


Ignore:
Timestamp:
07/12/11 21:17:28 (14 years ago)
Author:
Franck <carnet.franck.paul@…>
Branch:
default
Message:

Mise en accessibilité des tables (about:Config et user:Prefs)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • plugins/userPref/index.php

    r500 r581  
    7272     return 
    7373     '<tr>'. 
    74      '<td><label for="s_'.$id.'">'.sprintf($slabel,html::escapeHTML($id)).'</label></td>'. 
     74     '<td scope="raw"><label for="s_'.$id.'">'.sprintf($slabel,html::escapeHTML($id)).'</label></td>'. 
    7575     '<td>'.$field.'</td>'. 
    7676     '<td>'.$s['type'].'</td>'. 
     
    8484  <?php echo dcPage::jsPageTabs($part); ?> 
    8585  <style type="text/css"> 
    86   .ns-name { background: #ccc; color: #000; padding-top: 0.3em; padding-bottom: 0.3em; font-size: 1.1em; } 
     86     table.prefs { border: 1px solid #999; margin-bottom: 2em; } 
     87     table.prefs th { background: #f5f5f5; color: #444; padding-top: 0.3em; padding-bottom: 0.3em; } 
    8788  </style> 
    8889</head> 
     
    102103<div id="local" class="multi-part" title="<?php echo __('user preferences'); ?>"> 
    103104<form action="plugin.php" method="post"> 
    104 <table> 
    105 <tr> 
    106   <th class="nowrap">Pref ID</th> 
    107   <th><?php echo __('Value'); ?></th> 
    108   <th><?php echo __('Type'); ?></th> 
    109   <th class="maximal"><?php echo __('Description'); ?></th> 
    110 </tr> 
    111 <?php 
     105 
     106<?php  
     107 
     108$table_header = '<table class="prefs"><caption>%s</caption>'. 
     109'<thead>'. 
     110'<tr>'."\n". 
     111'  <th class="nowrap">Setting ID</th>'."\n". 
     112'  <th>'.__('Value').'</th>'."\n". 
     113'  <th>'.__('Type').'</th>'."\n". 
     114'  <th class="maximalx">'.__('Description').'</th>'."\n". 
     115'</tr>'."\n". 
     116'</thead>'."\n". 
     117'<tbody>'; 
     118$table_footer = '</tbody></table>'; 
     119 
    112120$prefs = array(); 
    113121 
     
    123131{ 
    124132     ksort($s); 
    125      echo '<tr><td colspan="4" class="ws-name">workspace: <strong>'.$ws.'</strong></td></tr>'; 
    126       
     133     echo sprintf($table_header,$ws); 
    127134     foreach ($s as $k => $v) 
    128135     { 
    129136          echo prefLine($k,$v,$ws,'s',!$v['global']); 
    130137     } 
     138     echo $table_footer; 
    131139} 
    132140?> 
    133 </table> 
     141 
    134142<p><input type="submit" value="<?php echo __('Save'); ?>" /> 
    135143<input type="hidden" name="p" value="userPref" /> 
     
    140148<div id="global" class="multi-part" title="<?php echo __('global preferences'); ?>"> 
    141149<form action="plugin.php" method="post"> 
    142 <table> 
    143 <tr> 
    144   <th class="nowrap">Pref ID</th> 
    145   <th><?php echo __('Value'); ?></th> 
    146   <th><?php echo __('Type'); ?></th> 
    147   <th class="maximal"><?php echo __('Description'); ?></th> 
    148 </tr> 
     150 
    149151<?php 
    150152$prefs = array(); 
     
    161163{ 
    162164     ksort($s); 
    163      echo '<tr><td colspan="4" class="ws-name">workspace: <strong>'.$ws.'</strong></td></tr>'; 
    164       
     165     echo sprintf($table_header,$ws); 
    165166     foreach ($s as $k => $v) 
    166167     { 
    167168          echo prefLine($k,$v,$ws,'gs',false); 
    168169     } 
     170     echo $table_footer; 
    169171} 
    170172?> 
    171 </table> 
     173 
    172174<p><input type="submit" value="<?php echo __('Save'); ?>" /> 
    173175<input type="hidden" name="p" value="userPref" /> 
Note: See TracChangeset for help on using the changeset viewer.

Sites map