Dotclear

Changeset 1957:18e928446e18 for admin


Ignore:
Timestamp:
09/19/13 22:33:38 (12 years ago)
Author:
Anne Kozlika <kozlika@…>
Branch:
default
Message:

Categories, work in progress. Quelques CSS. Gestion petits écrans + bloc réordonnancement à revoir.

Location:
admin
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • admin/categories.php

    r1954 r1957  
    144144     while ($rs->fetch()) 
    145145     { 
    146           $attr = 'id="cat_'.$rs->cat_id.'"'; 
     146          $attr = 'id="cat_'.$rs->cat_id.'" class="cat-line clearfix"'; 
    147147 
    148148          if ($rs->level > $level) { 
     
    156156          } 
    157157 
     158          echo    
     159          '<p><label class="classic" for="cat-'.$rs->cat_id.'"><a href="category.php?id='.$rs->cat_id.'">'.html::escapeHTML($rs->cat_title).'</a></label> </p>'. 
     160          '<p>(<a href="posts.php?cat_id='.$rs->cat_id.'">'. 
     161          sprintf(($rs->nb_post > 1 ? __('%d entries') : __('%d entry') ),$rs->nb_post).'</a>'. 
     162          ', '.__('total:').' '.$rs->nb_total.')</p>'. 
     163          '<p><span class="cat-url">'.__('URL:').' <code>'.html::escapeHTML($rs->cat_url).'</code></span></p>'; 
     164 
    158165          echo 
    159           '<p>'.        
    160           '<label class="classic" for="cat-'.$rs->cat_id.'"><a href="category.php?id='.$rs->cat_id.'">'.html::escapeHTML($rs->cat_title).'</a></label>'. 
    161           ' (<a href="posts.php?cat_id='.$rs->cat_id.'">'. 
    162           sprintf(($rs->nb_post > 1 ? __('%d entries') : __('%d entry') ),$rs->nb_post).'</a>'. 
    163           ', '.__('total:').' '.$rs->nb_total.') '. 
    164                '<span class="cat-url">'.__('URL:').' <code>'.html::escapeHTML($rs->cat_url).'</code></span>'; 
    165  
     166          '<p class="cat-buttons">'; 
    166167          if ($rs->nb_total>0) { 
    167168               // remove current category 
    168                echo               
     169               echo 
     170               '<label>'.__('Move entries to').'</label> '.               
    169171               form::combo('mov_cat['.$rs->cat_id.']',array_filter($categories_combo, create_function('$cat', 'return $cat->value!=$GLOBALS[\'rs\']->cat_id;')),'',''). 
    170                '<input type="submit" class="" name="mov['.$rs->cat_id.']" value="'.__('Ok').'"/>'; 
     172               ' <input type="submit" class="reset" name="mov['.$rs->cat_id.']" value="'.__('OK').'"/>'; 
    171173              
    172174               $attr_disabled = ' disabled="disabled"'; 
     
    189191     '</div>'; 
    190192 
    191      echo '<div class="fieldset"><h3 class="clear hidden-if-no-js">'.__('Categories order').'</h3>'; 
     193     echo '<div class="border-top"><h3 class="clear hidden-if-no-js">'.__('Categories order').'</h3>'; 
    192194 
    193195     if ($core->auth->check('categories',$core->blog->id) && $rs->count()>1) { 
     
    203205 
    204206     echo 
    205      '<p class="hidden-if-js right"><input type="submit" name="reset" value="'.__('Reorder all categories on the top level and delete selected categories').'" />'. 
     207     '<p class="hidden-if-js right"><input type="submit" name="reset" value="'.__('Reorder all categories on the top level').'" />'. 
    206208     $core->formNonce().'</p>'. 
    207209     '<p class="hidden-if-no-js"><input type="submit" name="reset" value="'.__('Reorder all categories on the top level').'" />'. 
  • admin/style/default.css

    r1950 r1957  
    16191619     padding: 0; 
    16201620     } 
    1621      #categories li { 
    1622           margin: .5em 0; 
    1623           padding: .5em 1.2em; 
    1624           border: 1px solid #ccc; 
    1625           border-left: 8px solid #E5E3DA; 
     1621     .cat-line { 
     1622          position: relative; 
     1623          margin: .66em 0; 
     1624          padding: .66em 1em; 
     1625          border: 1px solid #bbb; 
     1626          border-left: 6px solid #bbb; 
    16261627          border-radius: 3px; 
    16271628          } 
    1628           #categories label a { 
     1629          .cat-line label a { 
    16291630               font-weight: bold; 
    16301631               } 
    1631           #categories li p { 
     1632          .cat-line p, .cat-line label { 
    16321633               margin: 0; 
    16331634               display: inline-block; 
    1634                } 
    1635           #categories input[type="checkbox"] { 
    1636                margin-right: .8em; 
    16371635               } 
    16381636          .cat-url { 
     
    16431641               min-height: 2.5em; 
    16441642               } 
    1645           #categories input.cat-rank { 
     1643/*        #categories input.cat-rank { 
    16461644               float: right; 
    16471645               margin-left: 30px; 
    16481646               } 
     1647*/ 
     1648.cat-buttons {  
     1649     float: right;  
     1650     margin-top: -.2em; 
     1651     } 
     1652.cat-buttons select { 
     1653     padding: 1px 2px 3px 2px; 
     1654     margin-right: .25em; 
     1655     } 
     1656.cat-line label { 
     1657     margin-right: .25em; 
     1658     } 
     1659.cat-buttons .reset { 
     1660     padding-left: 4px; 
     1661     padding-right: 4px; 
     1662     } 
     1663#categories ul ul { 
     1664     margin-right: 2em; 
     1665     margin-top: 1em; 
     1666     } 
     1667.cat-line .cat-line { 
     1668     border: 1px solid #ccc; 
     1669     border-left-width: 3px; 
     1670     } 
    16491671#categories h4 { 
    16501672     margin: 0; 
Note: See TracChangeset for help on using the changeset viewer.

Sites map