From 5f1460757a0d07ee238d0995c2fca47544fa968d Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 12 Jul 2021 19:44:25 +0200 Subject: [PATCH 1/2] add new method printAttribute(), just like in class.ViewDocument.php --- views/bootstrap/class.ViewFolder.php | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/views/bootstrap/class.ViewFolder.php b/views/bootstrap/class.ViewFolder.php index 0a09b9095..6f8ed0722 100644 --- a/views/bootstrap/class.ViewFolder.php +++ b/views/bootstrap/class.ViewFolder.php @@ -98,6 +98,21 @@ class SeedDMS_View_ViewFolder extends SeedDMS_Theme_Style { } } /* }}} */ + /** + * Output a single attribute in the document info section + * + * @param object $attribute attribute + */ + protected function printAttribute($attribute) { /* {{{ */ + $attrdef = $attribute->getAttributeDefinition(); +?> + + getName()); ?>: + getAttributeValue($attribute); ?> + +params['user']; $node = $this->params['node']; @@ -307,13 +322,7 @@ $('body').on('click', '.order-btn', function(ev) { } elseif(is_string($arr)) { echo $arr; } else { - $attrdef = $attribute->getAttributeDefinition(); - ?> - - getName()); ?>: - getAttributeValue($attribute); ?> - -printAttribute($attribute); } } } From e733b4fced33e0ec7712cd1fae64ac9f5edf3a0e Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 12 Jul 2021 19:47:34 +0200 Subject: [PATCH 2/2] add new method printAttribute() (just like in 5.1.x) --- views/bootstrap/class.ViewDocument.php | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/views/bootstrap/class.ViewDocument.php b/views/bootstrap/class.ViewDocument.php index 4faf119d0..e030c816c 100644 --- a/views/bootstrap/class.ViewDocument.php +++ b/views/bootstrap/class.ViewDocument.php @@ -83,6 +83,21 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Theme_Style { } } /* }}} */ + /** + * Output a single attribute in the document info section + * + * @param object $attribute attribute + */ + protected function printAttribute($attribute) { /* {{{ */ + $attrdef = $attribute->getAttributeDefinition(); +?> + + getName()); ?>: + getAttributeValue($attribute); ?> + +getAttributes(); if($attributes) { @@ -363,13 +378,7 @@ $(document).ready( function() { } elseif(is_string($arr)) { echo $arr; } else { - $attrdef = $attribute->getAttributeDefinition(); - ?> - - getName()); ?>: - getAttributeValue($attribute); ?> - -printAttribute($attribute); } } }