diff options
Diffstat (limited to 'view/tpl')
31 files changed, 719 insertions, 518 deletions
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/alt_pager.tpl b/view/tpl/alt_pager.tpl index b46dc7662..94fa93401 100644 --- a/view/tpl/alt_pager.tpl +++ b/view/tpl/alt_pager.tpl @@ -1,4 +1,4 @@ <div class="pager"> -{{if $has_less}}<a href="{{$url}}&page={{$prevpage}}" class="pager-prev">{{$less}}</a>{{/if}} -{{if $has_more}}{{if $has_less}} | {{/if}}<a href="{{$url}}&page={{$nextpage}}" class="pager-next">{{$more}}</a>{{/if}} +{{if $has_less}}<a href="{{$url}}?page={{$prevpage}}" class="pager-prev">{{$less}}</a>{{/if}} +{{if $has_more}}{{if $has_less}} | {{/if}}<a href="{{$url}}?page={{$nextpage}}" class="pager-next">{{$more}}</a>{{/if}} </div> diff --git a/view/tpl/app_nav.tpl b/view/tpl/app_nav.tpl index 0d6e66892..c3a7bc8b6 100644 --- a/view/tpl/app_nav.tpl +++ b/view/tpl/app_nav.tpl @@ -1 +1 @@ -<a class="dropdown-item{{if $app.active}} active{{/if}}" href="{{$app.url}}">{{if $icon}}<i class="generic-icons-nav fa fa-fw fa-{{$icon}}"></i>{{else}}<img src="{{$app.photo}}" width="16" height="16" style="margin-right:9px;"/>{{/if}}{{$app.name}}</a> +<a class="dropdown-item{{if $app.active}} active{{/if}}" href="{{$app.url}}" data-papp="{{$app.papp}}" data-icon="{{$icon}}" data-url="{{$app.url}}" data-name="{{$app.name}}">{{if $icon}}<i class="generic-icons-nav fa fa-fw fa-{{$icon}}"></i>{{else}}<img src="{{$app.photo}}" width="16" height="16" style="margin-right:9px;"/>{{/if}}{{$app.name}}</a> diff --git a/view/tpl/app_nav_pinned.tpl b/view/tpl/app_nav_pinned.tpl index b114ed19e..bf942dd48 100644 --- a/view/tpl/app_nav_pinned.tpl +++ b/view/tpl/app_nav_pinned.tpl @@ -1,4 +1,4 @@ -<a class="navbar-app nav-link{{if $app.active}} active{{/if}}" href="{{$app.url}}" title="{{$app.name}}" > +<a class="navbar-app nav-link{{if $app.active}} active{{/if}}" href="{{$app.url}}" title="{{$app.name}}"> {{if $icon}} <i class="fa fa-fw fa-{{$icon}}"></i> <span class="d-lg-none">{{$app.name}}</span> diff --git a/view/tpl/channel_import.tpl b/view/tpl/channel_import.tpl index c7cbb1742..bbd53cbb5 100644 --- a/view/tpl/channel_import.tpl +++ b/view/tpl/channel_import.tpl @@ -23,7 +23,7 @@ <div id="import-common-desc" class="section-content-info-wrapper">{{$common}}</div> {{include file="field_checkbox.tpl" field=$make_primary}} - {{include file="field_checkbox.tpl" field=$moving}} + {{* include file="field_checkbox.tpl" field=$moving *}} {{include file="field_input.tpl" field=$newname}} <div id="import-common-desc" class="section-content-info-wrapper">{{$pleasewait}}</div> diff --git a/view/tpl/cloud_directory.tpl b/view/tpl/cloud_directory.tpl index b5ac93204..a851eb203 100644 --- a/view/tpl/cloud_directory.tpl +++ b/view/tpl/cloud_directory.tpl @@ -1,7 +1,7 @@ <div class="{{if $tiles}}section-content-wrapper{{else}}section-content-wrapper-np{{/if}}"> {{if $tiles}} <table id="cloud-index"> - <tr id="new-upload-progress-bar-1"></tr> {{* this is needed to append the upload files in the right order *}} + <tr id="new-upload-progress-bar-0"></tr> {{* this is needed to append the upload files in the right order *}} </table> <div class="row row-cols-2 row-cols-md-4"> {{if $parentpath}} @@ -136,7 +136,7 @@ </td> </tr> {{/if}} - <tr id="new-upload-progress-bar-1"></tr> {{* this is needed to append the upload files in the right order *}} + <tr id="new-upload-progress-bar-0"></tr> {{* this is needed to append the upload files in the right order *}} {{foreach $entries as $item}} <tr id="cloud-index-{{$item.attach_id}}" class="cloud-index{{if $item.collection}} attach-drop{{/if}}"{{if $item.collection}} data-folder="{{$item.resource}}"{{/if}} data-id="{{$item.attach_id}}" draggable="true"> <td> diff --git a/view/tpl/connections.tpl b/view/tpl/connections.tpl index f6ee1b1db..1719a6522 100644 --- a/view/tpl/connections.tpl +++ b/view/tpl/connections.tpl @@ -19,7 +19,7 @@ <form action="{{$cmd}}" method="get" id="mimimi" name="contacts-search-form"> <div class="input-group mb-3"> <input type="text" name="search" id="contacts-search" class="form-control" onfocus="this.select();" value="{{$search}}" placeholder="{{$desc}}" /> - <button id="contacts-search-submit" class="btn btn-sm btn-outline-secondary" type="submit"><i class="fa fa-fw fa-search"></i></button> + <button id="contacts-search-submit" class="btn btn-outline-secondary" type="submit"><i class="fa fa-fw fa-search"></i></button> </div> </form> </div> diff --git a/view/tpl/follow.tpl b/view/tpl/follow.tpl index 53325fdce..7adbc03ec 100644 --- a/view/tpl/follow.tpl +++ b/view/tpl/follow.tpl @@ -3,7 +3,7 @@ <form action="follow" method="post" /> <div class="input-group"> <input class="form-control" type="text" name="url" title="{{$hint}}" placeholder="{{$desc}}" /> - <button class="btn btn-sm btn-success" type="submit" name="submit" value="{{$follow}}" title="{{$follow}}"><i class="fa fa-fw fa-plus"></i></button> + <button class="btn btn-success" type="submit" name="submit" value="{{$follow}}" title="{{$follow}}"><i class="fa fa-fw fa-plus"></i></button> </div> </form> {{if $abook_usage_message}} 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/import_progress.tpl b/view/tpl/import_progress.tpl new file mode 100644 index 000000000..05f6c09e3 --- /dev/null +++ b/view/tpl/import_progress.tpl @@ -0,0 +1,42 @@ +<h3>{{$chtitle_str}}: 100%</h3> + +<div> + <div class="progress mb-2"> + <div class="progress-bar progress-bar-striped bg-primary" role="progressbar" style="width: 100%" aria-valuenow="100" aria-valuemin="0" aria-valuemax="100"></div> + </div> + <div> + <span class="text-muted">{{$chcompleted_str}}</span> + </div> +</div> + +<hr> + +<h3>{{$ctitle_str}}: <span id="cprogress-label">{{$cprogress_str}}</span></h3> + +<div id="cprogress"> + <div class="progress mb-2"> + <div id="cprogress-bar" class="progress-bar progress-bar-striped bg-warning{{if $cprogress < 100}} progress-bar-animated{{/if}}" role="progressbar" style="width: {{$cprogress}}%" aria-valuenow="{{$cprogress}}" aria-valuemin="0" aria-valuemax="100"></div> + </div> + <div id="cprogress-resume" class="{{if $cprogress == 100}}d-none{{/if}}"> + <a href="/import_progress/resume_itemsync" class="text-capitalize">[ {{$resume_str}} ]</a> <span class="text-muted">{{$resume_helper_str}}</span> + </div> + <div id="cprogress-completed" class="{{if $cprogress < 100}}d-none{{/if}}"> + <span class="text-muted">{{$ccompleted_str}}</span> + </div> +</div> + +<hr> + +<h3>{{$ftitle_str}}: <span id="fprogress-label">{{$fprogress_str}}</span></h3> + +<div id="fprogress"> + <div class="progress mb-2"> + <div id="fprogress-bar" class="progress-bar progress-bar-striped bg-info{{if $fprogress < 100}} progress-bar-animated{{/if}}" role="progressbar" style="width: {{$fprogress}}%" aria-valuenow="{{$fprogress}}" aria-valuemin="0" aria-valuemax="100"></div> + </div> + <div id="fprogress-resume" class="{{if $fprogress == 100}}d-none{{/if}}"> + <a href="/import_progress/resume_filesync" class="text-capitalize">[ {{$resume_str}} ]</a> <span class="text-muted">{{$resume_helper_str}}</span> + </div> + <div id="fprogress-completed" class="{{if $fprogress < 100}}d-none{{/if}}"> + <span class="text-muted">{{$fcompleted_str}}</span> + </div> +</div> diff --git a/view/tpl/locmanage.tpl b/view/tpl/locmanage.tpl index 9b988c9c5..70426dd3e 100644 --- a/view/tpl/locmanage.tpl +++ b/view/tpl/locmanage.tpl @@ -1,13 +1,5 @@ <div class="generic-content-wrapper"> <div class="section-title-wrapper"> - <script> - function primehub(id) { - $.post(baseurl + '/locs','primary='+id,function(data) { window.location.href=window.location.href; }); - } - function drophub(id) { - $.post(baseurl + '/locs','drop='+id,function(data) { window.location.href=window.location.href; }); - } - </script> <button class="btn btn-success btn-sm float-end" onclick="window.location.href='/locs/f=&sync=1'; return false;"><i class="fa fa-refresh"></i> {{$sync}}</button> <h2>{{$header}}</h2> </div> @@ -27,15 +19,27 @@ <th>{{$drop}}</th> </tr> {{foreach $hubs as $hub}} - {{if ! $hub.deleted }} + {{if ! $hub.hubloc_deleted }} <tr class="locs-index-row"> <td>{{$hub.hubloc_addr}}</td> <td class="d-none d-md-table-cell">{{$hub.hubloc_url}}</td> - <td>{{if $hub.primary}}<i class="fa fa-check-square-o"></i>{{else}}<i class="fa fa-square-o primehub" onclick="primehub({{$hub.hubloc_id}}); return false;"></i>{{/if}}</td> - <td><i class="fa fa-trash-o drophub" onclick="drophub({{$hub.hubloc_id}}); return false;"></i></td> + <td>{{if $hub.hubloc_primary}}<i class="fa fa-check-square-o"></i>{{else}}<i class="fa fa-square-o primehub" onclick="primehub({{$hub.hubloc_id}}); return false;"></i>{{/if}}</td> + <td> + {{if $hub.hubloc_url != $base_url}} + <i class="fa fa-trash-o drophub" onclick="drophub({{$hub.hubloc_id}}); return false;"></i> + {{/if}} + </td> </tr> {{/if}} {{/foreach}} </table> </div> </div> +<script> + function primehub(id) { + $.post(baseurl + '/locs','primary='+id,function(data) { window.location.href=window.location.href; }); + } + function drophub(id) { + $.post(baseurl + '/locs','drop='+id,function(data) { window.location.href=window.location.href; }); + } +</script> 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..c8b5ce26c 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> + <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 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> + <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"> @@ -186,6 +188,7 @@ </div> {{/if}} </div> + <i id="app-bin-trash" class="fa fa-2x fa-fw fa-trash-o d-none"></i> <button type="button" class="btn-close text-reset" data-bs-dismiss="offcanvas" aria-label="Close"></button> </div> <div class="offcanvas-body pt-0"> @@ -198,20 +201,20 @@ {{/foreach}} {{/if}} {{if $navbar_apps.0}} + <div class="d-lg-none dropdown-header text-uppercase"> + {{$pinned_apps}} + </div> <div id="nav-app-bin-container" class="d-lg-none"> - <div class="dropdown-header text-uppercase"> - {{$pinned_apps}} - </div> {{foreach $navbar_apps as $navbar_app}} {{$navbar_app|replace:'navbar-app nav-link':'dropdown-item nav-app-sortable'|replace:'fa':'generic-icons-nav fa'}} {{/foreach}} </div> {{/if}} {{if $is_owner}} + <div class="dropdown-header text-uppercase"> + {{$featured_apps}} + </div> <div id="app-bin-container" data-token="{{$form_security_token}}"> - <div class="dropdown-header text-uppercase"> - {{$featured_apps}} - </div> {{foreach $nav_apps as $nav_app}} {{$nav_app}} {{/foreach}} @@ -235,14 +238,19 @@ animation: 150, delay: 200, delayOnTouchOnly: true, + onStart: function (e) { + $('#app-bin-trash').removeClass('d-none'); + }, onEnd: function (e) { + $('#app-bin-trash').addClass('d-none'); + let app_str = ''; - $('#app-bin-container a').each(function () { + $('#app-bin-container a:visible').each(function () { if(app_str.length) { - app_str = app_str.concat(',', $(this).text()); + app_str = app_str.concat(',', this.text); } else { - app_str = app_str.concat($(this).text()); + app_str = app_str.concat(this.text); } }); $.post( @@ -386,6 +394,39 @@ }); + + $('#app-bin-trash').on('dragover', function (e) { + e.preventDefault(); + e.stopPropagation(); + + $('#app-bin-container a[href=\'' + app_url + '\']').fadeOut(); + }); + $('#app-bin-trash').on('dragleave', function (e) { + e.preventDefault(); + e.stopPropagation(); + + $('#app-bin-container a[href=\'' + app_url + '\']').fadeIn(); + + }); + $('#app-bin-trash').on('drop', function (e) { + e.preventDefault(); + e.stopPropagation(); + + if (papp === null) + return; + + $.ajax({ + type: 'post', + url: 'appman', + data: { + 'aj' : 1, + 'feature' : 'nav_featured_app', + 'papp' : papp + } + }); + + }); + var papp, app_icon, app_url; $(document).on('dragstart', function (e) { papp = e.target.dataset.papp || null; 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/notes.tpl b/view/tpl/notes.tpl index 0ae0604ef..902691fae 100644 --- a/view/tpl/notes.tpl +++ b/view/tpl/notes.tpl @@ -1,37 +1,122 @@ {{if $app}} <div id="personal-notes" class="generic-content-wrapper{{if $hidden}} d-none{{/if}}"> - <div class="section-title-wrapper"> - <h2>{{$banner}}</h2> + <div class="section-title-wrapper clearfix"> + <div class="float-end rounded border border-secondary m-1 ps-1 pe-1 text-muted small note-mode" title="Double click into note for edit mode">{{$strings.read}}</div> + <h2>{{$strings.title}}</h2> </div> - <div class="section-content-wrapper"> + <div class="section-content-wrapper-np"> {{else}} <div id="personal-notes" class="widget{{if $hidden}} d-none{{/if}}"> - <h3>{{$banner}}</h3> + <div class="float-end rounded border border-secondary mb-1 ps-1 pe-1 text-muted small note-mode" title="Double click note for edit mode">{{$strings.read}}</div> + <h3 class="float-start">{{$banner}}</h3> {{/if}} - <textarea name="note_text" id="note-text" class="{{if $app}}form-control border-0{{/if}}">{{$text}}</textarea> + <textarea name="note_text" id="note-text" class="form-control{{if $app}} border-0{{else}} p-1{{/if}}" style="display: none;">{{$text}}</textarea> + <div id="note-text-html" class="{{if !$app}}border rounded p-1{{/if}}">{{$html}}</div> <script> var noteSaveTimer = null; var noteText = $('#note-text'); + var noteTextHTML = $('#note-text-html'); + var noteMode = $('.note-mode'); + var noteEditing = false; + + noteText.bbco_autocomplete('bbcode'); $(document).on('focusout',"#note-text",function(e){ if(noteSaveTimer) clearTimeout(noteSaveTimer); + + noteEditing = false; notePostFinal(); noteSaveTimer = null; + setNoteMode(noteMode, 'saving'); }); - $(document).on('focusin',"#note-text",function(e){ - noteSaveTimer = setTimeout(noteSaveChanges,10000); + $(document).on('dblclick',"#note-text-html",function(e){ + noteEditing = 1; + noteText.show().focusin(); + noteText.height(noteTextHTML.outerHeight()); + noteText.scrollTop(noteTextHTML.scrollTop()); + noteTextHTML.hide(); + setNoteMode(noteMode, 'edit'); + + $(document).one('click', function(e) { + if (e.target.id !== 'note-text') { + noteTextHTML.show(); + noteTextHTML.height(noteText.outerHeight()); + noteTextHTML.scrollTop(noteText.scrollTop()); + noteText.hide(); + setNoteMode(noteMode, 'read'); + } + }); + + $(document).one('click', '#note-text', function(e){ + noteEditing = 2; + setNoteMode(noteMode, 'editing'); + noteSaveTimer = setTimeout(noteSaveChanges,10000); + }); + }); + + function notePostFinal() { - $.post('notes/sync', { 'note_text' : $('#note-text').val() }); + $.post( + 'notes/sync', + { + 'note_text' : noteText.val() + }, + function (data) { + noteTextHTML.html(data.html); + noteTextHTML.show(); + noteTextHTML.height(noteText.outerHeight()); + noteTextHTML.scrollTop(noteText.scrollTop()); + noteText.hide(); + setNoteMode(noteMode, 'saved'); + } + ); } function noteSaveChanges() { - $.post('notes', { 'note_text' : $('#note-text').val() }); - noteSaveTimer = setTimeout(noteSaveChanges,10000); + $.post('notes', { 'note_text' : noteText.val() }); + noteSaveTimer = setTimeout(noteSaveChanges, 10000); } + + function setNoteMode (obj, mode) { + switch(mode) { + case 'edit': + obj.removeClass('border-secondary border-success text-muted text-success') + obj.addClass('border-danger text-danger') + obj.html('{{$strings.edit}}'); + break; + case 'editing': + obj.removeClass('border-secondary border-success text-muted text-success') + obj.addClass('border-danger text-danger') + obj.html('{{$strings.editing}}{{$strings.dots}}'); + break; + case 'saving': + obj.removeClass('border-secondary border-danger text-muted text-danger') + obj.addClass('border-success text-success') + obj.html('{{$strings.saving}}{{$strings.dots}}'); + break; + case 'saved': + obj.removeClass('border-secondary border-danger text-muted text-danger') + obj.addClass('border-success text-success') + obj.html('{{$strings.saved}}'); + setTimeout(function () { + if(noteEditing) { + setNoteMode(noteMode, noteEditing === 1 ? 'edit' : 'editing'); + } + else { + setNoteMode(noteMode, 'read'); + } + }, 3000); + break; + case 'read': + default: + obj.removeClass('border-success border-danger text-success text-danger').addClass('border-secondary text-muted').html('{{$strings.read}}'); + } + } + </script> {{if $app}} </div> diff --git a/view/tpl/notifications_widget.tpl b/view/tpl/notifications_widget.tpl index 76b0851a7..fcadf71e5 100644 --- a/view/tpl/notifications_widget.tpl +++ b/view/tpl/notifications_widget.tpl @@ -257,7 +257,7 @@ if(typeof sse_type === 'undefined') return; - if(followup || !manual || !($('#nav-' + sse_type + '-sub').hasClass('collapse') && $('#nav-' + sse_type + '-sub').hasClass('show'))) { + if(followup || !manual || !$('#notification-link-' + sse_type).hasClass('collapsed')) { if(sse_offset >= 0) { $("#nav-" + sse_type + "-loading").show(); @@ -287,9 +287,9 @@ sse_handleNotifications(obj, replace, followup); }); } - else + else { $("#nav-" + sse_type + "-loading").hide(); - + } } else { sessionStorage.removeItem('notification_open'); @@ -315,6 +315,7 @@ } else { $('.' + type + '-update').html('0'); + $('#nav-' + type + '-sub').removeClass('show'); $('.' + type + '-button').fadeOut(function() { sse_setNotificationsStatus(); }); @@ -490,9 +491,10 @@ var fcount = Number($('.' + n[1] + '-update').html()); fcount--; $('.' + n[1] + '-update').html(fcount); - if(fcount < 1) + if(fcount < 1) { $('.' + n[1] + '-button').fadeOut(); - + $('#nav-' + n[1] + '-sub').removeClass('show'); + } var count = Number($(this).find('.bg-secondary').html()); count--; $(this).find('.bg-secondary').html(count); @@ -538,43 +540,42 @@ <i class="fa fa-{11} text-muted"></i> </a> </div> - <div id="notifications" class="border border-bottom-0 rounded navbar-nav collapse"> + <div id="notifications" class="border border-top-0 rounded navbar-nav collapse"> {{foreach $notifications as $notification}} - <div class="rounded list-group list-group-flush collapse {{$notification.type}}-button"> + <div class="border border-start-0 border-end-0 border-bottom-0 list-group list-group-flush collapse {{$notification.type}}-button"> <a id="notification-link-{{$notification.type}}" class="collapsed list-group-item fakelink notification-link" href="#" title="{{$notification.title}}" data-bs-target="#nav-{{$notification.type}}-sub" data-bs-toggle="collapse" data-sse_type="{{$notification.type}}"> <i class="fa fa-fw fa-{{$notification.icon}}"></i> {{$notification.label}} <span class="float-end badge bg-{{$notification.severity}} {{$notification.type}}-update"></span> </a> - <div id="nav-{{$notification.type}}-sub" class="list-group list-group-flush border-bottom collapse notification-content" data-bs-parent="#notifications" data-sse_type="{{$notification.type}}"> - {{if $notification.viewall}} - <a class="list-group-item text-decoration-none text-dark" id="nav-{{$notification.type}}-see-all" href="{{$notification.viewall.url}}"> - <i class="fa fa-fw fa-external-link"></i> {{$notification.viewall.label}} - </a> - {{/if}} - {{if $notification.markall}} - <div class="list-group-item cursor-pointer" id="nav-{{$notification.type}}-mark-all" onclick="markRead('{{$notification.type}}'); return false;"> - <i class="fa fa-fw fa-check"></i> {{$notification.markall.label}} - </div> - {{/if}} - {{if $notification.filter}} - {{if $notification.filter.posts_label}} - <div class="list-group-item cursor-pointer" id="tt-{{$notification.type}}-only"> - <i class="fa fa-fw fa-filter"></i> {{$notification.filter.posts_label}} - </div> - {{/if}} - {{if $notification.filter.name_label}} - <div class="list-group-item clearfix notifications-textinput" id="cn-{{$notification.type}}-only"> - <div class="text-muted notifications-textinput-filter"><i class="fa fa-fw fa-filter"></i></div> - <input id="cn-{{$notification.type}}-input" type="text" class="notification-filter form-control form-control-sm" placeholder="{{$notification.filter.name_label}}"> - <div id="cn-{{$notification.type}}-input-clear" class="text-muted notifications-textinput-clear d-none"><i class="fa fa-times"></i></div> - </div> - {{/if}} - {{/if}} - <div id="nav-{{$notification.type}}-menu" class="list-group list-group-flush"></div> - <div id="nav-{{$notification.type}}-loading" class="list-group-item" style="display: none;"> - {{$loading}}<span class="jumping-dots"><span class="dot-1">.</span><span class="dot-2">.</span><span class="dot-3">.</span></span> - </div> - + </div> + <div id="nav-{{$notification.type}}-sub" class="border border-start-0 border-end-0 border-bottom-0 list-group list-group-flush collapse notification-content" data-bs-parent="#notifications" data-sse_type="{{$notification.type}}"> + {{if $notification.viewall}} + <a class="list-group-item text-decoration-none text-dark" id="nav-{{$notification.type}}-see-all" href="{{$notification.viewall.url}}"> + <i class="fa fa-fw fa-external-link"></i> {{$notification.viewall.label}} + </a> + {{/if}} + {{if $notification.markall}} + <div class="list-group-item cursor-pointer" id="nav-{{$notification.type}}-mark-all" onclick="markRead('{{$notification.type}}'); return false;"> + <i class="fa fa-fw fa-check"></i> {{$notification.markall.label}} + </div> + {{/if}} + {{if $notification.filter}} + {{if $notification.filter.posts_label}} + <div class="list-group-item cursor-pointer" id="tt-{{$notification.type}}-only"> + <i class="fa fa-fw fa-filter"></i> {{$notification.filter.posts_label}} + </div> + {{/if}} + {{if $notification.filter.name_label}} + <div class="list-group-item clearfix notifications-textinput" id="cn-{{$notification.type}}-only"> + <div class="text-muted notifications-textinput-filter"><i class="fa fa-fw fa-filter"></i></div> + <input id="cn-{{$notification.type}}-input" type="text" class="notification-filter form-control form-control-sm" placeholder="{{$notification.filter.name_label}}"> + <div id="cn-{{$notification.type}}-input-clear" class="text-muted notifications-textinput-clear d-none"><i class="fa fa-times"></i></div> + </div> + {{/if}} + {{/if}} + <div id="nav-{{$notification.type}}-menu" class="list-group list-group-flush"></div> + <div id="nav-{{$notification.type}}-loading" class="list-group-item" style="display: none;"> + {{$loading}}<span class="jumping-dots"><span class="dot-1">.</span><span class="dot-2">.</span><span class="dot-3">.</span></span> </div> </div> {{/foreach}} diff --git a/view/tpl/peoplefind.tpl b/view/tpl/peoplefind.tpl index 2ede221f3..1dc02e4c3 100644 --- a/view/tpl/peoplefind.tpl +++ b/view/tpl/peoplefind.tpl @@ -3,7 +3,7 @@ <form action="directory" method="post" /> <div class="input-group mb-3"> <input class="form-control" type="text" name="search" title="{{$hint}}{{if $advanced_search}}{{$advanced_hint}}{{/if}}" placeholder="{{$desc}}" /> - <button class="btn btn-sm btn-outline-secondary" type="submit" name="submit"><i class="fa fa-fw fa-search"></i></button> + <button class="btn btn-outline-secondary" type="submit" name="submit"><i class="fa fa-fw fa-search"></i></button> </div> </form> <ul class="nav nav-pills flex-column"> 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/photos_upload.tpl b/view/tpl/photos_upload.tpl index 95cf4e295..72f6c4611 100644 --- a/view/tpl/photos_upload.tpl +++ b/view/tpl/photos_upload.tpl @@ -55,7 +55,7 @@ </form> </div> <table id="upload-index"> - <tr id="new-upload-progress-bar-1"></tr> {{* this is needed to append the upload files in the right order *}} + <tr id="new-upload-progress-bar-0"></tr> {{* this is needed to append the upload files in the right order *}} </table> {{$aclselect}} <div id="photos-upload-end" class="clear"></div> 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/searchbox.tpl b/view/tpl/searchbox.tpl index ec855dc5c..c6bbcee82 100644 --- a/view/tpl/searchbox.tpl +++ b/view/tpl/searchbox.tpl @@ -2,9 +2,9 @@ <input type="hidden" name="f" value="" /> <div id="{{$id}}" class="input-group"> <input class="form-control" type="text" name="search" id="search-text" value="{{$s}}" onclick="this.submit();" /> - <button type="submit" name="submit" class="btn btn-sm btn-outline-secondary" id="search-submit" value="{{$search_label}}"><i class="fa fa-search"></i></button> + <button type="submit" name="submit" class="btn btn-outline-secondary" id="search-submit" value="{{$search_label}}"><i class="fa fa-search"></i></button> {{if $savedsearch}} - <button type="submit" name="searchsave" class="btn btn-sm btn-outline-secondary" id="search-save" value="{{$save_label}}"><i class="fa fa-floppy-o"></i></button> + <button type="submit" name="searchsave" class="btn btn-outline-secondary" id="search-save" value="{{$save_label}}"><i class="fa fa-floppy-o"></i></button> {{/if}} </div> </form> diff --git a/view/tpl/settings.tpl b/view/tpl/settings.tpl index a3e68f60a..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"> @@ -154,6 +154,7 @@ {{include file="field_intcheckbox.tpl" field=$vnotify14}} {{include file="field_intcheckbox.tpl" field=$vnotify15}} {{include file="field_intcheckbox.tpl" field=$always_show_in_notices}} + {{include file="field_intcheckbox.tpl" field=$update_notices_per_parent}} {{include file="field_input.tpl" field=$evdays}} </div> </div> 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> diff --git a/view/tpl/uexport.tpl b/view/tpl/uexport.tpl index 7eafd97a6..2b7967970 100644 --- a/view/tpl/uexport.tpl +++ b/view/tpl/uexport.tpl @@ -3,17 +3,54 @@ <h2>{{$title}}</h2> </div> <div class="section-content-wrapper"> - <b><a href="uexport/basic">{{$basictitle}}</a></b></p> - <p>{{$basic}}</p> - - <p><b><a href="uexport/complete">{{$fulltitle}}</a></b></p> - <p>{{$full}}</p> - - <p>{{$extra}}</p> - <p>{{$extra2}}</p> - <p>{{$extra3}}</p> - - <p>{{$extra4}}</p> - + <p class="mb-3"> + <h3>{{$channel_title}}</h3> + <p> + {{$channel_info}} + </p> + <a href="uexport/channel" class="btn btn-outline-primary"><i class="fa fa-download"></i> {{$channel_title}}</a> + </p> + <p class="mb-3"> + <h3>{{$content_title}}</h3> + <p> + {{$content_info}} + {{$items_extra_info}} + </p> + {{foreach $years as $year}} + <a href="uexport/{{$year}}" class="btn btn-outline-primary"><i class="fa fa-download"></i> {{$year}}</a> + {{/foreach}} + </p> + <p class="mb-3"> + <h3>{{$wikis_title}}</h3> + <p> + {{$wikis_info}} + {{$items_extra_info}} + </p> + <a href="uexport/wikis" class="btn btn-outline-primary"><i class="fa fa-download"></i> {{$wikis_title}}</a> + </p> + <p class="mb-3"> + <h3>{{$webpages_title}}</h3> + <p> + {{$webpages_info}} + {{$items_extra_info}} + </p> + <a href="uexport/webpages" class="btn btn-outline-primary"><i class="fa fa-download"></i> {{$webpages_title}}</a> + </p> + <p class="mb-3"> + <h3>{{$events_title}}</h3> + <p> + {{$events_info}} + {{$items_extra_info}} + </p> + <a href="uexport/events" class="btn btn-outline-primary"><i class="fa fa-download"></i> {{$events_title}}</a> + </p> + <p class="mb-3"> + <h3>{{$chatrooms_title}}</h3> + <p> + {{$chatrooms_info}} + {{$items_extra_info}} + </p> + <a href="uexport/chatrooms" class="btn btn-outline-primary"><i class="fa fa-download"></i> {{$chatrooms_title}}</a> + </p> </div> </div> diff --git a/view/tpl/wiki.tpl b/view/tpl/wiki.tpl index bf3f64508..640678ae8 100644 --- a/view/tpl/wiki.tpl +++ b/view/tpl/wiki.tpl @@ -67,7 +67,7 @@ <div id="id_{{$commitMsg.0}}_wrapper" class="field input" style="display: none"> <div class="input-group"> <input class="form-control" name="{{$commitMsg.0}}" id="id_{{$commitMsg.0}}" type="text" value="{{$commitMsg.2}}"{{if $commitMsg.5}} {{$commitMsg.5}}{{/if}}> - <button id="save-page" type="button" class="btn btn-sm btn-primary disabled">Save</button> + <button id="save-page" type="button" class="btn btn-primary disabled">Save</button> </div> </div> {{/if}} diff --git a/view/tpl/xchan_vcard.tpl b/view/tpl/xchan_vcard.tpl index 7deae0f99..2fd9bec1d 100644 --- a/view/tpl/xchan_vcard.tpl +++ b/view/tpl/xchan_vcard.tpl @@ -6,14 +6,14 @@ </a> </div> <div class="col-7 m-1"> - <div class="row"> - <strong class="fn p-name text-truncate">{{$name}}</strong> + <div class="text-truncate"> + <strong class="fn p-name">{{$name}}</strong> </div> - <div class="row"> - <small class="text-muted p-adr text-truncate">{{$addr}}</small> + <div class="text-truncate"> + <small class="text-muted p-adr">{{$addr}}</small> </div> {{if $connect}} - <div class="row mt-2"> + <div class="mt-1"> <a href="follow?f=&url={{$follow}}&interactive=1" class="btn btn-success btn-sm" rel="nofollow"> <i class="fa fa-plus"></i> {{$connect}} </a> diff --git a/view/tpl/xrd_host.tpl b/view/tpl/xrd_host.tpl index 2a40dcf47..43bd94664 100644 --- a/view/tpl/xrd_host.tpl +++ b/view/tpl/xrd_host.tpl @@ -1,11 +1,6 @@ <?xml version='1.0' encoding='UTF-8'?> -<XRD xmlns='http://docs.oasis-open.org/ns/xri/xrd-1.0' - xmlns:hm='http://host-meta.net/xrd/1.0'> - - <hm:Host>{{$zhost}}</hm:Host> - - <Link rel='lrdd' type="application/xrd+xml" template='{{$zroot}}/xrd/?uri={uri}' /> - <Link rel="http://oexchange.org/spec/0.8/rel/resident-target" type="application/xrd+xml" - href="{{$zroot}}/oexchange/xrd" /> - +<XRD xmlns='http://docs.oasis-open.org/ns/xri/xrd-1.0' xmlns:hm='http://host-meta.net/xrd/1.0'> + <hm:Host>{{$zhost}}</hm:Host> + <Link rel='lrdd' type="application/xrd+xml" template='{{$zroot}}/xrd/?uri={uri}' /> + <Link rel="http://oexchange.org/spec/0.8/rel/resident-target" type="application/xrd+xml" href="{{$zroot}}/oexchange/xrd" /> </XRD> diff --git a/view/tpl/xrd_person.tpl b/view/tpl/xrd_person.tpl index 52adb54e3..63f8e0846 100644 --- a/view/tpl/xrd_person.tpl +++ b/view/tpl/xrd_person.tpl @@ -1,28 +1,16 @@ <?xml version="1.0" encoding="UTF-8"?> <XRD xmlns="http://docs.oasis-open.org/ns/xri/xrd-1.0"> - - <Subject>{{$subject}}</Subject> - {{if $aliases}}{{foreach $aliases as $a}} - <Alias>{{$a}}</Alias> - {{/foreach}}{{/if}} - - <Link rel="http://schemas.google.com/g/2010#updates-from" - type="application/atom+xml" - href="{{$atom}}" /> - <Link rel="http://webfinger.net/rel/profile-page" - type="text/html" - href="{{$profile_url}}" /> - <Link rel="http://portablecontacts.net/spec/1.0" - href="{{$poco_url}}" /> - <Link rel="http://webfinger.net/rel/avatar" - type="image/jpeg" - href="{{$photo}}" /> - <Link rel="http://microformats.org/profile/hcard" - type="text/html" - href="{{$hcard_url}}" /> - <Link rel="http://ostatus.org/schema/1.0/subscribe" - template="{{$subscribe}}" /> - <Link rel="magic-public-key" - href="{{$modexp}}" /> - + <Subject>{{$subject}}</Subject> +{{if $aliases}} +{{foreach $aliases as $a}} + <Alias>{{$a}}</Alias> +{{/foreach}} +{{/if}} + <Link rel="http://schemas.google.com/g/2010#updates-from" type="application/atom+xml" href="{{$atom}}" /> + <Link rel="http://webfinger.net/rel/profile-page" type="text/html" href="{{$profile_url}}" /> + <Link rel="http://portablecontacts.net/spec/1.0" href="{{$poco_url}}" /> + <Link rel="http://webfinger.net/rel/avatar" type="image/jpeg" href="{{$photo}}" /> + <Link rel="http://microformats.org/profile/hcard" type="text/html" href="{{$hcard_url}}" /> + <Link rel="http://ostatus.org/schema/1.0/subscribe" template="{{$subscribe}}" /> + <Link rel="magic-public-key" href="{{$modexp}}" /> </XRD> |