Commit 35ad4fe7 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Use wiki tab for wiki, wall, snippets

parent 39bbdc46
......@@ -53,12 +53,6 @@ $ ->
$('.trigger-submit').on 'change', ->
$(@).parents('form').submit()
# Wiki resizer
$('.wiki-fullscreen').on 'click', ->
$('.writeboards-menu').toggleClass('hide')
$('.writeboards-content').toggleClass('span9').toggleClass('span12')
# Flash
if (flash = $(".flash-container")).length > 0
flash.click -> $(@).fadeOut()
......
......@@ -80,7 +80,7 @@ module TabHelper
end
end
def project_writeboards_tab_class
def project_wiki_tab_class
[:files, :wall].each do |action|
return "active" if current_page?(controller: "projects", action: action, id: @project)
end
......
......@@ -35,7 +35,7 @@
Merge Requests
%span.count.merge_counter= @project.merge_requests.opened.count
= nav_link(html_options: {class: "#{project_writeboards_tab_class}"}) do
= nav_link(html_options: {class: "#{project_wiki_tab_class}"}) do
= link_to 'Wiki', project_wiki_path(@project, :index)
- if can? current_user, :admin_project, @project
......
.row
.span3
= render 'writeboards/nav'
.span9
- unless @notes.empty?
= render 'wikis/nav'
- unless @notes.empty?
%table
%thead
%tr
......@@ -19,7 +16,7 @@
Added
= time_ago_in_words(note.created_at)
ago
- else
- else
%p.slead All files attached to project wall, issues etc will be displayed here
.row
.span3
= render 'writeboards/nav'
.span9
%div.wall_page
= render 'wikis/nav'
%div.wall_page
= render "notes/reversed_notes_with_form"
.row
.span3
= render 'writeboards/nav'
.span9
%h3.page_title
= render 'wikis/nav'
%h3.page_title
Snippets
%small share code pastes with others out of git repository
- if can? current_user, :write_snippet, @project
= link_to new_project_snippet_path(@project), class: "btn btn-small add_new pull-right", title: "New Snippet" do
Add new snippet
%br
%table
%br
%table
%thead
%tr
%th Title
......
%ul.nav.nav-pills.nav-stacked
%ul.nav.nav-tabs
- if @project.wiki_enabled
= nav_link(controller: 'wikis') do
= link_to 'Wiki', project_wiki_path(@project, :index)
......
.row
.span3
= render 'writeboards/nav'
.span9
%h3.page_title All Pages
%br
%table
= render 'wikis/nav'
%h3.page_title All Pages
%br
%table
%thead
%tr
%th Title
......
.row
.span3.writeboards-menu
= render 'writeboards/nav'
.span9.writeboards-content
- if @wiki != @most_recent_wiki
= render 'wikis/nav'
- if @wiki != @most_recent_wiki
.alert
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_holder
.file_title
= link_to '#', class: 'wiki-fullscreen' do
%i.icon-resize-horizontal
 
= @wiki.title
%span.options
= link_to pages_project_wikis_path(@project), class: "btn btn-tiny grouped" do
......@@ -27,4 +21,4 @@
= preserve do
= markdown @wiki.content
%p.time Last edited by #{link_to_member @project, @wiki.user}, #{time_ago_in_words @wiki.created_at} ago
%p.time Last edited by #{link_to_member @project, @wiki.user}, #{time_ago_in_words @wiki.created_at} ago
......@@ -218,7 +218,7 @@ describe "Gitlab Flavored Markdown" do
end
it "should NOT render title in wikis#show" do
within(".content h3") do # page title
within(".content .file_title") do # page title
page.should have_content("Circumvent ##{issue.id}")
page.should_not have_link("##{issue.id}")
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment