Dotclear


Ignore:
Timestamp:
08/11/13 16:34:50 (12 years ago)
Author:
franck <carnet.franck.paul@…>
Branch:
default
Message:

New dcPage::breadcrumb function, applied to some admin's pages, will be continued by kozlika

File:
1 edited

Legend:

Unmodified
Added
Removed
  • inc/admin/lib.dc.page.php

    r1318 r1328  
    271271          "</div>\n".         // End of #wrapper 
    272272          '</body></html>'; 
     273     } 
     274 
     275     public static function breadcrumb($elements=null,$no_home_link=false) 
     276     { 
     277          // First item of array elements should be blog's name, System or Plugins 
     278          $res = '<h2>'.($no_home_link ? 
     279               '<img src="style/dashboard-alt.png" alt="" />' : 
     280               '<a class="go_home" href="index.php"><img src="style/dashboard.png" alt="'.__('Go to dashboard').'" /></a>'); 
     281          $index = 0; 
     282          foreach ($elements as $element => $url) { 
     283               $res .= ($no_home_link ? ' ' : ($index == 1 ? ' : ' : ' &rsaquo; ')).($url ? '<a href="'.$url.'">' : '').$element.($url ? '</a>' : ''); 
     284               $index++; 
     285          } 
     286          $res .= '</h2>'; 
     287          return $res; 
    273288     } 
    274289 
Note: See TracChangeset for help on using the changeset viewer.

Sites map