From 4c05994a6f5c5ec625a37dac1278c4f25e30e7ee Mon Sep 17 00:00:00 2001 From: Roland Gruber Date: Sun, 25 Aug 2019 12:44:13 +0200 Subject: [PATCH] responsive --- lam/lib/modules/generalInformation.inc | 35 +++++++++++++------------- 1 file changed, 17 insertions(+), 18 deletions(-) diff --git a/lam/lib/modules/generalInformation.inc b/lam/lib/modules/generalInformation.inc index 53a0c946..8d14dd10 100644 --- a/lam/lib/modules/generalInformation.inc +++ b/lam/lib/modules/generalInformation.inc @@ -1,9 +1,8 @@ attributes['creatorsName'][0])) { - $return->addElement(new htmlOutputText(_('Created by'))); - $return->addElement(new htmlOutputText(getAbstractDN($this->attributes['creatorsName'][0])), true); + $return->addLabel(new htmlOutputText(_('Created by'))); + $return->addField(new htmlOutputText(getAbstractDN($this->attributes['creatorsName'][0]))); } if (isset($this->attributes['createTimestamp'][0])) { - $return->addElement(new htmlOutputText(_('Creation time'))); - $return->addElement(new htmlOutputText(formatLDAPTimestamp($this->attributes['createTimestamp'][0])), true); + $return->addLabel(new htmlOutputText(_('Creation time'))); + $return->addField(new htmlOutputText(formatLDAPTimestamp($this->attributes['createTimestamp'][0]))); } if (isset($this->attributes['creatorsName'][0]) || isset($this->attributes['createTimestamp'][0])) { - $return->addElement(new htmlSpacer(null, '5px'), true); + $return->addVerticalSpacer('1rem'); } // modification info if (isset($this->attributes['modifiersName'][0])) { - $return->addElement(new htmlOutputText(_('Modified by'))); - $return->addElement(new htmlOutputText(getAbstractDN($this->attributes['modifiersName'][0])), true); + $return->addLabel(new htmlOutputText(_('Modified by'))); + $return->addField(new htmlOutputText(getAbstractDN($this->attributes['modifiersName'][0]))); } if (isset($this->attributes['modifyTimestamp'][0])) { - $return->addElement(new htmlOutputText(_('Modification time'))); - $return->addElement(new htmlOutputText(formatLDAPTimestamp($this->attributes['modifyTimestamp'][0])), true); + $return->addLabel(new htmlOutputText(_('Modification time'))); + $return->addField(new htmlOutputText(formatLDAPTimestamp($this->attributes['modifyTimestamp'][0]))); } if (isset($this->attributes['modifiersName'][0]) || isset($this->attributes['modifyTimestamp'][0])) { - $return->addElement(new htmlSpacer(null, '5px'), true); + $return->addVerticalSpacer('1rem'); } // children if (isset($this->attributes['hasSubordinates'][0])) { @@ -103,20 +102,20 @@ class generalInformation extends baseModule { if ($this->attributes['hasSubordinates'][0] == 'TRUE') { $hasChilds = _('yes'); } - $return->addElement(new htmlOutputText(_('Has subentries'))); - $return->addElement(new htmlOutputText($hasChilds), true); - $return->addElement(new htmlSpacer(null, '5px'), true); + $return->addLabel(new htmlOutputText(_('Has subentries'))); + $return->addField(new htmlOutputText($hasChilds)); + $return->addVerticalSpacer('1rem'); } // group memberships if (isset($this->attributes['memberOf'][0])) { $groupLabel = new htmlOutputText(_('Groups')); $groupLabel->alignment = htmlElement::ALIGN_TOP; - $return->addElement($groupLabel); + $return->addLabel($groupLabel); $groups = new htmlTable(); for ($i = 0; $i < sizeof($this->attributes['memberOf']); $i++) { $groups->addElement(new htmlOutputText(getAbstractDN($this->attributes['memberOf'][$i])), true); } - $return->addElement($groups); + $return->addField($groups); } return $return; }