From a3f0c070962b33c4cc2e263370a11e565c5b72c1 Mon Sep 17 00:00:00 2001 From: Roland Gruber Date: Thu, 7 Nov 2019 21:45:12 +0100 Subject: [PATCH] spacing fixes --- lam/lib/adminHeader.inc | 1 + lam/lib/lists.inc | 1 - lam/lib/modules.inc | 11 ++-------- lam/lib/types/user.inc | 27 ++++++++++++------------ lam/style/500_layout.css | 3 ++- lam/templates/tree/treeViewContainer.php | 1 - 6 files changed, 19 insertions(+), 25 deletions(-) diff --git a/lam/lib/adminHeader.inc b/lam/lib/adminHeader.inc index f1fee687..6a8ed1b7 100644 --- a/lam/lib/adminHeader.inc +++ b/lam/lib/adminHeader.inc @@ -195,6 +195,7 @@ jQuery(document).ready(function() { '; diff --git a/lam/lib/lists.inc b/lam/lib/lists.inc index 8f170a5b..eb27dd40 100644 --- a/lam/lib/lists.inc +++ b/lam/lib/lists.inc @@ -912,7 +912,6 @@ class lamList { */ private function printHeader() { include 'adminHeader.inc'; - \LAM\HEADER\printTypeTabs('../..'); $this->printHeaderContent(); } diff --git a/lam/lib/modules.inc b/lam/lib/modules.inc index ec20ffdd..288a0391 100644 --- a/lam/lib/modules.inc +++ b/lam/lib/modules.inc @@ -1051,10 +1051,9 @@ class accountContainer { $titleBarContainer = new htmlResponsiveRow(); $titleBarContainer->setCSSClasses(array('maxrow')); $titleBarTitleText = new htmlOutputText($this->titleBarTitle, false); - $titleBarContainer->add(new htmlDiv(null, $titleBarTitleText, array('titleBarTitle', 'text-left')), 12); - $titleBarContainer->addVerticalSpacer('0.5rem'); + $titleBarContainer->add(new htmlDiv(null, $titleBarTitleText, array('titleBarTitle', 'text-left')), 12, 12, 4); $titleBarSubtitleText = new htmlOutputText($this->titleBarSubtitle, false); - $titleBarContainer->add(new htmlDiv(null, $titleBarSubtitleText, array('titleBarSubtitle', 'text-left')), 12); + $titleBarContainer->add(new htmlDiv(null, $titleBarSubtitleText, array('titleBarSubtitle', 'responsiveLabel')), 12, 12, 8); $titleBarSuffixRdn = new htmlResponsiveRow(); $titleBarSuffixRdn->add(new htmlHorizontalLine(), 12); // suffix @@ -1322,12 +1321,6 @@ class accountContainer { $deleteButton->setCSSClasses(array('fullwidth-mobile-only')); $leftButtonGroup->addElement($deleteButton); } - // back to list button - $leftButtonGroup->addElement(new htmlSpacer('15px', null)); - $backToListButton = new htmlButton('accountContainerBackToList', $this->type->getBaseType()->LABEL_BACK_TO_ACCOUNT_LIST); - $backToListButton->setIconClass('backButton'); - $backToListButton->setCSSClasses(array('fullwidth-mobile-only')); - $leftButtonGroup->addElement($backToListButton); $row->add($leftButtonGroup, 12, 9); $rightGroup = new htmlGroup(); diff --git a/lam/lib/types/user.inc b/lam/lib/types/user.inc index f7fabada..19957452 100644 --- a/lam/lib/types/user.inc +++ b/lam/lib/types/user.inc @@ -128,6 +128,7 @@ class user extends baseType { * @return String title text */ public function getTitleBarTitle($container) { + $title = $this->buildAccountStatusIcon($container); // get attributes $personalAttributes = null; if ($container->getAccountModule('inetOrgPerson') != null) { @@ -158,37 +159,37 @@ class user extends baseType { // check if first and last name can be shown if (($personalAttributes != null) && isset($personalAttributes['sn'][0]) && !empty($personalAttributes['sn'][0]) && isset($personalAttributes['givenName'][0]) && !empty($personalAttributes['givenName'][0])) { - return htmlspecialchars($personalAttributes['givenName'][0] . ' ' . $personalAttributes['sn'][0]); + return $title . htmlspecialchars($personalAttributes['givenName'][0] . ' ' . $personalAttributes['sn'][0]); } // check if a display name is set if (($sambaAttributes != null) && isset($sambaAttributes['displayName'][0]) && !empty($sambaAttributes['displayName'][0])) { - return htmlspecialchars($sambaAttributes['displayName'][0]); + return $title . htmlspecialchars($sambaAttributes['displayName'][0]); } // check if a common name is set if (($personalAttributes != null) && isset($personalAttributes['cn'][0]) && !empty($personalAttributes['cn'][0])) { - return htmlspecialchars($personalAttributes['cn'][0]); + return $title . htmlspecialchars($personalAttributes['cn'][0]); } if (($unixAttributes != null) && isset($unixAttributes['cn'][0]) && !empty($unixAttributes['cn'][0])) { - return htmlspecialchars($unixAttributes['cn'][0]); + return $title . htmlspecialchars($unixAttributes['cn'][0]); } // check if a user name is set if (($unixAttributes != null) && isset($unixAttributes['uid'][0]) && !empty($unixAttributes['uid'][0])) { - return htmlspecialchars($unixAttributes['uid'][0]); + return $title . htmlspecialchars($unixAttributes['uid'][0]); } if (($personalAttributes != null) && isset($personalAttributes['uid'][0]) && !empty($personalAttributes['uid'][0])) { - return htmlspecialchars($personalAttributes['uid'][0]); + return $title . htmlspecialchars($personalAttributes['uid'][0]); } if (($accountAttributes != null) && isset($accountAttributes['uid'][0]) && !empty($accountAttributes['uid'][0])) { - return htmlspecialchars($accountAttributes['uid'][0]); + return $title . htmlspecialchars($accountAttributes['uid'][0]); } if (($mitKerberosAttributes != null) && isset($mitKerberosAttributes['krbPrincipalName'][0]) && !empty($mitKerberosAttributes['krbPrincipalName'][0])) { - return htmlspecialchars($mitKerberosAttributes['krbPrincipalName'][0]); + return $title . htmlspecialchars($mitKerberosAttributes['krbPrincipalName'][0]); } if ($container->isNewAccount) { - return _("New user"); + return $title . _("New user"); } // fall back to default - return parent::getTitleBarTitle($container); + return $title . parent::getTitleBarTitle($container); } /** @@ -206,10 +207,10 @@ class user extends baseType { $personalAttributes = $container->getAccountModule('windowsUser')->getAttributes(); } if ($personalAttributes == null) { - return $this->buildAccountStatusIcon($container); + return ''; } - $subtitle = $this->buildAccountStatusIcon($container); - $spacer = '        '; + $subtitle = ''; + $spacer = '     '; // check if an email address can be shown if (isset($personalAttributes['mail'][0]) && !empty($personalAttributes['mail'][0])) { $subtitle .= '' . htmlspecialchars($personalAttributes['mail'][0]) . '' . $spacer; diff --git a/lam/style/500_layout.css b/lam/style/500_layout.css index df554de4..b92b8a94 100644 --- a/lam/style/500_layout.css +++ b/lam/style/500_layout.css @@ -226,8 +226,9 @@ textarea { table.lamHeader { background-image: url(lam-images/headerLine.png); - padding: 0px 0px 0.5rem 0px; + padding: 0px; height: 35px; + margin-bottom: 0.5rem; } table.lamTop { diff --git a/lam/templates/tree/treeViewContainer.php b/lam/templates/tree/treeViewContainer.php index 17ea39f7..69a12065 100644 --- a/lam/templates/tree/treeViewContainer.php +++ b/lam/templates/tree/treeViewContainer.php @@ -40,7 +40,6 @@ enforceUserIsLoggedIn(); setlanguage(); include __DIR__ . '/../../lib/adminHeader.inc'; -\LAM\HEADER\printTypeTabs('../..'); ?>