summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhil Hughes <me@iamphill.com>2016-09-16 10:52:41 +0100
committerPhil Hughes <me@iamphill.com>2016-09-16 10:52:41 +0100
commitb66a8203ca66f6a5e70e4c0bfcb07a0385560591 (patch)
tree3ca5df387c940cf9982dbc604983f15bf6e340bd
parent9c5638fb5b5d28e081d5859baa0e926cf92599d7 (diff)
downloadgitlab-ce-slash-commands-load-fix.tar.gz
Moved loading GFM source into zen.html.hamlslash-commands-load-fix
-rw-r--r--app/views/layouts/application.html.haml1
-rw-r--r--app/views/projects/_zen.html.haml4
2 files changed, 3 insertions, 2 deletions
diff --git a/app/views/layouts/application.html.haml b/app/views/layouts/application.html.haml
index 748c94c7825..15a94ac23c5 100644
--- a/app/views/layouts/application.html.haml
+++ b/app/views/layouts/application.html.haml
@@ -10,5 +10,4 @@
= render "layouts/header/default", title: header_title
= render 'layouts/page', sidebar: sidebar, nav: nav
- = render "layouts/init_auto_complete" if current_user && @load_gfm
= yield :scripts_body
diff --git a/app/views/projects/_zen.html.haml b/app/views/projects/_zen.html.haml
index bc2fc397893..cb97181b9e1 100644
--- a/app/views/projects/_zen.html.haml
+++ b/app/views/projects/_zen.html.haml
@@ -1,4 +1,3 @@
-- @load_gfm = !(@target_project || @project).nil?
- supports_slash_commands = local_assigns.fetch(:supports_slash_commands, false)
.zen-backdrop
- classes << ' js-gfm-input js-autosize markdown-area'
@@ -8,3 +7,6 @@
= text_area_tag attr, nil, class: classes, placeholder: placeholder
%a.zen-control.zen-control-leave.js-zen-leave{ href: "#" }
= icon('compress')
+
+- content_for :scripts_body do
+ = render "layouts/init_auto_complete" if current_user && (@target_project || @project)