diff options
author | zotlabs <mike@macgirvin.com> | 2017-10-10 16:05:56 -0700 |
---|---|---|
committer | zotlabs <mike@macgirvin.com> | 2017-10-10 16:05:56 -0700 |
commit | f273815d8ff45a28b36bd5121c58422dfc28d0ff (patch) | |
tree | f51f4dbfe646b41c1016c85589701cdc44db40e7 | |
parent | 87970491441cb15462d3fe7a7641d2f2755cb45b (diff) | |
parent | 07ae4319501ac6edc024a849b4d060f171f27178 (diff) | |
download | volse-hubzilla-f273815d8ff45a28b36bd5121c58422dfc28d0ff.tar.gz volse-hubzilla-f273815d8ff45a28b36bd5121c58422dfc28d0ff.tar.bz2 volse-hubzilla-f273815d8ff45a28b36bd5121c58422dfc28d0ff.zip |
Merge branch 'dev' of https://github.com/redmatrix/hubzilla into dev_merge
-rw-r--r-- | Zotlabs/Module/Channel.php | 7 | ||||
-rw-r--r-- | Zotlabs/Render/Comanche.php | 3 | ||||
-rw-r--r-- | Zotlabs/Widget/Notifications.php | 4 | ||||
-rwxr-xr-x | boot.php | 2 | ||||
-rw-r--r-- | include/nav.php | 75 | ||||
-rw-r--r-- | include/text.php | 6 | ||||
-rw-r--r-- | view/css/bootstrap-red.css | 1 | ||||
-rw-r--r-- | view/css/navbar_tucson.css | 3 | ||||
-rw-r--r-- | view/js/main.js | 7 | ||||
-rw-r--r-- | view/theme/redbasic/css/align_left.css | 8 | ||||
-rw-r--r-- | view/theme/redbasic/css/style.css | 3 | ||||
-rw-r--r-- | view/theme/redbasic/js/redbasic.js | 34 | ||||
-rw-r--r-- | view/theme/redbasic/php/config.php | 3 | ||||
-rw-r--r-- | view/theme/redbasic/php/style.php | 13 | ||||
-rw-r--r-- | view/theme/redbasic/tpl/theme_settings.tpl | 1 | ||||
-rw-r--r-- | view/tpl/hdr.tpl | 3 | ||||
-rwxr-xr-x | view/tpl/nav.tpl | 143 | ||||
-rwxr-xr-x | view/tpl/navbar_tucson.tpl | 89 | ||||
-rw-r--r-- | view/tpl/notifications_widget.tpl | 61 |
19 files changed, 134 insertions, 332 deletions
diff --git a/Zotlabs/Module/Channel.php b/Zotlabs/Module/Channel.php index 508d2b57a..14d02d873 100644 --- a/Zotlabs/Module/Channel.php +++ b/Zotlabs/Module/Channel.php @@ -92,11 +92,6 @@ class Channel extends \Zotlabs\Web\Controller { // Ensure we've got a profile owner if updating. \App::$profile['profile_uid'] = \App::$profile_uid = $update; } - else { - if(\App::$profile['profile_uid'] == local_channel()) { - nav_set_selected('Channel Home'); - } - } $is_owner = (((local_channel()) && (\App::$profile['profile_uid'] == local_channel())) ? true : false); @@ -119,6 +114,8 @@ class Channel extends \Zotlabs\Web\Controller { if(! $update) { + nav_set_selected('Channel Home'); + $static = channel_manual_conv_update(\App::$profile['profile_uid']); //$o .= profile_tabs($a, $is_owner, \App::$profile['channel_address']); diff --git a/Zotlabs/Render/Comanche.php b/Zotlabs/Render/Comanche.php index ca664cba6..c787b19ae 100644 --- a/Zotlabs/Render/Comanche.php +++ b/Zotlabs/Render/Comanche.php @@ -457,6 +457,9 @@ class Comanche { } } + if(! purify_filename($name)) + return ''; + $clsname = ucfirst($name); $nsname = "\\Zotlabs\\Widget\\" . $clsname; diff --git a/Zotlabs/Widget/Notifications.php b/Zotlabs/Widget/Notifications.php index cac884cd1..0f82d102e 100644 --- a/Zotlabs/Widget/Notifications.php +++ b/Zotlabs/Widget/Notifications.php @@ -6,9 +6,6 @@ class Notifications { function widget($arr) { - if(! get_pconfig(local_channel(), 'system', 'experimental_notif')) - return; - $channel = \App::get_channel(); if(local_channel()) { @@ -139,7 +136,6 @@ class Notifications { ] ]; - $o = replace_macros(get_markup_template('notifications_widget.tpl'), array( '$notifications' => $notifications, '$loading' => t('Loading...') @@ -49,7 +49,7 @@ require_once('include/hubloc.php'); require_once('include/attach.php'); define ( 'PLATFORM_NAME', 'hubzilla' ); -define ( 'STD_VERSION', '2.7.5' ); +define ( 'STD_VERSION', '2.7.6' ); define ( 'ZOT_REVISION', '1.3' ); define ( 'DB_UPDATE_VERSION', 1196 ); diff --git a/include/nav.php b/include/nav.php index 3da67ffd1..b5f713145 100644 --- a/include/nav.php +++ b/include/nav.php @@ -62,12 +62,9 @@ EOT; if($banner === false) $banner = get_config('system','sitename'); - if(! get_pconfig(local_channel(), 'system', 'experimental_notif')) { - //the notifications template is in hdr.tpl - App::$page['header'] .= replace_macros(get_markup_template('hdr.tpl'), array( - //we could additionally use this to display important system notifications e.g. for updates - )); - } + App::$page['header'] .= replace_macros(get_markup_template('hdr.tpl'), array( + //we could additionally use this to display important system notifications e.g. for updates + )); $techlevel = get_account_techlevel(); @@ -94,8 +91,6 @@ EOT; $nav['loginmenu'][] = Array('rmagic',t('Remote authentication'),'',t('Click to authenticate to your home hub'),'rmagic_nav_btn'); } - - if(local_channel()) { if($chans && count($chans) > 1 && feature_enabled(local_channel(),'nav_channel_select')) $nav['channels'] = $chans; @@ -171,51 +166,10 @@ EOT; */ if(local_channel()) { - - $nav['network'] = array('network', t('Activity'), "", t('Network Activity'),'network_nav_btn'); - $nav['network']['all'] = [ 'network', t('View your network activity'), '','' ]; - $nav['network']['mark'] = array('', t('Mark all activity notifications seen'), '',''); - - $nav['home'] = array('channel/' . $channel['channel_address'], t('Channel Home'), "", t('Channel home'),'home_nav_btn'); - $nav['home']['all'] = [ 'channel/' . $channel['channel_address'], t('View your channel home'), '' , '' ]; - $nav['home']['mark'] = array('', t('Mark all channel notifications seen'), '',''); - - - $nav['intros'] = array('connections/ifpending', t('Connections'), "", t('Connections'),'connections_nav_btn'); - if(is_site_admin()) - $nav['registrations'] = array('admin/accounts', t('Registrations'), "", t('Registrations'),'registrations_nav_btn'); - - - $nav['notifications'] = array('notifications/system', t('Notices'), "", t('Notifications'),'notifications_nav_btn'); - $nav['notifications']['all']=array('notifications/system', t('View all notifications'), "", ""); - $nav['notifications']['mark'] = array('', t('Mark all system notifications seen'), '',''); - - $nav['messages'] = array('mail/combined', t('Mail'), "", t('Private mail'),'mail_nav_btn'); - $nav['messages']['all']=array('mail/combined', t('View your private messages'), "", ""); - $nav['messages']['mark'] = array('', t('Mark all private messages seen'), '',''); - $nav['messages']['inbox'] = array('mail/inbox', t('Inbox'), "", t('Inbox')); - $nav['messages']['outbox']= array('mail/outbox', t('Outbox'), "", t('Outbox')); - $nav['messages']['new'] = array('mail/new', t('New Message'), "", t('New Message')); - - - $nav['all_events'] = array('events', t('Events'), "", t('Event Calendar'),'events_nav_btn'); - $nav['all_events']['all']=array('events', t('View events'), "", ""); - $nav['all_events']['mark'] = array('', t('Mark all events seen'), '',''); - if(! $_SESSION['delegate']) { $nav['manage'] = array('manage', t('Channel Manager'), "", t('Manage Your Channels'),'manage_nav_btn'); } - $nav['settings'] = array('settings', t('Settings'),"", t('Account/Channel Settings'),'settings_nav_btn'); - - $nav['files'] = array('sharedwithme', t('Shared Files'), "", t('New files shared with me'),'files_nav_btn'); - - } - - if(! get_config('system', 'disable_discover_tab')) { - $nav['pubs'] = array('pubstream', t('Public stream'), "", t('Public stream activity'),'pubs_nav_btn'); - $nav['pubs']['all'] = [ 'pubstream', t('View public stream'), '','' ]; - $nav['pubs']['mark'] = array('', t('Mark all public stream items seen'), '',''); } /** @@ -233,13 +187,15 @@ EOT; // turned off until somebody discovers this and figures out a good location for it. $powered_by = ''; - $active_app = q("SELECT app_url FROM app WHERE app_channel = %d AND app_name = '%s' LIMIT 1", - intval($channel['channel_id']), - dbesc(\App::$nav_sel['raw_name']) - ); - - if($active_app) { - $url = $active_app[0]['app_url']; + if(App::$profile_uid && App::$nav_sel['raw_name']) { + $active_app = q("SELECT app_url FROM app WHERE app_channel = %d AND app_name = '%s' LIMIT 1", + intval(App::$profile_uid), + dbesc(App::$nav_sel['raw_name']) + ); + + if($active_app) { + $url = $active_app[0]['app_url']; + } } //app bin @@ -284,8 +240,8 @@ EOT; } } - $c = theme_include('navbar_' . $template . '.css'); - $tpl = get_markup_template('navbar_' . $template . '.tpl'); + $c = theme_include('navbar_' . purify_filename($template) . '.css'); + $tpl = get_markup_template('navbar_' . purify_filename($template) . '.tpl'); if($c && $tpl) { head_add_css('navbar_' . $template . '.css'); @@ -297,7 +253,6 @@ EOT; App::$page['nav'] .= replace_macros($tpl, array( '$baseurl' => z_root(), - '$experimental_notif' => get_pconfig(local_channel(), 'system', 'experimental_notif'), '$fulldocs' => t('Help'), '$sitelocation' => $sitelocation, '$nav' => $x['nav'], @@ -318,7 +273,7 @@ EOT; '$addapps' => t('Add Apps'), '$orderapps' => t('Arrange Apps'), '$sysapps_toggle' => t('Toggle System Apps'), - '$url' => $url + '$url' => (($url) ? $url : App::$cmd) )); if(x($_SESSION, 'reload_avatar') && $observer) { diff --git a/include/text.php b/include/text.php index 80914747b..8a65be0d5 100644 --- a/include/text.php +++ b/include/text.php @@ -3156,3 +3156,9 @@ function ellipsify($s,$maxlen) { return mb_substr($s,0,$maxlen / 2) . '...' . mb_substr($s,mb_strlen($s) - ($maxlen / 2)); } + +function purify_filename($s) { + if(($s[0] === '.') || strpos($s,'/') !== false) + return ''; + return $s; +} diff --git a/view/css/bootstrap-red.css b/view/css/bootstrap-red.css index fb6ea911e..2dfc9e07b 100644 --- a/view/css/bootstrap-red.css +++ b/view/css/bootstrap-red.css @@ -19,6 +19,7 @@ nav .dropdown-menu { } } + @media screen and (max-width: 767px) { .navbar { padding: .5rem 7px; diff --git a/view/css/navbar_tucson.css b/view/css/navbar_tucson.css new file mode 100644 index 000000000..79f95fe63 --- /dev/null +++ b/view/css/navbar_tucson.css @@ -0,0 +1,3 @@ +#notifications { + display: none; +} diff --git a/view/js/main.js b/view/js/main.js index 6557b1d8e..ea8d1a3ab 100644 --- a/view/js/main.js +++ b/view/js/main.js @@ -365,11 +365,6 @@ $(function() { return; }); - $('span[rel^="#"]').click(function(e){ - manage_popup_menu(this, e); - return; - }); - function manage_popup_menu(w,e) { menu = $( $(w).attr('rel') ); @@ -992,7 +987,7 @@ function notify_popup_loader(notifyType) { html = notifications_tpl.format(this.notify_link,this.photo,this.name,this.message,this.when,this.hclass); $("#nav-" + notifyType + "-menu").append(html); }); - $(".dropdown-menu img[data-src], .dropdown-item img[data-src]").each(function(i, el){ + $(".dropdown-menu img[data-src], .notification img[data-src]").each(function(i, el){ // Replace data-src attribute with src attribute for every image $(el).attr('src', $(el).data("src")); $(el).removeAttr("data-src"); diff --git a/view/theme/redbasic/css/align_left.css b/view/theme/redbasic/css/align_left.css deleted file mode 100644 index acb2893e3..000000000 --- a/view/theme/redbasic/css/align_left.css +++ /dev/null @@ -1,8 +0,0 @@ -main { - margin-left: 0px; -} - -aside#region_3 { - width: auto; - padding: 0px 0px 0px 0px; -} diff --git a/view/theme/redbasic/css/style.css b/view/theme/redbasic/css/style.css index 2e8d71954..8b4a6ac82 100644 --- a/view/theme/redbasic/css/style.css +++ b/view/theme/redbasic/css/style.css @@ -787,18 +787,21 @@ div.jGrowl div.jGrowl-notification { .contactname { font-weight: bold; + color: $font_colour; display: block; overflow: hidden; text-overflow: ellipsis; } .dropdown-notification, +.notification, .member-item { line-height: 1.1em; font-size: 0.75rem; overflow: hidden; text-overflow: ellipsis; display: block; + white-space: nowrap; } #acl-search::-webkit-input-placeholder { diff --git a/view/theme/redbasic/js/redbasic.js b/view/theme/redbasic/js/redbasic.js index 3fa9d2a76..4f71c1e73 100644 --- a/view/theme/redbasic/js/redbasic.js +++ b/view/theme/redbasic/js/redbasic.js @@ -16,19 +16,27 @@ $(document).ready(function() { } $('#css3-calc').remove(); // Remove the test element - if($(window).width() > 767) { + if($(window).width() >= 767) { $('#left_aside_wrapper').stick_in_parent({ - offset_top: parseInt($('#region_1').css('padding-top')), + offset_top: parseInt($('aside').css('padding-top')), parent: 'main', spacer: '#left_aside_spacer' }); + } + + if($(window).width() >= 1200) { $('#right_aside_wrapper').stick_in_parent({ - offset_top: parseInt($('#region_3').css('padding-top')), + offset_top: parseInt($('aside').css('padding-top')), parent: 'main', spacer: '#right_aside_spacer' }); } + + $('#notifications_wrapper.fs #notifications').stick_in_parent({ + parent: '#notifications_wrapper' + }); + $('#expand-aside').on('click', toggleAside); $('section').on('click', function() { @@ -46,6 +54,16 @@ $(document).ready(function() { } }); + + var right_aside_height = $('#rightt_aside_wrapper').height(); + + $('#right_aside_wrapper').on('click', function() { + if(right_aside_height != $('#right_aside_wrapper').height()) { + $(document.body).trigger("sticky_kit:recalc"); + right_aside_height = $('#right_aside_wrapper').height(); + } + }); + $('.usermenu').click(function() { if($('#navbar-collapse-1, #navbar-collapse-2').hasClass('show')){ $('#navbar-collapse-1, #navbar-collapse-2').removeClass('show'); @@ -64,14 +82,14 @@ $(document).ready(function() { } }); - var notifications_parent = $('#notifications')[0].parentElement.id; + var notifications_parent = $('#notifications_wrapper')[0].parentElement.id; $('#notifications-btn-1').click(function() { - if($('#notifications').hasClass('fs')) - $('#notifications').prependTo('#' + notifications_parent); + if($('#notifications_wrapper').hasClass('fs')) + $('#notifications_wrapper').prependTo('#' + notifications_parent); else - $('#notifications').prependTo('body'); + $('#notifications_wrapper').prependTo('section'); - $('#notifications').toggleClass('fs'); + $('#notifications_wrapper').toggleClass('fs'); if($('#navbar-collapse-2').hasClass('show')){ $('#navbar-collapse-2').removeClass('show'); } diff --git a/view/theme/redbasic/php/config.php b/view/theme/redbasic/php/config.php index 8dbe1be9c..f98182739 100644 --- a/view/theme/redbasic/php/config.php +++ b/view/theme/redbasic/php/config.php @@ -52,7 +52,6 @@ class RedbasicConfig { $arr['radius'] = get_pconfig(local_channel(),'redbasic', 'radius' ); $arr['shadow'] = get_pconfig(local_channel(),'redbasic', 'photo_shadow' ); $arr['converse_width']=get_pconfig(local_channel(),"redbasic","converse_width"); - $arr['align_left']=get_pconfig(local_channel(),"redbasic","align_left"); $arr['top_photo']=get_pconfig(local_channel(),"redbasic","top_photo"); $arr['reply_photo']=get_pconfig(local_channel(),"redbasic","reply_photo"); return $this->form($arr); @@ -79,7 +78,6 @@ class RedbasicConfig { set_pconfig(local_channel(), 'redbasic', 'radius', $_POST['redbasic_radius']); set_pconfig(local_channel(), 'redbasic', 'photo_shadow', $_POST['redbasic_shadow']); set_pconfig(local_channel(), 'redbasic', 'converse_width', $_POST['redbasic_converse_width']); - set_pconfig(local_channel(), 'redbasic', 'align_left', $_POST['redbasic_align_left']); set_pconfig(local_channel(), 'redbasic', 'top_photo', $_POST['redbasic_top_photo']); set_pconfig(local_channel(), 'redbasic', 'reply_photo', $_POST['redbasic_reply_photo']); } @@ -112,7 +110,6 @@ class RedbasicConfig { '$radius' => array('redbasic_radius', t('Set radius of corners'), $arr['radius'], t('Example: 4px')), '$shadow' => array('redbasic_shadow', t('Set shadow depth of photos'), $arr['shadow']), '$converse_width' => array('redbasic_converse_width',t('Set maximum width of content region in pixel'),$arr['converse_width'], t('Leave empty for default width')), - '$align_left' => array('redbasic_align_left',t('Left align page content'),$arr['align_left'], '', array(t('No'),t('Yes'))), '$top_photo' => array('redbasic_top_photo', t('Set size of conversation author photo'), $arr['top_photo']), '$reply_photo' => array('redbasic_reply_photo', t('Set size of followup author photos'), $arr['reply_photo']), )); diff --git a/view/theme/redbasic/php/style.php b/view/theme/redbasic/php/style.php index e5a6eb0cd..91cc0b85b 100644 --- a/view/theme/redbasic/php/style.php +++ b/view/theme/redbasic/php/style.php @@ -26,7 +26,6 @@ if(! App::$install) { $radius = get_pconfig($uid, 'redbasic', 'radius'); $shadow = get_pconfig($uid,'redbasic','photo_shadow'); $converse_width=get_pconfig($uid,'redbasic','converse_width'); - $align_left=get_pconfig($uid,'redbasic','align_left'); $top_photo=get_pconfig($uid,'redbasic','top_photo'); $reply_photo=get_pconfig($uid,'redbasic','reply_photo'); } @@ -117,10 +116,6 @@ if(file_exists('view/theme/redbasic/css/style.css')) { $x .= file_get_contents('view/theme/redbasic/css/narrow_navbar.css'); } - if($align_left && file_exists('view/theme/redbasic/css/align_left.css')) { - $x .= file_get_contents('view/theme/redbasic/css/align_left.css'); - } - if($schemecss) { $x .= $schemecss; } @@ -128,12 +123,8 @@ if(file_exists('view/theme/redbasic/css/style.css')) { $aside_width = 288; // left aside and right aside are 285px + converse width - if($align_left) { - $main_width = (($aside_width) + intval($converse_width)); - } - else { - $main_width = (($aside_width * 2) + intval($converse_width)); - } + $main_width = (($aside_width * 2) + intval($converse_width)); + // prevent main_width smaller than 768px $main_width = (($main_width < 768) ? 768 : $main_width); diff --git a/view/theme/redbasic/tpl/theme_settings.tpl b/view/theme/redbasic/tpl/theme_settings.tpl index f90e37ac3..7c552b49e 100644 --- a/view/theme/redbasic/tpl/theme_settings.tpl +++ b/view/theme/redbasic/tpl/theme_settings.tpl @@ -1,4 +1,3 @@ -{{include file="field_checkbox.tpl" field=$align_left}} {{include file="field_checkbox.tpl" field=$narrow_navbar}} {{include file="field_input.tpl" field=$converse_width}} {{include file="field_input.tpl" field=$font_size}} diff --git a/view/tpl/hdr.tpl b/view/tpl/hdr.tpl index cccee2229..e69de29bb 100644 --- a/view/tpl/hdr.tpl +++ b/view/tpl/hdr.tpl @@ -1,3 +0,0 @@ -<div id="nav-notifications-template" rel="template"> - <a class="dropdown-item clearfix dropdown-notification {5}" href="{0}" title="{2} {3}"><img class="menu-img-3" data-src="{1}"><span class="contactname">{2}</span><span class="dropdown-sub-text">{3}<br>{4}</span></a> -</div> diff --git a/view/tpl/nav.tpl b/view/tpl/nav.tpl index d2bd20f8f..b6faad0c2 100755 --- a/view/tpl/nav.tpl +++ b/view/tpl/nav.tpl @@ -66,157 +66,18 @@ <button id="expand-aside" type="button" class="d-md-none navbar-toggler border-0" data-toggle="offcanvas" data-target="#region_1"> <i class="fa fa-arrow-circle-right" id="expand-aside-icon"></i> </button> - {{if ! $experimental_notif}} - {{if $localuser || $nav.pubs}} - <button id="notifications-btn" type="button" class="navbar-toggler border-0 text-white" data-toggle="collapse" data-target="#navbar-collapse-1"> - <i class="fa fa-exclamation-circle"></i> - </button> - {{/if}} - {{else}} {{if $localuser || $nav.pubs}} <button id="notifications-btn-1" type="button" class="navbar-toggler border-0 text-white"> <i class="fa fa-exclamation-circle"></i> </button> {{/if}} - {{/if}} <button id="menu-btn" class="navbar-toggler border-0" type="button" data-toggle="collapse" data-target="#navbar-collapse-2"> <i class="fa fa-bars"></i> </button> </div> <div class="collapse navbar-collapse" id="navbar-collapse-1"> - {{if ! $experimental_notif}} - <ul class="navbar-nav mr-auto"> - {{if $nav.network}} - <li class="nav-item dropdown network-button" style="display: none;"> - <a class="nav-link" href="#" title="{{$nav.network.3}}" id="{{$nav.network.4}}" data-toggle="dropdown" rel="#nav-network-menu"> - <i class="fa fa-fw fa-th"></i> - <span class="badge badge-pill badge-secondary network-update"></span> - </a> - <div id="nav-network-menu" class="dropdown-menu" rel="network"> - <a class="dropdown-item" id="nav-network-see-all" href="{{$nav.network.all.0}}">{{$nav.network.all.1}}</a> - <a class="dropdown-item" id="nav-network-mark-all" href="#" onclick="markRead('network'); return false;">{{$nav.network.mark.1}}</a> - {{$emptynotifications}} - </div> - </li> - {{/if}} - {{if $nav.home}} - <li class="nav-item dropdown home-button" style="display: none;"> - <a class="nav-link" href="#" title="{{$nav.home.3}}" id="{{$nav.home.4}}" data-toggle="dropdown" rel="#nav-home-menu"> - <i class="fa fa-fw fa-home"></i> - <span class="badge badge-pill badge-danger home-update"></span> - </a> - <div id="nav-home-menu" class="dropdown-menu" rel="home"> - <a class="dropdown-item" id="nav-home-see-all" href="{{$nav.home.all.0}}">{{$nav.home.all.1}}</a> - <a class="dropdown-item" id="nav-home-mark-all" href="#" onclick="markRead('home'); return false;">{{$nav.home.mark.1}}</a> - {{$emptynotifications}} - </div> - </li> - {{/if}} - {{if $nav.messages}} - <li class="nav-item dropdown mail-button" style="display: none;"> - <a class="nav-link" href="#" title="{{$nav.messages.3}}" id="{{$nav.messages.4}}" data-toggle="dropdown" rel="#nav-mail-menu"> - <i class="fa fa-fw fa-envelope"></i> - <span class="badge badge-pill badge-danger mail-update"></span> - </a> - <div id="nav-mail-menu" class="dropdown-menu" rel="messages"> - <a class="dropdown-item" id="nav-messages-see-all" href="{{$nav.messages.all.0}}">{{$nav.messages.all.1}}</a> - <a class="dropdown-item" id="nav-messages-mark-all" href="#" onclick="markRead('messages'); return false;">{{$nav.messages.mark.1}}</a> - {{$emptynotifications}} - </div> - </li> - {{/if}} - {{if $nav.all_events}} - <li class="nav-item dropdown all_events-button" style="display: none;"> - <a class="nav-link" href="#" title="{{$nav.all_events.3}}" id="{{$nav.all_events.4}}" data-toggle="dropdown" rel="#nav-all_events-menu"> - <i class="fa fa-fw fa-calendar"></i> - <span class="badge badge-pill badge-secondary all_events-update"></span> - </a> - <div id="nav-all_events-menu" class="dropdown-menu" rel="all_events"> - <a class="dropdown-item" id="nav-all_events-see-all" href="{{$nav.all_events.all.0}}">{{$nav.all_events.all.1}}</a> - <a class="dropdown-item" id="nav-all_events-mark-all" href="#" onclick="markRead('all_events'); return false;">{{$nav.all_events.mark.1}}</a> - {{$emptynotifications}} - </div> - </li> - {{/if}} - {{if $nav.intros}} - <li class="nav-item dropdown intros-button" style="display: none;"> - <a class="nav-link" href="#" title="{{$nav.intros.3}}" id="{{$nav.intros.4}}" data-toggle="dropdown" rel="#nav-intros-menu"> - <i class="fa fa-fw fa-users"></i> - <span class="badge badge-pill badge-danger intros-update"></span> - </a> - <div id="nav-intros-menu" class="dropdown-menu" rel="intros"> - <a class="dropdown-item" id="nav-intros-see-all" href="{{$nav.intros.all.0}}">{{$nav.intros.all.1}}</a> - {{$emptynotifications}} - </div> - </li> - {{/if}} - {{if $nav.registrations}} - <li class="nav-item dropdown register-button" style="display: none;"> - <a class="nav-link" href="#" title="{{$nav.registrations.3}}" id="{{$nav.registrations.4}}" data-toggle="dropdown" rel="#nav-register-menu"> - <i class="fa fa-fw fa-user-o"></i> - <span class="badge badge-pill badge-danger register-update"></span> - </a> - <div id="nav-register-menu" class="dropdown-menu" rel="register"> - {{$emptynotifications}} - </div> - </li> - {{/if}} - {{if $nav.notifications}} - <li class="nav-item dropdown notify-button" style="display: none;"> - <a class="nav-link" href="#" title="{{$nav.notifications.1}}" id="{{$nav.notifications.4}}" data-toggle="dropdown" rel="#nav-notify-menu"> - <i class="fa fa-fw fa-exclamation"></i> - <span class="badge badge-pill badge-danger notify-update"></span> - </a> - <div id="nav-notify-menu" class="dropdown-menu" rel="notify"> - <a class="dropdown-item" id="nav-notify-see-all" href="{{$nav.notifications.all.0}}">{{$nav.notifications.all.1}}</a> - <a class="dropdown-item" id="nav-notify-mark-all" href="#" onclick="markRead('notify'); return false;">{{$nav.notifications.mark.1}}</a> - {{$emptynotifications}} - </div> - </li> - {{/if}} - {{if $nav.files}} - <li class="nav-item dropdown files-button" style="display: none;"> - <a class="nav-link" href="#" title="{{$nav.files.3}}" id="{{$nav.files.4}}" data-toggle="dropdown" rel="#nav-files-menu"> - <i class="fa fa-fw fa-folder"></i> - <span class="badge badge-pill badge-danger files-update"></span> - </a> - <div id="nav-files-menu" class="dropdown-menu" rel="files"> - {{$emptynotifications}} - </div> - </li> - {{/if}} - {{if $nav.login && !$userinfo}} - <li class="nav-item d-none d-xl-flex"> - <a class="nav-link" href="#" title="{{$nav.loginmenu.1.3}}" id="{{$nav.loginmenu.1.4}}" data-toggle="modal" data-target="#nav-login">{{$nav.loginmenu.1.1}}</a> - </li> - {{/if}} - {{if $nav.register}} - <li class="nav-item {{$nav.register.2}} d-none d-xl-flex"> - <a class="nav-link" href="{{$nav.register.0}}" title="{{$nav.register.3}}" id="{{$nav.register.4}}">{{$nav.register.1}}</a> - </li> - {{/if}} - {{if $nav.alogout}} - <li class="nav-item {{$nav.alogout.2}} d-none d-xl-flex"> - <a class="nav-link" href="{{$nav.alogout.0}}" title="{{$nav.alogout.3}}" id="{{$nav.alogout.4}}">{{$nav.alogout.1}}</a> - </li> - {{/if}} - {{if $nav.pubs}} - <li class="nav-item dropdown pubs-button" style="display: none;"> - <a class="nav-link" href="#" title="{{$nav.pubs.3}}" id="{{$nav.pubs.4}}" data-toggle="dropdown" rel="#nav-pubs-menu"> - <i class="fa fa-fw fa-globe"></i> - <span class="badge badge-pill badge-secondary pubs-update"></span> - </a> - <div id="nav-pubs-menu" class="dropdown-menu" rel="pubs"> - <a class="dropdown-item" id="nav-pubs-see-all" href="{{$nav.pubs.all.0}}">{{$nav.pubs.all.1}}</a> - <a class="dropdown-item" id="nav-pubs-mark-all" href="#" onclick="markRead('pubs'); return false;">{{$nav.pubs.mark.1}}</a> - {{$emptynotifications}} - </div> - </li> - {{/if}} - </ul> - {{else}} - <div class="navbar-text mr-auto d-none d-xl-flex"></div> - {{/if}} + <div class="mr-auto d-none d-xl-flex"></div> + <div id="banner" class="navbar-text d-none d-xl-flex">{{$banner}}</div> <ul id="nav-right" class="navbar-nav ml-auto d-none d-xl-flex"> diff --git a/view/tpl/navbar_tucson.tpl b/view/tpl/navbar_tucson.tpl index ace22a880..c160bec68 100755 --- a/view/tpl/navbar_tucson.tpl +++ b/view/tpl/navbar_tucson.tpl @@ -10,6 +10,9 @@ {{/if}} </div> {{/if}} + + + {{if $userinfo}} <div class="dropdown usermenu"> <div class="fakelink" data-toggle="dropdown"> @@ -42,6 +45,7 @@ {{/if}} </div> {{/if}} + {{if ! $is_owner}} <div class="dropdown-menu" role="menu" aria-labelledby="avatar"> <a class="dropdown-item" href="{{$nav.rusermenu.0}}" role="menuitem">{{$nav.rusermenu.1}}</a> @@ -50,34 +54,49 @@ {{/if}} </div> {{/if}} + + + +{{if $navbar_apps}} +<ul class="navbar-nav mr-auto d-none d-xl-flex"> +{{foreach $navbar_apps as $navbar_app}} +<li> +{{$navbar_app}} +</li> +{{/foreach}} +</ul> +{{/if}} + + <div class="navbar-toggler-right"> + {{if $nav.help.6}} <button id="context-help-btn" class="navbar-toggler border-0" type="button" onclick="contextualHelp(); return false;"> <i class="fa fa-question-circle"></i> </button> {{/if}} + <button id="expand-aside" type="button" class="navbar-toggler border-0" data-toggle="offcanvas" data-target="#region_1"> <i class="fa fa-arrow-circle-right" id="expand-aside-icon"></i> </button> - {{if ! $experimental_notif}} + {{if $localuser || $nav.pubs}} <button id="notifications-btn" type="button" class="navbar-toggler border-0 text-white" data-toggle="collapse" data-target="#navbar-collapse-1"> - <i class="fa fa-exclamation-circle"></i> + <i class="fa fa-exclamation"></i> </button> {{/if}} - {{else}} - {{if $localuser || $nav.pubs}} - <button id="notifications-btn-1" type="button" class="navbar-toggler border-0 text-white"> - <i class="fa fa-exclamation-circle"></i> - </button> - {{/if}} - {{/if}} + <button id="menu-btn" class="navbar-toggler border-0" type="button" data-toggle="collapse" data-target="#navbar-collapse-2"> <i class="fa fa-bars"></i> </button> </div> + + + + + <div class="collapse navbar-collapse" id="navbar-collapse-1"> - {{if ! $experimental_notif}} + <ul class="navbar-nav mr-auto"> {{if $nav.network}} <li class="nav-item dropdown network-button" style="display: none;"> @@ -143,17 +162,6 @@ </div> </li> {{/if}} - {{if $nav.registrations}} - <li class="nav-item dropdown register-button" style="display: none;"> - <a class="nav-link" href="#" title="{{$nav.registrations.3}}" id="{{$nav.registrations.4}}" data-toggle="dropdown" rel="#nav-register-menu"> - <i class="fa fa-fw fa-user-o"></i> - <span class="badge badge-pill badge-danger register-update"></span> - </a> - <div id="nav-register-menu" class="dropdown-menu" rel="register"> - {{$emptynotifications}} - </div> - </li> - {{/if}} {{if $nav.notifications}} <li class="nav-item dropdown notify-button" style="display: none;"> <a class="nav-link" href="#" title="{{$nav.notifications.1}}" id="{{$nav.notifications.4}}" data-toggle="dropdown" rel="#nav-notify-menu"> @@ -167,17 +175,7 @@ </div> </li> {{/if}} - {{if $nav.files}} - <li class="nav-item dropdown files-button" style="display: none;"> - <a class="nav-link" href="#" title="{{$nav.files.3}}" id="{{$nav.files.4}}" data-toggle="dropdown" rel="#nav-files-menu"> - <i class="fa fa-fw fa-folder"></i> - <span class="badge badge-pill badge-danger files-update"></span> - </a> - <div id="nav-files-menu" class="dropdown-menu" rel="files"> - {{$emptynotifications}} - </div> - </li> - {{/if}} + {{if $nav.login && !$userinfo}} <li class="nav-item d-none d-xl-flex"> <a class="nav-link" href="#" title="{{$nav.loginmenu.1.3}}" id="{{$nav.loginmenu.1.4}}" data-toggle="modal" data-target="#nav-login">{{$nav.loginmenu.1.1}}</a> @@ -193,33 +191,16 @@ <a class="nav-link" href="{{$nav.alogout.0}}" title="{{$nav.alogout.3}}" id="{{$nav.alogout.4}}">{{$nav.alogout.1}}</a> </li> {{/if}} - {{if $nav.pubs}} - <li class="nav-item dropdown pubs-button" style="display: none;"> - <a class="nav-link" href="#" title="{{$nav.pubs.3}}" id="{{$nav.pubs.4}}" data-toggle="dropdown" rel="#nav-pubs-menu"> - <i class="fa fa-fw fa-globe"></i> - <span class="badge badge-pill badge-secondary pubs-update"></span> - </a> - <div id="nav-pubs-menu" class="dropdown-menu" rel="pubs"> - <a class="dropdown-item" id="nav-pubs-see-all" href="{{$nav.pubs.all.0}}">{{$nav.pubs.all.1}}</a> - <a class="dropdown-item" id="nav-pubs-mark-all" href="#" onclick="markRead('pubs'); return false;">{{$nav.pubs.mark.1}}</a> - {{$emptynotifications}} - </div> - </li> - {{/if}} + </ul> - {{/if}} + + + <div id="banner" class="navbar-text d-none d-xl-flex">{{$banner}}</div> <ul id="nav-right" class="navbar-nav ml-auto d-none d-xl-flex"> - {{if $navbar_apps}} - {{foreach $navbar_apps as $navbar_app}} - <li class="nav-navbar-apps"> - {{$navbar_app}} - </li> - {{/foreach}} - {{/if}} <li class="nav-item collapse clearfix" id="nav-search"> <form class="form-inline" method="get" action="search" role="search"> <input class="form-control form-control-sm mt-1 mr-2" id="nav-search-text" type="text" value="" placeholder=" {{$help}}" name="search" title="{{$nav.search.3}}" onclick="this.submit();" onblur="closeMenu('nav-search'); openMenu('nav-search-btn');"/> @@ -261,6 +242,8 @@ </li> </ul> </div> + + <div class="collapse d-xl-none" id="navbar-collapse-2"> <div class="navbar-nav mr-auto"> {{if $channel_apps.0}} diff --git a/view/tpl/notifications_widget.tpl b/view/tpl/notifications_widget.tpl index 3323422d6..73cf24071 100644 --- a/view/tpl/notifications_widget.tpl +++ b/view/tpl/notifications_widget.tpl @@ -12,40 +12,45 @@ position: fixed; top: 0px; left: 0px; - padding: 4.5rem .5rem 0 .5rem; + padding: 4.5rem .5rem 1rem .5rem; background-color: white; width: 100%; max-width: 100%; - height: 100vh; - z-index: 1030; + height: 100%; + z-index: 1025; + overflow: auto; } -</style> - + #notifications { + margin-bottom: 1rem; + } +</style> -<div id="notifications" class="navbar-nav" data-children=".nav-item"> - <div id="nav-notifications-template" rel="template"> - <a class="dropdown-item clearfix dropdown-notification {5}" href="{0}" title="{2} {3}"> - <img class="menu-img-3" data-src="{1}"> - <span class="contactname">{2}</span> - <span class="dropdown-sub-text">{3}<br>{4}</span> - </a> - </div> - {{foreach $notifications as $notification}} - <div class="collapse {{$notification.type}}-button"> - <a class="list-group-item" href="#nav-{{$notification.type}}-menu" title="{{$notification.title}}" data-toggle="collapse" data-parent="#notifications" rel="#nav-{{$notification.type}}-menu"> - <i class="fa fa-fw fa-{{$notification.icon}}"></i> {{$notification.label}} - <span class="float-right badge badge-{{$notification.severity}} {{$notification.type}}-update"></span> - </a> - <div id="nav-{{$notification.type}}-menu" class="collapse notification-content" rel="{{$notification.type}}"> - {{if $notification.viewall}} - <a class="dropdown-item" id="nav-{{$notification.type}}-see-all" href="{{$notification.viewall.url}}">{{$notification.viewall.label}}</a> - {{/if}} - {{if $notification.markall}} - <a class="dropdown-item" id="nav-{{$notification.type}}-mark-all" href="{{$notification.markall.url}}" onclick="markRead('{{$notification.type}}'); return false;">{{$notification.markall.label}}</a> - {{/if}} - {{$loading}} +<div id="notifications_wrapper"> + <div id="notifications" class="navbar-nav" data-children=".nav-item"> + <div id="nav-notifications-template" rel="template"> + <a class="list-group-item clearfix notification {5}" href="{0}" title="{2} {3}"> + <img class="menu-img-3" data-src="{1}"> + <span class="contactname">{2}</span> + <span class="dropdown-sub-text">{3}<br>{4}</span> + </a> + </div> + {{foreach $notifications as $notification}} + <div class="collapse {{$notification.type}}-button"> + <a class="list-group-item" href="#nav-{{$notification.type}}-menu" title="{{$notification.title}}" data-toggle="collapse" data-parent="#notifications" rel="#nav-{{$notification.type}}-menu"> + <i class="fa fa-fw fa-{{$notification.icon}}"></i> {{$notification.label}} + <span class="float-right badge badge-{{$notification.severity}} {{$notification.type}}-update"></span> + </a> + <div id="nav-{{$notification.type}}-menu" class="collapse notification-content" rel="{{$notification.type}}"> + {{if $notification.viewall}} + <a class="list-group-item" id="nav-{{$notification.type}}-see-all" href="{{$notification.viewall.url}}">{{$notification.viewall.label}}</a> + {{/if}} + {{if $notification.markall}} + <a class="list-group-item" id="nav-{{$notification.type}}-mark-all" href="{{$notification.markall.url}}" onclick="markRead('{{$notification.type}}'); return false;">{{$notification.markall.label}}</a> + {{/if}} + {{$loading}} + </div> </div> + {{/foreach}} </div> - {{/foreach}} </div> |