Dotclear

Changeset 2647:bd67628faadf


Ignore:
Timestamp:
02/05/14 15:53:27 (12 years ago)
Author:
franck <carnet.franck.paul@…>
Branch:
default
Message:

Visually split each group of files in three sub-groups (if any) : theme's files, parent's theme's file, template set's files, fixes #1704

Files:
6 edited

Legend:

Unmodified
Added
Removed
  • locales/en/plugins.po

    r2516 r2647  
    19651965msgid "Drag widgets here to remove." 
    19661966msgstr "" 
     1967 
     1968msgid "From theme:" 
     1969msgstr "" 
     1970 
     1971msgid "From parent:" 
     1972msgstr "" 
     1973 
     1974msgid "From template set:" 
     1975msgstr "" 
  • locales/fr/plugins.po

    r2546 r2647  
    19831983msgstr "Glisser les widgets ici pour les retirer du volet." 
    19841984 
     1985msgid "From theme:" 
     1986msgstr "Du thème :" 
     1987 
     1988msgid "From parent:" 
     1989msgstr "Du thème parent :" 
     1990 
     1991msgid "From template set:" 
     1992msgstr "Du jeu de template :" 
     1993 
    19851994#~ msgid "RSS or Atom feed subscription links" 
    19861995#~ msgstr "Liens d'abonnement aux flux RSS ou Atom" 
  • plugins/themeEditor/class.themeEditor.php

    r2607 r2647  
    4747     } 
    4848 
    49      public function filesList($type,$item='%1$s') 
     49     public function filesList($type,$item='%1$s',$split=true) 
    5050     { 
    5151          $files = $this->getFilesFromType($type); 
     
    5656 
    5757          $list = ''; 
    58           foreach ($files as $k => $v) 
    59           { 
    60                if (strpos($v,$this->user_theme) === 0) { 
    61                     $li = sprintf('<li class="default-file">%s</li>',$item); 
    62                } elseif ($this->parent_theme && strpos($v,$this->parent_theme) === 0) { 
    63                     $li = sprintf('<li class="parent-file">%s</li>',$item); 
    64                } else { 
    65                     $li = sprintf('<li>%s</li>',$item); 
    66                } 
    67                $list .= sprintf($li,$k,html::escapeHTML($k)); 
     58          if ($split) { 
     59               // First part for current theme 
     60               $list_theme = ''; 
     61               foreach ($files as $k => $v) 
     62               { 
     63                    if (strpos($v,$this->user_theme) === 0) { 
     64                         $li = sprintf('<li class="default-file">%s</li>',$item); 
     65                         $list_theme .= sprintf($li,$k,html::escapeHTML($k)); 
     66                    } 
     67               } 
     68               // Second part for parent theme if any 
     69               $list_parent = ''; 
     70               foreach ($files as $k => $v) 
     71               { 
     72                    if ((strpos($v,$this->user_theme) !== 0) && ($this->parent_theme && strpos($v,$this->parent_theme) === 0)) { 
     73                         $li = sprintf('<li class="parent-file">%s</li>',$item); 
     74                         $list_parent .= sprintf($li,$k,html::escapeHTML($k)); 
     75                    } 
     76               } 
     77               // Third part for template set 
     78               $list_tpl = ''; 
     79               foreach ($files as $k => $v) 
     80               { 
     81                    if ((strpos($v,$this->user_theme) !== 0) && ($this->parent_theme && strpos($v,$this->parent_theme) !== 0)) { 
     82                         $li = sprintf('<li>%s</li>',$item); 
     83                         $list_tpl .= sprintf($li,$k,html::escapeHTML($k)); 
     84                    } 
     85               } 
     86               $list .= ($list_theme != '' ? sprintf('<li class="group-file">'.__('From theme:').'<ul>%s</ul></li>',$list_theme) : ''); 
     87               $list .= ($list_parent != '' ? sprintf('<li class="group-file">'.__('From parent:').'<ul>%s</ul></li>',$list_parent) : ''); 
     88               $list .= ($list_tpl != '' ? sprintf('<li class="group-file">'.__('From template set:').'<ul>%s</ul></li>',$list_tpl) : ''); 
     89          } else { 
     90               foreach ($files as $k => $v) 
     91               { 
     92                    if (strpos($v,$this->user_theme) === 0) { 
     93                         $li = sprintf('<li class="default-file">%s</li>',$item); 
     94                    } elseif ($this->parent_theme && strpos($v,$this->parent_theme) === 0) { 
     95                         $li = sprintf('<li class="parent-file">%s</li>',$item); 
     96                    } else { 
     97                         $li = sprintf('<li>%s</li>',$item); 
     98                    } 
     99                    $list .= sprintf($li,$k,html::escapeHTML($k)); 
     100               } 
    68101          } 
    69102 
  • plugins/themeEditor/locales/en/help/help.html

    r2534 r2647  
    1717</ul> 
    1818 
     19<p>Each section of files may have three sub-sections :</p> 
     20<ul> 
     21     <li>Files belonging to the current theme</li> 
     22     <li>Files belonging to the parent theme</li> 
     23     <li>Files belonging to the template set</li> 
     24</ul> 
     25 
    1926<p>The bullet in front of each file can have three different colors:</p> 
    2027<ul> 
    21 <li><strong>Black</strong> means it is in the <code>default</code> theme.</li> 
    22 <li><strong>Yellow </strong> means it belongs to the current theme.</li>  
     28<li><strong>Yellow </strong> means it belongs to the current theme.</li> 
    2329<li><strong>Red </strong> means it belongs to a parent theme.</li> 
     30<li><strong>Black</strong> means it is in the template set.</li> 
    2431</ul> 
     32 
     33<p>The files belonging to the current theme are also in bold.</p> 
    2534 
    2635<h4>File mofidication</h4> 
     
    2938<p>Be careful: Modifications are applied immediately after saving.</p> 
    3039 
    31 <p>If you modify a file that comes from the <code>default</code> theme, the file will be copied into your current theme.</p> 
     40<p>If you modify a file that comes from the template set or the parent theme, the file will be copied into your current theme.</p> 
    3241 
    3342<h4>Syntax highlighting</h4> 
  • plugins/themeEditor/locales/fr/help/help.html

    r2433 r2647  
    1313  <li>fichiers du thème&nbsp;: les templates,</li> 
    1414  <li>fichiers CSS&nbsp;: les feuilles de style,</li> 
    15   <li>fichiers JavaScript.</li> 
     15  <li>fichiers JavaScript,</li> 
    1616  <li>fichiers de traduction.</li> 
     17</ul> 
     18 
     19<p>Chaque groupe de fichiers peut contenir trois sous-groupes :</p> 
     20<ul> 
     21     <li>fichiers du thème actif,</li> 
     22     <li>fichiers du thème parent,</li> 
     23     <li>fichiers du jeu de "template".</li> 
    1724</ul> 
    1825 
    1926<p>A la gauche de chaque fichier, chaque puce se voit attribuée une couleur :</p> 
    2027<ul> 
    21 <li><b>noire</b> indique qu'il se trouve dans le thème "default".</li> 
    22 <li><b>jaune</b> indique qu'il fait partie du thème actif.</li>  
    23 <li><b>rouge</b> indique qu'il fait partie d'un thème parent.</li> 
     28<li><b>jaune</b> indique qu'il fait partie du thème actif.</li> 
     29<li><b>rouge</b> indique qu'il fait partie du thème parent.</li> 
     30<li><b>noire</b> indique qu'il se trouve dans le jeu de "template".</li> 
    2431</ul> 
     32 
     33<p>Les fichiers du thème actif sont également repérés en gras.</p> 
    2534 
    2635<h4>Modification des fichiers</h4> 
     
    3140<p>Les modifications sont immédiatement appliquées lors de la sauvegarde, soyez vigilants.</p> 
    3241 
    33 <p>A noter que si vous modifiez un fichier se trouvant dans le thème "default", celui-ci sera copié dans votre thème en cours d'utilisation.</p> 
     42<p>A noter que si vous modifiez un fichier se trouvant dans le jeu de "template" ou dans le thème parent, celui-ci sera copié dans votre thème en cours d'utilisation.</p> 
    3443 
    3544<h4>Coloration syntaxique</h4> 
  • plugins/themeEditor/style.css

    r2566 r2647  
    2121#file-chooser li.default-file { 
    2222     color: #f90; 
     23     font-weight: bold; 
    2324} 
    2425#file-chooser li.parent-file { 
    2526     color:#c00; 
    2627} 
     28#file-chooser li.group-file { 
     29     list-style: none; 
     30     margin-bottom: 1em; 
     31} 
     32#file-chooser li.group-file ul { 
     33     margin-top: .5em; 
     34} 
    2735textarea { 
    2836     font: 1em Monaco,"Courier New",Courier,monospace; 
Note: See TracChangeset for help on using the changeset viewer.

Sites map