From e648679fcf9a1784ce447d0b63fa563ce0302707 Mon Sep 17 00:00:00 2001 From: Jared Hancock <jared@osticket.com> Date: Wed, 22 Apr 2015 12:19:32 -0500 Subject: [PATCH] ui: Hide empty sidebar on client index --- assets/default/css/theme.css | 3 +++ index.php | 7 +++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/assets/default/css/theme.css b/assets/default/css/theme.css index 73a76e4aa..2ebe419f6 100644 --- a/assets/default/css/theme.css +++ b/assets/default/css/theme.css @@ -996,6 +996,9 @@ img.sign-in-image { .sidebar .content { padding: 10px; border: 1px solid #C8DDFA; background: #F7FBFE; } +.sidebar .content:empty { + display: none; +} .sidebar section .header { font-weight: bold; diff --git a/index.php b/index.php index 97ff23787..ad12bb417 100644 --- a/index.php +++ b/index.php @@ -28,8 +28,7 @@ require(CLIENTINC_DIR.'header.inc.php'); echo __('Open a New Ticket');?></a> </p> </div> - <div class="content"> -<?php + <div class="content"><?php $faqs = FAQ::getFeatured()->select_related('category')->limit(5); if ($faqs->all()) { ?> <section><div class="header"><?php echo __('Featured Questions'); ?></div> @@ -50,8 +49,8 @@ require(CLIENTINC_DIR.'header.inc.php'); <?php } ?> </section> <?php - } ?> - </div> + } + ?></div> </div> <div class="welcome"> <?php -- GitLab