项目-配置-模块中去掉实训任务
This commit is contained in:
parent
73706d18a2
commit
c355bf6201
|
@ -46,7 +46,7 @@
|
||||||
</li>
|
</li>
|
||||||
<% end %>
|
<% end %>
|
||||||
<!--实训任务-->
|
<!--实训任务-->
|
||||||
<% if !@project.enabled_modules.where("name = 'training_tasks'").empty? %>
|
<% if !@project.enabled_modules.where("name = 'training_tasks'").empty? && hidden_unproject_infos %>
|
||||||
<% if User.current.admin? || is_project_manager?(User.current.id, @project.id) || is_project_manager?(User.current, @project.try(:forked_from_project_id)) %>
|
<% if User.current.admin? || is_project_manager?(User.current.id, @project.id) || is_project_manager?(User.current, @project.try(:forked_from_project_id)) %>
|
||||||
<li id="project_menu_011">
|
<li id="project_menu_011">
|
||||||
<%= link_to training_tasks_count > 0 ? "#{l(:project_module_training_tasks)}<span class='issues_nav_tag ml5'>#{switch_integer_into_k training_tasks_count}</span>".html_safe : "#{l(:project_module_training_tasks)}", project_training_tasks_url(@project), :class => "pro_new_proname", :title => "#{training_tasks_count}" %>
|
<%= link_to training_tasks_count > 0 ? "#{l(:project_module_training_tasks)}<span class='issues_nav_tag ml5'>#{switch_integer_into_k training_tasks_count}</span>".html_safe : "#{l(:project_module_training_tasks)}", project_training_tasks_url(@project), :class => "pro_new_proname", :title => "#{training_tasks_count}" %>
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
<% if User.current.allowed_to?(:manage_repository, @project) %>
|
<% if User.current.allowed_to?(:manage_repository, @project) %>
|
||||||
<li><a href="javascript:void(0)" id="pro_st_tb_6" class="<%= show_memu == 'manage_repository' ? 'active' : ''%>" onclick="project_setting(6);">版本库</a></li>
|
<li><a href="javascript:void(0)" id="pro_st_tb_6" class="<%= show_memu == 'manage_repository' ? 'active' : ''%>" onclick="project_setting(6);">版本库</a></li>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% if !@project.enabled_modules.where("name = 'training_tasks'").empty? %>
|
<% if !@project.enabled_modules.where("name = 'training_tasks'").empty? && hidden_unproject_infos %>
|
||||||
<li><a href="javascript:void(0)" id="pro_st_tb_7" class="<%= show_memu == 'trainig_task' ? 'active' : ''%>" onclick="project_setting(7);">实训任务</a></li>
|
<li><a href="javascript:void(0)" id="pro_st_tb_7" class="<%= show_memu == 'trainig_task' ? 'active' : ''%>" onclick="project_setting(7);">实训任务</a></li>
|
||||||
<% end %>
|
<% end %>
|
||||||
<!--<li id="pro_st_tb_7" class="pro_st_normaltab" onclick="project_setting(7);">活动(时间跟踪)</li>-->
|
<!--<li id="pro_st_tb_7" class="pro_st_normaltab" onclick="project_setting(7);">活动(时间跟踪)</li>-->
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
<div class="pro_new_prompt ml15 mr15 mb10"><p>问题跟踪模块与实训模块不能同时选择</p><p>一旦选定并保存后,将不能修改</p></div>
|
<% if hidden_unproject_infos %>
|
||||||
|
<div class="pro_new_prompt ml15 mr15 mb10"><p>问题跟踪模块与实训模块不能同时选择</p><p>一旦选定并保存后,将不能修改</p></div>
|
||||||
|
<% end %>
|
||||||
<ul class="pro_newsetting_con ml30 mb15">
|
<ul class="pro_newsetting_con ml30 mb15">
|
||||||
<h2 class="pro_newsetting_title">请选择此项目可以使用的模块:</h2>
|
<h2 class="pro_newsetting_title">请选择此项目可以使用的模块:</h2>
|
||||||
<%= form_for @project,:url => { :action => 'modules', :id => @project },:html => {:id => 'modules-form',:method => :post} do |f| %>
|
<%= form_for @project,:url => { :action => 'modules', :id => @project },:html => {:id => 'modules-form',:method => :post} do |f| %>
|
||||||
|
|
|
@ -193,10 +193,12 @@ Redmine::AccessControl.map do |map|
|
||||||
map.permission :delete_issue_watchers, {:watchers => :destroy}
|
map.permission :delete_issue_watchers, {:watchers => :destroy}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
=begin
|
||||||
map.project_module :training_tasks do |map|
|
map.project_module :training_tasks do |map|
|
||||||
map.permission :manage_training_tasks, {:training_tasks => [:new, :create]}, :require => :loggedin
|
map.permission :manage_training_tasks, {:training_tasks => [:new, :create]}, :require => :loggedin
|
||||||
map.permission :view_training_tasks, {:training_tasks => :index, :versions => :download}, :read => true
|
map.permission :view_training_tasks, {:training_tasks => :index, :versions => :download}, :read => true
|
||||||
end
|
end
|
||||||
|
=end
|
||||||
|
|
||||||
# map.project_module :time_tracking do |map|
|
# map.project_module :time_tracking do |map|
|
||||||
# map.permission :log_time, {:timelog => [:new, :create]}, :require => :loggedin
|
# map.permission :log_time, {:timelog => [:new, :create]}, :require => :loggedin
|
||||||
|
@ -418,7 +420,9 @@ Redmine::MenuManager.map :project_menu do |menu|
|
||||||
#menu.push :roadmap, { :controller => 'versions', :action => 'index' }, :param => :project_id
|
#menu.push :roadmap, { :controller => 'versions', :action => 'index' }, :param => :project_id
|
||||||
# :if => Proc.new { |p| p.shared_versions.any? }
|
# :if => Proc.new { |p| p.shared_versions.any? }
|
||||||
menu.push :issues, { :controller => 'issues', :action => 'index' },:if => Proc.new {|p| p.enabled_module_names.include?('issue_tracking') } ,:param => :project_id, :caption => :label_issue_plural
|
menu.push :issues, { :controller => 'issues', :action => 'index' },:if => Proc.new {|p| p.enabled_module_names.include?('issue_tracking') } ,:param => :project_id, :caption => :label_issue_plural
|
||||||
|
=begin
|
||||||
menu.push :training_tasks, { :controller => 'training_tasks', :action => 'index' },:if => Proc.new {|p| p.enabled_module_names.include?('training_tasks') } ,:param => :project_id, :caption => :label_training_task
|
menu.push :training_tasks, { :controller => 'training_tasks', :action => 'index' },:if => Proc.new {|p| p.enabled_module_names.include?('training_tasks') } ,:param => :project_id, :caption => :label_training_task
|
||||||
|
=end
|
||||||
# menu.push :new_issue, { :controller => 'issues', :action => 'new', :copy_from => nil }, :param => :project_id, :caption => :label_issue_new,
|
# menu.push :new_issue, { :controller => 'issues', :action => 'new', :copy_from => nil }, :param => :project_id, :caption => :label_issue_new,
|
||||||
# :html => { :accesskey => Redmine::AccessKeys.key_for(:new_issue) }
|
# :html => { :accesskey => Redmine::AccessKeys.key_for(:new_issue) }
|
||||||
# menu.push :gantt, { :controller => 'gantts', :action => 'show' }, :param => :project_id, :caption => :label_gantt
|
# menu.push :gantt, { :controller => 'gantts', :action => 'show' }, :param => :project_id, :caption => :label_gantt
|
||||||
|
|
Loading…
Reference in New Issue