summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBjoern Schiessle <schiessle@owncloud.com>2013-12-13 14:34:26 +0100
committerBjoern Schiessle <schiessle@owncloud.com>2013-12-16 17:40:35 +0100
commit3e17fbe30dbf2a0e99c7aca83d855fb8df46d11b (patch)
treeeb7df05a09ab696e30205da1406611ed0fea960e
parent3831b8b1be693a3d4babb378378f1baa676b1cc3 (diff)
downloadnextcloud-server-3e17fbe30dbf2a0e99c7aca83d855fb8df46d11b.tar.gz
nextcloud-server-3e17fbe30dbf2a0e99c7aca83d855fb8df46d11b.zip
always show home breadcrumb in files view
-rw-r--r--apps/files/templates/part.breadcrumb.php12
-rw-r--r--core/js/js.js8
2 files changed, 9 insertions, 11 deletions
diff --git a/apps/files/templates/part.breadcrumb.php b/apps/files/templates/part.breadcrumb.php
index 9db27eb9b29..90d07d4336c 100644
--- a/apps/files/templates/part.breadcrumb.php
+++ b/apps/files/templates/part.breadcrumb.php
@@ -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"]); ?>
diff --git a/core/js/js.js b/core/js/js.js
index d9b3b54e0a1..66faa48f85f 100644
--- a/core/js/js.js
+++ b/core/js/js.js
@@ -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);