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

View File

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