Module: ObservationMatrixColumnItemsHelper

Defined in:
app/helpers/observation_matrix_column_items_helper.rb

Instance Method Summary collapse

Instance Method Details

#observation_matrix_column_item_tag(observation_matrix_column_item) ⇒ Object

!! when dynamic columns are extended this will have to reflect other types than tags



4
5
6
7
8
9
10
11
# File 'app/helpers/observation_matrix_column_items_helper.rb', line 4

def observation_matrix_column_item_tag(observation_matrix_column_item)
  return nil if observation_matrix_column_item.nil?
  if observation_matrix_column_item.is_dynamic?
    (controlled_vocabulary_term_tag(observation_matrix_column_item.controlled_vocabulary_term) + ' (tag keyword)').html_safe
  else
    (descriptor_tag(observation_matrix_column_item.descriptor) + ' (single descriptor)').html_safe
  end
end