From: Dmitriy Zaporozhets Date: Fri, 15 Mar 2013 14:55:07 +0000 (+0200) Subject: Merge branch 'use_gollum_wikis' of https://github.com/DanKnox/gitlabhq into DanKnox... X-Git-Tag: v5.0.0~59^2~1 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=71ab011a1711db9a1a9ced2c2c92c8427ae6f624;p=wvm%2Fgitlab.git Merge branch 'use_gollum_wikis' of https://github.com/DanKnox/gitlabhq into DanKnox-use_gollum_wikis Conflicts: app/views/layouts/project_resource.html.haml app/views/wikis/edit.html.haml app/views/wikis/pages.html.haml app/views/wikis/show.html.haml spec/features/gitlab_flavored_markdown_spec.rb --- 71ab011a1711db9a1a9ced2c2c92c8427ae6f624 diff --cc app/views/layouts/project_resource.html.haml index e4558b693,3c53c0f2b..dfbb6a039 --- a/app/views/layouts/project_resource.html.haml +++ b/app/views/layouts/project_resource.html.haml @@@ -35,11 -35,12 +35,11 @@@ 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 diff --cc app/views/wikis/edit.html.haml index 501ba0923,84d8d27d8..dd200a355 --- a/app/views/wikis/edit.html.haml +++ b/app/views/wikis/edit.html.haml @@@ -1,4 -1,7 +1,6 @@@ - %h3.page_title Editing page + %h3.page_title + Editing page + = render partial: 'main_links' -%hr = render 'form' .pull-right diff --cc app/views/wikis/pages.html.haml index 7bf57adc1,fe35a2ede..eb65599d0 --- a/app/views/wikis/pages.html.haml +++ b/app/views/wikis/pages.html.haml @@@ -1,5 -1,6 +1,7 @@@ += render 'wikis/nav' - %h3.page_title All Pages + %h3.page_title + All Pages + = render partial: 'main_links' %br %table %thead diff --cc app/views/wikis/show.html.haml index ea8de1551,8e9870698..9d87fdf14 --- a/app/views/wikis/show.html.haml +++ b/app/views/wikis/show.html.haml @@@ -1,24 -1,16 +1,29 @@@ += render 'wikis/nav' - - if @wiki != @most_recent_wiki - .alert + %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 diff --cc spec/features/gitlab_flavored_markdown_spec.rb index 1da182759,05cef191c..a64853282 --- a/spec/features/gitlab_flavored_markdown_spec.rb +++ b/spec/features/gitlab_flavored_markdown_spec.rb @@@ -207,25 -207,5 +207,4 @@@ describe "Gitlab Flavored Markdown" d 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