Module: IqvocSkosxlHelper
- Defined in:
- app/helpers/iqvoc_skosxl_helper.rb
Instance Method Summary collapse
- #delete_button_text(label) ⇒ Object
- #render_label(label) ⇒ Object
- #search_result_label(label, concept) ⇒ Object
Instance Method Details
#delete_button_text(label) ⇒ Object
12 13 14 |
# File 'app/helpers/iqvoc_skosxl_helper.rb', line 12 def (label) label.never_published? ? t("txt.views.versioning.delete") : t("txt.views.versioning.delete_copy") end |
#render_label(label) ⇒ Object
2 3 4 5 6 7 8 9 10 |
# File 'app/helpers/iqvoc_skosxl_helper.rb', line 2 def render_label(label) if label.new_record? '-' elsif label.is_a?(Label::SKOSXL::Base) link_to(label.to_s, label_path(id: label)) else label.to_s end end |
#search_result_label(label, concept) ⇒ Object
16 17 18 19 20 21 |
# File 'app/helpers/iqvoc_skosxl_helper.rb', line 16 def search_result_label(label, concept) str = ActiveSupport::SafeBuffer.new str << label str << " (#{concept.additional_info})" if concept.additional_info str end |