Merge branch 'dev' of https://github.com/redmatrix/hubzilla into xdev_merge
This commit is contained in:
commit
52b1ea10a1
@ -11,7 +11,7 @@ class Manage extends \Zotlabs\Web\Controller {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
nav_set_selected('Manage');
|
nav_set_selected('Channel Manager');
|
||||||
|
|
||||||
require_once('include/security.php');
|
require_once('include/security.php');
|
||||||
|
|
||||||
|
@ -297,7 +297,7 @@ class Ping extends \Zotlabs\Web\Controller {
|
|||||||
killme();
|
killme();
|
||||||
}
|
}
|
||||||
|
|
||||||
if(argc() > 1 && argv(1) === 'messages') {
|
if(argc() > 1 && argv(1) === 'mail') {
|
||||||
$channel = \App::get_channel();
|
$channel = \App::get_channel();
|
||||||
$t = q("select mail.*, xchan.* from mail left join xchan on xchan_hash = from_xchan
|
$t = q("select mail.*, xchan.* from mail left join xchan on xchan_hash = from_xchan
|
||||||
where channel_id = %d and mail_seen = 0 and mail_deleted = 0
|
where channel_id = %d and mail_seen = 0 and mail_deleted = 0
|
||||||
|
@ -16,15 +16,15 @@ class Notifications {
|
|||||||
'type' => 'network',
|
'type' => 'network',
|
||||||
'icon' => 'th',
|
'icon' => 'th',
|
||||||
'severity' => 'secondary',
|
'severity' => 'secondary',
|
||||||
'label' => t('Activity'),
|
'label' => t('New Network Activity'),
|
||||||
'title' => t('Network Activity Notifications'),
|
'title' => t('New Network Activity Notifications'),
|
||||||
'viewall' => [
|
'viewall' => [
|
||||||
'url' => 'network',
|
'url' => 'network',
|
||||||
'label' => t('View your network activity')
|
'label' => t('View your network activity')
|
||||||
],
|
],
|
||||||
'markall' => [
|
'markall' => [
|
||||||
'url' => '#',
|
'url' => '#',
|
||||||
'label' => t('Mark all notifications seen')
|
'label' => t('Mark all notifications read')
|
||||||
]
|
]
|
||||||
];
|
];
|
||||||
|
|
||||||
@ -32,8 +32,8 @@ class Notifications {
|
|||||||
'type' => 'home',
|
'type' => 'home',
|
||||||
'icon' => 'home',
|
'icon' => 'home',
|
||||||
'severity' => 'danger',
|
'severity' => 'danger',
|
||||||
'label' => t('Home'),
|
'label' => t('New Home Activity'),
|
||||||
'title' => t('Channel Home Notifications'),
|
'title' => t('New Home Activity Notifications'),
|
||||||
'viewall' => [
|
'viewall' => [
|
||||||
'url' => 'channel/' . $channel['channel_address'],
|
'url' => 'channel/' . $channel['channel_address'],
|
||||||
'label' => t('View your home activity')
|
'label' => t('View your home activity')
|
||||||
@ -45,11 +45,11 @@ class Notifications {
|
|||||||
];
|
];
|
||||||
|
|
||||||
$notifications[] = [
|
$notifications[] = [
|
||||||
'type' => 'messages',
|
'type' => 'mail',
|
||||||
'icon' => 'envelope',
|
'icon' => 'envelope',
|
||||||
'severity' => 'danger',
|
'severity' => 'danger',
|
||||||
'label' => t('Mail'),
|
'label' => t('New Mails'),
|
||||||
'title' => t('Private mail'),
|
'title' => t('New Mails Notifications'),
|
||||||
'viewall' => [
|
'viewall' => [
|
||||||
'url' => 'mail/combined',
|
'url' => 'mail/combined',
|
||||||
'label' => t('View your private mails')
|
'label' => t('View your private mails')
|
||||||
@ -64,8 +64,8 @@ class Notifications {
|
|||||||
'type' => 'all_events',
|
'type' => 'all_events',
|
||||||
'icon' => 'calendar',
|
'icon' => 'calendar',
|
||||||
'severity' => 'secondary',
|
'severity' => 'secondary',
|
||||||
'label' => t('Events'),
|
'label' => t('New Events'),
|
||||||
'title' => t('Event Calendar'),
|
'title' => t('New Events Notifications'),
|
||||||
'viewall' => [
|
'viewall' => [
|
||||||
'url' => 'mail/combined',
|
'url' => 'mail/combined',
|
||||||
'label' => t('View events')
|
'label' => t('View events')
|
||||||
@ -81,7 +81,7 @@ class Notifications {
|
|||||||
'icon' => 'users',
|
'icon' => 'users',
|
||||||
'severity' => 'danger',
|
'severity' => 'danger',
|
||||||
'label' => t('New Connections'),
|
'label' => t('New Connections'),
|
||||||
'title' => t('New Connections'),
|
'title' => t('New Connections Notifications'),
|
||||||
'viewall' => [
|
'viewall' => [
|
||||||
'url' => 'connections',
|
'url' => 'connections',
|
||||||
'label' => t('View all connections')
|
'label' => t('View all connections')
|
||||||
@ -93,7 +93,7 @@ class Notifications {
|
|||||||
'icon' => 'folder',
|
'icon' => 'folder',
|
||||||
'severity' => 'danger',
|
'severity' => 'danger',
|
||||||
'label' => t('New Files'),
|
'label' => t('New Files'),
|
||||||
'title' => t('New files shared with me'),
|
'title' => t('New Files Notifications'),
|
||||||
];
|
];
|
||||||
|
|
||||||
$notifications[] = [
|
$notifications[] = [
|
||||||
@ -119,7 +119,7 @@ class Notifications {
|
|||||||
'icon' => 'user-o',
|
'icon' => 'user-o',
|
||||||
'severity' => 'danger',
|
'severity' => 'danger',
|
||||||
'label' => t('New Registrations'),
|
'label' => t('New Registrations'),
|
||||||
'title' => t('New Registrations'),
|
'title' => t('New Registrations Notifications'),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -481,8 +481,8 @@ function NavUpdate() {
|
|||||||
if(data.home == 0) { data.home = ''; $('.home-update, .home-button').hide(); } else { $('.home-update, .home-button').show(); }
|
if(data.home == 0) { data.home = ''; $('.home-update, .home-button').hide(); } else { $('.home-update, .home-button').show(); }
|
||||||
$('.home-update').html(data.home);
|
$('.home-update').html(data.home);
|
||||||
|
|
||||||
if(data.intros == 0) { data.intros = ''; $('.intro-update, .intro-button').hide(); } else { $('.intro-update, .intro-button').show(); }
|
if(data.intros == 0) { data.intros = ''; $('.intros-update, .intros-button').hide(); } else { $('.intros-update, .intros-button').show(); }
|
||||||
$('.intro-update').html(data.intros);
|
$('.intros-update').html(data.intros);
|
||||||
|
|
||||||
if(data.mail == 0) { data.mail = ''; $('.mail-update, .mail-button').hide(); } else { $('.mail-update, .mail-button').show(); }
|
if(data.mail == 0) { data.mail = ''; $('.mail-update, .mail-button').hide(); } else { $('.mail-update, .mail-button').show(); }
|
||||||
$('.mail-update').html(data.mail);
|
$('.mail-update').html(data.mail);
|
||||||
|
3
view/pdl/mod_display.pdl
Normal file
3
view/pdl/mod_display.pdl
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
[region=right_aside]
|
||||||
|
[widget=notifications][/widget]
|
||||||
|
[/region]
|
3
view/pdl/mod_pubstream.pdl
Normal file
3
view/pdl/mod_pubstream.pdl
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
[region=right_aside]
|
||||||
|
[widget=notifications][/widget]
|
||||||
|
[/region]
|
3
view/pdl/mod_sharedwithme.pdl
Normal file
3
view/pdl/mod_sharedwithme.pdl
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
[region=right_aside]
|
||||||
|
[widget=notifications][/widget]
|
||||||
|
[/region]
|
@ -8,7 +8,7 @@
|
|||||||
<body <?php if($page['direction']) echo 'dir="rtl"' ?> >
|
<body <?php if($page['direction']) echo 'dir="rtl"' ?> >
|
||||||
<?php if(x($page,'banner')) echo $page['banner']; ?>
|
<?php if(x($page,'banner')) echo $page['banner']; ?>
|
||||||
<header><?php if(x($page,'header')) echo $page['header']; ?></header>
|
<header><?php if(x($page,'header')) echo $page['header']; ?></header>
|
||||||
<nav class="navbar fixed-top navbar-expand-md navbar-dark bg-dark"><?php if(x($page,'nav')) echo $page['nav']; ?></nav>
|
<nav class="navbar fixed-top navbar-expand-xl navbar-dark bg-dark"><?php if(x($page,'nav')) echo $page['nav']; ?></nav>
|
||||||
<main>
|
<main>
|
||||||
<aside id="region_1"><div id="left_aside_spacer"><div id="left_aside_wrapper"><?php if(x($page,'aside')) echo $page['aside']; ?></div></div></aside>
|
<aside id="region_1"><div id="left_aside_spacer"><div id="left_aside_wrapper"><?php if(x($page,'aside')) echo $page['aside']; ?></div></div></aside>
|
||||||
<section id="region_2"><?php if(x($page,'content')) echo $page['content']; ?>
|
<section id="region_2"><?php if(x($page,'content')) echo $page['content']; ?>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
{{if $nav.login && !$userinfo}}
|
{{if $nav.login && !$userinfo}}
|
||||||
<div class="d-md-none pt-1 pb-1">
|
<div class="d-xl-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">
|
<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}}
|
{{$nav.loginmenu.1.1}}
|
||||||
</a>
|
</a>
|
||||||
@ -111,11 +111,11 @@
|
|||||||
{{/if}}
|
{{/if}}
|
||||||
{{if $nav.messages}}
|
{{if $nav.messages}}
|
||||||
<li class="nav-item dropdown mail-button" style="display: none;">
|
<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-messages-menu">
|
<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>
|
<i class="fa fa-fw fa-envelope"></i>
|
||||||
<span class="badge badge-pill badge-danger mail-update"></span>
|
<span class="badge badge-pill badge-danger mail-update"></span>
|
||||||
</a>
|
</a>
|
||||||
<div id="nav-messages-menu" class="dropdown-menu" rel="messages">
|
<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-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>
|
<a class="dropdown-item" id="nav-messages-mark-all" href="#" onclick="markRead('messages'); return false;">{{$nav.messages.mark.1}}</a>
|
||||||
{{$emptynotifications}}
|
{{$emptynotifications}}
|
||||||
@ -136,10 +136,10 @@
|
|||||||
</li>
|
</li>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{if $nav.intros}}
|
{{if $nav.intros}}
|
||||||
<li class="nav-item dropdown intro-button" style="display: none;">
|
<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">
|
<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>
|
<i class="fa fa-fw fa-users"></i>
|
||||||
<span class="badge badge-pill badge-danger intro-update"></span>
|
<span class="badge badge-pill badge-danger intros-update"></span>
|
||||||
</a>
|
</a>
|
||||||
<div id="nav-intros-menu" class="dropdown-menu" rel="intros">
|
<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>
|
<a class="dropdown-item" id="nav-intros-see-all" href="{{$nav.intros.all.0}}">{{$nav.intros.all.1}}</a>
|
||||||
@ -183,17 +183,17 @@
|
|||||||
</li>
|
</li>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{if $nav.login && !$userinfo}}
|
{{if $nav.login && !$userinfo}}
|
||||||
<li class="nav-item d-none d-md-flex">
|
<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>
|
<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>
|
</li>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{if $nav.register}}
|
{{if $nav.register}}
|
||||||
<li class="nav-item {{$nav.register.2}} d-none d-md-flex">
|
<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>
|
<a class="nav-link" href="{{$nav.register.0}}" title="{{$nav.register.3}}" id="{{$nav.register.4}}">{{$nav.register.1}}</a>
|
||||||
</li>
|
</li>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{if $nav.alogout}}
|
{{if $nav.alogout}}
|
||||||
<li class="nav-item {{$nav.alogout.2}} d-none d-md-flex">
|
<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>
|
<a class="nav-link" href="{{$nav.alogout.0}}" title="{{$nav.alogout.3}}" id="{{$nav.alogout.4}}">{{$nav.alogout.1}}</a>
|
||||||
</li>
|
</li>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
@ -216,9 +216,9 @@
|
|||||||
<div class="text-white">{{$sel.active}}</div>
|
<div class="text-white">{{$sel.active}}</div>
|
||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
<div id="banner" class="navbar-text d-none d-md-flex">{{$banner}}</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-md-flex">
|
<ul id="nav-right" class="navbar-nav ml-auto d-none d-xl-flex">
|
||||||
<li class="nav-item collapse clearfix" id="nav-search">
|
<li class="nav-item collapse clearfix" id="nav-search">
|
||||||
<form class="form-inline" method="get" action="search" role="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');"/>
|
<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');"/>
|
||||||
@ -272,7 +272,7 @@
|
|||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="collapse d-md-none" id="navbar-collapse-2">
|
<div class="collapse d-xl-none" id="navbar-collapse-2">
|
||||||
<div class="navbar-nav mr-auto">
|
<div class="navbar-nav mr-auto">
|
||||||
{{if $channel_apps.0}}
|
{{if $channel_apps.0}}
|
||||||
{{foreach $channel_apps as $channel_app}}
|
{{foreach $channel_apps as $channel_app}}
|
||||||
|
@ -1,12 +1,18 @@
|
|||||||
<style>
|
<style>
|
||||||
#notifications {
|
#notifications {
|
||||||
width: 100%;
|
position: fixed;
|
||||||
|
top: 4.5rem;
|
||||||
|
width: 266px;
|
||||||
|
padding: 0 .5rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.notification-content {
|
.notification-content {
|
||||||
max-height: 50vh;
|
max-height: 50vh;
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
border-left: 0.2rem solid #eee;
|
}
|
||||||
|
|
||||||
|
.notification-content.collapsing {
|
||||||
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
.fs {
|
.fs {
|
||||||
@ -22,9 +28,9 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.fs #notifications {
|
.fs #notifications {
|
||||||
position: relative !important;
|
position: relative;
|
||||||
width: 100% !important;
|
width: 100%;
|
||||||
top: 0px !important;
|
top: 0px;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
@ -36,10 +42,10 @@
|
|||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<ul id="notifications" class="navbar-nav" style="position: fixed; width: 280px; top: 64px;" data-children=".nav-item">
|
<div id="notifications" class="navbar-nav" data-children=".nav-item">
|
||||||
{{foreach $notifications as $notification}}
|
{{foreach $notifications as $notification}}
|
||||||
<li class="nav-item {{$notification.type}}-button" style="display: none;">
|
<div class="collapse {{$notification.type}}-button">
|
||||||
<a class="nav-link" href="#nav-{{$notification.type}}-menu" title="{{$notification.title}}" data-toggle="collapse" data-parent="#notifications" rel="#nav-{{$notification.type}}-menu">
|
<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}}
|
<i class="fa fa-fw fa-{{$notification.icon}}"></i> {{$notification.label}}
|
||||||
<span class="float-right badge badge-{{$notification.severity}} {{$notification.type}}-update"></span>
|
<span class="float-right badge badge-{{$notification.severity}} {{$notification.type}}-update"></span>
|
||||||
</a>
|
</a>
|
||||||
@ -52,6 +58,6 @@
|
|||||||
{{/if}}
|
{{/if}}
|
||||||
{{$loading}}
|
{{$loading}}
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</div>
|
||||||
{{/foreach}}
|
{{/foreach}}
|
||||||
</ul>
|
</div>
|
||||||
|
Reference in New Issue
Block a user