diff options
author | Robert Speicher <robert@gitlab.com> | 2016-04-07 00:17:21 +0000 |
---|---|---|
committer | Robert Speicher <robert@gitlab.com> | 2016-04-07 00:17:21 +0000 |
commit | 730625f022b1c3b9394cf944f04968a29ac8dc36 (patch) | |
tree | bf1dea34bd2b412bbd42102423f177859bfce2e6 /app/views | |
parent | 7c6c933c9f7d52b7b78ce5f9656c65fb65d64f35 (diff) | |
parent | 1575a95b65d4cad91f775ae260b8828cdf303462 (diff) | |
download | gitlab-ce-730625f022b1c3b9394cf944f04968a29ac8dc36.tar.gz |
Merge branch 'patch/fix-markdown-preview-wikis' into 'master'
Wiki preview URL converting problem [via Markdown]
Current implementation when rendering the preview, thinks relative links are for project repository files.
We are creating a new preview route that will define correct context data to render for wikis instead.
Fixes #2380, #1184
See merge request !3461
Diffstat (limited to 'app/views')
-rw-r--r-- | app/views/layouts/project.html.haml | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/app/views/layouts/project.html.haml b/app/views/layouts/project.html.haml index ab527e8e438..a7ef31acd3d 100644 --- a/app/views/layouts/project.html.haml +++ b/app/views/layouts/project.html.haml @@ -5,10 +5,14 @@ - content_for :scripts_body_top do - project = @target_project || @project + - if @project_wiki + - markdown_preview_path = namespace_project_wikis_markdown_preview_path(project.namespace, project) + - else + - markdown_preview_path = markdown_preview_namespace_project_path(project.namespace, project) - if current_user :javascript window.project_uploads_path = "#{namespace_project_uploads_path project.namespace,project}"; - window.markdown_preview_path = "#{markdown_preview_namespace_project_path(project.namespace, project)}"; + window.markdown_preview_path = "#{markdown_preview_path}"; - content_for :scripts_body do = render "layouts/init_auto_complete" if current_user |