diff --git a/Zotlabs/Module/Wiki.php b/Zotlabs/Module/Wiki.php index 8069afc7c..37ebe2a38 100644 --- a/Zotlabs/Module/Wiki.php +++ b/Zotlabs/Module/Wiki.php @@ -390,7 +390,7 @@ class Wiki extends \Zotlabs\Web\Controller { 'files' => array($page['page']['urlName'].'.md') )); if($commit['success']) { - json_return_and_die(array('url' => '/'.argv(0).'/'.argv(1).'/'.$page['wiki']['urlName'].'/'.urlencode($page['page']['urlName']), 'success' => true)); + json_return_and_die(array('url' => '/'.argv(0).'/'.argv(1).'/'.$page['wiki']['urlName'].'/'.$page['page']['urlName'], 'success' => true)); } else { json_return_and_die(array('message' => 'Error making git commit','url' => '/'.argv(0).'/'.argv(1).'/'.$page['wiki']['urlName'].'/'.urlencode($page['page']['urlName']),'success' => false)); } diff --git a/include/wiki.php b/include/wiki.php index d2cb51bd3..eb87840f6 100644 --- a/include/wiki.php +++ b/include/wiki.php @@ -31,16 +31,29 @@ function wiki_page_list($resource_id) { if (!$w['path']) { return array('pages' => null, 'wiki' => null); } - $pages = array(); - $pages[] = array('title' => 'Home', 'url' => 'Home'); + + $pages[] = [ + 'resource_id' => '', + 'title' => 'Home', + 'url' => 'Home', + 'link_id' => 'id_wiki_home_0' + ]; + if (is_dir($w['path']) === true) { $files = array_diff(scandir($w['path']), array('.', '..', '.git')); // TODO: Check that the files are all text files - + $i = 1; foreach($files as $file) { // strip the .md file extension and unwrap URL encoding to leave HTML encoded name - if( urldecode(substr($file, 0, -3)) !== 'Home') { - $pages[] = array('title' => urldecode(substr($file, 0, -3)), 'url' => urlencode(substr($file, 0, -3))); + $title = substr($file, 0, -3); + if(urldecode($title) !== 'Home') { + $pages[] = [ + 'resource_id' => $resource_id, + 'title' => urldecode($title), + 'url' => $title, + 'link_id' => 'id_' . substr($resource_id, 0, 10) . '_' . $i + ]; + $i++; } } } diff --git a/view/css/widgets.css b/view/css/widgets.css index 10c66c213..402c3f473 100644 --- a/view/css/widgets.css +++ b/view/css/widgets.css @@ -18,6 +18,41 @@ word-wrap: break-word; } +.widget-nav-pills-icons { + opacity: 0; + padding: 6px 10px; + float: right; + position: relative; + z-index:1; +} + + +.widget-nav-pills-checkbox { + padding: 6px 10px; + float: right; + position: relative; + z-index:1; + cursor: pointer; +} + +i.widget-nav-pills-icons, +i.widget-nav-pills-checkbox { + margin-top: 2px; +} + +.widget-nav-pills-icons:hover + a { + background-color: #eee; +} + +.widget-nav-pills-checkbox:hover + a { + background-color: #eee; +} + +li:hover .widget-nav-pills-icons { + opacity: 1; +} + + /* suggest */ .suggest-widget-more { diff --git a/view/theme/redbasic/css/style.css b/view/theme/redbasic/css/style.css index fba6da17a..2f3da7542 100644 --- a/view/theme/redbasic/css/style.css +++ b/view/theme/redbasic/css/style.css @@ -2040,3 +2040,14 @@ dl.bb-dl > dd > li { padding-left: 15px; border-left: 3px solid #eee; } + +.nav-pills-stacked-icons { + padding: 6px 10px; + float: right; + position: relative; + z-index:1; +} + +.nav-pills-stacked-icons:hover + a { + background-color: #eee; +} diff --git a/view/tpl/group_side.tpl b/view/tpl/group_side.tpl index e58cf060d..35f79a07e 100755 --- a/view/tpl/group_side.tpl +++ b/view/tpl/group_side.tpl @@ -5,12 +5,10 @@ {{foreach $groups as $group}}