gitlab-org--gitlab-foss/app/views/layouts/project.html.haml
Timothy Andrew e6b1d1669b Hook up the updated WikiLinkFilter to the wiki controllers.
- Need to pass in a `page_slug` to the filter, so it can rewrite based
  on the current page (all links are rewritten to the level of the app root).
- The earlier `markdown_preview` endpoint was at the level of the wiki.
  We need to know the current page (for rewriting, as above), so this
  commit moves the endpoint to the level of a wiki page.
- Fix all tests
2016-06-09 10:15:01 +05:30

28 lines
1.1 KiB
Text

- page_title @project.name_with_namespace
- page_description @project.description unless page_description
- header_title project_title(@project) unless header_title
- nav "project"
- content_for :scripts_body_top do
- project = @target_project || @project
- if @project_wiki && @page
- markdown_preview_path = namespace_project_wiki_markdown_preview_path(project.namespace, project, params[:id])
- 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_path}";
- content_for :scripts_body do
= render "layouts/init_auto_complete" if current_user
- content_for :header_content do
.js-dropdown-menu-projects
.dropdown-menu.dropdown-select.dropdown-menu-projects
= dropdown_title("Go to a project")
= dropdown_filter("Search your projects")
= dropdown_content
= dropdown_loading
= render template: "layouts/application"