From efe41817f20c689536ef68a5de4523063293cb1d Mon Sep 17 00:00:00 2001 From: zmagod Date: Mon, 19 Dec 2016 10:49:21 +0100 Subject: [PATCH] removes sample group/type link in new sample form [fixes SCI-809] --- .../javascripts/samples/sample_datatable.js.erb | 11 ----------- app/views/shared/_samples.html.erb | 11 +---------- 2 files changed, 1 insertion(+), 21 deletions(-) diff --git a/app/assets/javascripts/samples/sample_datatable.js.erb b/app/assets/javascripts/samples/sample_datatable.js.erb index ba911e63e..4b7b284b6 100644 --- a/app/assets/javascripts/samples/sample_datatable.js.erb +++ b/app/assets/javascripts/samples/sample_datatable.js.erb @@ -756,12 +756,6 @@ function createSampleTypeSelect(data, selected) { var $selectType = $('') .attr('name', 'sample_type_id').addClass('show-tick'); - var sampleTypesLink = $('#samples').attr('data-sample-types-link'); - - var $option = $("") - .attr('value', -2) - .text(I18n.t('samples.table.add_sample_type')); - $selectType.append($option); $option = $('') .attr('value', -1).text(I18n.t('samples.table.no_type')) $selectType.append($option); @@ -786,11 +780,6 @@ function createSampleGroupSelect(data, selected) { var $selectGroup = $('') .attr('name', 'sample_group_id').addClass('show-tick'); - var sampleGroupsLink = $('#samples').attr('data-sample-groups-link'); - - var $option = $("") - .text(I18n.t('samples.table.add_sample_group')); - $selectGroup.append($option); $option = $('') .attr('value', -1).text(I18n.t('samples.table.no_group')) .attr('data-icon', 'glyphicon glyphicon-asterisk'); diff --git a/app/views/shared/_samples.html.erb b/app/views/shared/_samples.html.erb index 9ebb0b329..095a34ed0 100644 --- a/app/views/shared/_samples.html.erb +++ b/app/views/shared/_samples.html.erb @@ -128,16 +128,7 @@ data-source="<%= @samples_index_link %>" data-num-columns="<%= num_of_columns %>" data-new-sample="<%= new_organization_sample_path(organization_id: @organization) %>" - data-create-sample="<%= organization_samples_path(organization_id: @organization) %>" - data-sample-types-link="<%= organization_sample_types_path(@organization, - project_id: (@project.id if @project), - my_module_id: (@my_module.id if @my_module), - experiment_id: (@experiment.id if @experiment)) %>" - data-sample-groups-link="<%= organization_sample_groups_path(current_organization, - project_id: (@project.id if @project), - my_module_id: (@my_module.id if @my_module), - experiment_id: (@experiment.id if @experiment)) %>" - > + data-create-sample="<%= organization_samples_path(organization_id: @organization) %>">