42a00f740b
1. So we can build the markdown preview URL for it. 2. We can't skip the slug in this case, because the slug is used to construct relative markdown URLs. 3. Add rspec feature tests to cover creating wiki pages with spaces/hyphens in the name. 4. Add rspec feature tests for markdown preview URL rewriting, which was only covered by unit tests up to this point.
28 lines
1.1 KiB
Text
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, @page.slug)
|
|
- 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"
|