Skip to content

Commit 0ffa3c5

Browse files
committed
fix: show Edit With button only when a submission exists
1 parent 7b4af70 commit 0ffa3c5

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

app/helpers/ontologies_helper.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -695,12 +695,12 @@ def ontology_edit_button
695695
# no logic yet
696696
def edit_with_button
697697
return unless @ontology.admin?(session[:user])
698+
return unless @submission_latest
699+
698700
content_tag(:div, style: 'margin-left: 10px;', data: { controller: 'tooltip' }, title: t('application.edit_with_tooltip')) do
699701
render PillButtonComponent.new do
700-
content_tag(:a, class: 'd-flex align-items-center', href: 'javascript:void(0);') do
701-
(inline_svg_tag('edit.svg') +
702-
content_tag(:span, t('application.edit_with'), class: 'ml-1')).html_safe
703-
end
702+
(inline_svg_tag('edit.svg') +
703+
content_tag(:span, t('application.edit_with'), class: 'ml-1')).html_safe
704704
end
705705
end
706706
end

0 commit comments

Comments
 (0)