From bb1e2cfefdcd8b3ff86cb15b3a14d7b21e90a6ad Mon Sep 17 00:00:00 2001 From: Juan Fuentes <juanf@bs-mbpr28.d.ethz.ch> Date: Mon, 27 May 2019 13:51:17 +0200 Subject: [PATCH] renaming types to ELN object/collection --- .../1/as/webapps/eln-lims/html/js/util/FormUtil.js | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/util/FormUtil.js b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/util/FormUtil.js index 0f19fad8006..80cc9f25f76 100644 --- a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/util/FormUtil.js +++ b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/util/FormUtil.js @@ -1549,13 +1549,24 @@ var FormUtil = new function() { entityTypeOrder = ["Space", "Project", "Experiment", "Sample", "DataSet"]; entityMap = result.result; + + var getTypeDisplayName = function(type) { + if(type === "Sample") { + return ELNDictionary.Sample; + } else if(type === "Experiment") { + return ELNDictionary.getExperimentDualName(); + } else { + return type; + } + } + for(var typeOrder = 0 ; typeOrder < entityTypeOrder.length ; typeOrder++) { for (key in entityMap) { entity = entityMap[key]; if(entity.type == entityTypeOrder[typeOrder]) { $table.append($("<tr>") .append($("<td>").append(_this._getBooleanField('freezing-form-' + key.replace("+", "-"), entity.displayName, true))) - .append($("<td>").append(entity.type)) + .append($("<td>").append(getTypeDisplayName(entity.type))) .append($("<td>").append(entity.permId)) .append($("<td>").append(entity.displayName)) ); -- GitLab