Commit 7799b5bda6ba0a65c5a951dfd72db4fe334dc70e
Exists in
master
and in
4 other branches
Merge branch 'feature/writeboard'
Showing
17 changed files
with
50 additions
and
37 deletions
Show diff stats
app/assets/stylesheets/sections/notes.scss
app/helpers/tab_helper.rb
... | ... | @@ -73,11 +73,19 @@ module TabHelper |
73 | 73 | end |
74 | 74 | |
75 | 75 | def project_tab_class |
76 | - [:files, :edit].each do |action| | |
76 | + return "active" if current_page?(controller: "projects", action: :edit, id: @project) | |
77 | + | |
78 | + if ['services', 'hooks', 'deploy_keys', 'team_members'].include? controller.controller_name | |
79 | + "active" | |
80 | + end | |
81 | + end | |
82 | + | |
83 | + def project_wiki_tab_class | |
84 | + [:files, :wall].each do |action| | |
77 | 85 | return "active" if current_page?(controller: "projects", action: action, id: @project) |
78 | 86 | end |
79 | 87 | |
80 | - if ['snippets', 'services', 'hooks', 'deploy_keys', 'team_members'].include? controller.controller_name | |
88 | + if ['wikis', 'snippets'].include? controller.controller_name | |
81 | 89 | "active" |
82 | 90 | end |
83 | 91 | end | ... | ... |
app/views/commits/_diffs.html.haml
... | ... | @@ -25,7 +25,7 @@ |
25 | 25 | %span= diff.old_path |
26 | 26 | |
27 | 27 | - if @commit.prev_commit |
28 | - = link_to project_tree_path(@project, tree_join(@commit.prev_commit_id, diff.new_path)), {:class => 'btn pull-right view-file'} do | |
28 | + = link_to project_tree_path(@project, tree_join(@commit.prev_commit_id, diff.new_path)), {:class => 'btn btn-tiny pull-right view-file'} do | |
29 | 29 | View file @ |
30 | 30 | %span.commit-short-id= @commit.short_id(6) |
31 | 31 | - else | ... | ... |
app/views/hooks/index.html.haml
app/views/layouts/project_resource.html.haml
... | ... | @@ -35,17 +35,11 @@ |
35 | 35 | Merge Requests |
36 | 36 | %span.count.merge_counter= @project.merge_requests.opened.count |
37 | 37 | |
38 | - - if @project.wall_enabled | |
39 | - = nav_link(path: 'projects#wall') do | |
40 | - = link_to 'Wall', wall_project_path(@project) | |
41 | - | |
42 | - - if @project.wiki_enabled | |
43 | - = nav_link(controller: :wikis) do | |
44 | - = link_to 'Wiki', project_wiki_path(@project, :index) | |
38 | + = nav_link(html_options: {class: "#{project_wiki_tab_class}"}) do | |
39 | + = link_to 'Wiki', project_wiki_path(@project, :index) | |
45 | 40 | |
46 | 41 | - if can? current_user, :admin_project, @project |
47 | 42 | = nav_link(html_options: {class: "#{project_tab_class}"}) do |
48 | 43 | = link_to edit_project_path(@project), class: "stat-tab tab " do |
49 | 44 | Settings |
50 | - | |
51 | 45 | .content= yield | ... | ... |
app/views/projects/files.html.haml
app/views/projects/wall.html.haml
app/views/snippets/edit.html.haml
app/views/snippets/index.html.haml
app/views/snippets/new.html.haml
app/views/snippets/show.html.haml
... | ... | @@ -0,0 +1,14 @@ |
1 | +%ul.nav.nav-tabs | |
2 | + - if @project.wiki_enabled | |
3 | + = nav_link(controller: 'wikis') do | |
4 | + = link_to 'Wiki', project_wiki_path(@project, :index) | |
5 | + | |
6 | + - if @project.wall_enabled | |
7 | + = nav_link(path: 'projects#wall') do | |
8 | + = link_to 'Wall', wall_project_path(@project) | |
9 | + | |
10 | + = nav_link(path: 'projects#files') do | |
11 | + = link_to 'Attachments', files_project_path(@project), class: "files-tab tab" | |
12 | + | |
13 | + = nav_link(controller: :snippets) do | |
14 | + = link_to 'Snippets', project_snippets_path(@project), class: "snippets-tab tab" | ... | ... |
app/views/wikis/edit.html.haml
1 | 1 | %h3.page_title Editing page |
2 | -%hr | |
3 | 2 | = render 'form' |
4 | 3 | |
5 | 4 | .pull-right |
6 | 5 | - if can? current_user, :admin_wiki, @project |
7 | 6 | = link_to project_wiki_path(@project, @wiki), confirm: "Are you sure you want to delete this page?", method: :delete, class: "btn btn-small btn-remove" do |
8 | - Delete this page | |
9 | 7 | \ No newline at end of file |
8 | + Delete this page | ... | ... |
app/views/wikis/pages.html.haml
app/views/wikis/show.html.haml
1 | -%h3.page_title | |
2 | - = @wiki.title | |
3 | - %span.pull-right | |
4 | - = link_to pages_project_wikis_path(@project), class: "btn btn-small grouped" do | |
5 | - Pages | |
6 | - - if can? current_user, :write_wiki, @project | |
7 | - = link_to history_project_wiki_path(@project, @wiki), class: "btn btn-small grouped" do | |
8 | - History | |
9 | - = link_to edit_project_wiki_path(@project, @wiki), class: "btn btn-small grouped" do | |
10 | - %i.icon-edit | |
11 | - Edit | |
12 | -%br | |
1 | += render 'wikis/nav' | |
13 | 2 | - if @wiki != @most_recent_wiki |
14 | - .warning_message | |
3 | + .alert | |
15 | 4 | This is an old version of this page. |
16 | 5 | 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)}. |
17 | 6 | |
18 | 7 | .file_holder |
8 | + .file_title | |
9 | + = @wiki.title | |
10 | + %span.options | |
11 | + = link_to pages_project_wikis_path(@project), class: "btn btn-tiny grouped" do | |
12 | + Pages | |
13 | + - if can? current_user, :write_wiki, @project | |
14 | + = link_to history_project_wiki_path(@project, @wiki), class: "btn btn-tiny grouped" do | |
15 | + History | |
16 | + = link_to edit_project_wiki_path(@project, @wiki), class: "btn btn-tiny grouped" do | |
17 | + %i.icon-edit | |
18 | + Edit | |
19 | + | |
19 | 20 | .file_content.wiki |
20 | 21 | = preserve do |
21 | 22 | = markdown @wiki.content | ... | ... |
features/project/active_tab.feature
... | ... | @@ -37,7 +37,7 @@ Feature: Project active tab |
37 | 37 | |
38 | 38 | Scenario: On Project Wall |
39 | 39 | Given I visit my project's wall page |
40 | - Then the active main tab should be Wall | |
40 | + Then the active main tab should be Wiki | |
41 | 41 | And no other main tabs should be active |
42 | 42 | |
43 | 43 | Scenario: On Project Wiki | ... | ... |
spec/features/gitlab_flavored_markdown_spec.rb
... | ... | @@ -218,7 +218,7 @@ describe "Gitlab Flavored Markdown" do |
218 | 218 | end |
219 | 219 | |
220 | 220 | it "should NOT render title in wikis#show" do |
221 | - within(".content h3") do # page title | |
221 | + within(".content .file_title") do # page title | |
222 | 222 | page.should have_content("Circumvent ##{issue.id}") |
223 | 223 | page.should_not have_link("##{issue.id}") |
224 | 224 | end | ... | ... |