Dotclear


Ignore:
Timestamp:
09/30/13 11:56:33 (12 years ago)
Author:
Dsls
Branch:
default
Message:

revamped dcPage::breadcrumb, closes #1559

Location:
inc/admin
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • inc/admin/actions/class.dcactioncomments.php

    r2075 r2166  
    5959                    html::escapeHTML($this->core->blog->name) => '', 
    6060                    __('Comments') => 'comments.php', 
    61                     '<span class="page-title">'.__('Comments actions').'</span>' => '' 
     61                    __('Comments actions') => '' 
    6262               )) 
    6363          ); 
  • inc/admin/actions/class.dcactionposts.php

    r2072 r2166  
    6161                    html::escapeHTML($this->core->blog->name) => '', 
    6262                    $this->getCallerTitle() => $this->getRedirection(array(),true), 
    63                     '<span class="page-title">'.__('Entries actions').'</span>' => '' 
     63                    __('Entries actions') => '' 
    6464               )) 
    6565          ); 
     
    229229                              html::escapeHTML($core->blog->name) => '', 
    230230                              $ap->getCallerTitle() => $ap->getRedirection(array(),true), 
    231                               '<span class="page-title">'.__('Change category for this selection').'</span>' => '' 
     231                              __('Change category for this selection') => '' 
    232232               ))); 
    233233               # categories list 
     
    299299                              html::escapeHTML($core->blog->name) => '', 
    300300                              $ap->getCallerTitle() => $ap->getRedirection(array(),true), 
    301                               '<span class="page-title">'.__('Change author for this selection').'</span>' => '')), 
     301                              __('Change author for this selection') => '')), 
    302302                         dcPage::jsLoad('js/jquery/jquery.autocomplete.js'). 
    303303                         '<script type="text/javascript">'."\n". 
     
    340340                              html::escapeHTML($core->blog->name) => '', 
    341341                              $ap->getCallerTitle() => $ap->getRedirection(array(),true), 
    342                               '<span class="page-title">'.__('Change language for this selection').'</span>' => '' 
     342                              _('Change language for this selection') => '' 
    343343               ))); 
    344344               # lang list 
  • inc/admin/lib.dc.page.php

    r2161 r2166  
    304304     } 
    305305 
    306      public static function breadcrumb($elements=null,$with_home_link=true,$echo=false) 
    307      { 
     306     public static function breadcrumb($elements=null,$options=array()) 
     307     { 
     308          $with_home_link = isset($options['home_link'])?$options['home_link']:true; 
     309          $highlight_latest = isset($options['highlight_latest'])?$options['highlight_latest']:true; 
     310          $highlight_pos = isset($options['highlight_pos'])?$options['highlight_pos']:-1; 
    308311          // First item of array elements should be blog's name, System or Plugins 
    309312          $res = '<h2>'.($with_home_link ? 
     
    311314               '<img src="style/dashboard-alt.png" alt="" />'); 
    312315          $index = 0; 
     316          if ($highlight_pos < 0) { 
     317               $highlight_pos = count($elements)+$highlight_pos; 
     318          } 
    313319          foreach ($elements as $element => $url) { 
     320               if ($highlight_latest && $index == $highlight_pos) { 
     321                    $element = sprintf('<span class="page-title">%s</span>',$element); 
     322               } 
    314323               $res .= ($with_home_link ? ($index == 1 ? ' : ' : ' &rsaquo; ') : ($index == 0 ? ' ' : ' &rsaquo; ')). 
    315324                    ($url ? '<a href="'.$url.'">' : '').$element.($url ? '</a>' : ''); 
     
    317326          } 
    318327          $res .= '</h2>'; 
    319           if ($echo) { 
    320                echo $res; 
    321           } 
    322328          return $res; 
    323329     } 
Note: See TracChangeset for help on using the changeset viewer.

Sites map