always show home breadcrumb in files view

This commit is contained in:
Bjoern Schiessle 2013-12-13 14:34:26 +01:00
parent 3831b8b1be
commit 3e17fbe30d
2 changed files with 9 additions and 11 deletions

View File

@ -1,10 +1,8 @@
<?php if(count($_["breadcrumb"])):?>
<div class="crumb" data-dir=''>
<a href="<?php print_unescaped($_['baseURL']); ?>">
<img src="<?php print_unescaped(OCP\image_path('core', 'places/home.svg'));?>" class="svg" />
</a>
</div>
<?php endif;?>
<div class="crumb <?php if(!count($_["breadcrumb"])) p('last');?>" data-dir=''>
<a href="<?php print_unescaped($_['baseURL']); ?>">
<img src="<?php print_unescaped(OCP\image_path('core', 'places/home.svg'));?>" class="svg" />
</a>
</div>
<?php for($i=0; $i<count($_["breadcrumb"]); $i++):
$crumb = $_["breadcrumb"][$i];
$dir = \OCP\Util::encodePath($crumb["dir"]); ?>

View File

@ -471,11 +471,11 @@ OC.Breadcrumb={
},
_show:function(container, dir, leafname, leaflink){
var self = this;
this._clear(container);
// show home + path in subdirectories
if (dir && dir !== '/') {
if (dir) {
//add home
var link = OC.linkTo('files','index.php');
@ -502,7 +502,7 @@ OC.Breadcrumb={
}
});
}
//add leafname
if (leafname && leaflink) {
this._push(container, leafname, leaflink);