summaryrefslogtreecommitdiff
path: root/app/helpers/ide_helper.rb
blob: f090ae712691ffa86cb9ef256649a6ec13bd42f9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
module IdeHelper
  def ide_edit_button(project = @project, ref = @ref, path = @path, options = {})
    return unless blob = readable_blob(options, path, project, ref)

    common_classes = "btn js-edit-ide #{options[:extra_class]}"

    edit_button_tag(blob,
                    common_classes,
                    _('Web IDE'),
                    ide_edit_path(project, ref, path, options),
                    project,
                    ref)
  end
end