Commit 7202f51a authored by Mario's avatar Mario
Browse files

more work on breadcrumbs

parent d78e6ae5
Pipeline #372298 passed with stage
in 3 minutes and 12 seconds
......@@ -11,8 +11,6 @@ require_once('include/photos.php');
class File_upload extends \Zotlabs\Web\Controller {
function post() {
hz_syslog(print_r($_REQUEST,true));
logger('file upload: ' . print_r($_REQUEST,true));
logger('file upload: ' . print_r($_FILES,true));
......
......@@ -455,15 +455,18 @@ class Browser extends DAV\Browser\Plugin {
if(strpos($path,$special) === 0)
$display_path = trim(substr($path,$count),'/');
if(! $_REQUEST['cat']){
$breadcrumbs_html = '';
if($display_path && ! $_REQUEST['cat']){
$breadcrumbs = [];
$folders = explode('/', $display_path);
$folder_hashes = explode('/', $node->os_path);
$breadcrumb_path = z_root() . '/cloud/' . $this->auth->owner_nick;
$breadcrumbs[] = [
'name' => $this->auth->owner_nick,
'hash' => '',
'path' => 'cloud/' . $this->auth->owner_nick
'path' => $breadcrumb_path
];
foreach($folders as $i => $name) {
......
......@@ -659,7 +659,6 @@ function attach_store($channel, $observer_hash, $options = '', $arr = null) {
}
}
if(! $pathname) {
hz_syslog('no pathname');
$pathname = filepath_macro($upload_path);
}
......@@ -676,8 +675,6 @@ function attach_store($channel, $observer_hash, $options = '', $arr = null) {
$direct = null;
if($pathname) {
hz_syslog('pathname: ' . $pathname);
$x = attach_mkdirp($channel, $observer_hash, $darr);
$folder_hash = (($x['success']) ? $x['data']['hash'] : '');
$direct = (($x['success']) ? $x['data'] : null);
......@@ -689,7 +686,6 @@ hz_syslog('pathname: ' . $pathname);
}
}
else {
hz_syslog('gothere');
$folder_hash = ((($arr) && array_key_exists('folder',$arr)) ? $arr['folder'] : '');
}
......
......@@ -96,3 +96,11 @@
box-shadow: none;
}
.breadcrumb {
padding: 0px 10px 0px 10px;
margin: 0px 0px 3px 0px;
}
.breadcrumb-item {
margin: 0px;
}
......@@ -2,9 +2,9 @@
<ol class="breadcrumb bg-transparent">
{{foreach $breadcrumbs as $breadcrumb}}
{{if $breadcrumb@last}}
<li class="breadcrumb-item active h3" aria-current="page">{{$breadcrumb.name}}</li>
<li class="breadcrumb-item active h3 pt-3 pb-3" aria-current="page">{{$breadcrumb.name}}</li>
{{else}}
<li class="breadcrumb-item h3 cloud-index attach-drop" data-folder="{{$breadcrumb.hash}}" title="{{$breadcrumb.hash}}"><a href="{{$breadcrumb.path}}">{{$breadcrumb.name}}</a></li>
<li class="breadcrumb-item h3 cloud-index attach-drop pt-3 pb-3" data-folder="{{$breadcrumb.hash}}" title="{{$breadcrumb.hash}}"><a href="{{$breadcrumb.path}}">{{$breadcrumb.name}}</a></li>
{{/if}}
{{/foreach}}
</ol>
......
......@@ -42,5 +42,10 @@
</form>
<div class="clear"></div>
</div>
{{if $breadcrumbs_html}}
{{$aclselect}}
{{/if}}
{{if $breadcrumbs_html}}
{{$breadcrumbs_html}}
<hr class="m-0">
{{/if}}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment