From e432dddfce5ad612a66b111d791fc6d74ec50dd0 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 21 Apr 2026 12:30:44 +0200 Subject: [PATCH] various rebase fixes --- views/bootstrap/class.ViewDocument.php | 4 ++-- views/bootstrap4/class.Bootstrap4.php | 32 +++++++++++++++----------- 2 files changed, 21 insertions(+), 15 deletions(-) diff --git a/views/bootstrap/class.ViewDocument.php b/views/bootstrap/class.ViewDocument.php index 59d27bdb1..0f844c81a 100644 --- a/views/bootstrap/class.ViewDocument.php +++ b/views/bootstrap/class.ViewDocument.php @@ -2048,8 +2048,8 @@ $(document).ready( function() { contentContainerStart(); ?> - formField(getMLText("linked_document"), $this->getDocumentChooserHtml("form1")); ?> -formField(getMLText("add_document_link"), $this->getDocumentChooserHtml("form1")); ?> + getLinkTypes() as $linktype) { $options[] = array($linktype->getID(), htmlspecialchars($linktype->getName()), false, array(/*array('data-subtitle', $linktype->countDocumentLinksByType().' '.getMLText('documents'))*/)); diff --git a/views/bootstrap4/class.Bootstrap4.php b/views/bootstrap4/class.Bootstrap4.php index efda06e38..4309c4df4 100644 --- a/views/bootstrap4/class.Bootstrap4.php +++ b/views/bootstrap4/class.Bootstrap4.php @@ -1018,6 +1018,8 @@ background-image: linear-gradient(to bottom, #882222, #111111);; $menuitems['definitions']['children']['document_linktypes'] = array('link'=>$this->params['settings']->_httpRoot."out/out.LinkTypes.php", 'label'=>getMLText('global_link_types')); if ($accessobject->check_view_access('AttributeMgr')) $menuitems['definitions']['children']['attribute_definitions'] = array('link'=>$this->params['settings']->_httpRoot."out/out.AttributeMgr.php", 'label'=>getMLText('global_attributedefinitions')); + if ($accessobject->check_view_access('AttributeGroupMgr')) + $menuitems['definitions']['children']['attributegroup_definitions'] = array('link'=>$this->params['settings']->_httpRoot."out/out.AttributeGroupMgr.php", 'label'=>getMLText('global_attributedefinitiongroups')); if($this->params['workflowmode'] == 'advanced') { if ($accessobject->check_view_access('WorkflowMgr')) $menuitems['definitions']['children']['workflows'] = array('link'=>$this->params['settings']->_httpRoot."out/out.WorkflowMgr.php", 'label'=>getMLText('global_workflows')); @@ -2044,11 +2046,11 @@ $(document).ready(function() { * * @param object $attribute attribute */ - protected function printAttributeValue($attribute) { /* {{{ */ - echo self::getAttributeValue($attribute); + protected function printAttributeValue($attribute, $noecho=false) { /* {{{ */ + echo self::getAttributeValue($attribute, $noecho); } /* }}} */ - function getAttributeValue($attribute) { /* {{{ */ + function getAttributeValue($attribute, $noecho=false) { /* {{{ */ $dms = $this->params['dms']; $attrdef = $attribute->getAttributeDefinition(); switch($attrdef->getType()) { @@ -2058,7 +2060,7 @@ $(document).ready(function() { foreach($attrs as $attr) { $tmp[] = ''.htmlspecialchars($attr).''; } - return implode('
', $tmp); + $content = implode('
', $tmp); break; case SeedDMS_Core_AttributeDefinition::type_email: $attrs = $attribute->getValueAsArray(); @@ -2066,7 +2068,7 @@ $(document).ready(function() { foreach($attrs as $attr) { $tmp[] = ''.htmlspecialchars($attr).''; } - return implode('
', $tmp); + $content = implode('
', $tmp); break; case SeedDMS_Core_AttributeDefinition::type_folder: $attrs = $attribute->getValueAsArray(); @@ -2075,7 +2077,7 @@ $(document).ready(function() { if ($targetfolder) $tmp[] = ''.htmlspecialchars($targetfolder->getName()).''; } - return implode('
', $tmp); + $content = implode('
', $tmp); break; case SeedDMS_Core_AttributeDefinition::type_document: $attrs = $attribute->getValueAsArray(); @@ -2084,7 +2086,7 @@ $(document).ready(function() { if ($targetdoc) $tmp[] = ''.htmlspecialchars($targetdoc->getName()).''; } - return implode('
', $tmp); + $content = implode('
', $tmp); break; case SeedDMS_Core_AttributeDefinition::type_user: $attrs = $attribute->getValueAsArray(); @@ -2093,7 +2095,7 @@ $(document).ready(function() { if ($curuser) $tmp[] = htmlspecialchars($curuser->getFullname()." (".$curuser->getLogin().")"); } - return implode('
', $tmp); + $content = implode('
', $tmp); break; case SeedDMS_Core_AttributeDefinition::type_group: $attrs = $attribute->getValueAsArray(); @@ -2102,7 +2104,7 @@ $(document).ready(function() { if ($curgroup) $tmp[] = htmlspecialchars($curgroup->getName()); } - return implode('
', $tmp); + $content = implode('
', $tmp); break; case SeedDMS_Core_AttributeDefinition::type_date: $attrs = $attribute->getValueAsArray(); @@ -2110,11 +2112,15 @@ $(document).ready(function() { foreach($attrs as $attr) { $tmp[] = getReadableDate($attr); } - return implode(', ', $tmp); + $content = implode(', ', $tmp); break; default: - return htmlspecialchars(implode(', ', $attribute->getValueAsArray())); + $content = htmlspecialchars(implode(', ', $attribute->getValueAsArray())); } + if($noecho) + return $content; + else + echo $content; } /* }}} */ function printAttributeEditField($attrdef, $attribute, $fieldname='attributes', $norequire=false, $namepostfix='', $alwaysmultiple=false) { /* {{{ */ @@ -3573,7 +3579,7 @@ $('body').on('click', '[id^=\"table-row-folder\"] td:nth-child(2)', function(ev) * * @param object $document * @param object $previewer - * @param boolean $skipcont set to true if embrasing tr shall be skipped + * @param boolean $skipcont set to true if embrasing tr shall be skipped. * In that case call documentListRowStart() before and documentListRowEnd() * after this method. * @param integer $version set to a value != 0 for a specific version, otherwise @@ -3697,7 +3703,7 @@ $('body').on('click', '[id^=\"table-row-folder\"] td:nth-child(2)', function(ev) $content .= "
"; foreach($categories as $category) { $color = $category->getColor() ? $category->getColor() : substr(md5($category->getName()), 0, 6); - $content .= "".$category->getName()." "; + $content .= "".htmlspecialchars($category->getName())." "; } } if(!empty($extracontent['bottom_title']))