summaryrefslogtreecommitdiff
path: root/app/views/layouts/snippets.html.haml
diff options
context:
space:
mode:
Diffstat (limited to 'app/views/layouts/snippets.html.haml')
-rw-r--r--app/views/layouts/snippets.html.haml9
1 files changed, 5 insertions, 4 deletions
diff --git a/app/views/layouts/snippets.html.haml b/app/views/layouts/snippets.html.haml
index 5f986c81ff4..cde2b467392 100644
--- a/app/views/layouts/snippets.html.haml
+++ b/app/views/layouts/snippets.html.haml
@@ -1,9 +1,10 @@
- header_title _("Snippets"), snippets_path
+- snippets_upload_path = snippets_upload_path(@snippet, current_user)
- content_for :page_specific_javascripts do
- - if @snippet && current_user
- -# haml-lint:disable InlineJavaScript
- :javascript
- window.uploads_path = "#{upload_path('personal_snippet', id: @snippet.id)}";
+ - if snippets_upload_path
+ = javascript_tag nonce: true do
+ :plain
+ window.uploads_path = "#{snippets_upload_path}";
= render template: "layouts/application"