diff options
Diffstat (limited to 'app/helpers/ide_helper.rb')
-rw-r--r-- | app/helpers/ide_helper.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/app/helpers/ide_helper.rb b/app/helpers/ide_helper.rb new file mode 100644 index 00000000000..f090ae71269 --- /dev/null +++ b/app/helpers/ide_helper.rb @@ -0,0 +1,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 |