From 4758c5551de58cfbdae34d3b602b9d3d0faf14dd Mon Sep 17 00:00:00 2001
From: juanf <juanf>
Date: Tue, 9 Feb 2016 10:27:49 +0000
Subject: [PATCH] SSDM-3023 : Project Overview settings on samples, experiments
 and datasets that are only on ELN spaces.

SVN: 35650
---
 .../eln-lims/1/as/initialize-master-data.py   | 25 ++++++++++++++++++-
 .../js/views/DataSetForm/DataSetFormView.js   |  6 +++++
 .../ExperimentForm/ExperimentFormView.js      |  5 ++++
 .../js/views/SampleForm/SampleFormModel.js    |  2 +-
 .../js/views/SampleForm/SampleFormView.js     |  7 +++++-
 5 files changed, 42 insertions(+), 3 deletions(-)

diff --git a/plasmid/source/core-plugins/eln-lims/1/as/initialize-master-data.py b/plasmid/source/core-plugins/eln-lims/1/as/initialize-master-data.py
index 631db7000f3..d5f268ebfed 100644
--- a/plasmid/source/core-plugins/eln-lims/1/as/initialize-master-data.py
+++ b/plasmid/source/core-plugins/eln-lims/1/as/initialize-master-data.py
@@ -495,7 +495,7 @@ def initELNMasterData():
 										]);
 	
 	createVocabularyWithTerms("ELN_TYPES_METADATA", "The presence of this vocabulary indicates the ELN Plugin that the ELN master data script was executed.", [
-											["TYPES_VERSION", "Types Version S216", None]
+											["TYPES_VERSION", "Types Version S223", None]
 										]);
 	##
 	## Property Types for annotations
