Merge pull request #2162 from owncloud/trash_bin_home

let the home icon link to the files view in the trash bin
This commit is contained in:
Jan-Christoph Borchardt 2013-03-07 06:26:15 -08:00
commit 70f0e0a8da
2 changed files with 23 additions and 1 deletions

View File

@ -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());

View File

@ -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;