diff options
-rw-r--r-- | apps/files_trashbin/index.php | 3 | ||||
-rw-r--r-- | apps/files_trashbin/templates/part.breadcrumb.php | 20 |
2 files changed, 22 insertions, 1 deletions
diff --git a/apps/files_trashbin/index.php b/apps/files_trashbin/index.php index 779db9bc31c..2e4c4953a16 100644 --- a/apps/files_trashbin/index.php +++ b/apps/files_trashbin/index.php @@ -95,9 +95,10 @@ 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') . '?dir='); $list = new OCP\Template('files_trashbin', 'part.list', ''); $list->assign('files', $files); 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; |