diff options
author | Mario Vavti <mario@mariovavti.com> | 2021-09-23 21:54:12 +0200 |
---|---|---|
committer | Mario Vavti <mario@mariovavti.com> | 2021-09-23 21:54:12 +0200 |
commit | 2870fd46da8ceaff5b3a2b0f6bc8d4c7f7601661 (patch) | |
tree | 6607509d641d0034b9b2fc2e8f4ed8d3e7c3becd | |
parent | dff8ef91a6e2e2b2fddb816218e15750061c4c2b (diff) | |
parent | 0588975e372f863aa2d74bbff0ac2b9778852431 (diff) | |
download | volse-hubzilla-2870fd46da8ceaff5b3a2b0f6bc8d4c7f7601661.tar.gz volse-hubzilla-2870fd46da8ceaff5b3a2b0f6bc8d4c7f7601661.tar.bz2 volse-hubzilla-2870fd46da8ceaff5b3a2b0f6bc8d4c7f7601661.zip |
Merge branch 'dev' of https://framagit.org/hubzilla/core into dev
-rw-r--r-- | Zotlabs/Lib/Enotify.php | 6 | ||||
-rw-r--r-- | Zotlabs/Module/Hq.php | 1 | ||||
-rw-r--r-- | Zotlabs/Widget/Messages.php | 55 | ||||
-rw-r--r-- | boot.php | 2 | ||||
-rw-r--r-- | include/items.php | 7 | ||||
-rw-r--r-- | view/css/bootstrap-red.css | 2 | ||||
-rw-r--r-- | view/php/default.php | 2 | ||||
-rw-r--r-- | view/theme/redbasic/css/style.css | 3 | ||||
-rw-r--r-- | view/tpl/abook_edit.tpl | 10 | ||||
-rw-r--r-- | view/tpl/admin_settings_features.tpl | 2 | ||||
-rw-r--r-- | view/tpl/generic_addon_settings.tpl | 2 | ||||
-rw-r--r-- | view/tpl/messages_widget.tpl | 5 | ||||
-rw-r--r-- | view/tpl/navbar_default.tpl | 326 | ||||
-rw-r--r-- | view/tpl/navbar_tucson.tpl | 410 | ||||
-rw-r--r-- | view/tpl/permcats.tpl | 2 | ||||
-rw-r--r-- | view/tpl/profile_edit.tpl | 8 | ||||
-rw-r--r-- | view/tpl/settings.tpl | 6 | ||||
-rw-r--r-- | view/tpl/settings_display.tpl | 6 | ||||
-rw-r--r-- | view/tpl/settings_features.tpl | 2 | ||||
-rw-r--r-- | view/tpl/tokens.tpl | 2 |
20 files changed, 462 insertions, 397 deletions
diff --git a/Zotlabs/Lib/Enotify.php b/Zotlabs/Lib/Enotify.php index 632848290..d02dab739 100644 --- a/Zotlabs/Lib/Enotify.php +++ b/Zotlabs/Lib/Enotify.php @@ -127,7 +127,7 @@ class Enotify { logger('notification: mail'); $subject = sprintf( t('[$Projectname:Notify] New direct message received at %s'), $sitename); - $preamble = sprintf( t('%1$s sent you a new direct message at %2$s.'), $sender['xchan_name'], $sitename); + $preamble = sprintf( t('%1$s sent you a new direct message at %2$s'), $sender['xchan_name'], $sitename); $epreamble = sprintf( t('%1$s sent you %2$s.'), '[zrl=' . $sender['xchan_url'] . ']' . $sender['xchan_name'] . '[/zrl]', '[zrl=$itemlink]' . t('a direct message') . '[/zrl]'); $sitelink = t('Please visit %s to view and/or reply to your direct messages.'); $tsitelink = sprintf( $sitelink, $siteurl . '/hq/' . gen_link_id($params['item']['mid'])); @@ -238,7 +238,7 @@ class Enotify { $subject = sprintf( t('[$Projectname:Notify] Moderated Comment to conversation #%1$d by %2$s'), $parent_id, $sender['xchan_name']); else $subject = sprintf( t('[$Projectname:Notify] Comment to conversation #%1$d by %2$s'), $parent_id, $sender['xchan_name']); - $preamble = sprintf( t('%1$s commented on an item/conversation you have been following.'), $sender['xchan_name']); + $preamble = sprintf( t('%1$s commented on an item/conversation you have been following'), $sender['xchan_name']); $epreamble = $dest_str; $sitelink = t('Please visit %s to view and/or reply to the conversation.'); @@ -318,7 +318,7 @@ class Enotify { // differents subjects for messages on the same thread. $subject = sprintf( t('[$Projectname:Notify] Like received to conversation #%1$d by %2$s'), $parent_id, $sender['xchan_name']); - $preamble = sprintf( t('%1$s liked an item/conversation you created.'), $sender['xchan_name']); + $preamble = sprintf( t('%1$s liked an item/conversation you created'), $sender['xchan_name']); $epreamble = $dest_str; $sitelink = t('Please visit %s to view and/or reply to the conversation.'); diff --git a/Zotlabs/Module/Hq.php b/Zotlabs/Module/Hq.php index 929f2b758..3b8e88488 100644 --- a/Zotlabs/Module/Hq.php +++ b/Zotlabs/Module/Hq.php @@ -254,7 +254,6 @@ class Hq extends \Zotlabs\Web\Controller { return; $options['offset'] = $_REQUEST['offset']; - $options['dm'] = $_REQUEST['dm']; $options['type'] = $_REQUEST['type']; $ret = Messages::get_messages_page($options); diff --git a/Zotlabs/Widget/Messages.php b/Zotlabs/Widget/Messages.php index 21375b08f..22662a01d 100644 --- a/Zotlabs/Widget/Messages.php +++ b/Zotlabs/Widget/Messages.php @@ -11,7 +11,7 @@ class Messages { if (!local_channel()) return EMPTY_STR; - $page = self::get_messages_page($options); + $page = self::get_messages_page([]); $_SESSION['messages_loadtime'] = datetime_convert(); @@ -24,6 +24,7 @@ class Messages { 'messages_title' => t('Public and restricted messages'), 'direct_messages_title' => t('Direct messages'), 'starred_messages_title' => t('Starred messages'), + 'notice_messages_title' => t('Notices'), 'loading' => t('Loading'), 'empty' => t('No messages') ] @@ -40,6 +41,10 @@ class Messages { return; } + if ($options['type'] == 'notification') { + return self::get_notices_page($options); + } + $channel = App::get_channel(); $item_normal = item_normal(); $entries = []; @@ -81,6 +86,7 @@ class Messages { xchan_query($items, false); $i = 0; + $entries = []; foreach($items as $item) { @@ -181,4 +187,51 @@ class Messages { return trim($recipients, ', '); } + public static function get_notices_page($options) { + + if (!local_channel()) + return; + + $limit = 30; + + $offset = 0; + if ($options['offset']) { + $offset = intval($options['offset']); + } + + $notices = q("SELECT * FROM notify WHERE uid = %d + ORDER BY created DESC LIMIT $limit OFFSET $offset", + intval(local_channel()) + ); + + $i = 0; + $entries = []; + + foreach($notices as $notice) { + + $summary = trim(strip_tags(bbcode($notice['msg']))); + + if(strpos($summary, $notice['xname']) === 0) { + $summary = substr($summary, strlen($notice['xname']) + 1); + } + + $entries[$i]['author_name'] = $notice['xname']; + $entries[$i]['author_addr'] = $notice['url']; + $entries[$i]['info'] = ''; + $entries[$i]['created'] = datetime_convert('UTC', date_default_timezone_get(), $notice['created']); + $entries[$i]['summary'] = $summary; + $entries[$i]['b64mid'] = basename($notice['link']); + $entries[$i]['href'] = z_root() . '/hq/' . basename($notice['link']); + $entries[$i]['icon'] = ''; + + $i++; + } + + $result = [ + 'offset' => ((count($entries) < $limit) ? -1 : intval($offset + $limit)), + 'entries' => $entries + ]; + + return $result; + } } @@ -53,7 +53,7 @@ require_once('include/bbcode.php'); require_once('include/items.php'); define ( 'PLATFORM_NAME', 'hubzilla' ); -define ( 'STD_VERSION', '6.3.2' ); +define ( 'STD_VERSION', '6.3.3' ); define ( 'ZOT_REVISION', '6.0' ); define ( 'DB_UPDATE_VERSION', 1248 ); diff --git a/include/items.php b/include/items.php index 933d94f3c..2ee870c2f 100644 --- a/include/items.php +++ b/include/items.php @@ -2423,9 +2423,14 @@ function send_status_notifications($post_id,$item) { $unfollowed = false; $parent = 0; + $is_reaction = false; + + $type = ((intval($item['item_private']) === 2) ? NOTIFY_MAIL : NOTIFY_COMMENT); if(array_key_exists('verb',$item) && (activity_match($item['verb'], ACTIVITY_LIKE) || activity_match($item['verb'], ACTIVITY_DISLIKE))) { + $type = NOTIFY_LIKE; + $r = q("select id from item where mid = '%s' and uid = %d limit 1", dbesc($item['thr_parent']), intval($item['uid']) @@ -2494,7 +2499,7 @@ function send_status_notifications($post_id,$item) { Enotify::submit(array( - 'type' => ((intval($item['item_private']) === 2) ? NOTIFY_MAIL : NOTIFY_COMMENT), + 'type' => $type, 'from_xchan' => $item['author_xchan'], 'to_xchan' => $r[0]['channel_hash'], 'item' => $item, diff --git a/view/css/bootstrap-red.css b/view/css/bootstrap-red.css index 9f03d1b12..8a33f3b2e 100644 --- a/view/css/bootstrap-red.css +++ b/view/css/bootstrap-red.css @@ -62,7 +62,7 @@ nav .dropdown-menu { /* offcanvas */ .offcanvas, -.modal-backdrop.fade { +.offcanvas-backdrop.fade { transition: none; } diff --git a/view/php/default.php b/view/php/default.php index 6f0735a11..64d58a0c1 100644 --- a/view/php/default.php +++ b/view/php/default.php @@ -8,7 +8,7 @@ <body <?php if($page['direction']) echo 'dir="rtl"' ?> > <?php if(x($page,'banner')) echo $page['banner']; ?> <header><?php if(x($page,'header')) echo $page['header']; ?></header> - <nav class="navbar fixed-top navbar-expand-lg navbar-dark bg-dark"><?php if(x($page,'nav')) echo $page['nav']; ?></nav> + <?php if(x($page,'nav')) echo $page['nav']; ?></nav> <main> <div class="content"> <div class="columns"> diff --git a/view/theme/redbasic/css/style.css b/view/theme/redbasic/css/style.css index 9c3596f1b..346e46c6b 100644 --- a/view/theme/redbasic/css/style.css +++ b/view/theme/redbasic/css/style.css @@ -1538,9 +1538,8 @@ blockquote { left: 0px; } - #nav-app-link-wrapper.has_location { + #nav-app-link-wrapper { min-width: 0; - flex-basis: 25%; } #nav-app-link-wrapper { diff --git a/view/tpl/abook_edit.tpl b/view/tpl/abook_edit.tpl index 380d5886c..686b40a54 100644 --- a/view/tpl/abook_edit.tpl +++ b/view/tpl/abook_edit.tpl @@ -85,7 +85,7 @@ <div class="panel"> <div class="section-subtitle-wrapper" role="tab" id="pending-tool"> <h3> - <a data-bs-toggle="collapse" data-parent="#contact-edit-tools" href="#pending-tool-collapse" aria-expanded="true" aria-controls="pending-tool-collapse"> + <a data-bs-toggle="collapse" data-bs-parent="#contact-edit-tools" href="#pending-tool-collapse" aria-expanded="true" aria-controls="pending-tool-collapse"> {{$pending_label}} </a> </h3> @@ -387,7 +387,7 @@ <div class="panel"> <div class="section-subtitle-wrapper" role="tab" id="affinity-tool"> <h3> - <a data-bs-toggle="collapse" data-parent="#contact-edit-tools" href="#affinity-tool-collapse" aria-expanded="true" aria-controls="affinity-tool-collapse"> + <a data-bs-toggle="collapse" data-bs-parent="#contact-edit-tools" href="#affinity-tool-collapse" aria-expanded="true" aria-controls="affinity-tool-collapse"> {{$affinity}} </a> </h3> @@ -418,7 +418,7 @@ <div class="panel"> <div class="section-subtitle-wrapper" role="tab" id="fitert-tool"> <h3> - <a data-bs-toggle="collapse" data-parent="#contact-edit-tools" href="#fitert-tool-collapse" aria-expanded="true" aria-controls="fitert-tool-collapse"> + <a data-bs-toggle="collapse" data-bs-parent="#contact-edit-tools" href="#fitert-tool-collapse" aria-expanded="true" aria-controls="fitert-tool-collapse"> {{$connfilter_label}} </a> </h3> @@ -442,7 +442,7 @@ <div class="panel"> <div class="section-subtitle-wrapper" role="tab" id="rating-tool"> <h3> - <a data-bs-toggle="collapse" data-parent="#contact-edit-tools" href="#rating-tool-collapse" aria-expanded="true" aria-controls="rating-tool-collapse"> + <a data-bs-toggle="collapse" data-bs-parent="#contact-edit-tools" href="#rating-tool-collapse" aria-expanded="true" aria-controls="rating-tool-collapse"> {{$lbl_rating}} </a> </h3> @@ -471,7 +471,7 @@ {{if $notself}} <div class="section-subtitle-wrapper" role="tab" id="perms-tool"> <h3> - <a data-bs-toggle="collapse" data-parent="#contact-edit-tools" href="#perms-tool-collapse" aria-expanded="true" aria-controls="perms-tool-collapse"> + <a data-bs-toggle="collapse" data-bs-parent="#contact-edit-tools" href="#perms-tool-collapse" aria-expanded="true" aria-controls="perms-tool-collapse"> {{$permlbl}} </a> </h3> diff --git a/view/tpl/admin_settings_features.tpl b/view/tpl/admin_settings_features.tpl index 330251dce..6c5c2c245 100644 --- a/view/tpl/admin_settings_features.tpl +++ b/view/tpl/admin_settings_features.tpl @@ -14,7 +14,7 @@ </a> </h3> </div> - <div id="{{$g}}-settings-content" class="panel-collapse collapse{{if $g == 'general'}} show{{/if}}" data-parent="#settings" role="tabpanel" aria-labelledby="{{$g}}-settings-title"> + <div id="{{$g}}-settings-content" class="panel-collapse collapse{{if $g == 'general'}} show{{/if}}" data-bs-parent="#settings" role="tabpanel" aria-labelledby="{{$g}}-settings-title"> <div class="section-content-tools-wrapper"> {{foreach $f.1 as $fcat}} {{include file="field_checkbox.tpl" field=$fcat.0}} diff --git a/view/tpl/generic_addon_settings.tpl b/view/tpl/generic_addon_settings.tpl index 92896aec4..aed8276da 100644 --- a/view/tpl/generic_addon_settings.tpl +++ b/view/tpl/generic_addon_settings.tpl @@ -10,7 +10,7 @@ </a> </h3> </div> - <div id="{{$addon.0}}-settings-content" class="panel-collapse collapse" role="tabpanel" aria-labelledby="{{$addon.0}}-settings" data-parent="#settings"> + <div id="{{$addon.0}}-settings-content" class="panel-collapse collapse" role="tabpanel" aria-labelledby="{{$addon.0}}-settings" data-bs-parent="#settings"> <div class="section-content-tools-wrapper"> {{$content}} {{if $addon.0}} diff --git a/view/tpl/messages_widget.tpl b/view/tpl/messages_widget.tpl index 2d7ab99df..83f563db6 100644 --- a/view/tpl/messages_widget.tpl +++ b/view/tpl/messages_widget.tpl @@ -16,6 +16,11 @@ </a> </li> {{/if}} + <li class="nav-item"> + <a class="nav-link messages-type" href="#" title="{{$strings.notice_messages_title}}" data-messages_type="notification"> + <i class="fa fa-fw fa-exclamation"></i> + </a> + </li> </ul> <div id="messages-widget" class="border border-top-0 overflow-auto mb-3 clearfix" style="height: 70vh;"> <div id="messages-template" rel="template" class="d-none"> diff --git a/view/tpl/navbar_default.tpl b/view/tpl/navbar_default.tpl index df8e5b69a..eae74daca 100644 --- a/view/tpl/navbar_default.tpl +++ b/view/tpl/navbar_default.tpl @@ -1,180 +1,182 @@ -<div class="container-fluid"> - {{if $nav.login && !$userinfo}} - <div class="d-lg-none pt-1 pb-1"> - {{if $nav.loginmenu.1.4}} - <a class="btn btn-primary btn-sm text-white" href="#" title="{{$nav.loginmenu.1.3}}" id="{{$nav.loginmenu.1.4}}_collapse" data-bs-toggle="modal" data-bs-target="#nav-login"> - {{$nav.loginmenu.1.1}} - </a> - {{else}} - <a class="btn btn-primary btn-sm text-white" href="login" title="{{$nav.loginmenu.1.3}}"> - {{$nav.loginmenu.1.1}} - </a> - {{/if}} - {{if $nav.register}} - <a class="btn btn-warning btn-sm text-dark" href="{{$nav.register.0}}" title="{{$nav.register.3}}" id="{{$nav.register.4}}" > - {{$nav.register.1}} - </a> - {{/if}} - </div> - {{/if}} - {{if $userinfo}} - <div class="d-flex justify-content-start"> - <div class="dropdown"> - <div class="fakelink usermenu" data-bs-toggle="dropdown"> - <img id="avatar" src="{{$userinfo.icon}}" alt="{{$userinfo.name}}"> - <i class="fa fa-caret-down"></i> - </div> - {{if $is_owner}} - <div class="dropdown-menu"> - {{foreach $nav.usermenu as $usermenu}} - <a class="dropdown-item{{if $usermenu.2}} active{{/if}}" href="{{$usermenu.0}}" title="{{$usermenu.3}}" role="menuitem" id="{{$usermenu.4}}">{{$usermenu.1}}</a> - {{/foreach}} - {{if $nav.group}} - <a class="dropdown-item" href="{{$nav.group.0}}" title="{{$nav.group.3}}" role="menuitem" id="{{$nav.group.4}}">{{$nav.group.1}}</a> - {{/if}} - {{if $nav.manage}} - <a class="dropdown-item{{if $sel.name == Manage}} active{{/if}}" href="{{$nav.manage.0}}" title="{{$nav.manage.3}}" role="menuitem" id="{{$nav.manage.4}}">{{$nav.manage.1}}</a> - {{/if}} - {{if $nav.channels}} - {{foreach $nav.channels as $chan}} - <a class="dropdown-item" href="manage/{{$chan.channel_id}}" title="{{$chan.channel_name}}" role="menuitem"><i class="fa fa-circle{{if $localuser == $chan.channel_id}} text-success{{else}} invisible{{/if}}"></i> {{$chan.channel_name}}</a> - {{/foreach}} - {{/if}} - {{if $nav.profiles}} - <a class="dropdown-item" href="{{$nav.profiles.0}}" title="{{$nav.profiles.3}}" role="menuitem" id="{{$nav.profiles.4}}">{{$nav.profiles.1}}</a> - {{/if}} - {{if $nav.settings}} - <div class="dropdown-divider"></div> - <a class="dropdown-item{{if $sel.name == Settings}} active{{/if}}" href="{{$nav.settings.0}}" title="{{$nav.settings.3}}" role="menuitem" id="{{$nav.settings.4}}">{{$nav.settings.1}}</a> - {{/if}} - {{if $nav.admin}} - <div class="dropdown-divider"></div> - <a class="dropdown-item{{if $sel.name == Admin}} active{{/if}}" href="{{$nav.admin.0}}" title="{{$nav.admin.3}}" role="menuitem" id="{{$nav.admin.4}}">{{$nav.admin.1}}</a> - {{/if}} - {{if $nav.logout}} - <div class="dropdown-divider"></div> - <a class="dropdown-item" href="{{$nav.logout.0}}" title="{{$nav.logout.3}}" role="menuitem" id="{{$nav.logout.4}}">{{$nav.logout.1}}</a> - {{/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> - <a class="dropdown-item" href="{{$nav.rusermenu.2}}" role="menuitem">{{$nav.rusermenu.3}}</a> - </div> - {{/if}} - </div> - {{if $sel.name}} - <div id="nav-app-link-wrapper" class="navbar-nav{{if $sitelocation}} has_location{{/if}}"> - <a id="nav-app-link" href="{{$url}}" class="nav-link text-truncate"> - {{$sel.name}} - {{if $sitelocation}} - <br><small>{{$sitelocation}}</small> - {{/if}} +<nav class="navbar fixed-top navbar-expand-lg navbar-dark bg-dark"> + <div class="container-fluid flex-nowrap"> + {{if $nav.login && !$userinfo}} + <div class="d-lg-none pt-1 pb-1"> + {{if $nav.loginmenu.1.4}} + <a class="btn btn-primary btn-sm text-white" href="#" title="{{$nav.loginmenu.1.3}}" id="{{$nav.loginmenu.1.4}}_collapse" data-bs-toggle="modal" data-bs-target="#nav-login"> + {{$nav.loginmenu.1.1}} </a> - </div> - {{if $settings_url}} - <div id="nav-app-settings-link-wrapper" class="navbar-nav"> - <a id="nav-app-settings-link" href="{{$settings_url}}/?f=&rpath={{$url}}" class="nav-link"> - <i class="fa fa-fw fa-cog"></i> + {{else}} + <a class="btn btn-primary btn-sm text-white" href="login" title="{{$nav.loginmenu.1.3}}"> + {{$nav.loginmenu.1.1}} </a> + {{/if}} + {{if $nav.register}} + <a class="btn btn-warning btn-sm text-dark" href="{{$nav.register.0}}" title="{{$nav.register.3}}" id="{{$nav.register.4}}" > + {{$nav.register.1}} + </a> + {{/if}} </div> {{/if}} - {{/if}} - </div> - {{/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="d-lg-none navbar-toggler border-0"> - <i class="fa fa-arrow-circle-right" id="expand-aside-icon"></i> - </button> - {{if $localuser || $nav.pubs}} - <button id="notifications-btn-1" type="button" class="navbar-toggler border-0 notifications-btn"> - <i id="notifications-btn-icon-1" class="fa fa-exclamation-circle notifications-btn-icon"></i> - </button> - {{/if}} - <button id="menu-btn" class="navbar-toggler border-0" type="button" data-bs-toggle="offcanvas" data-bs-target="#app-bin"> - <i class="fa fa-bars"></i> - </button> - </div> - <div class="collapse navbar-collapse justify-content-between" id="navbar-collapse-1"> - <ul class="navbar-nav"> - {{if $nav.login && !$userinfo}} - <li class="nav-item d-lg-flex"> - {{if $nav.loginmenu.1.4}} - <a class="nav-link" href="#" title="{{$nav.loginmenu.1.3}}" id="{{$nav.loginmenu.1.4}}" data-bs-toggle="modal" data-bs-target="#nav-login"> - {{$nav.loginmenu.1.1}} + {{if $userinfo}} + <div class="d-flex" style="max-width: 50%"> + <div class="dropdown"> + <div class="fakelink usermenu" data-bs-toggle="dropdown"> + <img id="avatar" src="{{$userinfo.icon}}" alt="{{$userinfo.name}}"> + <i class="fa fa-caret-down"></i> + </div> + {{if $is_owner}} + <div class="dropdown-menu"> + {{foreach $nav.usermenu as $usermenu}} + <a class="dropdown-item{{if $usermenu.2}} active{{/if}}" href="{{$usermenu.0}}" title="{{$usermenu.3}}" role="menuitem" id="{{$usermenu.4}}">{{$usermenu.1}}</a> + {{/foreach}} + {{if $nav.group}} + <a class="dropdown-item" href="{{$nav.group.0}}" title="{{$nav.group.3}}" role="menuitem" id="{{$nav.group.4}}">{{$nav.group.1}}</a> + {{/if}} + {{if $nav.manage}} + <a class="dropdown-item{{if $sel.name == Manage}} active{{/if}}" href="{{$nav.manage.0}}" title="{{$nav.manage.3}}" role="menuitem" id="{{$nav.manage.4}}">{{$nav.manage.1}}</a> + {{/if}} + {{if $nav.channels}} + {{foreach $nav.channels as $chan}} + <a class="dropdown-item" href="manage/{{$chan.channel_id}}" title="{{$chan.channel_name}}" role="menuitem"><i class="fa fa-circle{{if $localuser == $chan.channel_id}} text-success{{else}} invisible{{/if}}"></i> {{$chan.channel_name}}</a> + {{/foreach}} + {{/if}} + {{if $nav.profiles}} + <a class="dropdown-item" href="{{$nav.profiles.0}}" title="{{$nav.profiles.3}}" role="menuitem" id="{{$nav.profiles.4}}">{{$nav.profiles.1}}</a> + {{/if}} + {{if $nav.settings}} + <div class="dropdown-divider"></div> + <a class="dropdown-item{{if $sel.name == Settings}} active{{/if}}" href="{{$nav.settings.0}}" title="{{$nav.settings.3}}" role="menuitem" id="{{$nav.settings.4}}">{{$nav.settings.1}}</a> + {{/if}} + {{if $nav.admin}} + <div class="dropdown-divider"></div> + <a class="dropdown-item{{if $sel.name == Admin}} active{{/if}}" href="{{$nav.admin.0}}" title="{{$nav.admin.3}}" role="menuitem" id="{{$nav.admin.4}}">{{$nav.admin.1}}</a> + {{/if}} + {{if $nav.logout}} + <div class="dropdown-divider"></div> + <a class="dropdown-item" href="{{$nav.logout.0}}" title="{{$nav.logout.3}}" role="menuitem" id="{{$nav.logout.4}}">{{$nav.logout.1}}</a> + {{/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> + <a class="dropdown-item" href="{{$nav.rusermenu.2}}" role="menuitem">{{$nav.rusermenu.3}}</a> + </div> + {{/if}} + </div> + {{if $sel.name}} + <div id="nav-app-link-wrapper" class="navbar-nav{{if $sitelocation}} has_location{{/if}}"> + <a id="nav-app-link" href="{{$url}}" class="nav-link text-truncate" style="width: 100%"> + {{$sel.name}} + {{if $sitelocation}} + <br><small>{{$sitelocation}}</small> + {{/if}} </a> - {{else}} - <a class="nav-link" href="login" title="{{$nav.loginmenu.1.3}}"> - {{$nav.loginmenu.1.1}} + </div> + {{if $settings_url}} + <div id="nav-app-settings-link-wrapper" class="navbar-nav"> + <a id="nav-app-settings-link" href="{{$settings_url}}/?f=&rpath={{$url}}" class="nav-link"> + <i class="fa fa-fw fa-cog"></i> </a> - {{/if}} - </li> - {{/if}} - {{if $nav.register}} - <li class="nav-item {{$nav.register.2}} d-lg-flex"> - <a class="nav-link" href="{{$nav.register.0}}" title="{{$nav.register.3}}" id="{{$nav.register.4}}">{{$nav.register.1}}</a> - </li> + </div> {{/if}} - {{if $nav.alogout}} - <li class="nav-item {{$nav.alogout.2}} d-lg-flex"> - <a class="nav-link" href="{{$nav.alogout.0}}" title="{{$nav.alogout.3}}" id="{{$nav.alogout.4}}">{{$nav.alogout.1}}</a> - </li> {{/if}} - </ul> - - <div id="banner" class="navbar-text">{{$banner}}</div> + </div> + {{/if}} - <ul id="nav-right" class="navbar-nav"> - <li class="nav-item collapse clearfix" id="nav-search"> - <form class="form-inline" method="get" action="{{$nav.search.4}}" role="search"> - <input class="form-control form-control-sm mt-1 me-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');"/> - </form> - <div id="nav-search-spinner" class="spinner-wrapper"> - <div class="spinner s"></div> - </div> - </li> - <li class="nav-item" id="nav-search-btn"> - <a class="nav-link" href="#nav-search" title="{{$nav.search.3}}" onclick="openMenu('nav-search'); closeMenu('nav-search-btn'); $('#nav-search-text').focus(); return false;"><i class="fa fa-fw fa-search"></i></a> - </li> + <div class="navbar-toggler-right"> {{if $nav.help.6}} - <li class="nav-item dropdown {{$sel.help}}"> - <a class="nav-link {{$nav.help.2}}" target="hubzilla-help" href="{{$nav.help.0}}" title="{{$nav.help.3}}" id="{{$nav.help.4}}" onclick="contextualHelp(); return false;"><i class="fa fa-fw fa-question-circle"></i></a> - </li> + <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="d-lg-none navbar-toggler border-0"> + <i class="fa fa-arrow-circle-right" id="expand-aside-icon"></i> + </button> {{if $localuser || $nav.pubs}} - <li id="notifications-btn" class="nav-item d-xl-none"> - <a class="nav-link text-white notifications-btn" href="#"><i id="notifications-btn-icon" class="fa fa-exclamation-circle notifications-btn-icon"></i></a> - </li> - {{/if}} - {{if $navbar_apps}} - {{foreach $navbar_apps as $navbar_app}} - <li class="nav-app-sortable"> - {{$navbar_app}} - </li> - {{/foreach}} + <button id="notifications-btn-1" type="button" class="navbar-toggler border-0 notifications-btn"> + <i id="notifications-btn-icon-1" class="fa fa-exclamation-circle notifications-btn-icon"></i> + </button> {{/if}} - <li class="nav-item dropdown" id="app-menu"> - <a class="nav-link" href="#" data-bs-toggle="offcanvas" data-bs-target="#app-bin" aria-controls="app-bin"><i class="fa fa-fw fa-bars"></i></a> - </li> - </ul> - </div> - {{if $nav.help.6}} - <div id="contextual-help-content" class="contextual-help-content"> - {{$nav.help.5}} - <div class="float-end"> - <a class="btn btn-primary btn-sm" target="hubzilla-help" href="{{$nav.help.0}}" title="{{$nav.help.3}}"><i class="fa fa-question"></i> {{$fulldocs}}</a> - <a class="contextual-help-tool" href="#" onclick="contextualHelp(); return false;"><i class="fa fa-times"></i></a> + <button id="menu-btn" class="navbar-toggler border-0" type="button" data-bs-toggle="offcanvas" data-bs-target="#app-bin"> + <i class="fa fa-bars"></i> + </button> </div> + <div class="collapse navbar-collapse justify-content-between" id="navbar-collapse-1"> + <ul class="navbar-nav"> + {{if $nav.login && !$userinfo}} + <li class="nav-item d-lg-flex"> + {{if $nav.loginmenu.1.4}} + <a class="nav-link" href="#" title="{{$nav.loginmenu.1.3}}" id="{{$nav.loginmenu.1.4}}" data-bs-toggle="modal" data-bs-target="#nav-login"> + {{$nav.loginmenu.1.1}} + </a> + {{else}} + <a class="nav-link" href="login" title="{{$nav.loginmenu.1.3}}"> + {{$nav.loginmenu.1.1}} + </a> + {{/if}} + </li> + {{/if}} + {{if $nav.register}} + <li class="nav-item {{$nav.register.2}} d-lg-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-lg-flex"> + <a class="nav-link" href="{{$nav.alogout.0}}" title="{{$nav.alogout.3}}" id="{{$nav.alogout.4}}">{{$nav.alogout.1}}</a> + </li> + {{/if}} + </ul> + + <div id="banner" class="navbar-text">{{$banner}}</div> + + <ul id="nav-right" class="navbar-nav"> + <li class="nav-item collapse clearfix" id="nav-search"> + <form class="form-inline" method="get" action="{{$nav.search.4}}" role="search"> + <input class="form-control form-control-sm mt-1 me-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');"/> + </form> + <div id="nav-search-spinner" class="spinner-wrapper"> + <div class="spinner s"></div> + </div> + </li> + <li class="nav-item" id="nav-search-btn"> + <a class="nav-link" href="#nav-search" title="{{$nav.search.3}}" onclick="openMenu('nav-search'); closeMenu('nav-search-btn'); $('#nav-search-text').focus(); return false;"><i class="fa fa-fw fa-search"></i></a> + </li> + {{if $nav.help.6}} + <li class="nav-item dropdown {{$sel.help}}"> + <a class="nav-link {{$nav.help.2}}" target="hubzilla-help" href="{{$nav.help.0}}" title="{{$nav.help.3}}" id="{{$nav.help.4}}" onclick="contextualHelp(); return false;"><i class="fa fa-fw fa-question-circle"></i></a> + </li> + {{/if}} + {{if $localuser || $nav.pubs}} + <li id="notifications-btn" class="nav-item d-xl-none"> + <a class="nav-link text-white notifications-btn" href="#"><i id="notifications-btn-icon" class="fa fa-exclamation-circle notifications-btn-icon"></i></a> + </li> + {{/if}} + {{if $navbar_apps}} + {{foreach $navbar_apps as $navbar_app}} + <li class="nav-app-sortable"> + {{$navbar_app}} + </li> + {{/foreach}} + {{/if}} + <li class="nav-item dropdown" id="app-menu"> + <a class="nav-link" href="#" data-bs-toggle="offcanvas" data-bs-target="#app-bin" aria-controls="app-bin"><i class="fa fa-fw fa-bars"></i></a> + </li> + </ul> + </div> + {{if $nav.help.6}} + <div id="contextual-help-content" class="contextual-help-content"> + {{$nav.help.5}} + <div class="float-end"> + <a class="btn btn-primary btn-sm" target="hubzilla-help" href="{{$nav.help.0}}" title="{{$nav.help.3}}"><i class="fa fa-question"></i> {{$fulldocs}}</a> + <a class="contextual-help-tool" href="#" onclick="contextualHelp(); return false;"><i class="fa fa-times"></i></a> + </div> + </div> + {{/if}} </div> - {{/if}} -</div> +</nav> <div class="offcanvas offcanvas-end" tabindex="-1" id="app-bin" aria-labelledby="app-bin-label"> <div class="offcanvas-header"> <div class="lh-1" id="app-bin-label"> diff --git a/view/tpl/navbar_tucson.tpl b/view/tpl/navbar_tucson.tpl index 6a8b5872d..bb67ff31c 100644 --- a/view/tpl/navbar_tucson.tpl +++ b/view/tpl/navbar_tucson.tpl @@ -1,222 +1,224 @@ -{{if $nav.login && !$userinfo}} -<div class="d-lg-none pt-1 pb-1"> - {{if $nav.loginmenu.1.4}} - <a class="btn btn-primary btn-sm text-white" href="#" title="{{$nav.loginmenu.1.3}}" id="{{$nav.loginmenu.1.4}}_collapse" data-bs-toggle="modal" data-bs-target="#nav-login"> - {{$nav.loginmenu.1.1}} - </a> - {{else}} - <a class="btn btn-primary btn-sm text-white" href="login" title="{{$nav.loginmenu.1.3}}"> - {{$nav.loginmenu.1.1}} - </a> - {{/if}} - {{if $nav.register}} - <a class="btn btn-warning btn-sm text-dark" href="{{$nav.register.0}}" title="{{$nav.register.3}}" id="{{$nav.register.4}}" > - {{$nav.register.1}} - </a> - {{/if}} -</div> -{{/if}} -{{if $userinfo}} -<div class="dropdown"> - <div class="fakelink usermenu" data-bs-toggle="dropdown"> - <img id="avatar" src="{{$userinfo.icon}}" alt="{{$userinfo.name}}"> - <i class="fa fa-caret-down"></i> - </div> - {{if $is_owner}} - <div class="dropdown-menu"> - {{foreach $nav.usermenu as $usermenu}} - <a class="dropdown-item{{if $usermenu.2}} active{{/if}}" href="{{$usermenu.0}}" title="{{$usermenu.3}}" role="menuitem" id="{{$usermenu.4}}">{{$usermenu.1}}</a> - {{/foreach}} - {{if $nav.manage}} - <a class="dropdown-item{{if $sel.name == Manage}} active{{/if}}" href="{{$nav.manage.0}}" title="{{$nav.manage.3}}" role="menuitem" id="{{$nav.manage.4}}">{{$nav.manage.1}}</a> - {{/if}} - {{if $nav.channels}} - {{foreach $nav.channels as $chan}} - <a class="dropdown-item" href="manage/{{$chan.channel_id}}" title="{{$chan.channel_name}}" role="menuitem"><i class="fa fa-circle{{if $localuser == $chan.channel_id}} text-success{{else}} invisible{{/if}}"></i> {{$chan.channel_name}}</a> - {{/foreach}} - {{/if}} - {{if $nav.profiles}} - <a class="dropdown-item" href="{{$nav.profiles.0}}" title="{{$nav.profiles.3}}" role="menuitem" id="{{$nav.profiles.4}}">{{$nav.profiles.1}}</a> +<nav class="navbar fixed-top navbar-expand-lg navbar-dark bg-dark"> + {{if $nav.login && !$userinfo}} + <div class="d-lg-none pt-1 pb-1"> + {{if $nav.loginmenu.1.4}} + <a class="btn btn-primary btn-sm text-white" href="#" title="{{$nav.loginmenu.1.3}}" id="{{$nav.loginmenu.1.4}}_collapse" data-bs-toggle="modal" data-bs-target="#nav-login"> + {{$nav.loginmenu.1.1}} + </a> + {{else}} + <a class="btn btn-primary btn-sm text-white" href="login" title="{{$nav.loginmenu.1.3}}"> + {{$nav.loginmenu.1.1}} + </a> {{/if}} - {{if $nav.settings}} - <div class="dropdown-divider"></div> - <a class="dropdown-item{{if $sel.name == Settings}} active{{/if}}" href="{{$nav.settings.0}}" title="{{$nav.settings.3}}" role="menuitem" id="{{$nav.settings.4}}">{{$nav.settings.1}}</a> + {{if $nav.register}} + <a class="btn btn-warning btn-sm text-dark" href="{{$nav.register.0}}" title="{{$nav.register.3}}" id="{{$nav.register.4}}" > + {{$nav.register.1}} + </a> {{/if}} - {{if $nav.admin}} - <div class="dropdown-divider"></div> - <a class="dropdown-item{{if $sel.name == Admin}} active{{/if}}" href="{{$nav.admin.0}}" title="{{$nav.admin.3}}" role="menuitem" id="{{$nav.admin.4}}">{{$nav.admin.1}}</a> + </div> + {{/if}} + {{if $userinfo}} + <div class="dropdown"> + <div class="fakelink usermenu" data-bs-toggle="dropdown"> + <img id="avatar" src="{{$userinfo.icon}}" alt="{{$userinfo.name}}"> + <i class="fa fa-caret-down"></i> + </div> + {{if $is_owner}} + <div class="dropdown-menu"> + {{foreach $nav.usermenu as $usermenu}} + <a class="dropdown-item{{if $usermenu.2}} active{{/if}}" href="{{$usermenu.0}}" title="{{$usermenu.3}}" role="menuitem" id="{{$usermenu.4}}">{{$usermenu.1}}</a> + {{/foreach}} + {{if $nav.manage}} + <a class="dropdown-item{{if $sel.name == Manage}} active{{/if}}" href="{{$nav.manage.0}}" title="{{$nav.manage.3}}" role="menuitem" id="{{$nav.manage.4}}">{{$nav.manage.1}}</a> + {{/if}} + {{if $nav.channels}} + {{foreach $nav.channels as $chan}} + <a class="dropdown-item" href="manage/{{$chan.channel_id}}" title="{{$chan.channel_name}}" role="menuitem"><i class="fa fa-circle{{if $localuser == $chan.channel_id}} text-success{{else}} invisible{{/if}}"></i> {{$chan.channel_name}}</a> + {{/foreach}} + {{/if}} + {{if $nav.profiles}} + <a class="dropdown-item" href="{{$nav.profiles.0}}" title="{{$nav.profiles.3}}" role="menuitem" id="{{$nav.profiles.4}}">{{$nav.profiles.1}}</a> + {{/if}} + {{if $nav.settings}} + <div class="dropdown-divider"></div> + <a class="dropdown-item{{if $sel.name == Settings}} active{{/if}}" href="{{$nav.settings.0}}" title="{{$nav.settings.3}}" role="menuitem" id="{{$nav.settings.4}}">{{$nav.settings.1}}</a> + {{/if}} + {{if $nav.admin}} + <div class="dropdown-divider"></div> + <a class="dropdown-item{{if $sel.name == Admin}} active{{/if}}" href="{{$nav.admin.0}}" title="{{$nav.admin.3}}" role="menuitem" id="{{$nav.admin.4}}">{{$nav.admin.1}}</a> + {{/if}} + {{if $nav.logout}} + <div class="dropdown-divider"></div> + <a class="dropdown-item" href="{{$nav.logout.0}}" title="{{$nav.logout.3}}" role="menuitem" id="{{$nav.logout.4}}">{{$nav.logout.1}}</a> + {{/if}} + </div> {{/if}} - {{if $nav.logout}} - <div class="dropdown-divider"></div> - <a class="dropdown-item" href="{{$nav.logout.0}}" title="{{$nav.logout.3}}" role="menuitem" id="{{$nav.logout.4}}">{{$nav.logout.1}}</a> + {{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> + <a class="dropdown-item" href="{{$nav.rusermenu.2}}" role="menuitem">{{$nav.rusermenu.3}}</a> + </div> {{/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> - <a class="dropdown-item" href="{{$nav.rusermenu.2}}" role="menuitem">{{$nav.rusermenu.3}}</a> + {{if $sel.name}} + <div id="nav-app-link-wrapper" class="navbar-nav mr-auto"> + <a id="nav-app-link" href="{{$url}}" class="nav-link text-truncate"> + {{$sel.name}} + {{if $sitelocation}} + <br><small>{{$sitelocation}}</small> + {{/if}} + </a> </div> {{/if}} -</div> -{{if $sel.name}} -<div id="nav-app-link-wrapper" class="navbar-nav mr-auto"> - <a id="nav-app-link" href="{{$url}}" class="nav-link text-truncate"> - {{$sel.name}} - {{if $sitelocation}} - <br><small>{{$sitelocation}}</small> - {{/if}} - </a> -</div> -{{/if}} -{{/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="d-lg-none navbar-toggler border-0" data-bs-toggle="offcanvas" data-bs-target="#region_1"> - <i class="fa fa-arrow-circle-right" id="expand-aside-icon"></i> - </button> - {{if $localuser || $nav.pubs}} - <button id="notifications-btn-1" type="button" class="navbar-toggler border-0 notifications-btn"> - <i id="notifications-btn-icon-1" class="fa fa-exclamation-circle notifications-btn-icon"></i> - </button> - {{/if}} - <button id="menu-btn" class="navbar-toggler border-0" type="button" data-bs-toggle="collapse" data-bs-target="#navbar-collapse-2"> - <i class="fa fa-bars"></i> - </button> -</div> -<div class="collapse navbar-collapse" id="navbar-collapse-1"> - <ul class="navbar-nav mr-auto"> - {{if $nav.login && !$userinfo}} - <li class="nav-item d-lg-flex"> - {{if $nav.loginmenu.1.4}} - <a class="nav-link" href="#" title="{{$nav.loginmenu.1.3}}" id="{{$nav.loginmenu.1.4}}" data-bs-toggle="modal" data-bs-target="#nav-login"> - {{$nav.loginmenu.1.1}} - </a> - {{else}} - <a class="nav-link" href="login" title="{{$nav.loginmenu.1.3}}"> - {{$nav.loginmenu.1.1}} - </a> - {{/if}} - </li> - {{/if}} - {{if $nav.register}} - <li class="nav-item {{$nav.register.2}} d-lg-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-lg-flex"> - <a class="nav-link" href="{{$nav.alogout.0}}" title="{{$nav.alogout.3}}" id="{{$nav.alogout.4}}">{{$nav.alogout.1}}</a> - </li> - {{/if}} - </ul> - - <div id="banner" class="navbar-text">{{$banner}}</div> - - <ul id="nav-right" class="navbar-nav ml-auto"> - <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 me-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');"/> - </form> - <div id="nav-search-spinner" class="spinner-wrapper"> - <div class="spinner s"></div> - </div> - </li> - <li class="nav-item" id="nav-search-btn"> - <a class="nav-link" href="#nav-search" title="{{$nav.search.3}}" onclick="openMenu('nav-search'); closeMenu('nav-search-btn'); $('#nav-search-text').focus(); return false;"><i class="fa fa-fw fa-search"></i></a> - </li> + <div class="navbar-toggler-right"> {{if $nav.help.6}} - <li class="nav-item dropdown {{$sel.help}}"> - <a class="nav-link {{$nav.help.2}}" target="hubzilla-help" href="{{$nav.help.0}}" title="{{$nav.help.3}}" id="{{$nav.help.4}}" onclick="contextualHelp(); return false;"><i class="fa fa-fw fa-question-circle"></i></a> - </li> + <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="d-lg-none navbar-toggler border-0" data-bs-toggle="offcanvas" data-bs-target="#region_1"> + <i class="fa fa-arrow-circle-right" id="expand-aside-icon"></i> + </button> {{if $localuser || $nav.pubs}} - <li id="notifications-btn" class="nav-item d-xl-none"> - <a class="nav-link text-white notifications-btn" href="#"><i id="notifications-btn-icon" class="fa fa-exclamation-circle notifications-btn-icon"></i></a> - </li> - {{/if}} - {{if $channel_menu && $channel_apps.0}} - <li class="nav-item dropdown" id="channel-menu"> - <a class="nav-link" href="#" data-bs-toggle="dropdown"><img src="{{$channel_thumb}}" style="height:14px; width:14px;position:relative; top:-2px;" /></a> - <div id="dropdown-menu" class="dropdown-menu dropdown-menu-end"> - {{foreach $channel_apps as $channel_app}} - {{$channel_app}} - {{/foreach}} - </div> - </li> + <button id="notifications-btn-1" type="button" class="navbar-toggler border-0 notifications-btn"> + <i id="notifications-btn-icon-1" class="fa fa-exclamation-circle notifications-btn-icon"></i> + </button> {{/if}} - {{if $navbar_apps}} - {{foreach $navbar_apps as $navbar_app}} - <li> - {{$navbar_app}} - </li> - {{/foreach}} - {{/if}} - <li class="nav-item dropdown" id="app-menu"> - <a class="nav-link" href="#" data-bs-toggle="dropdown"><i class="fa fa-fw fa-bars"></i></a> - <div id="dropdown-menu" class="dropdown-menu dropdown-menu-end"> - {{if $channel_apps.0 && ! $channel_menu}} - {{foreach $channel_apps as $channel_app}} - {{$channel_app}} - {{/foreach}} - <div class="dropdown-divider"></div> - <div class="dropdown-header text-black-50 sys-apps-toggle" onclick="$('#dropdown-menu').click(function(e) { e.stopPropagation(); }); openClose('sys_apps');"> - {{$sysapps_toggle}} - </div> - <div id="sys_apps" style="display:none;"> + <button id="menu-btn" class="navbar-toggler border-0" type="button" data-bs-toggle="collapse" data-bs-target="#navbar-collapse-2"> + <i class="fa fa-bars"></i> + </button> + </div> + <div class="collapse navbar-collapse" id="navbar-collapse-1"> + <ul class="navbar-nav mr-auto"> + {{if $nav.login && !$userinfo}} + <li class="nav-item d-lg-flex"> + {{if $nav.loginmenu.1.4}} + <a class="nav-link" href="#" title="{{$nav.loginmenu.1.3}}" id="{{$nav.loginmenu.1.4}}" data-bs-toggle="modal" data-bs-target="#nav-login"> + {{$nav.loginmenu.1.1}} + </a> + {{else}} + <a class="nav-link" href="login" title="{{$nav.loginmenu.1.3}}"> + {{$nav.loginmenu.1.1}} + </a> {{/if}} - {{foreach $nav_apps as $nav_app}} - {{$nav_app}} - {{/foreach}} - {{if $channel_apps.0 && ! $channel_menu}} + </li> + {{/if}} + {{if $nav.register}} + <li class="nav-item {{$nav.register.2}} d-lg-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-lg-flex"> + <a class="nav-link" href="{{$nav.alogout.0}}" title="{{$nav.alogout.3}}" id="{{$nav.alogout.4}}">{{$nav.alogout.1}}</a> + </li> + {{/if}} + </ul> + + <div id="banner" class="navbar-text">{{$banner}}</div> + + <ul id="nav-right" class="navbar-nav ml-auto"> + <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 me-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');"/> + </form> + <div id="nav-search-spinner" class="spinner-wrapper"> + <div class="spinner s"></div> </div> - {{/if}} - {{if $is_owner}} - <div class="dropdown-divider"></div> - <a class="dropdown-item" href="/apps"><i class="generic-icons-nav fa fa-fw fa-plus-circle"></i>{{$addapps}}</a> - <a class="dropdown-item" href="/apporder"><i class="generic-icons-nav fa fa-fw fa-sort"></i>{{$orderapps}}</a> - {{/if}} + </li> + <li class="nav-item" id="nav-search-btn"> + <a class="nav-link" href="#nav-search" title="{{$nav.search.3}}" onclick="openMenu('nav-search'); closeMenu('nav-search-btn'); $('#nav-search-text').focus(); return false;"><i class="fa fa-fw fa-search"></i></a> + </li> + {{if $nav.help.6}} + <li class="nav-item dropdown {{$sel.help}}"> + <a class="nav-link {{$nav.help.2}}" target="hubzilla-help" href="{{$nav.help.0}}" title="{{$nav.help.3}}" id="{{$nav.help.4}}" onclick="contextualHelp(); return false;"><i class="fa fa-fw fa-question-circle"></i></a> + </li> + {{/if}} + {{if $localuser || $nav.pubs}} + <li id="notifications-btn" class="nav-item d-xl-none"> + <a class="nav-link text-white notifications-btn" href="#"><i id="notifications-btn-icon" class="fa fa-exclamation-circle notifications-btn-icon"></i></a> + </li> + {{/if}} + {{if $channel_menu && $channel_apps.0}} + <li class="nav-item dropdown" id="channel-menu"> + <a class="nav-link" href="#" data-bs-toggle="dropdown"><img src="{{$channel_thumb}}" style="height:14px; width:14px;position:relative; top:-2px;" /></a> + <div id="dropdown-menu" class="dropdown-menu dropdown-menu-end"> + {{foreach $channel_apps as $channel_app}} + {{$channel_app}} + {{/foreach}} + </div> + </li> + {{/if}} + {{if $navbar_apps}} + {{foreach $navbar_apps as $navbar_app}} + <li> + {{$navbar_app}} + </li> + {{/foreach}} + {{/if}} + <li class="nav-item dropdown" id="app-menu"> + <a class="nav-link" href="#" data-bs-toggle="dropdown"><i class="fa fa-fw fa-bars"></i></a> + <div id="dropdown-menu" class="dropdown-menu dropdown-menu-end"> + {{if $channel_apps.0 && ! $channel_menu}} + {{foreach $channel_apps as $channel_app}} + {{$channel_app}} + {{/foreach}} + <div class="dropdown-divider"></div> + <div class="dropdown-header text-black-50 sys-apps-toggle" onclick="$('#dropdown-menu').click(function(e) { e.stopPropagation(); }); openClose('sys_apps');"> + {{$sysapps_toggle}} + </div> + <div id="sys_apps" style="display:none;"> + {{/if}} + {{foreach $nav_apps as $nav_app}} + {{$nav_app}} + {{/foreach}} + {{if $channel_apps.0 && ! $channel_menu}} + </div> + {{/if}} + {{if $is_owner}} + <div class="dropdown-divider"></div> + <a class="dropdown-item" href="/apps"><i class="generic-icons-nav fa fa-fw fa-plus-circle"></i>{{$addapps}}</a> + <a class="dropdown-item" href="/apporder"><i class="generic-icons-nav fa fa-fw fa-sort"></i>{{$orderapps}}</a> + {{/if}} + </div> + </li> + </ul> + </div> + <div class="collapse d-lg-none" id="navbar-collapse-2"> + <div class="navbar-nav mr-auto"> + {{if $channel_apps.0}} + {{foreach $channel_apps as $channel_app}} + {{$channel_app|replace:'dropdown-item':'nav-link'}} + {{/foreach}} + <div class="dropdown-header text-white-50 sys-apps-toggle" onclick="openClose('sys-apps-collapsed');"> + {{$sysapps_toggle}} </div> - </li> - </ul> -</div> -<div class="collapse d-lg-none" id="navbar-collapse-2"> - <div class="navbar-nav mr-auto"> - {{if $channel_apps.0}} - {{foreach $channel_apps as $channel_app}} - {{$channel_app|replace:'dropdown-item':'nav-link'}} - {{/foreach}} - <div class="dropdown-header text-white-50 sys-apps-toggle" onclick="openClose('sys-apps-collapsed');"> - {{$sysapps_toggle}} - </div> - <div id="sys-apps-collapsed" style="display:none;"> - {{/if}} - {{foreach $navbar_apps as $navbar_app}} - {{$navbar_app}} - {{/foreach}} - {{foreach $nav_apps as $nav_app}} - {{$nav_app|replace:'dropdown-item':'nav-link'}} - {{/foreach}} - {{if $channel_apps.0}} + <div id="sys-apps-collapsed" style="display:none;"> + {{/if}} + {{foreach $navbar_apps as $navbar_app}} + {{$navbar_app}} + {{/foreach}} + {{foreach $nav_apps as $nav_app}} + {{$nav_app|replace:'dropdown-item':'nav-link'}} + {{/foreach}} + {{if $channel_apps.0}} + </div> + {{/if}} + {{if $is_owner}} + <div class="dropdown-divider"></div> + <a class="nav-link" href="/apps"><i class="generic-icons-nav fa fa-fw fa-plus-circle"></i>{{$addapps}}</a> + <a class="nav-link" href="/apporder"><i class="generic-icons-nav fa fa-fw fa-sort"></i>{{$orderapps}}</a> + {{/if}} </div> - {{/if}} - {{if $is_owner}} - <div class="dropdown-divider"></div> - <a class="nav-link" href="/apps"><i class="generic-icons-nav fa fa-fw fa-plus-circle"></i>{{$addapps}}</a> - <a class="nav-link" href="/apporder"><i class="generic-icons-nav fa fa-fw fa-sort"></i>{{$orderapps}}</a> - {{/if}} </div> -</div> -{{if $nav.help.6}} -<div id="contextual-help-content" class="contextual-help-content"> - {{$nav.help.5}} - <div class="float-end"> - <a class="btn btn-primary btn-sm" target="hubzilla-help" href="{{$nav.help.0}}" title="{{$nav.help.3}}"><i class="fa fa-question"></i> {{$fulldocs}}</a> - <a class="contextual-help-tool" href="#" onclick="contextualHelp(); return false;"><i class="fa fa-times"></i></a> + {{if $nav.help.6}} + <div id="contextual-help-content" class="contextual-help-content"> + {{$nav.help.5}} + <div class="float-end"> + <a class="btn btn-primary btn-sm" target="hubzilla-help" href="{{$nav.help.0}}" title="{{$nav.help.3}}"><i class="fa fa-question"></i> {{$fulldocs}}</a> + <a class="contextual-help-tool" href="#" onclick="contextualHelp(); return false;"><i class="fa fa-times"></i></a> + </div> </div> -</div> -{{/if}} + {{/if}} +</nav> diff --git a/view/tpl/permcats.tpl b/view/tpl/permcats.tpl index 83a04210e..5b2d811d7 100644 --- a/view/tpl/permcats.tpl +++ b/view/tpl/permcats.tpl @@ -20,7 +20,7 @@ <div class="panel" id="permission-settings"> <div class="section-subtitle-wrapper" role="tab" id="perms-tool"> <h3> - <a data-bs-toggle="collapse" data-parent="#permission-settings" href="#perms-tool-collapse" aria-expanded="true" aria-controls="perms-tool-collapse"> + <a data-bs-toggle="collapse" data-bs-parent="#permission-settings" href="#perms-tool-collapse" aria-expanded="true" aria-controls="perms-tool-collapse"> {{$permlbl}} </a> </h3> diff --git a/view/tpl/profile_edit.tpl b/view/tpl/profile_edit.tpl index 14430bf89..95346b3a8 100644 --- a/view/tpl/profile_edit.tpl +++ b/view/tpl/profile_edit.tpl @@ -54,7 +54,7 @@ </a> </h3> </div> - <div id="personal-collapse" class="panel-collapse collapse show" data-parent="#profile-edit-wrapper" role="tabpanel" aria-labelledby="personal"> + <div id="personal-collapse" class="panel-collapse collapse show" data-bs-parent="#profile-edit-wrapper" role="tabpanel" aria-labelledby="personal"> <div class="section-content-tools-wrapper"> {{if $multi_profiles}} {{include file="field_input.tpl" field=$profile_name}} @@ -224,7 +224,7 @@ </a> </h3> </div> - <div id="location-collapse" class="panel-collapse collapse" data-parent="#profile-edit-wrapper" role="tabpanel" aria-labelledby="location"> + <div id="location-collapse" class="panel-collapse collapse" data-bs-parent="#profile-edit-wrapper" role="tabpanel" aria-labelledby="location"> <div class="section-content-tools-wrapper"> {{if $fields.address}} {{include file="field_input.tpl" field=$address}} @@ -269,7 +269,7 @@ </a> </h3> </div> - <div id="relation-collapse" class="panel-collapse collapse" data-parent="#profile-edit-wrapper" role="tabpanel" aria-labelledby="relation"> + <div id="relation-collapse" class="panel-collapse collapse" data-bs-parent="#profile-edit-wrapper" role="tabpanel" aria-labelledby="relation"> <div class="section-content-tools-wrapper"> {{if $fields.marital }} <div id="profile-edit-marital-wrapper" class="mb-3 field" > @@ -320,7 +320,7 @@ </a> </h3> </div> - <div id="miscellaneous-collapse" class="panel-collapse collapse" data-parent="#profile-edit-wrapper" role="tabpanel" aria-labelledby="miscellaneous"> + <div id="miscellaneous-collapse" class="panel-collapse collapse" data-bs-parent="#profile-edit-wrapper" role="tabpanel" aria-labelledby="miscellaneous"> <div class="section-content-tools-wrapper"> {{if $fields.homepage}} {{include file="field_input.tpl" field=$homepage}} diff --git a/view/tpl/settings.tpl b/view/tpl/settings.tpl index 27e9d5d60..353da9c2b 100644 --- a/view/tpl/settings.tpl +++ b/view/tpl/settings.tpl @@ -16,7 +16,7 @@ </a> </h3> </div> - <div id="basic-settings-collapse" class="collapse show" role="tabpanel" aria-labelledby="basic-settings" data-parent="#settings"> + <div id="basic-settings-collapse" class="collapse show" role="tabpanel" aria-labelledby="basic-settings" data-bs-parent="#settings"> <div class="section-content-tools-wrapper"> {{include file="field_input.tpl" field=$username}} {{include file="field_select_grouped.tpl" field=$timezone}} @@ -42,7 +42,7 @@ </a> </h3> </div> - <div id="privacy-settings-collapse" class="collapse" role="tabpanel" aria-labelledby="privacy-settings" data-parent="#settings"> + <div id="privacy-settings-collapse" class="collapse" role="tabpanel" aria-labelledby="privacy-settings" data-bs-parent="#settings"> <div class="section-content-tools-wrapper"> {{include file="field_select_grouped.tpl" field=$role}} {{$autoperms}} @@ -102,7 +102,7 @@ </a> </h3> </div> - <div id="notification-settings-collapse" class="collapse" role="tabpanel" aria-labelledby="notification-settings" data-parent="#settings"> + <div id="notification-settings-collapse" class="collapse" role="tabpanel" aria-labelledby="notification-settings" data-bs-parent="#settings"> <div class="section-content-tools-wrapper"> <div id="settings-notifications"> diff --git a/view/tpl/settings_display.tpl b/view/tpl/settings_display.tpl index 4d6e3f512..70b9bac80 100644 --- a/view/tpl/settings_display.tpl +++ b/view/tpl/settings_display.tpl @@ -15,7 +15,7 @@ </a> </h3> </div> - <div id="theme-settings-content" class="collapse show" role="tabpanel" aria-labelledby="theme-settings" data-parent="#settings" > + <div id="theme-settings-content" class="collapse show" role="tabpanel" aria-labelledby="theme-settings" data-bs-parent="#settings" > <div class="section-content-tools-wrapper"> {{if $theme}} {{include file="field_themeselect.tpl" field=$theme}} @@ -38,7 +38,7 @@ </a> </h3> </div> - <div id="custom-settings-content" class="collapse{{if !$theme}} in{{/if}}" role="tabpanel" aria-labelledby="custom-settings" data-parent="#settings" > + <div id="custom-settings-content" class="collapse{{if !$theme}} in{{/if}}" role="tabpanel" aria-labelledby="custom-settings" data-bs-parent="#settings" > <div class="section-content-tools-wrapper"> {{if $theme_config}} {{$theme_config}} @@ -54,7 +54,7 @@ </a> </h3> </div> - <div id="content-settings-content" class="collapse{{if !$theme && !$theme_config}} in{{/if}}" role="tabpanel" aria-labelledby="content-settings" data-parent="#settings"> + <div id="content-settings-content" class="collapse{{if !$theme && !$theme_config}} in{{/if}}" role="tabpanel" aria-labelledby="content-settings" data-bs-parent="#settings"> <div class="section-content-wrapper"> {{include file="field_input.tpl" field=$ajaxint}} {{include file="field_input.tpl" field=$itemspage}} diff --git a/view/tpl/settings_features.tpl b/view/tpl/settings_features.tpl index 2c359f111..4467ed3da 100644 --- a/view/tpl/settings_features.tpl +++ b/view/tpl/settings_features.tpl @@ -15,7 +15,7 @@ </a> </h3> </div> - <div id="{{$g}}-settings-content" class="collapse{{if $g == 'general'}} show{{/if}}" role="tabpanel" aria-labelledby="{{$g}}-settings-title" data-parent="#settings"> + <div id="{{$g}}-settings-content" class="collapse{{if $g == 'general'}} show{{/if}}" role="tabpanel" aria-labelledby="{{$g}}-settings-title" data-bs-parent="#settings"> <div class="section-content-tools-wrapper"> {{foreach $f.1 as $fcat}} {{include file="field_checkbox.tpl" field=$fcat}} diff --git a/view/tpl/tokens.tpl b/view/tpl/tokens.tpl index d1e6d04bc..6bf8dc202 100644 --- a/view/tpl/tokens.tpl +++ b/view/tpl/tokens.tpl @@ -22,7 +22,7 @@ <div class="panel" id="permission-settings"> <div class="section-subtitle-wrapper" role="tab" id="perms-tool"> <h3> - <a data-bs-toggle="collapse" data-parent="#permission-settings" href="#perms-tool-collapse" aria-expanded="true" aria-controls="perms-tool-collapse"> + <a data-bs-toggle="collapse" data-bs-parent="#permission-settings" href="#perms-tool-collapse" aria-expanded="true" aria-controls="perms-tool-collapse"> {{$permlbl}} </a> </h3> |