Move snippets to own tab as feature. Make it disabled for new projects by default

This commit is contained in:
Dmitriy Zaporozhets 2013-03-18 23:33:41 +02:00
parent 112dc875ba
commit b765a7958d
7 changed files with 25 additions and 3 deletions

View file

@ -43,6 +43,10 @@
= nav_link(path: 'projects#wall') do
= link_to 'Wall', wall_project_path(@project)
- if @project.snippets_enabled
= nav_link(controller: :snippets) do
= link_to 'Snippets', project_snippets_path(@project)
- 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

View file

@ -87,6 +87,12 @@
= f.check_box :wall_enabled
%span.descr Simple chat system for broadcasting inside project
.control-group
= f.label :snippets_enabled, "Snippets", class: 'control-label'
.controls
= f.check_box :snippets_enabled
%span.descr Share code pastes with others out of git repository
.control-group
= f.label :wiki_enabled, "Wiki", class: 'control-label'
.controls