Dotclear

Changeset 2928:0471a74f04ed


Ignore:
Timestamp:
01/26/15 13:44:21 (11 years ago)
Author:
franck <carnet.franck.paul@…>
Branch:
default
Message:

Add item description option, closes #2060

Files:
3 edited

Legend:

Unmodified
Added
Removed
  • locales/fr/plugins.po

    r2843 r2928  
    18841884msgstr "Aucun item de menu pour l'instant." 
    18851885 
     1886msgid "Item description" 
     1887msgstr "Description des items de menu" 
     1888 
     1889msgid "Displayed in link" 
     1890msgstr "Affichée dans le lien" 
     1891 
     1892msgid "Used as link title" 
     1893msgstr "Utilisée comme titre du lien" 
     1894 
     1895msgid "Displayed in link and used as title" 
     1896msgstr "Affichée dans le lien et utilisée comme titre" 
     1897 
     1898msgid "Not displayed nor used" 
     1899msgstr "Ignorée" 
     1900 
    18861901msgid "Add tags" 
    18871902msgstr "Ajouter des mots-clés" 
  • plugins/simpleMenu/_public.php

    r2912 r2928  
    3131          $description = isset($attr['description']) ? trim($attr['description']) : ''; 
    3232 
    33           if (!preg_match('#^(title|span)$#',$description)) { 
     33          if (!preg_match('#^(title|span|both|none)$#',$description)) { 
    3434               $description = ''; 
    3535          } 
     
    4747          global $core, $_ctx; 
    4848 
     49          $descr_type = array(0 => 'span',1 => 'title',2 => 'both',3 => 'none'); 
     50 
    4951          if (!(boolean) $core->blog->settings->system->simpleMenu_active) 
    5052               return; 
     
    5860          } 
    5961 
    60           $menu = tplSimpleMenu::displayMenu('','','title'); 
     62          $description = 'title'; 
     63          if (isset($descr_type[$w->description])) { 
     64               $description = $descr_type[$w->description]; 
     65          } 
     66          $menu = tplSimpleMenu::displayMenu('','',$description); 
    6167          if ($menu == '') { 
    6268               return; 
     
    107113                    $title = $span = ''; 
    108114                    if ($m['descr']) { 
    109                          if ($description == 'title') { 
     115                         if ($description == 'title' || $description == 'both') { 
    110116                              $title = ' title="'.html::escapeHTML(__($m['descr'])).'"'; 
    111                          } else { 
     117                         } 
     118                         if ($description == 'span' || $description == 'both') { 
    112119                              $span = ' <span>'.html::escapeHTML(__($m['descr'])).'</span>'; 
    113120                         } 
  • plugins/simpleMenu/_widgets.php

    r2778 r2928  
    2020          $w->create('simplemenu',__('Simple menu'),array('tplSimpleMenu','simpleMenuWidget'),null,'List of simple menu items'); 
    2121          $w->simplemenu->setting('title',__('Title (optional)').' :',__('Menu')); 
     22          $w->simplemenu->setting('description',__('Item description'),0,'combo', 
     23               array( 
     24                    __('Displayed in link') => 0,                     // span 
     25                    __('Used as link title') => 1,                         // title 
     26                    __('Displayed in link and used as title') => 2,   // both 
     27                    __('Not displayed nor used') => 3                 // none 
     28                    ) 
     29               ); 
    2230          $w->simplemenu->setting('homeonly',__('Display on:'),0,'combo', 
    2331               array( 
     
    2634                    __('Except on home page') => 2 
    2735                    ) 
    28           ); 
     36               ); 
    2937          $w->simplemenu->setting('content_only',__('Content only'),0,'check'); 
    3038          $w->simplemenu->setting('class',__('CSS class:'),''); 
Note: See TracChangeset for help on using the changeset viewer.

Sites map