diff --git a/app/assets/javascripts/lib/models/input_element.coffee b/app/assets/javascripts/lib/models/input_element.coffee index 133d59e7f2..e480d74c9c 100644 --- a/app/assets/javascripts/lib/models/input_element.coffee +++ b/app/assets/javascripts/lib/models/input_element.coffee @@ -192,6 +192,7 @@ class @InputElementList extends Backbone.Collection user_value: def disabled: dis coupled: dis && values.coupling_disabled + coupling_groups: values.coupling_groups }, { silent: true }) i.trigger('initial-set:user_value') diff --git a/app/assets/javascripts/lib/views/input_element_view.js b/app/assets/javascripts/lib/views/input_element_view.js index 01edcb6be7..69160640aa 100644 --- a/app/assets/javascripts/lib/views/input_element_view.js +++ b/app/assets/javascripts/lib/views/input_element_view.js @@ -440,7 +440,9 @@ end_year: App.settings.get('end_year'), info_link: I18n.t('input_elements.common.info_link'), coupling_icon: this.model.get('coupling_icon'), + coupling_groups: this.model.get('coupling_groups'), info_coupling: I18n.t('input_elements.common.info_coupling'), + label_groups: I18n.t('input_elements.common.coupling_groups_label'), }) ); diff --git a/app/assets/stylesheets/_slider.sass b/app/assets/stylesheets/_slider.sass index 77ff8fe786..79ef233952 100644 --- a/app/assets/stylesheets/_slider.sass +++ b/app/assets/stylesheets/_slider.sass @@ -153,6 +153,14 @@ $slider-box-height: 22px margin: -0.75rem 0 0 svg margin-bottom: -0.2rem + .coupling-groups + margin-bottom: 0.75rem + .group + background: #fff + padding: 0.2rem 0.5rem + border-radius: 2px + color: $landing-grey + margin-left: 0.25rem &.info-box-visible .show-info diff --git a/app/models/slide.rb b/app/models/slide.rb index 1d39f53a2d..e36236e1ed 100644 --- a/app/models/slide.rb +++ b/app/models/slide.rb @@ -85,10 +85,6 @@ def grouped_input_elements interface_groups end - def mixed_coupled? - - end - def short_name_for_admin "#{sidebar_item.try :key} : #{key}" end diff --git a/app/views/input_elements/_input_element.html b/app/views/input_elements/_input_element.html index 0970e28dcd..d3947d03d0 100644 --- a/app/views/input_elements/_input_element.html +++ b/app/views/input_elements/_input_element.html @@ -42,6 +42,12 @@ <%= info_coupling %> +
+ <%= label_groups %> + <% _.each(coupling_groups, function (coupling_group) { %> + <%= coupling_group %> + <% }); %> +
<% } %> <%= info %> diff --git a/config/locales/interface/input_elements/en_common.yml b/config/locales/interface/input_elements/en_common.yml index 0aa70fd02f..50e7e26161 100644 --- a/config/locales/interface/input_elements/en_common.yml +++ b/config/locales/interface/input_elements/en_common.yml @@ -3,3 +3,4 @@ en: common: info_link: Technical and financial properties info_coupling: This slider is coupled with an external model, what does this mean? + coupling_groups_label: Part of the following couplings diff --git a/config/locales/interface/input_elements/nl_common.yml b/config/locales/interface/input_elements/nl_common.yml index 3af3df32a6..0beb0d4d3d 100644 --- a/config/locales/interface/input_elements/nl_common.yml +++ b/config/locales/interface/input_elements/nl_common.yml @@ -3,3 +3,4 @@ nl: common: info_link: Technische parameters en kosten info_coupling: Deze schuif is gekoppeld aan een extern model, wat betekent dit? + coupling_groups_label: Maakt deel uit van de volgende koppelingen