Remove user group and welcome page templates from the OTS Signs theme
This commit is contained in:
@@ -23,47 +23,17 @@
|
||||
{% extends "base.twig" %}
|
||||
|
||||
{% block headContent %}
|
||||
{% if not currentUser.isSuperAdmin() and not currentUser.isGroupAdmin() %}
|
||||
<script nonce="{{ cspNonce }}">
|
||||
(function() {
|
||||
var path = window.location.pathname;
|
||||
if (path.indexOf('/layout/designer/') !== -1) return;
|
||||
var cmsIdx = path.toLowerCase().indexOf('/cms');
|
||||
var portalUrl = window.location.origin + (cmsIdx > 0 ? path.substring(0, cmsIdx) : '') + '/';
|
||||
window.location.replace(portalUrl);
|
||||
})();
|
||||
</script>
|
||||
{% endif %}
|
||||
<script nonce="{{ cspNonce }}">
|
||||
(function(){
|
||||
try{
|
||||
var stored = localStorage.getItem('ots-theme-mode');
|
||||
var prefersLight = window.matchMedia && window.matchMedia('(prefers-color-scheme: light)').matches;
|
||||
var mode = stored || (prefersLight ? 'light' : 'dark');
|
||||
if(mode === 'light') document.documentElement.classList.add('ots-light-mode');
|
||||
else document.documentElement.classList.remove('ots-light-mode');
|
||||
}catch(e){}
|
||||
})();
|
||||
|
||||
(function(){
|
||||
// Apply collapsed sidebar state early to prevent header flashing
|
||||
try {
|
||||
var collapsed = localStorage.getItem('otsTheme:sidebarCollapsed');
|
||||
if (collapsed === 'true') {
|
||||
document.documentElement.classList.add('ots-sidebar-collapsed');
|
||||
if (document.body) document.body.classList.add('ots-sidebar-collapsed');
|
||||
}
|
||||
} catch (e) {}
|
||||
})();
|
||||
|
||||
</script>
|
||||
<style nonce="{{ cspNonce }}">
|
||||
/* Let the CSS variable theming (light/dark) control page background */
|
||||
html,body{background-color:var(--color-background,#0f172a)!important;color:var(--color-text-primary,#ffffff)!important}
|
||||
/* Hide the old topbar strip entirely — actions are now in .ots-page-actions */
|
||||
.row.header.header-side,
|
||||
.ots-topbar-strip { display: none !important; height: 0 !important; margin: 0 !important; padding: 0 !important; overflow: hidden !important; }
|
||||
</style>
|
||||
{% if not currentUser.isSuperAdmin() and not currentUser.isGroupAdmin() %}
|
||||
<script nonce="{{ cspNonce }}">
|
||||
(function() {
|
||||
var path = window.location.pathname;
|
||||
if (path.indexOf('/layout/designer/') !== -1) return;
|
||||
var cmsIdx = path.toLowerCase().indexOf('/cms');
|
||||
var portalUrl = window.location.origin + (cmsIdx > 0 ? path.substring(0, cmsIdx) : '') + '/';
|
||||
window.location.replace(portalUrl);
|
||||
})();
|
||||
</script>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
@@ -80,10 +50,6 @@
|
||||
<nav class="navbar navbar-default navbar-expand-lg">
|
||||
<a class="navbar-brand xibo-logo-container" href="#">
|
||||
<img class="xibo-logo" src="{{ theme.uri("img/xibologo.png") }}">
|
||||
<span class="xibo-logo-text">
|
||||
<span class="brand-line brand-line-top">OTS</span>
|
||||
<span class="brand-line brand-line-bottom">Signs</span>
|
||||
</span>
|
||||
</a>
|
||||
|
||||
<!-- Brand and toggle get grouped for better mobile display -->
|
||||
@@ -111,23 +77,33 @@
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
<div id="content-wrapper" class="{% if hideNavigation == "1" %}no-nav{% endif %}{% if horizontalNav %} ots-horizontal-nav{% endif %}">
|
||||
{# Floating top-right actions: notification bell + user menu #}
|
||||
{# Hidden when horizontal nav is active — the navbar already has these controls #}
|
||||
{% if not forceHide and not horizontalNav %}
|
||||
<div class="ots-page-actions"{% if hideNavigation == "1" %} style="display:none!important"{% endif %}>
|
||||
{% include "authed-theme-topbar.twig" ignore missing %}
|
||||
{% if currentUser.featureEnabled("drawer") %}
|
||||
<div class="ots-topbar-action">
|
||||
{% include "authed-notification-drawer.twig" with { 'compact': true } %}
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="ots-topbar-action">
|
||||
{% include "authed-user-menu.twig" with { 'compact': true } %}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
<div id="content-wrapper">
|
||||
<div class="page-content">
|
||||
{% if not horizontalNav or hideNavigation == "1" or forceHide %}
|
||||
<div class="row header header-side">
|
||||
<div class="col-sm-12">
|
||||
<div class="meta pull-left xibo-logo-container">
|
||||
<div class="page"><img class="xibo-logo" src="{{ theme.uri("img/xibologo.png") }}"></div>
|
||||
</div>
|
||||
{% if not forceHide %}
|
||||
{% if not hideNavigation == "1" %}
|
||||
<button type="button" class="pull-right navbar-toggler navbar-toggler-side" data-toggle="collapse" data-target="#navbar-collapse-1" aria-controls="navbarNav" aria-expanded="false">
|
||||
<span class="fa fa-bars"></span>
|
||||
</button>
|
||||
{% endif %}
|
||||
<div class="user pull-right">
|
||||
{% include "authed-user-menu.twig" %}
|
||||
</div>
|
||||
{% if currentUser.featureEnabled("drawer") %}
|
||||
<div class="user user-notif pull-right">
|
||||
{% include "authed-notification-drawer.twig" %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% include "authed-theme-topbar.twig" ignore missing %}
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
{% block actionMenu %}{% endblock %}
|
||||
@@ -169,4 +145,4 @@
|
||||
{% block javaScriptTemplates %}
|
||||
{# File upload templates and scripts #}
|
||||
{% include "include-file-upload.twig" %}
|
||||
{% endblock %}
|
||||
{% endblock %}
|
||||
|
||||
Reference in New Issue
Block a user