OSDN Git Service

Merge branch 'use_gollum_wikis' of https://github.com/DanKnox/gitlabhq into DanKnox...
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Fri, 15 Mar 2013 14:55:07 +0000 (16:55 +0200)
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Fri, 15 Mar 2013 14:55:07 +0000 (16:55 +0200)
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

12 files changed:
1  2 
Gemfile
Gemfile.lock
app/assets/stylesheets/application.scss
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
config/routes.rb
features/steps/shared/paths.rb
features/support/env.rb
lib/api/internal.rb
spec/features/gitlab_flavored_markdown_spec.rb

diff --cc Gemfile
Simple merge
diff --cc Gemfile.lock
Simple merge
                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
@@@ -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
@@@ -1,5 -1,6 +1,7 @@@
- %h3.page_title All Pages
 += render 'wikis/nav'
+ %h3.page_title
+   All Pages
+   = render partial: 'main_links'
  %br
  %table
    %thead
@@@ -1,24 -1,16 +1,29 @@@
- - 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
Simple merge
Simple merge
Simple merge
Simple merge
@@@ -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