more nav_set_selected

This commit is contained in:
git-marijus 2017-07-22 11:04:18 +02:00
parent 27678a523c
commit 4335e49381
14 changed files with 37 additions and 12 deletions

View File

@ -7,6 +7,9 @@ class Bookmarks extends \Zotlabs\Web\Controller {
function init() {
if(! local_channel())
return;
nav_set_selected(t('View Bookmarks'));
$item_id = intval($_REQUEST['item']);
$burl = trim($_REQUEST['burl']);

View File

@ -765,6 +765,7 @@ class Cdav extends \Zotlabs\Web\Controller {
}
if(argv(1) === 'calendar') {
nav_set_selected(t('CalDAV'));
$caldavBackend = new \Sabre\CalDAV\Backend\PDO($pdo);
$calendars = $caldavBackend->getCalendarsForUser($principalUri);
}
@ -965,6 +966,7 @@ class Cdav extends \Zotlabs\Web\Controller {
if(argv(1) === 'addressbook') {
nav_set_selected(t('CardDAV'));
$carddavBackend = new \Sabre\CardDAV\Backend\PDO($pdo);
$addressbooks = $carddavBackend->getAddressBooksForUser($principalUri);
}

View File

@ -89,9 +89,11 @@ class Chat extends \Zotlabs\Web\Controller {
function get() {
if(local_channel())
if(local_channel()) {
$channel = \App::get_channel();
nav_set_selected(t('My Chatrooms'));
}
$ob = \App::get_observer();
$observer = get_observer_hash();
if(! $observer) {

View File

@ -88,12 +88,14 @@ class Invite extends \Zotlabs\Web\Controller {
}
function get() {
function get() {
if(! local_channel()) {
notice( t('Permission denied.') . EOL);
return;
}
nav_set_selected(t('Invite'));
$tpl = get_markup_template('invite.tpl');
$invonly = false;

View File

@ -5,6 +5,7 @@ namespace Zotlabs\Module;
class Lang extends \Zotlabs\Web\Controller {
function get() {
nav_set_selected(t('Language'));
return lang_selector();
}

View File

@ -110,17 +110,17 @@ class Mood extends \Zotlabs\Web\Controller {
function get() {
function get() {
if(! local_channel()) {
notice( t('Permission denied.') . EOL);
return;
}
nav_set_selected(t('Mood'));
$parent = ((x($_GET,'parent')) ? intval($_GET['parent']) : '0');
$verbs = get_mood_verbs();
$shortlist = array();

View File

@ -143,12 +143,14 @@ class Poke extends \Zotlabs\Web\Controller {
function get() {
function get() {
if(! local_channel()) {
notice( t('Permission denied.') . EOL);
return;
}
nav_set_selected(t('Poke'));
$name = '';
$id = '';

View File

@ -7,7 +7,9 @@ require_once('include/zot.php');
class Probe extends \Zotlabs\Web\Controller {
function get() {
nav_set_selected(t('Remote Diagnostics'));
$o .= '<h3>Probe Diagnostic</h3>';
$o .= '<form action="probe" method="get">';

View File

@ -59,6 +59,8 @@ class Rpost extends \Zotlabs\Web\Controller {
}
return login();
}
nav_set_selected(t('Post'));
// If we have saved rpost session variables, but nothing in the current $_REQUEST, recover the saved variables

View File

@ -22,7 +22,7 @@ class Search extends \Zotlabs\Web\Controller {
if($load)
$_SESSION['loadtime'] = datetime_convert();
nav_set_selected('search');
nav_set_selected(t('Search'));
require_once("include/bbcode.php");
require_once('include/security.php');

View File

@ -28,6 +28,8 @@ class Suggest extends \Zotlabs\Web\Controller {
notice( t('Permission denied.') . EOL);
return;
}
nav_set_selected(t('Suggest Channels'));
$_SESSION['return_url'] = z_root() . '/' . \App::$cmd;

View File

@ -34,7 +34,9 @@ class Webpages extends \Zotlabs\Web\Controller {
\App::$error = 404;
return;
}
nav_set_selected(t('Webpages'));
$which = argv(1);
$_SESSION['return_url'] = \App::$query_string;

View File

@ -1380,6 +1380,11 @@ blockquote {
background-color: $item_colour;
}
.dropdown-item.active {
color: #fff;
background-color: #007bff;
}
.bg-dark {
background-color: $nav_bg !important;
}

View File

@ -1,5 +1,5 @@
{{if $nav.login && !$userinfo}}
<div class="d-md-none p-1">
<div class="d-md-none pt-1 pb-1">
<a class="btn btn-primary btn-sm text-white" href="#" title="{{$nav.loginmenu.1.3}}" id="{{$nav.loginmenu.1.4}}_collapse" data-toggle="modal" data-target="#nav-login">
{{$nav.loginmenu.1.1}}
</a>