Merge wiki, wall & snippets under one tab - writeboards
This commit is contained in:
parent
753ecbdcec
commit
a685624d27
14 changed files with 128 additions and 99 deletions
|
@ -284,6 +284,6 @@ ul.notes {
|
|||
margin-top: 8px;
|
||||
margin-left: 15px;
|
||||
@extend .pull-left;
|
||||
@extend .span4;
|
||||
width: 35%;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -73,11 +73,19 @@ module TabHelper
|
|||
end
|
||||
|
||||
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_writeboards_tab_class
|
||||
[:files, :wall].each do |action|
|
||||
return "active" if current_page?(controller: "projects", action: action, id: @project)
|
||||
end
|
||||
|
||||
if ['snippets', 'services', 'hooks', 'deploy_keys', 'team_members'].include? controller.controller_name
|
||||
if ['wikis', 'snippets'].include? controller.controller_name
|
||||
"active"
|
||||
end
|
||||
end
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
.input
|
||||
= 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
|
||||
|
||||
-if @hooks.any?
|
||||
|
|
|
@ -35,17 +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, :index)
|
||||
= nav_link(html_options: {class: "#{project_writeboards_tab_class}"}) do
|
||||
= link_to 'Writeboards', project_wiki_path(@project, :index)
|
||||
|
||||
- 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,5 +1,8 @@
|
|||
= render "project_head"
|
||||
- unless @notes.empty?
|
||||
.row
|
||||
.span3
|
||||
= render 'writeboards/nav'
|
||||
.span9
|
||||
- unless @notes.empty?
|
||||
%table
|
||||
%thead
|
||||
%tr
|
||||
|
@ -16,7 +19,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
|
||||
|
||||
|
||||
|
|
|
@ -1,2 +1,6 @@
|
|||
%div.wall_page
|
||||
.row
|
||||
.span3
|
||||
= render 'writeboards/nav'
|
||||
.span9
|
||||
%div.wall_page
|
||||
= render "notes/reversed_notes_with_form"
|
||||
|
|
|
@ -1,2 +1 @@
|
|||
= render "projects/project_head"
|
||||
= render "snippets/form"
|
||||
|
|
|
@ -1,14 +1,16 @@
|
|||
= render "projects/project_head"
|
||||
|
||||
%h3.page_title
|
||||
.row
|
||||
.span3
|
||||
= render 'writeboards/nav'
|
||||
.span9
|
||||
%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
|
||||
|
|
|
@ -1,2 +1 @@
|
|||
= render "projects/project_head"
|
||||
= render "snippets/form"
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
= render "projects/project_head"
|
||||
|
||||
%h3.page_title
|
||||
= @snippet.title
|
||||
%small= @snippet.file_name
|
||||
|
|
|
@ -1,6 +1,10 @@
|
|||
%h3.page_title All Pages
|
||||
%br
|
||||
%table
|
||||
.row
|
||||
.span3
|
||||
= render 'writeboards/nav'
|
||||
.span9
|
||||
%h3.page_title All Pages
|
||||
%br
|
||||
%table
|
||||
%thead
|
||||
%tr
|
||||
%th Title
|
||||
|
|
|
@ -1,4 +1,8 @@
|
|||
%h3.page_title
|
||||
.row
|
||||
.span3
|
||||
= render 'writeboards/nav'
|
||||
.span9
|
||||
%h3.page_title
|
||||
= @wiki.title
|
||||
%span.pull-right
|
||||
= link_to pages_project_wikis_path(@project), class: "btn btn-small grouped" do
|
||||
|
@ -9,15 +13,15 @@
|
|||
= link_to edit_project_wiki_path(@project, @wiki), class: "btn btn-small grouped" do
|
||||
%i.icon-edit
|
||||
Edit
|
||||
%br
|
||||
- if @wiki != @most_recent_wiki
|
||||
%br
|
||||
- if @wiki != @most_recent_wiki
|
||||
.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_holder
|
||||
.file_content.wiki
|
||||
= 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
|
||||
|
|
14
app/views/writeboards/_nav.html.haml
Normal file
14
app/views/writeboards/_nav.html.haml
Normal file
|
@ -0,0 +1,14 @@
|
|||
%ul.nav.nav-pills.nav-stacked
|
||||
- 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"
|
Loading…
Add table
Reference in a new issue