Merge Requests
%span.count.merge_counter= @project.merge_requests.opened.count
- - if @project.wall_enabled
- = nav_link(path: 'projects#wall') do
- = link_to 'Wall', wall_project_path(@project)
-
- - if @project.wiki_enabled
- = nav_link(controller: :wikis) do
- = link_to 'Wiki', project_wiki_path(@project, :home)
+ = nav_link(html_options: {class: "#{project_wiki_tab_class}"}) do
- = link_to 'Wiki', project_wiki_path(@project, :index)
++ = link_to 'Wiki', project_wiki_path(@project, :home)
+ - if can? current_user, :admin_project, @project
+ = nav_link(html_options: {class: "#{project_tab_class}"}) do
+ = link_to edit_project_path(@project), class: "stat-tab tab " do
+ Settings
.content= yield
- %h3.page_title Editing page
+ %h3.page_title
+ Editing page
+ = render partial: 'main_links'
-%hr
= render 'form'
.pull-right
- %h3.page_title All Pages
+= render 'wikis/nav'
+ %h3.page_title
+ All Pages
+ = render partial: 'main_links'
%br
%table
%thead
- - if @wiki != @most_recent_wiki
- .alert
+= render 'wikis/nav'
+ %h3.page_title
+ = @wiki.title.titleize
+ = render partial: 'main_links'
+ %br
+ - if @wiki.historical?
+ .warning_message
This is an old version of this page.
You can view the #{link_to "most recent version", project_wiki_path(@project, @wiki)} or browse the #{link_to "history", history_project_wiki_path(@project, @wiki)}.
.file_holder
+ .file_title
+ = @wiki.title
+ %span.options
+ = link_to pages_project_wikis_path(@project), class: "btn btn-tiny grouped" do
+ Pages
+ - if can? current_user, :write_wiki, @project
+ = link_to history_project_wiki_path(@project, @wiki), class: "btn btn-tiny grouped" do
+ History
+ = link_to edit_project_wiki_path(@project, @wiki), class: "btn btn-tiny grouped" do
+ %i.icon-edit
+ Edit
+
.file_content.wiki
= preserve do
- = markdown @wiki.content
+ = render_wiki_content(@wiki)
- %p.time Last edited by #{link_to_member @project, @wiki.user}, #{time_ago_in_words @wiki.created_at} ago
+ - commit = CommitDecorator.new(@wiki.version)
+ %p.time Last edited by #{commit.author_link(avatar: true, size: 16)} #{time_ago_in_words @wiki.created_at} ago
page.should have_link("##{issue.id}")
end
end
-
-
- describe "for wikis" do
- before do
- visit project_wiki_path(project, :index)
- fill_in "Title", with: "Circumvent ##{issue.id}"
- fill_in "Content", with: "# Other pages\n\n* [Foo](foo)\n* [Bar](bar)\n\nAlso look at ##{issue.id} :-)"
- click_on "Save"
- end
-
- it "should NOT render title in wikis#show" do
- within(".content .file_title") do # page title
- page.should have_content("Circumvent ##{issue.id}")
- page.should_not have_link("##{issue.id}")
- end
- end
--
- it "should render content in wikis#show" do
- page.should have_link("##{issue.id}")
- end
- end
end