@@ -513,12 +513,14 @@ def initELNMasterData():
 	##
 	createDataSetTypeWithProperties("ELN_PREVIEW", "PHYSICAL", "ELN Preview image", [
 		["NAME", "General", "Name", DataType.VARCHAR, None,	"Name", None, None],
+		["SHOW_IN_PROJECT_OVERVIEW", "General", "Show in project overview", DataType.BOOLEAN, None,	"Show in project overview", None, None],
 		["NOTES", "General information", "Notes", DataType.MULTILINE_VARCHAR, None, "Notes regarding the dataset", None, None],
 		["XMLCOMMENTS",	"Comments","Comments List",	DataType.XML,	None,	"Several comments can be added by different users", commentsDatasetScriptName, None]
 	]);
 	
 	createDataSetTypeWithProperties("SEQ_FILE", "PHYSICAL", "", [
 		["NAME", "General", "Name", DataType.VARCHAR, None,	"Name", None, None],
+		["SHOW_IN_PROJECT_OVERVIEW", "General", "Show in project overview", DataType.BOOLEAN, None,	"Show in project overview", None, None],
 		["NOTES", "General information", "Notes", DataType.MULTILINE_VARCHAR, None, "Notes regarding the dataset", None, None],
 		["XMLCOMMENTS",	"Comments","Comments List",	DataType.XML,	None,	"Several comments can be added by different users", commentsDatasetScriptName, None]
 		
@@ -526,18 +528,21 @@ def initELNMasterData():
 	
 	createDataSetTypeWithProperties("RAW_DATA", "PHYSICAL", "", [
 		["NAME", "General", "Name", DataType.VARCHAR, None,	"Name", None, None],
+		["SHOW_IN_PROJECT_OVERVIEW", "General", "Show in project overview", DataType.BOOLEAN, None,	"Show in project overview", None, None],
 		["NOTES", "General information", "Notes", DataType.MULTILINE_VARCHAR, None, "Notes regarding the dataset", None, None],
 		["XMLCOMMENTS",	"Comments","Comments List",	DataType.XML,	None,	"Several comments can be added by different users", commentsDatasetScriptName, None]
 	]);
 	
 	createDataSetTypeWithProperties("ANALYZED_DATA", "PHYSICAL", "", [
 		["NAME", "General", "Name", DataType.VARCHAR, None,	"Name", None, None],
+		["SHOW_IN_PROJECT_OVERVIEW", "General", "Show in project overview", DataType.BOOLEAN, None,	"Show in project overview", None, None],
 		["NOTES", "General information", "Notes", DataType.MULTILINE_VARCHAR, None, "Notes regarding the dataset", None, None],
 		["XMLCOMMENTS",	"Comments","Comments List",	DataType.XML,	None,	"Several comments can be added by different users", commentsDatasetScriptName, None]
 	]);
 	
 	createDataSetTypeWithProperties("DRAWING_BOARD", "PHYSICAL", "", [
 		["NAME", "General", "Name", DataType.VARCHAR, None,	"Name", None, None],
+		["SHOW_IN_PROJECT_OVERVIEW", "General", "Show in project overview", DataType.BOOLEAN, None,	"Show in project overview", None, None],
 		["NOTES", "General information", "Notes", DataType.MULTILINE_VARCHAR, None, "Notes regarding the dataset", None, None],
 		["XMLCOMMENTS",	"Comments","Comments List",	DataType.XML,	None,	"Several comments can be added by different users", commentsDatasetScriptName, None]
 	]);
@@ -552,6 +557,7 @@ def initELNMasterData():
 	
 	createExperimentTypeWithProperties("DEFAULT_EXPERIMENT", "Default Experiment", [
 		["NAME", 				"General", "Name", 					DataType.VARCHAR, 			None,	"Name", None, None],
+		["SHOW_IN_PROJECT_OVERVIEW", "General", "Show in project overview", DataType.BOOLEAN, None,	"Show in project overview", None, None],
 		["EXPERIMENTAL_GOALS", 	"General", "Experimental goals", 	DataType.MULTILINE_VARCHAR, None,	"Goal of the experiment", None, None],
 		["GRANT", 				"General", "Grant", 				DataType.VARCHAR,			None,	"grant name", None, None],
 		["START_DATE", 			"General", "Start Date", 			DataType.TIMESTAMP, 		None,	"Start Date", None, None],
@@ -567,6 +573,7 @@ def initELNMasterData():
 	annotationsScriptName = createAnnotationsScriptForType("ANTIBODY");
 	createSampleTypeWithProperties("ANTIBODY", "", [
 		["NAME", 				"General", 				"Name", 				DataType.VARCHAR,				None,		"Name", None, None],
+		["SHOW_IN_PROJECT_OVERVIEW", "General", "Show in project overview", DataType.BOOLEAN, None,	"Show in project overview", None, None],
 		["HOST", 				"General", 				"Host", 				DataType.CONTROLLEDVOCABULARY,	"HOST", 	"Host used to produce the antibody", None, None],
 		["FOR_WHAT", 			"General", 				"For what", 			DataType.MULTILINE_VARCHAR,		None, 		"For what kind of experimental application/readout this sample is used in the lab", None, None],
 		["DETECTION", 			"General", 				"Detection",			DataType.CONTROLLEDVOCABULARY,	"DETECTION","Protein detection system (fill in this information only for secondary antibodies)", None, None],
@@ -586,6 +593,7 @@ def initELNMasterData():
 	annotationsScriptName = createAnnotationsScriptForType("CHEMICAL");
 	createSampleTypeWithProperties("CHEMICAL", "", [
 		["NAME", 				"General", 				"Name", 				DataType.MULTILINE_VARCHAR,		None,		"Name", None, None],
+		["SHOW_IN_PROJECT_OVERVIEW", "General", "Show in project overview", DataType.BOOLEAN, None,	"Show in project overview", None, None],
 		["SUPPLIER", 			"Supplier and storage", "Supplier", 			DataType.MULTILINE_VARCHAR,		None,		"Supplier of the product", None, None],
 		["ARTICLE_NUMBER", 		"Supplier and storage", "Art. Number",			DataType.MULTILINE_VARCHAR,		None,		"Article number of the product", None, None],
 		["STORAGE", 			"Supplier and storage", "Storage", 				DataType.CONTROLLEDVOCABULARY,	"STORAGE",	"Storage conditions of the product", None, None],
@@ -596,6 +604,7 @@ def initELNMasterData():
 	annotationsScriptName = createAnnotationsScriptForType("ENZYME");
 	createSampleTypeWithProperties("ENZYME", "", [
 		["NAME", 				"General",				"Name",					DataType.MULTILINE_VARCHAR,		None,		"Name", None, None],
+		["SHOW_IN_PROJECT_OVERVIEW", "General", "Show in project overview", DataType.BOOLEAN, None,	"Show in project overview", None, None],
 		["SUPPLIER", 			"Supplier and storage",	"Supplier",				DataType.MULTILINE_VARCHAR,		None,		"Supplier of the product", None, None],
 		["ARTICLE_NUMBER", 		"Supplier and storage",	"Art. Number",			DataType.MULTILINE_VARCHAR,		None,		"Article number of the product", None, None],
 		["KIT", 				"Supplier and storage",	"Kit including",		DataType.MULTILINE_VARCHAR,		None,		"What the company includes with the enzyme", None, None],
@@ -607,6 +616,7 @@ def initELNMasterData():
 	annotationsScriptName = createAnnotationsScriptForType("MEDIA");
 	createSampleTypeWithProperties("MEDIA", "", [
 		["NAME", 				"General",				"Name",					DataType.MULTILINE_VARCHAR,		None,			"Name", None, None],
+		["SHOW_IN_PROJECT_OVERVIEW", "General", "Show in project overview", DataType.BOOLEAN, None,	"Show in project overview", None, None],
 		["FOR_WHAT", 			"General",				"For what",				DataType.MULTILINE_VARCHAR,		None,			"For what kind of experimental application/readout this sample is used in the lab", None, None],
 		["ORGANISM", 			"General",				"Organism",				DataType.CONTROLLEDVOCABULARY,	"ORGANISM",		"For what organism this medium is used", None, None],
 		["STORAGE", 			"Storage",				"Storage",				DataType.CONTROLLEDVOCABULARY,	"STORAGE",		"Storage conditions of the product", None, None],
@@ -621,6 +631,7 @@ def initELNMasterData():
 	annotationsScriptName = createAnnotationsScriptForType("SOLUTION_BUFFER");
 	createSampleTypeWithProperties("SOLUTION_BUFFER", "", [
 		["NAME", 				"General",				"Name",					DataType.MULTILINE_VARCHAR,		None,			"Name", None, None],
+		["SHOW_IN_PROJECT_OVERVIEW", "General", "Show in project overview", DataType.BOOLEAN, None,	"Show in project overview", None, None],
 		["FOR_WHAT", 			"General",				"For what",				DataType.MULTILINE_VARCHAR,		None,			"For what kind of experimental application/readout this sample is used in the lab", None, None],
 		["DETAILS", 			"Recipe",				"Details",				DataType.MULTILINE_VARCHAR,		None,			"Details and tips about how to prepare the solution/buffer", None, None],
 		["STORAGE", 			"Storage",				"Storage",				DataType.CONTROLLEDVOCABULARY,	"STORAGE",		"Storage conditions of the product", None, None],
@@ -635,6 +646,7 @@ def initELNMasterData():
 	annotationsScriptName = createAnnotationsScriptForType("OLIGO");
 	createSampleTypeWithProperties("OLIGO", "", [
 	  ["NAME", 				"General",				"Name",			DataType.VARCHAR,				None,				"Target of the oligonucleotide", None, None],
+		["SHOW_IN_PROJECT_OVERVIEW", "General", "Show in project overview", DataType.BOOLEAN, None,	"Show in project overview", None, None],
 		["DIRECTION", 				"Details",			"Direction",				DataType.CONTROLLEDVOCABULARY, "DIRECTION",			"Direction of the oligonucleotide", None, None],
 		["RESTRICTION_ENZYME", 		"Details",			"Restriction Enzyme",		DataType.MULTILINE_VARCHAR,		None,				"Restriction sites in the oligonucleotide", None, None],
 		["MODIFICATIONS", 			"Details",			"Modifications",			DataType.MULTILINE_VARCHAR,		None,				"Modifications of the ordered oligonucleotide", None, None],
@@ -646,6 +658,7 @@ def initELNMasterData():
 	annotationsScriptName = createAnnotationsScriptForType("RNA");
 	createSampleTypeWithProperties("RNA", "", [
 		["NAME", 				"General",				"Name of RNA",			DataType.VARCHAR,				None,				"Name of the RNA: species/number/strand", None, None],
+		["SHOW_IN_PROJECT_OVERVIEW", "General", "Show in project overview", DataType.BOOLEAN, None,	"Show in project overview", None, None],
 		["TARGET", 					"General",				"Target of the RNA",	DataType.VARCHAR,				None,				"Target of the oligonucleotide", None, None],
 		["TYPE", 					"General",				"Type of RNA",			DataType.CONTROLLEDVOCABULARY,	"RNA_TYPE",			"Type of RNA in terms of function: mimic of RNAi or inhibitor of RNAi", None, None],
 		["STRAND", 					"Details",				"Strand",				DataType.CONTROLLEDVOCABULARY,	"STRAND",			"Double or single strand RNA", None, None],
@@ -663,6 +676,7 @@ def initELNMasterData():
 	annotationsScriptName = createAnnotationsScriptForType("PLASMID");
 	createSampleTypeWithProperties("PLASMID", "", [
 		["NAME", 					"General",				"Plasmid",							DataType.VARCHAR,				None,								"Plasmid name", None, None],
+		["SHOW_IN_PROJECT_OVERVIEW", "General", "Show in project overview", DataType.BOOLEAN, None,	"Show in project overview", None, None],
 		["OWNER", 							"General",				"Owner",							DataType.CONTROLLEDVOCABULARY,	"OWNER",							"Who produced/owned the sample", None, None],
 		["OWNER_NUMBER", 					"General",				"Owner number",						DataType.MULTILINE_VARCHAR,		None,								"Owner number", None, None],
 		["BACKBONE", 						"Details",				"Backbone",							DataType.CONTROLLEDVOCABULARY,	"BACKBONE",							"Backbone of the plasmid", None, None],
@@ -681,6 +695,7 @@ def initELNMasterData():
 	annotationsScriptName = createAnnotationsScriptForType("BACTERIA");
 	createSampleTypeWithProperties("BACTERIA", "", [
 		["NAME", 			"General",				"Bacteria strain name",				DataType.VARCHAR,				None,								"Bacterial strain name", None, None],
+		["SHOW_IN_PROJECT_OVERVIEW", "General", "Show in project overview", DataType.BOOLEAN, None,	"Show in project overview", None, None],
 		["OWNER", 							"General",				"Owner",							DataType.CONTROLLEDVOCABULARY,	"OWNER",							"Who produced/owned the sample", None, None],
 		["OWNER_NUMBER", 					"General",				"Owner number",						DataType.MULTILINE_VARCHAR,		None,								"Owner number", None, None],
 		["GENETIC_MODIFICATION", 			"Genotype",				"Genetic modifications",			DataType.MULTILINE_VARCHAR,		None,								"Genetic modifications composed by the Plasmid ancestors", None, genotypeSampleScriptName],
@@ -698,6 +713,7 @@ def initELNMasterData():
 	annotationsScriptName = createAnnotationsScriptForType("YEAST");
 	createSampleTypeWithProperties("YEAST", "", [
 		["NAME", 							"General",				"Yeast strain name",					DataType.MULTILINE_VARCHAR,		None,								"Yeast strain name", None, None],
+		["SHOW_IN_PROJECT_OVERVIEW", "General", "Show in project overview", DataType.BOOLEAN, None,	"Show in project overview", None, None],
 		["OWNER", 							"General",				"Owner",								DataType.CONTROLLEDVOCABULARY,	"OWNER",							"Who produced/owned the sample", None, None],
 		["OWNER_NUMBER", 					"General",				"Owner number",							DataType.MULTILINE_VARCHAR,		None,								"Owner number", None, None],
 		["GENETIC_MODIFICATION", 			"Genotype",				"Genetic modifications",				DataType.MULTILINE_VARCHAR,		None,								"Genetic modifications composed by the Plasmid ancestors", None, genotypeSampleScriptName],
@@ -718,6 +734,7 @@ def initELNMasterData():
 	annotationsScriptName = createAnnotationsScriptForType("CELL_LINE");
 	createSampleTypeWithProperties("CELL_LINE", "", [
 		["NAME", 					"General",				"Cell line name",						DataType.VARCHAR,				None,								"Name of the cell line", None, None],
+		["SHOW_IN_PROJECT_OVERVIEW", "General", "Show in project overview", DataType.BOOLEAN, None,	"Show in project overview", None, None],
 		["OWNER", 							"General",				"Owner",								DataType.CONTROLLEDVOCABULARY,	"OWNER",							"Who produced/owned the sample", None, None],
 		["OWNER_NUMBER", 					"General",				"Owner number",							DataType.MULTILINE_VARCHAR,		None,								"Owner number", None, None],
 		["GENETIC_MODIFICATION", 			"Genotype",				"Genetic modifications",				DataType.MULTILINE_VARCHAR,		None,								"Genetic modifications composed by the Plasmid ancestors", None, genotypeSampleScriptName],
@@ -744,6 +761,7 @@ def initELNMasterData():
 	annotationsScriptName = createAnnotationsScriptForType("FLY");
 	createSampleTypeWithProperties("FLY", "", [
 		["NAME", 				"General",				"Fly strain name",						DataType.VARCHAR,				None,								"Fly strain name", None, None],
+		["SHOW_IN_PROJECT_OVERVIEW", "General", "Show in project overview", DataType.BOOLEAN, None,	"Show in project overview", None, None],
 		["OWNER", 							"General",				"Owner",								DataType.CONTROLLEDVOCABULARY,	"OWNER",							"Who produced/owned the sample", None, None],
 		["OWNER_NUMBER", 					"General",				"Owner number",							DataType.MULTILINE_VARCHAR,		None,								"Owner number", None, None],
 		["GENETIC_MODIFICATION", 			"Genotype",				"Genetic modifications",				DataType.MULTILINE_VARCHAR,		None,								"Genetic modifications composed by the Plasmid ancestors", None, genotypeSampleScriptName],
@@ -790,6 +808,7 @@ def initELNMasterData():
 	annotationsScriptName = createAnnotationsScriptForType("EXPERIMENTAL_STEP");
 	createSampleTypeWithProperties("EXPERIMENTAL_STEP", "", [
 		["NAME", 							"General",				"Name",									DataType.MULTILINE_VARCHAR,		None,								"Name", None, None],
+		["SHOW_IN_PROJECT_OVERVIEW", "General", "Show in project overview", DataType.BOOLEAN, None,	"Show in project overview", None, None],
 		["OWNER", 							"General",				"Owner",								DataType.CONTROLLEDVOCABULARY,	"OWNER",							"Who produced/owned the sample", None, None],
 		["EXPERIMENTAL_GOALS", 				"General",				"Experimental Goals",					DataType.MULTILINE_VARCHAR,		None,								"Goal of the experiment", None, None],
 		["EXPERIMENTAL_RESULTS", 			"General",				"Experimental Results",					DataType.MULTILINE_VARCHAR,		None,								"Brief summary of the results obtained", None, None],
@@ -807,6 +826,7 @@ def initELNMasterData():
 	annotationsScriptName = createAnnotationsScriptForType("GENERAL_PROTOCOL");
 	createSampleTypeWithProperties("GENERAL_PROTOCOL", "", [
 		["NAME", 					"General",			"Name",						DataType.MULTILINE_VARCHAR,		None,				"Name", None, None],
+		["SHOW_IN_PROJECT_OVERVIEW", "General", "Show in project overview", DataType.BOOLEAN, None,	"Show in project overview", None, None],
 		["FOR_WHAT", 				"General",			"For what",					DataType.MULTILINE_VARCHAR,		None,				"For what kind of experimental application/readout this sample is used in the lab", None, None],
 		["PROTOCOL_TYPE", 			"General",			"Protocol type",			DataType.CONTROLLEDVOCABULARY,	"PROTOCOL_TYPE",	"Category a protocol belongs", None, None],
 		["MATERIALS", 				"Materials",		"Materials",				DataType.MULTILINE_VARCHAR,		None,				"Machines (and relative set up), special labware required for the protocol.", None, None],
@@ -823,6 +843,7 @@ def initELNMasterData():
 	annotationsScriptName = createAnnotationsScriptForType("PCR_PROTOCOL");
 	createSampleTypeWithProperties("PCR_PROTOCOL", "", [
 		["NAME", 					"General",			"Name",						DataType.MULTILINE_VARCHAR,		None,				"Name", None, None],
+		["SHOW_IN_PROJECT_OVERVIEW", "General", "Show in project overview", DataType.BOOLEAN, None,	"Show in project overview", None, None],
 		["FOR_WHAT", 				"General",			"For what",					DataType.MULTILINE_VARCHAR,		None,				"For what kind of experimental application/readout this sample is used in the lab", None, None],
 		["TEMPLATE", 				"General",			"Template",					DataType.CONTROLLEDVOCABULARY,	"TEMPLATE",			"Type of template used in the PCR protocol", None, None],
 		["REACTION_MIX", 			"Materials",		"Reaction mix",				DataType.MULTILINE_VARCHAR,		None,				"Reaction mix recipe for the PCR", None, None],
@@ -838,6 +859,7 @@ def initELNMasterData():
 	annotationsScriptName = createAnnotationsScriptForType("WESTERN_BLOTTING_PROTOCOL");
 	createSampleTypeWithProperties("WESTERN_BLOTTING_PROTOCOL", "", [
 		["NAME", 					"General",			"Name",						DataType.MULTILINE_VARCHAR,		None,				"Name", None, None],
+		["SHOW_IN_PROJECT_OVERVIEW", "General", "Show in project overview", DataType.BOOLEAN, None,	"Show in project overview", None, None],
 		["FOR_WHAT", 				"General",			"For what",					DataType.MULTILINE_VARCHAR,		None,				"For what kind of experimental application/readout this sample is used in the lab", None, None],
 		["STORAGE", 				"General", 			"Storage",					DataType.CONTROLLEDVOCABULARY,	"STORAGE",			"Storage conditions of the product", None, None],
 		["MEMBRANE", 				"Materials", 		"Membrane",					DataType.CONTROLLEDVOCABULARY,	"MEMBRANE",			"Membrane used for western blotting", None, None],
@@ -850,6 +872,7 @@ def initELNMasterData():
 	annotationsScriptName = createAnnotationsScriptForType("DRAWING_BOARD");
 	createSampleTypeWithProperties("DRAWING_BOARD", "", [
 		["NAME", 					"General",			"Name",						DataType.MULTILINE_VARCHAR,		None,				"Name", None, None],
+		["SHOW_IN_PROJECT_OVERVIEW", "General", "Show in project overview", DataType.BOOLEAN, None,	"Show in project overview", None, None],
 		["XMLCOMMENTS", 			"Comments",			"Comments List",			DataType.XML,					None,				"Several comments can be added by different users", commentsSampleScriptName, None],
 		["ANNOTATIONS_STATE",		"Comments",			"Annotations State",		DataType.XML,					None,				"Annotations State", annotationsScriptName, None]
 	]);
diff --git a/plasmid/source/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/DataSetForm/DataSetFormView.js b/plasmid/source/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/DataSetForm/DataSetFormView.js
index e507d837942..aa6b70ca713 100644
--- a/plasmid/source/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/DataSetForm/DataSetFormView.js
+++ b/plasmid/source/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/DataSetForm/DataSetFormView.js
@@ -315,6 +315,12 @@ function DataSetFormView(dataSetFormController, dataSetFormModel) {
 						continue;
 					}
 				} else {
+					if(propertyType.code === "SHOW_IN_PROJECT_OVERVIEW") {
+						if(!(profile.inventorySpaces.length > 0 && $.inArray(this._dataSetFormModel.sample.identifier.split("/")[1], profile.inventorySpaces) === -1)) {
+							continue;
+						}
+					}
+					
 					var value = "";
 					if(this._dataSetFormModel.mode !== FormMode.CREATE) {
 						value = this._dataSetFormModel.dataSet.properties[propertyType.code];
diff --git a/plasmid/source/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/ExperimentForm/ExperimentFormView.js b/plasmid/source/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/ExperimentForm/ExperimentFormView.js
index 4fd30567314..ac274be1184 100644
--- a/plasmid/source/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/ExperimentForm/ExperimentFormView.js
+++ b/plasmid/source/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/ExperimentForm/ExperimentFormView.js
@@ -257,6 +257,11 @@ function ExperimentFormView(experimentFormController, experimentFormModel) {
 					continue;
 				}
 			} else {
+				if(propertyType.code === "SHOW_IN_PROJECT_OVERVIEW") {
+					if(!(profile.inventorySpaces.length > 0 && $.inArray(this._experimentFormModel.experiment.identifier.split("/")[1], profile.inventorySpaces) === -1)) {
+						continue;
+					}
+				}
 				var $controlGroup =  null;
 				
 				var value = this._experimentFormModel.experiment.properties[propertyType.code];
diff --git a/plasmid/source/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/SampleForm/SampleFormModel.js b/plasmid/source/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/SampleForm/SampleFormModel.js
index 5d4c4fc1354..0f6ae0a3a22 100644
--- a/plasmid/source/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/SampleForm/SampleFormModel.js
+++ b/plasmid/source/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/SampleForm/SampleFormModel.js
@@ -21,7 +21,7 @@ function SampleFormModel(mode, sample) {
 	
 	this.isFormDirty = false;
 	this.isFormLoaded = false;
-	this.isELNSubExperiment = profile.inventorySpaces.length > 0 && $.inArray(sample.spaceCode, profile.inventorySpaces) === -1;
+	this.isELNSample = profile.inventorySpaces.length > 0 && $.inArray(sample.spaceCode, profile.inventorySpaces) === -1;
 	
 	//
 	// TO-DO: Legacy code to be refactored
diff --git a/plasmid/source/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/SampleForm/SampleFormView.js b/plasmid/source/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/SampleForm/SampleFormView.js
index ac434c8f278..c28c75dbda3 100644
--- a/plasmid/source/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/SampleForm/SampleFormView.js
+++ b/plasmid/source/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/SampleForm/SampleFormView.js
@@ -277,7 +277,7 @@ function SampleFormView(sampleFormController, sampleFormModel) {
 		//
 		// GENERATE CHILDREN
 		//
-		if((this._sampleFormModel.mode !== FormMode.VIEW) && this._sampleFormModel.isELNSubExperiment) {
+		if((this._sampleFormModel.mode !== FormMode.VIEW) && this._sampleFormModel.isELNSample) {
 			var $generateChildrenBtn = $("<a>", { 'class' : 'btn btn-default', 'style' : 'margin-left:25px;', 'id' : 'generate_children'}).text("Generate Children");
 			$generateChildrenBtn.click(function(event) {
 				_this._generateChildren();
@@ -428,6 +428,11 @@ function SampleFormView(sampleFormController, sampleFormModel) {
 					continue;
 				}
 			} else {
+				if(propertyType.code === "SHOW_IN_PROJECT_OVERVIEW") {
+					if(!(profile.inventorySpaces.length > 0 && $.inArray(this._sampleFormModel.sample.spaceCode, profile.inventorySpaces) === -1)) {
+						continue;
+					}
+				}
 				var $controlGroup =  null;
 				var value = this._sampleFormModel.sample.properties[propertyType.code];
 				if(!value && propertyType.code.charAt(0) === '$') {
-- 
GitLab