Merge branch 'feature/writeboard'
This commit is contained in:
commit
7799b5bda6
17 changed files with 50 additions and 37 deletions
|
@ -284,6 +284,6 @@ ul.notes {
|
||||||
margin-top: 8px;
|
margin-top: 8px;
|
||||||
margin-left: 15px;
|
margin-left: 15px;
|
||||||
@extend .pull-left;
|
@extend .pull-left;
|
||||||
@extend .span4;
|
width: 35%;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -73,11 +73,19 @@ module TabHelper
|
||||||
end
|
end
|
||||||
|
|
||||||
def project_tab_class
|
def project_tab_class
|
||||||
[:files, :edit].each do |action|
|
return "active" if current_page?(controller: "projects", action: :edit, id: @project)
|
||||||
|
|
||||||
|
if ['services', 'hooks', 'deploy_keys', 'team_members'].include? controller.controller_name
|
||||||
|
"active"
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
def project_wiki_tab_class
|
||||||
|
[:files, :wall].each do |action|
|
||||||
return "active" if current_page?(controller: "projects", action: action, id: @project)
|
return "active" if current_page?(controller: "projects", action: action, id: @project)
|
||||||
end
|
end
|
||||||
|
|
||||||
if ['snippets', 'services', 'hooks', 'deploy_keys', 'team_members'].include? controller.controller_name
|
if ['wikis', 'snippets'].include? controller.controller_name
|
||||||
"active"
|
"active"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
%span= diff.old_path
|
%span= diff.old_path
|
||||||
|
|
||||||
- if @commit.prev_commit
|
- if @commit.prev_commit
|
||||||
= link_to project_tree_path(@project, tree_join(@commit.prev_commit_id, diff.new_path)), {:class => 'btn pull-right view-file'} do
|
= link_to project_tree_path(@project, tree_join(@commit.prev_commit_id, diff.new_path)), {:class => 'btn btn-tiny pull-right view-file'} do
|
||||||
View file @
|
View file @
|
||||||
%span.commit-short-id= @commit.short_id(6)
|
%span.commit-short-id= @commit.short_id(6)
|
||||||
- else
|
- else
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
.input
|
.input
|
||||||
= f.text_field :url, class: "text_field xxlarge"
|
= f.text_field :url, class: "text_field xxlarge"
|
||||||
|
|
||||||
= f.submit "Add Web Hook", class: "btn btn-primary"
|
= f.submit "Add Web Hook", class: "btn btn-create"
|
||||||
%hr
|
%hr
|
||||||
|
|
||||||
-if @hooks.any?
|
-if @hooks.any?
|
||||||
|
|
|
@ -35,17 +35,11 @@
|
||||||
Merge Requests
|
Merge Requests
|
||||||
%span.count.merge_counter= @project.merge_requests.opened.count
|
%span.count.merge_counter= @project.merge_requests.opened.count
|
||||||
|
|
||||||
- if @project.wall_enabled
|
= nav_link(html_options: {class: "#{project_wiki_tab_class}"}) do
|
||||||
= nav_link(path: 'projects#wall') do
|
= link_to 'Wiki', project_wiki_path(@project, :index)
|
||||||
= link_to 'Wall', wall_project_path(@project)
|
|
||||||
|
|
||||||
- if @project.wiki_enabled
|
|
||||||
= nav_link(controller: :wikis) do
|
|
||||||
= link_to 'Wiki', project_wiki_path(@project, :index)
|
|
||||||
|
|
||||||
- if can? current_user, :admin_project, @project
|
- if can? current_user, :admin_project, @project
|
||||||
= nav_link(html_options: {class: "#{project_tab_class}"}) do
|
= nav_link(html_options: {class: "#{project_tab_class}"}) do
|
||||||
= link_to edit_project_path(@project), class: "stat-tab tab " do
|
= link_to edit_project_path(@project), class: "stat-tab tab " do
|
||||||
Settings
|
Settings
|
||||||
|
|
||||||
.content= yield
|
.content= yield
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
= render "project_head"
|
= render 'wikis/nav'
|
||||||
- unless @notes.empty?
|
- unless @notes.empty?
|
||||||
%table
|
%table
|
||||||
%thead
|
%thead
|
||||||
|
|
|
@ -1,2 +1,3 @@
|
||||||
|
= render 'wikis/nav'
|
||||||
%div.wall_page
|
%div.wall_page
|
||||||
= render "notes/reversed_notes_with_form"
|
= render "notes/reversed_notes_with_form"
|
||||||
|
|
|
@ -1,2 +1 @@
|
||||||
= render "projects/project_head"
|
|
||||||
= render "snippets/form"
|
= render "snippets/form"
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
= render "projects/project_head"
|
= render 'wikis/nav'
|
||||||
|
|
||||||
%h3.page_title
|
%h3.page_title
|
||||||
Snippets
|
Snippets
|
||||||
%small share code pastes with others out of git repository
|
%small share code pastes with others out of git repository
|
||||||
|
|
|
@ -1,2 +1 @@
|
||||||
= render "projects/project_head"
|
|
||||||
= render "snippets/form"
|
= render "snippets/form"
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
= render "projects/project_head"
|
|
||||||
|
|
||||||
%h3.page_title
|
%h3.page_title
|
||||||
= @snippet.title
|
= @snippet.title
|
||||||
%small= @snippet.file_name
|
%small= @snippet.file_name
|
||||||
|
|
14
app/views/wikis/_nav.html.haml
Normal file
14
app/views/wikis/_nav.html.haml
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
%ul.nav.nav-tabs
|
||||||
|
- if @project.wiki_enabled
|
||||||
|
= nav_link(controller: 'wikis') do
|
||||||
|
= link_to 'Wiki', project_wiki_path(@project, :index)
|
||||||
|
|
||||||
|
- if @project.wall_enabled
|
||||||
|
= nav_link(path: 'projects#wall') do
|
||||||
|
= link_to 'Wall', wall_project_path(@project)
|
||||||
|
|
||||||
|
= nav_link(path: 'projects#files') do
|
||||||
|
= link_to 'Attachments', files_project_path(@project), class: "files-tab tab"
|
||||||
|
|
||||||
|
= nav_link(controller: :snippets) do
|
||||||
|
= link_to 'Snippets', project_snippets_path(@project), class: "snippets-tab tab"
|
|
@ -1,5 +1,4 @@
|
||||||
%h3.page_title Editing page
|
%h3.page_title Editing page
|
||||||
%hr
|
|
||||||
= render 'form'
|
= render 'form'
|
||||||
|
|
||||||
.pull-right
|
.pull-right
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
= render 'wikis/nav'
|
||||||
%h3.page_title All Pages
|
%h3.page_title All Pages
|
||||||
%br
|
%br
|
||||||
%table
|
%table
|
||||||
|
|
|
@ -1,21 +1,22 @@
|
||||||
%h3.page_title
|
= render 'wikis/nav'
|
||||||
= @wiki.title
|
|
||||||
%span.pull-right
|
|
||||||
= link_to pages_project_wikis_path(@project), class: "btn btn-small grouped" do
|
|
||||||
Pages
|
|
||||||
- if can? current_user, :write_wiki, @project
|
|
||||||
= link_to history_project_wiki_path(@project, @wiki), class: "btn btn-small grouped" do
|
|
||||||
History
|
|
||||||
= link_to edit_project_wiki_path(@project, @wiki), class: "btn btn-small grouped" do
|
|
||||||
%i.icon-edit
|
|
||||||
Edit
|
|
||||||
%br
|
|
||||||
- if @wiki != @most_recent_wiki
|
- if @wiki != @most_recent_wiki
|
||||||
.warning_message
|
.alert
|
||||||
This is an old version of this page.
|
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)}.
|
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
|
||||||
|
= @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
|
.file_content.wiki
|
||||||
= preserve do
|
= preserve do
|
||||||
= markdown @wiki.content
|
= markdown @wiki.content
|
||||||
|
|
|
@ -37,7 +37,7 @@ Feature: Project active tab
|
||||||
|
|
||||||
Scenario: On Project Wall
|
Scenario: On Project Wall
|
||||||
Given I visit my project's wall page
|
Given I visit my project's wall page
|
||||||
Then the active main tab should be Wall
|
Then the active main tab should be Wiki
|
||||||
And no other main tabs should be active
|
And no other main tabs should be active
|
||||||
|
|
||||||
Scenario: On Project Wiki
|
Scenario: On Project Wiki
|
||||||
|
|
|
@ -218,7 +218,7 @@ describe "Gitlab Flavored Markdown" do
|
||||||
end
|
end
|
||||||
|
|
||||||
it "should NOT render title in wikis#show" do
|
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 have_content("Circumvent ##{issue.id}")
|
||||||
page.should_not have_link("##{issue.id}")
|
page.should_not have_link("##{issue.id}")
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue