Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorPhil Hughes <me@iamphill.com>2018-03-20 20:00:56 +0300
committerPhil Hughes <me@iamphill.com>2018-03-20 20:00:56 +0300
commitedf2060c6d91db079e30ed56178be2eabc352132 (patch)
treea1506175b8b88a5474fdf1e5f7d0922f83feaa4a /app
parent2467852ccefaf8af961f54cd601f6f322dfad6c4 (diff)
fixed ide_edit_button not existing
Diffstat (limited to 'app')
-rw-r--r--app/helpers/blob_helper.rb11
-rw-r--r--app/views/projects/blob/_header.html.haml1
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