Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan-Christoph Borchardt <hey@jancborchardt.net>2013-03-07 18:26:15 +0400
committerJan-Christoph Borchardt <hey@jancborchardt.net>2013-03-07 18:26:15 +0400
commit70f0e0a8da73f8eac3ec63e558377068a0e0a3b0 (patch)
treea8d84adca08ae9ae1a0fabc195c0cecdb821a3d6
parent7c16c2c9ae2be3743a9ffc6a37484899784ed46c (diff)
parentba9f5f58854872ceb619e0f7c6debdf051cc3108 (diff)
Merge pull request #2162 from owncloud/trash_bin_home
let the home icon link to the files view in the trash bin
-rw-r--r--apps/files_trashbin/index.php4
-rw-r--r--apps/files_trashbin/templates/part.breadcrumb.php20
2 files changed, 23 insertions, 1 deletions
diff --git a/apps/files_trashbin/index.php b/apps/files_trashbin/index.php
index 779db9bc31c..24ccd8c4609 100644
--- a/apps/files_trashbin/index.php
+++ b/apps/files_trashbin/index.php
@@ -95,15 +95,17 @@ foreach (explode('/', $dir) as $i) {
}
}
-$breadcrumbNav = new OCP\Template('files', 'part.breadcrumb', '');
+$breadcrumbNav = new OCP\Template('files_trashbin', 'part.breadcrumb', '');
$breadcrumbNav->assign('breadcrumb', $breadcrumb);
$breadcrumbNav->assign('baseURL', OCP\Util::linkTo('files_trashbin', 'index.php') . '?dir=');
+$breadcrumbNav->assign('home', OCP\Util::linkTo('files', 'index.php'));
$list = new OCP\Template('files_trashbin', 'part.list', '');
$list->assign('files', $files);
$list->assign('baseURL', OCP\Util::linkTo('files_trashbin', 'index.php'). '?dir='.$dir);
$list->assign('downloadURL', OCP\Util::linkTo('files_trashbin', 'download.php') . '?file='.$dir);
$list->assign('disableSharing', true);
+$list->assign('dirlisting', $dirlisting);
$tmpl->assign('dirlisting', $dirlisting);
$list->assign('disableDownloadActions', true);
$tmpl->assign('breadcrumb', $breadcrumbNav->fetchPage());
diff --git a/apps/files_trashbin/templates/part.breadcrumb.php b/apps/files_trashbin/templates/part.breadcrumb.php
new file mode 100644
index 00000000000..2801e04e9ad
--- /dev/null
+++ b/apps/files_trashbin/templates/part.breadcrumb.php
@@ -0,0 +1,20 @@
+<div class="crumb">
+ <a href="<?php print_unescaped($_['home']); ?>">
+ <img src="<?php print_unescaped(OCP\image_path('core', 'places/home.svg'));?>" class="svg" />
+ </a>
+</div>
+<?php if(count($_["breadcrumb"])):?>
+ <div class="crumb svg"
+ data-dir='<?php print_unescaped($_['baseURL']); ?>'>
+ <a href="<?php p($_['baseURL']); ?>"><?php p($l->t("Deleted Files")); ?></a>
+ </div>
+<?php endif;?>
+<?php for($i=0; $i<count($_["breadcrumb"]); $i++):
+ $crumb = $_["breadcrumb"][$i];
+ $dir = str_replace('+', '%20', urlencode($crumb["dir"]));
+ $dir = str_replace('%2F', '/', $dir); ?>
+ <div class="crumb <?php if($i == count($_["breadcrumb"])-1) p('last');?> svg"
+ data-dir='<?php p($dir);?>'>
+ <a href="<?php p($_['baseURL'].$dir); ?>"><?php p($crumb["name"]); ?></a>
+ </div>
+<?php endfor;