完成配置---模块

This commit is contained in:
sw 2015-04-11 17:28:18 +08:00
parent fb935f124c
commit 01f56a761f
4 changed files with 38 additions and 39 deletions

View File

@ -1,8 +1,4 @@
<%= 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| %>
<fieldset class="box">
<legend><%= l(:text_select_project_modules) %></legend>
@ -14,7 +10,5 @@
<% end %>
</fieldset>
<p><%= check_all_links 'modules-form' %></p>
<p><%= submit_tag l(:button_save) %></p>
<% end %>

View File

@ -1,19 +1,24 @@
<div class="box pl15">
<h3 class="c_blue mb10">请选择此项目可以使用的模块:</h3>
<%= form_for @project,:url => { :action => 'modules', :id => @project },:html => {:id => 'modules-form',:method => :post} do |f| %>
<div class="box pl15">
<ul>
<li><label><input checked="checked" id="enabled_module_names_" name="enabled_module_names[]" type="checkbox" value="issue_tracking"> 问题跟踪</label></li>
<li><label><input checked="checked" id="enabled_module_names_" name="enabled_module_names[]" type="checkbox" value="issue_tracking"> 时间跟踪</label></li>
<li><label><input checked="checked" id="enabled_module_names_" name="enabled_module_names[]" type="checkbox" value="issue_tracking"> 新闻</label></li>
<li><label><input checked="checked" id="enabled_module_names_" name="enabled_module_names[]" type="checkbox" value="issue_tracking"> 文档</label></li>
<li><label><input checked="checked" id="enabled_module_names_" name="enabled_module_names[]" type="checkbox" value="issue_tracking"> 资源库</label></li>
<li><label><input checked="checked" id="enabled_module_names_" name="enabled_module_names[]" type="checkbox" value="issue_tracking"> Wiki</label></li>
<li><label><input checked="checked" id="enabled_module_names_" name="enabled_module_names[]" type="checkbox" value="issue_tracking"> 版本库</label></li>
<li><label><input checked="checked" id="enabled_module_names_" name="enabled_module_names[]" type="checkbox" value="issue_tracking"> 讨论区</label></li>
<li><label><input checked="checked" id="enabled_module_names_" name="enabled_module_names[]" type="checkbox" value="issue_tracking"> 日历</label></li>
<li><label><input checked="checked" id="enabled_module_names_" name="enabled_module_names[]" type="checkbox" value="issue_tracking"> 甘特图</label></li>
<li><label><input checked="checked" id="enabled_module_names_" name="enabled_module_names[]" type="checkbox" value="issue_tracking"> DTS测试工具</label></li>
<li><label><input checked="checked" id="enabled_module_names_" name="enabled_module_names[]" type="checkbox" value="issue_tracking"> 代码审查</label></li>
<% Redmine::AccessControl.available_project_modules.each do |m| %>
<li>
<label>
<%= check_box_tag 'enabled_module_names[]', m, @project.module_enabled?(m) -%>
<%= l_or_humanize(m, :prefix => "project_module_") %>
</label>
</li>
<% end %>
</ul>
</div><!--box end-->
<p class="mb10 c_grey"><a href="javascript:void(0)" class=" c_purple">全选</a> &nbsp;&nbsp;|&nbsp;&nbsp; <a href="javascript:void(0)" class=" c_purple" >清除</a></p>
<p><a href="javascript:void(0)" class="blue_btn" >保存</a></p>
<p class="mb10 c_grey">
<a href="javascript:void(0)" class="c_purple" onclick="checkAll('modules-form', true);return false;">全选</a>
&nbsp;&nbsp;|&nbsp;&nbsp;
<a href="javascript:void(0)" class=" c_purple" onclick="checkAll('modules-form', false); return false;" >清除</a>
</p>
<p>
<a href="javascript:void(0)" class="blue_btn" >保存</a>
</p>
<% end %>

View File

@ -174,7 +174,7 @@ function project_setting(n)
}
else
{
$("#pro_st_tb_"+i).removeClass().addClass("pro_st_dis");
$("#pro_st_tb_"+i).removeClass().addClass("pro_st_normaltab");
$("#pro_st_tbc_0"+i).removeClass().addClass("pro_st_undis");
}
}