Skip to content

Commit

Permalink
fix the badges issues when some are long and other small
Browse files Browse the repository at this point in the history
  • Loading branch information
syphax-bouazzouni committed Jan 23, 2025
1 parent 1e01e3d commit 2197d56
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions app/helpers/application_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -406,12 +406,12 @@ def get_link_for_cls_ajax(cls_id, ont_acronym, target = nil, style_as_badge = fa
link = bp_class_link(cls_id, ont_acronym)
ajax_url = "/ajax/classes/label?language=#{request_lang}"
cls_url = "/ontologies/#{ont_acronym}?p=classes&conceptid=#{CGI.escape(cls_id)}"
label_ajax_link(link, cls_id, ont_acronym, ajax_url , cls_url ,target)
label_ajax_link(link, cls_id, ont_acronym, ajax_url, cls_url, target)
else
if cls_id.size > 20 || !style_as_badge
content_tag(:span, cls_id)
else
if style_as_badge
render ChipButtonComponent.new(text: cls_id)
else
content_tag(:span, cls_id)
end
end
end
Expand Down

0 comments on commit 2197d56

Please sign in to comment.