diff options
author | Robin Appelman <icewind@owncloud.com> | 2014-01-15 16:36:14 +0400 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2014-01-15 16:36:14 +0400 |
commit | d279ddd9a25286bed6817413cc69987d57695e3b (patch) | |
tree | bd357849fd1ea57a1c3f91333cbf61443b382ca6 /apps | |
parent | d1f3f121d6992be07c3600882449ce17d56f116f (diff) |
Show the name of the shared folder in the breadcrumb when viewing a publicly shared folder
Diffstat (limited to 'apps')
-rw-r--r-- | apps/files/templates/part.breadcrumb.php | 6 | ||||
-rw-r--r-- | apps/files_sharing/public.php | 2 |
2 files changed, 7 insertions, 1 deletions
diff --git a/apps/files/templates/part.breadcrumb.php b/apps/files/templates/part.breadcrumb.php index 90d07d4336c..2a0df622767 100644 --- a/apps/files/templates/part.breadcrumb.php +++ b/apps/files/templates/part.breadcrumb.php @@ -1,6 +1,10 @@ <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" /> + <?php if(isset($_['rootBreadCrumb'])): + echo $_['rootBreadCrumb']; + else:?> + <img src="<?php print_unescaped(OCP\image_path('core', 'places/home.svg'));?>" class="svg" /> + <?php endif;?> </a> </div> <?php for($i=0; $i<count($_["breadcrumb"]); $i++): diff --git a/apps/files_sharing/public.php b/apps/files_sharing/public.php index f4042f65248..ef4345da20e 100644 --- a/apps/files_sharing/public.php +++ b/apps/files_sharing/public.php @@ -111,6 +111,7 @@ if (isset($path)) { } } $basePath = $path; + $rootName = basename($path); if (isset($_GET['path']) && \OC\Files\Filesystem::isReadable($basePath . $_GET['path'])) { $getPath = \OC\Files\Filesystem::normalizePath($_GET['path']); $path .= $getPath; @@ -216,6 +217,7 @@ if (isset($path)) { $list->assign('sharingroot', $basePath); $breadcrumbNav = new OCP\Template('files', 'part.breadcrumb', ''); $breadcrumbNav->assign('breadcrumb', $breadcrumb); + $breadcrumbNav->assign('rootBreadCrumb', $rootName); $breadcrumbNav->assign('baseURL', OCP\Util::linkToPublic('files') . $urlLinkIdentifiers . '&path='); $maxUploadFilesize=OCP\Util::maxUploadFilesize($path); $fileHeader = (!isset($files) or count($files) > 0); |