将是否启用DTS测试移入项目模块配置
This commit is contained in:
parent
a39672dd14
commit
2141fcc3ca
|
@ -747,7 +747,7 @@ class ProjectsController < ApplicationController
|
||||||
|
|
||||||
def update
|
def update
|
||||||
@project.safe_attributes = params[:project]
|
@project.safe_attributes = params[:project]
|
||||||
@project.dts_test = params[:project][:dts_test]
|
#@project.dts_test = params[:project][:dts_test]
|
||||||
if validate_parent_id && @project.save
|
if validate_parent_id && @project.save
|
||||||
@course = Course.find_by_extra(@project.identifier)
|
@course = Course.find_by_extra(@project.identifier)
|
||||||
unless @course.nil?
|
unless @course.nil?
|
||||||
|
|
|
@ -15,9 +15,11 @@
|
||||||
<!-- <p style="margin-left:-10px;"><%#= f.text_field :homepage, :size => 60, :style => "width:488px;margin-left: 10px;" %></p> --> <!-- by huang -->
|
<!-- <p style="margin-left:-10px;"><%#= f.text_field :homepage, :size => 60, :style => "width:488px;margin-left: 10px;" %></p> --> <!-- by huang -->
|
||||||
<p style="margin-left:-10px;"><em style ="color: #888888;display: block;font-size: 90%;font-style: normal;"><%= f.check_box :is_public, :style => "margin-left:10px;" %></em></p>
|
<p style="margin-left:-10px;"><em style ="color: #888888;display: block;font-size: 90%;font-style: normal;"><%= f.check_box :is_public, :style => "margin-left:10px;" %></em></p>
|
||||||
<p style="margin-left:-10px;"><em style ="color: #888888;display: block;font-size: 90%;font-style: normal;"><%= f.check_box :hidden_repo, :style => "margin-left:10px;" %></em></p>
|
<p style="margin-left:-10px;"><em style ="color: #888888;display: block;font-size: 90%;font-style: normal;"><%= f.check_box :hidden_repo, :style => "margin-left:10px;" %></em></p>
|
||||||
|
<!--
|
||||||
<p style="margin-left:-10px;"><em style ="color: #888888;display: block;font-size: 90%;font-style: normal;">
|
<p style="margin-left:-10px;"><em style ="color: #888888;display: block;font-size: 90%;font-style: normal;">
|
||||||
<%= f.check_box :dts_test, :style => "margin-left:10px;" %>
|
<%#= f.check_box :dts_test, :style => "margin-left:10px;" %>
|
||||||
</em></p>
|
</em></p>
|
||||||
|
-->
|
||||||
<p style="display:none;"><%= f.text_field :project_type, :value => 0 %></p>
|
<p style="display:none;"><%= f.text_field :project_type, :value => 0 %></p>
|
||||||
|
|
||||||
<%= wikitoolbar_for 'project_description' %>
|
<%= wikitoolbar_for 'project_description' %>
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
<li><%= link_to l(:project_module_gantt) ,project_gantt_path(@project) %></li>
|
<li><%= link_to l(:project_module_gantt) ,project_gantt_path(@project) %></li>
|
||||||
</ul>
|
</ul>
|
||||||
<ul><h3>其他工具</h3>
|
<ul><h3>其他工具</h3>
|
||||||
<% if @project.dts_test == 1 %>
|
<% if @project.enabled_modules.where(" name = 'dts'").count > 0 %>
|
||||||
<li><%= link_to l(:label_module_share) ,share_show_path(@project) %></li>
|
<li><%= link_to l(:label_module_share) ,share_show_path(@project) %></li>
|
||||||
<% end %>
|
<% end %>
|
||||||
<li><%= link_to l(:project_module_documents), project_documents_path(@project) %></li>
|
<li><%= link_to l(:project_module_documents), project_documents_path(@project) %></li>
|
||||||
|
|
|
@ -505,6 +505,7 @@ zh:
|
||||||
project_module_calendar: 日历
|
project_module_calendar: 日历
|
||||||
project_module_gantt: 甘特图
|
project_module_gantt: 甘特图
|
||||||
project_module_course: 课程
|
project_module_course: 课程
|
||||||
|
project_module_dts: DTS测试工具
|
||||||
label_module_share: DTS测试工具
|
label_module_share: DTS测试工具
|
||||||
|
|
||||||
label_user: 用户
|
label_user: 用户
|
||||||
|
|
|
@ -177,6 +177,7 @@ default_projects_modules:
|
||||||
- calendar
|
- calendar
|
||||||
- gantt
|
- gantt
|
||||||
- course
|
- course
|
||||||
|
- dts
|
||||||
default_projects_tracker_ids:
|
default_projects_tracker_ids:
|
||||||
serialized: true
|
serialized: true
|
||||||
default:
|
default:
|
||||||
|
|
20
db/schema.rb
20
db/schema.rb
|
@ -846,18 +846,18 @@ ActiveRecord::Schema.define(:version => 20140728014933) do
|
||||||
create_table "relative_memos", :force => true do |t|
|
create_table "relative_memos", :force => true do |t|
|
||||||
t.integer "osp_id"
|
t.integer "osp_id"
|
||||||
t.integer "parent_id"
|
t.integer "parent_id"
|
||||||
t.string "subject", :null => false
|
t.string "subject", :null => false
|
||||||
t.text "content", :null => false
|
t.text "content", :limit => 16777215, :null => false
|
||||||
t.integer "author_id"
|
t.integer "author_id"
|
||||||
t.integer "replies_count", :default => 0
|
t.integer "replies_count", :default => 0
|
||||||
t.integer "last_reply_id"
|
t.integer "last_reply_id"
|
||||||
t.boolean "lock", :default => false
|
t.boolean "lock", :default => false
|
||||||
t.boolean "sticky", :default => false
|
t.boolean "sticky", :default => false
|
||||||
t.boolean "is_quote", :default => false
|
t.boolean "is_quote", :default => false
|
||||||
t.datetime "created_at", :null => false
|
t.datetime "created_at", :null => false
|
||||||
t.datetime "updated_at", :null => false
|
t.datetime "updated_at", :null => false
|
||||||
t.integer "viewed_count_crawl", :default => 0
|
t.integer "viewed_count_crawl", :default => 0
|
||||||
t.integer "viewed_count_local", :default => 0
|
t.integer "viewed_count_local", :default => 0
|
||||||
t.string "url"
|
t.string "url"
|
||||||
t.string "username"
|
t.string "username"
|
||||||
t.string "userhomeurl"
|
t.string "userhomeurl"
|
||||||
|
|
|
@ -244,6 +244,9 @@ Redmine::AccessControl.map do |map|
|
||||||
map.permission :view_gantt, {:gantts => [:show, :update]}, :read => true
|
map.permission :view_gantt, {:gantts => [:show, :update]}, :read => true
|
||||||
end
|
end
|
||||||
|
|
||||||
|
map.project_module :dts do |map|
|
||||||
|
map.permission :do_dts, {:dts => :show}, :read => true
|
||||||
|
end
|
||||||
# map.project_module :journals do |map|
|
# map.project_module :journals do |map|
|
||||||
# map.permission :view_journals_for_messages, {:gantts => [:show, :update]}, :read => true
|
# map.permission :view_journals_for_messages, {:gantts => [:show, :update]}, :read => true
|
||||||
# end
|
# end
|
||||||
|
|
|
@ -67,6 +67,7 @@ module Redmine
|
||||||
def available_project_modules
|
def available_project_modules
|
||||||
@available_project_modules ||= @permissions.collect(&:project_module).uniq.compact
|
@available_project_modules ||= @permissions.collect(&:project_module).uniq.compact
|
||||||
end
|
end
|
||||||
|
|
||||||
def available_contest_modules
|
def available_contest_modules
|
||||||
@available_contest_modules ||= @permissions.collect(&:contest_module).uniq.compact
|
@available_contest_modules ||= @permissions.collect(&:contest_module).uniq.compact
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue