diff options
author | Phil Hughes <me@iamphill.com> | 2018-03-20 17:00:56 +0000 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2018-03-20 17:00:56 +0000 |
commit | edf2060c6d91db079e30ed56178be2eabc352132 (patch) | |
tree | a1506175b8b88a5474fdf1e5f7d0922f83feaa4a /app | |
parent | 2467852ccefaf8af961f54cd601f6f322dfad6c4 (diff) | |
download | gitlab-ce-edf2060c6d91db079e30ed56178be2eabc352132.tar.gz |
fixed ide_edit_button not existingmake-ide-ce
Diffstat (limited to 'app')
-rw-r--r-- | app/helpers/blob_helper.rb | 11 | ||||
-rw-r--r-- | app/views/projects/blob/_header.html.haml | 1 |
2 files changed, 12 insertions, 0 deletions
diff --git a/app/helpers/blob_helper.rb b/app/helpers/blob_helper.rb index 5ff09b23a78..2b440e4d584 100644 --- a/app/helpers/blob_helper.rb +++ b/app/helpers/blob_helper.rb @@ -33,6 +33,17 @@ module BlobHelper ref) end + def ide_edit_button(project = @project, ref = @ref, path = @path, options = {}) + return unless blob = readable_blob(options, path, project, ref) + + edit_button_tag(blob, + 'btn btn-default', + _('Web IDE'), + ide_edit_path(project, ref, path, options), + project, + ref) + end + def modify_file_button(project = @project, ref = @ref, path = @path, label:, action:, btn_class:, modal_type:) return unless current_user diff --git a/app/views/projects/blob/_header.html.haml b/app/views/projects/blob/_header.html.haml index f93bb02acb9..1b150ec3e5c 100644 --- a/app/views/projects/blob/_header.html.haml +++ b/app/views/projects/blob/_header.html.haml @@ -12,6 +12,7 @@ .btn-group{ role: "group" }< = edit_blob_button + = ide_edit_button - if current_user = replace_blob_link = delete_blob_link |