From dc81446f9ab3f92880386a781679764a145d3b9b Mon Sep 17 00:00:00 2001
From: juanf <juanf>
Date: Fri, 14 Jul 2017 07:05:44 +0000
Subject: [PATCH] SSDM-5375 : Labels show now on the Object form, for
 parents/children

SVN: 38527
---
 .../html/js/views/SampleForm/widgets/LinksController.js      | 2 +-
 .../eln-lims/html/js/views/SampleForm/widgets/LinksView.js   | 5 +++--
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/SampleForm/widgets/LinksController.js b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/SampleForm/widgets/LinksController.js
index 92ed045446d..af030241056 100644
--- a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/SampleForm/widgets/LinksController.js
+++ b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/SampleForm/widgets/LinksController.js
@@ -23,7 +23,7 @@ function LinksController(title, sampleTypeHints, isDisabled, samplesToEdit, show
 		
 		if(sampleTypeHints && showAnnotableTypes) {
 			for(var sIdx = 0; sIdx < sampleTypeHints.length; sIdx++) {
-				linksView.initContainerForType(sampleTypeHints[sIdx].TYPE);
+				linksView.initContainerForType(sampleTypeHints[sIdx].TYPE, undefined, sampleTypeHints[sIdx].LABEL);
 			}
 		}
 		
diff --git a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/SampleForm/widgets/LinksView.js b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/SampleForm/widgets/LinksView.js
index 2dccb640039..5bf958ea496 100644
--- a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/SampleForm/widgets/LinksView.js
+++ b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/SampleForm/widgets/LinksView.js
@@ -27,7 +27,7 @@ function LinksView(linksController, linksModel) {
 	//
 	// External API
 	//
-	linksView.initContainerForType = function(sampleTypeCode, samples) {
+	linksView.initContainerForType = function(sampleTypeCode, samples, sampleTypeLabel) {
 		var $dataGridContainer = sampleGridContainerByType[sampleTypeCode];
 		var samplesOnGrid = linksModel.samplesByType[sampleTypeCode];
 		
@@ -49,7 +49,8 @@ function LinksView(linksController, linksModel) {
 			var $samplePickerContainer = $("<div>");
 			
 			if(sampleTypeCode) {
-				$sampleTableContainer.append($("<div>").append(sampleTypeCode + ":")
+				var sampleTableContainerLabel = (sampleTypeLabel)?sampleTypeLabel:sampleTypeCode;
+				$sampleTableContainer.append($("<div>").append(sampleTableContainerLabel + ":")
 						.append("&nbsp;")
 						.append(linksView.getAddBtn($samplePickerContainer, sampleTypeCode))
 						.css("margin","5px"));
-- 
GitLab