Dotclear

Changeset 2166:6f409aa25386


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

revamped dcPage::breadcrumb, closes #1559

Files:
46 edited

Legend:

Unmodified
Added
Removed
  • admin/blog.php

    r1615 r2166  
    7272                    __('System') => '', 
    7373                    __('Blogs') => 'blogs.php', 
    74                     '<span class="page-title">'.__('New blog').'</span>' => '' 
     74                    __('New blog') => '' 
    7575               )) 
    7676     ); 
  • admin/blog_del.php

    r1733 r2166  
    5454               __('System') => '', 
    5555               __('Blogs') => 'blogs.php', 
    56                '<span class="page-title">'.__('Delete a blog').'</span>' => '' 
     56               __('Delete a blog') => '' 
    5757          )) 
    5858); 
  • admin/blog_pref.php

    r2028 r2166  
    270270          array( 
    271271               html::escapeHTML($blog_name) => '', 
    272                '<span class="page-title">'.__('Blog settings').'</span>' => '' 
    273           )); 
     272               __('Blog settings') => '' 
     273          ) 
     274     ); 
    274275} else { 
    275276     $breadcrumb = dcPage::breadcrumb( 
     
    277278               __('System') => '', 
    278279               __('Blogs') => 'blogs.php', 
    279                '<span class="page-title">'.__('Blog settings').' : '.html::escapeHTML($blog_name).'</span>' => '' 
     280               __('Blog settings').' : '.html::escapeHTML($blog_name) => '' 
    280281          )); 
    281282} 
  • admin/blog_theme.php

    r1553 r2166  
    212212          array( 
    213213               html::escapeHTML($core->blog->name) => '', 
    214                '<span class="page-title">'.__('Blog appearance').'</span>' => '' 
     214               __('Blog appearance') => '' 
    215215          )); 
    216216} else { 
     
    219219               html::escapeHTML($core->blog->name) => '', 
    220220               __('Blog appearance') => 'blog_theme.php', 
    221                '<span class="page-title">'.__('Theme configuration').'</span>' => '' 
     221               __('Theme configuration') => '' 
    222222          )); 
    223223} 
  • admin/blogs.php

    r2145 r2166  
    8888          array( 
    8989               __('System') => '', 
    90                '<span class="page-title">'.__('List of blogs').'</span>' => '' 
     90               __('List of blogs') 
    9191          )) 
    9292); 
  • admin/categories.php

    r2125 r2166  
    107107          array( 
    108108               html::escapeHTML($core->blog->name) => '', 
    109                '<span class="page-title">'.__('Categories').'</span>' => '' 
     109               __('Categories') => '' 
    110110          )) 
    111111); 
  • admin/category.php

    r2117 r2166  
    166166     } 
    167167} 
    168 $elements['<span class="page-title">'.$title.'</span>'] = ''; 
     168$elements[$title] = ''; 
    169169 
    170170dcPage::open($title, 
  • admin/comment.php

    r1972 r2166  
    164164               html::escapeHTML($core->blog->name) => '', 
    165165               html::escapeHTML($post_title) => $core->getPostAdminURL($post_type,$post_id).'&amp;co=1#c'.$comment_id, 
    166                '<span class="page-title">'.__('Edit comment').'</span>' => '' 
     166               __('Edit comment') => '' 
    167167          )); 
    168168} else { 
     
    171171               html::escapeHTML($core->blog->name) => '', 
    172172               html::escapeHTML($post_title) => $core->getPostAdminURL($post_type,$post_id), 
    173                '<span class="page-title">'.__('Edit comment').'</span>' => '' 
     173               __('Edit comment') => '' 
    174174          )); 
    175175} 
  • admin/comments.php

    r2145 r2166  
    169169          array( 
    170170               html::escapeHTML($core->blog->name) => '', 
    171                '<span class="page-title">'.__('Comments and trackbacks').'</span>' => '' 
     171               __('Comments and trackbacks') => '' 
    172172          )) 
    173173); 
  • admin/help.php

    r2074 r2166  
    7777          array( 
    7878               __('Global help') => 'help.php', 
    79                '<span class="page-title">'.$content_array['title'].'</span>' => '' 
     79               $content_array['title'] => '' 
    8080          )); 
    8181} else { 
    8282     $breadcrumb = dcPage::breadcrumb( 
    8383          array( 
    84                '<span class="page-title">'.__('Global help').'</span>' => '' 
     84               __('Global help') => '' 
    8585          )); 
    8686} 
  • admin/index.php

    r2159 r2166  
    205205     dcPage::breadcrumb( 
    206206          array( 
    207           '<span class="page-title">'.__('Dashboard').' : '.html::escapeHTML($core->blog->name).'</span>' => '' 
     207          __('Dashboard').' : '.html::escapeHTML($core->blog->name) => '' 
    208208          ), 
    209           false) 
     209          array('home_link' =>false) 
     210     ) 
    210211); 
    211212 
  • admin/langs.php

    r2007 r2166  
    133133     array( 
    134134          __('System') => '', 
    135           '<span class="page-title">'.__('Languages management').'</span>' => '' 
     135          __('Languages management') => '' 
    136136     )) 
    137137); 
  • admin/media.php

    r2152 r2166  
    212212                    html::escapeHTML($core->blog->name) => '', 
    213213                    __('Media manager') => '', 
    214                     '<span class="page-title">'.__('confirm removal').'</span>' => '' 
    215                ),!$popup) 
     214                    __('confirm removal') => '' 
     215               ), 
     216               array('home_link' => !$popup) 
     217          ) 
    216218     ); 
    217219      
     
    240242          array( 
    241243               html::escapeHTML($core->blog->name) => '', 
    242                '<span class="page-title">'.__('Media manager').'</span>' => '' 
    243           ),!$popup); 
     244               __('Media manager') => '' 
     245          ), 
     246          array('home_link' => !$popup) 
     247     ); 
    244248} else { 
    245249     $breadcrumb_media = $core->media->breadCrumb(html::escapeURL($page_url).'&amp;d=%s','<span class="page-title">%s</span>'); 
     
    248252               array( 
    249253                    html::escapeHTML($core->blog->name) => '', 
    250                     '<span class="page-title">'.__('Media manager').'</span>' => '' 
    251                ),!$popup); 
     254                    __('Media manager') => '' 
     255               ), 
     256               array('home_link' => !$popup) 
     257          ); 
    252258     } else { 
    253259          $breadcrumb = dcPage::breadcrumb( 
     
    256262                    __('Media manager') => html::escapeURL($page_url.'&d='), 
    257263                    $breadcrumb_media => '' 
    258                ),!$popup); 
     264               ), 
     265               array( 
     266                    'home_link' => !$popup, 
     267                    'highlight_latest' => false 
     268               ) 
     269          ); 
    259270     } 
    260271} 
  • admin/media_item.php

    r2106 r2166  
    206206               __('Media manager') => html::escapeURL($media_page_url), 
    207207               $core->media->breadCrumb(html::escapeURL($media_page_url).'&amp;d=%s').'<span class="page-title">'.$file->basename.'</span>' => '' 
    208           ),!$popup) 
     208          ), 
     209          array( 
     210               'home_link' => !$popup, 
     211               'highlight_latest' => false 
     212          ) 
     213     ) 
    209214); 
    210215 
  • admin/plugin.php

    r1358 r2166  
    8585               array( 
    8686                    __('System') => '', 
    87                     '<span class="page-title">'.__('Plugin not found').'</span>' => '' 
     87                    __('Plugin not found') => '' 
    8888               )) 
    8989     ); 
  • admin/plugins.php

    r2007 r2166  
    195195          array( 
    196196               __('System') => '', 
    197                '<span class="page-title">'.__('Plugins management').'</span>' => '' 
     197               __('Plugins management') => '' 
    198198          )) 
    199199); 
  • admin/post.php

    r2142 r2166  
    385385               html::escapeHTML($core->blog->name) => '', 
    386386               __('Entries') => 'posts.php', 
    387                '<span class="page-title">'.($post_id ? $page_title_edit : $page_title).'</span>' => '' 
     387               ($post_id ? $page_title_edit : $page_title) => '' 
    388388          )) 
    389389); 
  • admin/posts.php

    r2145 r2166  
    229229          array( 
    230230               html::escapeHTML($core->blog->name) => '', 
    231                '<span class="page-title">'.__('Entries').'</span>' => '' 
     231               __('Entries') => '' 
    232232          )) 
    233233); 
  • admin/preferences.php

    r2152 r2166  
    382382     array( 
    383383          html::escapeHTML($core->auth->userID()) => '', 
    384           '<span class="page-title">'.$page_title.'</span>' => '' 
     384          $page_title => '' 
    385385     )) 
    386386); 
  • admin/search.php

    r1912 r2166  
    7474          array( 
    7575               html::escapeHTML($core->blog->name) => '', 
    76                '<span class="page-title">'.__('Search').'</span>' => '' 
     76               __('Search') => '' 
    7777          )) 
    7878); 
  • admin/update.php

    r1792 r2166  
    178178          array( 
    179179               __('System') => '', 
    180                '<span class="page-title">'.__('Dotclear update').'</span>' => '' 
     180               __('Dotclear update') => '' 
    181181          )) 
    182182); 
  • admin/user.php

    r1719 r2166  
    186186               __('System') => '', 
    187187               __('Users') => 'users.php', 
    188                '<span class="page-title">'.$page_title.'</span>' => '' 
     188               $page_title => '' 
    189189          )) 
    190190); 
  • admin/users.php

    r2145 r2166  
    109109          array( 
    110110               __('System') => '', 
    111                '<span class="page-title">'.__('Users').'</span>' => '' 
     111               __('Users') => '' 
    112112          )) 
    113113); 
  • admin/users_actions.php

    r2108 r2166  
    136136               __('System') => '', 
    137137               __('Users') => 'users.php', 
    138                '<span class="page-title">'.__('Permissions').'</span>' => '' 
     138               __('Permissions') => '' 
    139139          )); 
    140140} else { 
     
    143143               __('System') => '', 
    144144               __('Users') => 'users.php', 
    145                '<span class="page-title">'.__('Actions').'</span>' => '' 
     145               __('Actions') => '' 
    146146          )); 
    147147} 
  • 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     } 
  • plugins/aboutConfig/index.php

    r2003 r2166  
    119119          __('System') => '', 
    120120          html::escapeHTML($core->blog->name) => '', 
    121           '<span class="page-title">'.__('about:config').'</span>' => '' 
     121          __('about:config') => '' 
    122122     )); 
    123123if (!empty($_GET['upd'])) { 
  • plugins/antispam/index.php

    r2122 r2166  
    127127               __('Plugins') => '', 
    128128               $page_name => $p_url, 
    129                '<span class="page-title">'.sprintf(__('%s filter configuration'),$filter->name).'</span>' => '' 
     129               sprintf(__('%s filter configuration'),$filter->name) => '' 
    130130          )); 
    131131 
     
    139139          array( 
    140140               __('Plugins') => '', 
    141                '<span class="page-title">'.$page_name.'</span>' => '' 
     141               $page_name => '' 
    142142          )); 
    143143 
  • plugins/blogroll/edit.php

    r2002 r2166  
    9999          array( 
    100100               html::escapeHTML($core->blog->name) => '', 
    101                '<span class="page-title">'.__('Blogroll').'</span>' => $p_url 
     101               __('Blogroll') => $p_url 
    102102          )); 
    103103?> 
  • plugins/blogroll/index.php

    r2115 r2166  
    181181          array( 
    182182               html::escapeHTML($core->blog->name) => '', 
    183                '<span class="page-title">'.__('Blogroll').'</span>' => '' 
     183               __('Blogroll') => '' 
    184184          )); 
    185185?> 
  • plugins/blowupConfig/index.php

    r1588 r2166  
    231231          html::escapeHTML($core->blog->name) => '', 
    232232          __('Blog appearance') => 'blog_theme.php', 
    233           '<span class="page-title">'.__('Blowup configuration').'</span>' => '' 
     233          __('Blowup configuration') => '' 
    234234     )); 
    235235 
  • plugins/daInstaller/index.php

    r1912 r2166  
    259259     array( 
    260260          __('System') => '', 
    261           '<span class="page-title">'.__('DotAddict.org Installer').'</span>' => '' 
     261          __('DotAddict.org Installer') => '' 
    262262     )). 
    263263 
  • plugins/importExport/index.php

    r2095 r2166  
    7878               __('Plugins') => '', 
    7979               $title => $p_url, 
    80                '<span class="page-title">'.html::escapeHTML($module->name).'</span>' => '' 
     80               html::escapeHTML($module->name) => '' 
    8181          )); 
    8282 
     
    9292          array( 
    9393               __('Plugins') => '', 
    94                '<span class="page-title">'.$title.'</span>' => '' 
     94               $title => '' 
    9595          )); 
    9696 
  • plugins/maintenance/index.php

    r2051 r2166  
    133133          array( 
    134134               __('Plugins') => '', 
    135                '<span class="page-title">'.__('Maintenance').'</span>' => '' 
     135               __('Maintenance') => '' 
    136136          ) 
    137137     ). 
     
    159159               __('Plugins') => '', 
    160160               '<a href="'.$p_url.'">'.__('Maintenance').'</a>' => '', 
    161                '<span class="page-title">'.html::escapeHTML($task->name()).'</span>' => '' 
     161               html::escapeHTML($task->name())=> '' 
    162162          ) 
    163163     ); 
     
    193193          array( 
    194194               __('Plugins') => '', 
    195                '<span class="page-title">'.__('Maintenance').'</span>' => '' 
     195               __('Maintenance') => '' 
    196196          ) 
    197197     ); 
  • plugins/pages/class.actionpage.php

    r2061 r2166  
    2626                    html::escapeHTML($this->core->blog->name) => '', 
    2727                    __('Pages') => $this->getRedirection(array(),true), 
    28                     '<span class="page-title">'.__('Pages actions').'</span>' => '' 
     28                    __('Pages actions') => '' 
    2929               )) 
    3030          ); 
  • plugins/pages/list.php

    r2056 r2166  
    7575     array( 
    7676          html::escapeHTML($core->blog->name) => '', 
    77           '<span class="page-title">'.__('Pages').'</span>' => '' 
     77          __('Pages') => '' 
    7878     )); 
    7979 
  • plugins/pages/page.php

    r1981 r2166  
    329329          html::escapeHTML($core->blog->name) => '', 
    330330          __('Pages') => $p_url, 
    331           '<span class="page-title">'.$edit_entry_title.'</span>' => '' 
     331          $edit_entry_title => '' 
    332332     )); 
    333333 
  • plugins/pings/index.php

    r1930 r2166  
    5555     array( 
    5656          __('Plugins') => '', 
    57           '<span class="page-title">'.__('Pings configuration').'</span>' => '' 
     57          __('Pings configuration') => '' 
    5858     )); 
    5959 
  • plugins/simpleMenu/index.php

    r2154 r2166  
    374374               html::escapeHTML($core->blog->name) => '', 
    375375               $page_title => $p_url, 
    376                '<span class="page-title">'.__('Add item').'</span>' => '', 
     376               __('Add item') => '', 
    377377               $step_label => '' 
    378           )); 
     378          ), 
     379          array( 
     380               'highlight_pos' => -2) 
     381     ); 
    379382} else { 
    380383     echo dcPage::breadcrumb( 
    381384          array( 
    382385               html::escapeHTML($core->blog->name) => '', 
    383                '<span class="page-title">'.$page_title.'</span>' => '' 
     386               $page_title => '' 
    384387          )); 
    385388} 
  • plugins/tags/_admin.php

    r2065 r2166  
    151151                              html::escapeHTML($core->blog->name) => '', 
    152152                              __('Entries') => $ap->getRedirection(array(),true), 
    153                               '<span class="page-title">'.__('Add tags to this selection').'</span>' => '' 
     153                              __('Add tags to this selection') => '' 
    154154                    )), 
    155155                    dcPage::jsLoad('js/jquery/jquery.autocomplete.js'). 
     
    228228                                   html::escapeHTML($core->blog->name) => '', 
    229229                                   __('Entries') => 'posts.php', 
    230                                    '<span class="page-title">'.__('Remove selected tags from this selection').'</span>' => '' 
     230                                   __('Remove selected tags from this selection') => '' 
    231231               ))); 
    232232               $posts_count = count($_POST['entries']); 
  • plugins/tags/tag_posts.php

    r2079 r2166  
    9191          html::escapeHTML($core->blog->name) => '', 
    9292          __('Tags') => $p_url.'&amp;m=tags', 
    93           '<span class="page-title">'.__('Tag').' &ldquo;'.html::escapeHTML($tag).'&rdquo;'.'</span>' => '' 
     93          __('Tag').' &ldquo;'.html::escapeHTML($tag).'&rdquo;' => '' 
    9494     )); 
    9595?> 
  • plugins/tags/tags.php

    r2003 r2166  
    2424     array( 
    2525          html::escapeHTML($core->blog->name) => '', 
    26           '<span class="page-title">'.__('Tags').'</span>' => '' 
     26          __('Tags') => '' 
    2727     )); 
    2828?> 
  • plugins/themeEditor/index.php

    r1382 r2166  
    9191          html::escapeHTML($core->blog->name) => '', 
    9292          __('Blog appearance') => 'blog_theme.php', 
    93           '<span class="page-title">'.__('Edit theme files').'</span>' => '' 
     93          __('Edit theme files') => '' 
    9494     )); 
    9595?> 
  • plugins/userPref/index.php

    r2003 r2166  
    115115          __('System') => '', 
    116116          html::escapeHTML($core->auth->userID()) => '', 
    117           '<span class="page-title">'.__('user:preferences').'</span>' => '' 
     117          __('user:preferences') => '' 
    118118     )); 
    119119 
  • plugins/widgets/index.php

    r1993 r2166  
    190190     array( 
    191191          html::escapeHTML($core->blog->name) => '', 
    192           '<span class="page-title">'.__('Widgets').'</span>' => '' 
     192          __('Widgets') => '' 
    193193     )); 
    194194 
Note: See TracChangeset for help on using the changeset viewer.

Sites map