spacing fixes

This commit is contained in:
Roland Gruber 2019-11-07 21:45:12 +01:00
parent 5a12fc7a2e
commit a3f0c07096
6 changed files with 19 additions and 25 deletions

View File

@ -195,6 +195,7 @@ jQuery(document).ready(function() {
<?php <?php
printTypeTabs($headerPrefix);
function printTypeTabs($headerPrefix) { function printTypeTabs($headerPrefix) {
echo '<div class="ui-tabs ui-corner-all ui-widget ui-widget-content">'; echo '<div class="ui-tabs ui-corner-all ui-widget ui-widget-content">';

View File

@ -912,7 +912,6 @@ class lamList {
*/ */
private function printHeader() { private function printHeader() {
include 'adminHeader.inc'; include 'adminHeader.inc';
\LAM\HEADER\printTypeTabs('../..');
$this->printHeaderContent(); $this->printHeaderContent();
} }

View File

@ -1051,10 +1051,9 @@ class accountContainer {
$titleBarContainer = new htmlResponsiveRow(); $titleBarContainer = new htmlResponsiveRow();
$titleBarContainer->setCSSClasses(array('maxrow')); $titleBarContainer->setCSSClasses(array('maxrow'));
$titleBarTitleText = new htmlOutputText($this->titleBarTitle, false); $titleBarTitleText = new htmlOutputText($this->titleBarTitle, false);
$titleBarContainer->add(new htmlDiv(null, $titleBarTitleText, array('titleBarTitle', 'text-left')), 12); $titleBarContainer->add(new htmlDiv(null, $titleBarTitleText, array('titleBarTitle', 'text-left')), 12, 12, 4);
$titleBarContainer->addVerticalSpacer('0.5rem');
$titleBarSubtitleText = new htmlOutputText($this->titleBarSubtitle, false); $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 = new htmlResponsiveRow();
$titleBarSuffixRdn->add(new htmlHorizontalLine(), 12); $titleBarSuffixRdn->add(new htmlHorizontalLine(), 12);
// suffix // suffix
@ -1322,12 +1321,6 @@ class accountContainer {
$deleteButton->setCSSClasses(array('fullwidth-mobile-only')); $deleteButton->setCSSClasses(array('fullwidth-mobile-only'));
$leftButtonGroup->addElement($deleteButton); $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); $row->add($leftButtonGroup, 12, 9);
$rightGroup = new htmlGroup(); $rightGroup = new htmlGroup();

View File

@ -128,6 +128,7 @@ class user extends baseType {
* @return String title text * @return String title text
*/ */
public function getTitleBarTitle($container) { public function getTitleBarTitle($container) {
$title = $this->buildAccountStatusIcon($container);
// get attributes // get attributes
$personalAttributes = null; $personalAttributes = null;
if ($container->getAccountModule('inetOrgPerson') != null) { if ($container->getAccountModule('inetOrgPerson') != null) {
@ -158,37 +159,37 @@ class user extends baseType {
// check if first and last name can be shown // check if first and last name can be shown
if (($personalAttributes != null) && isset($personalAttributes['sn'][0]) && !empty($personalAttributes['sn'][0]) if (($personalAttributes != null) && isset($personalAttributes['sn'][0]) && !empty($personalAttributes['sn'][0])
&& isset($personalAttributes['givenName'][0]) && !empty($personalAttributes['givenName'][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 // check if a display name is set
if (($sambaAttributes != null) && isset($sambaAttributes['displayName'][0]) && !empty($sambaAttributes['displayName'][0])) { 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 // check if a common name is set
if (($personalAttributes != null) && isset($personalAttributes['cn'][0]) && !empty($personalAttributes['cn'][0])) { 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])) { 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 // check if a user name is set
if (($unixAttributes != null) && isset($unixAttributes['uid'][0]) && !empty($unixAttributes['uid'][0])) { 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])) { 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])) { 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])) { 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) { if ($container->isNewAccount) {
return _("New user"); return $title . _("New user");
} }
// fall back to default // 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(); $personalAttributes = $container->getAccountModule('windowsUser')->getAttributes();
} }
if ($personalAttributes == null) { if ($personalAttributes == null) {
return $this->buildAccountStatusIcon($container); return '';
} }
$subtitle = $this->buildAccountStatusIcon($container); $subtitle = '';
$spacer = ' &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; '; $spacer = ' &nbsp;&nbsp;&nbsp; ';
// check if an email address can be shown // check if an email address can be shown
if (isset($personalAttributes['mail'][0]) && !empty($personalAttributes['mail'][0])) { if (isset($personalAttributes['mail'][0]) && !empty($personalAttributes['mail'][0])) {
$subtitle .= '<a href="mailto:' . htmlspecialchars($personalAttributes['mail'][0]) . '">' . htmlspecialchars($personalAttributes['mail'][0]) . '</a>' . $spacer; $subtitle .= '<a href="mailto:' . htmlspecialchars($personalAttributes['mail'][0]) . '">' . htmlspecialchars($personalAttributes['mail'][0]) . '</a>' . $spacer;

View File

@ -226,8 +226,9 @@ textarea {
table.lamHeader { table.lamHeader {
background-image: url(lam-images/headerLine.png); background-image: url(lam-images/headerLine.png);
padding: 0px 0px 0.5rem 0px; padding: 0px;
height: 35px; height: 35px;
margin-bottom: 0.5rem;
} }
table.lamTop { table.lamTop {

View File

@ -40,7 +40,6 @@ enforceUserIsLoggedIn();
setlanguage(); setlanguage();
include __DIR__ . '/../../lib/adminHeader.inc'; include __DIR__ . '/../../lib/adminHeader.inc';
\LAM\HEADER\printTypeTabs('../..');
?> ?>
<div id="tabcontent" class="ui-tabs-panel ui-widget-content ui-corner-bottom"> <div id="tabcontent" class="ui-tabs-panel ui-widget-content ui-corner-bottom">