socialforge/app/views/projects/settings.html.erb

121 lines
6.3 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<script type="text/javascript">
$(function(){
<%if @select_tab%>
<%if @select_tab == "modules"%>
project_setting(2);
<% elsif @select_tab == "members"%>
project_setting(3);
<% elsif @select_tab == "versions"%>
project_setting(4);
$("#pro_st_edit_ban").toggle();
<% elsif @select_tab == "repositories" %>
project_setting(6);
$("#pro_st_edit_ku").toggle();
<%else%>
<% end%>
<% end%>
$("div[nhname='pro_setting']").show();
});
</script>
<div class="project_r_h">
<h2 class="project_h2">配置</h2>
</div>
<!--通过admin界面配置不同角色显示不同的模块-->
<div class=" pro_setting" nhname="pro_setting" style="display:none;">
<div id="pro_st_tb_" class="pro_st_tb_">
<ul>
<% show_memu = show_project_memu User.current%>
<% if User.current.allowed_to?(:edit_project, @project) %>
<li id="pro_st_tb_1" class="<%= show_memu == 'edit_project' ? 'pro_st_hovertab' : 'pro_st_normaltab'%>" onclick="project_setting(1);">信息</li>
<% end %>
<% if User.current.allowed_to?(:select_project_modules, @project) %>
<li id="pro_st_tb_2" class="<%= show_memu == 'select_project_modules' ? 'pro_st_hovertab' : 'pro_st_normaltab'%>" onclick="project_setting(2);">模块</li>
<% end %>
<% if User.current.allowed_to?(:manage_members, @project) %>
<li id="pro_st_tb_3" class="<%= show_memu == 'manage_members' ? 'pro_st_hovertab' : 'pro_st_normaltab'%>" onclick="project_setting(3);">成员</li>
<% end %>
<% if User.current.allowed_to?(:manage_versions, @project) %>
<li id="pro_st_tb_4" class="<%= show_memu == 'manage_versions' ? 'pro_st_hovertab' : 'pro_st_normaltab'%>" onclick="project_setting(4);">版本</li>
<% end %>
<!--<li id="pro_st_tb_5" class="pro_st_normaltab" onclick="project_setting(5);">问题类别</li>-->
<% if User.current.allowed_to?(:manage_repository, @project) %>
<li id="pro_st_tb_6" class="<%= show_memu == 'manage_repository' ? 'pro_st_hovertab' : 'pro_st_normaltab'%>" onclick="project_setting(6);">版本库</li>
<% end %>
<!--<li id="pro_st_tb_7" class="pro_st_normaltab" onclick="project_setting(7);">活动(时间跟踪)</li>-->
<!--<li id="pro_st_tb_8" class="pro_st_normaltab" onclick="project_setting(8);">代码评审</li>-->
</ul>
</div><!--tb_ end-->
<div class="cl"></div>
<div class="pro_st_ctt">
<div class="<%= show_memu == 'edit_project' ? 'pro_st_dis' : 'pro_st_undis'%>" id="pro_st_tbc_01">
<%= render :partial=>"projects/settings/new_edit" if User.current.allowed_to?(:edit_project, @project)%>
</div><!--tbc_01 end-->
<div class="<%= show_memu == 'select_project_modules' ? 'pro_st_dis' : 'pro_st_undis'%>" id="pro_st_tbc_02">
<%= render :partial=>"projects/settings/new_modules" if User.current.allowed_to?(:select_project_modules, @project)%>
</div><!--tbc_02 end-->
<div class="<%= show_memu == 'manage_members' ? 'pro_st_dis' : 'pro_st_undis'%>" id="pro_st_tbc_03">
<%= render :partial=>"projects/settings/new_members" if User.current.allowed_to?(:manage_members, @project)%>
</div><!--tbc_03 end-->
<div class="<%= show_memu == 'manage_versions' ? 'pro_st_dis' : 'pro_st_undis'%>" id="pro_st_tbc_04">
<%= render :partial=>"projects/settings/new_versions" if User.current.allowed_to?(:manage_versions, @project)%>
</div><!--tbc_04 end-->
<!--<div class="pro_st_undis" id="pro_st_tbc_05">-->
<!--<%#= render :partial=>"projects/settings/new_issue_categories" %>-->
<!--</div>&lt;!&ndash;tbc_05 end&ndash;&gt;-->
<div class="<%= show_memu == 'manage_repository' ? 'pro_st_dis' : 'pro_st_undis'%>" id="pro_st_tbc_06">
<%= render :partial=>"projects/settings/new_repositories" if User.current.allowed_to?(:manage_repository, @project)%>
</div><!--tbc_06 end-->
<!--<div class="pro_st_undis" id="pro_st_tbc_07">-->
<!--<%#= render :partial=>"projects/settings/new_activities" %>-->
<!--</div>&lt;!&ndash;tbc_07 end&ndash;&gt;-->
<!--代码评审先不做-->
<!--<div class="pro_st_undis" id="pro_st_tbc_08">-->
<!--<div class="box f14">-->
<!--<ul>-->
<!--<li><label for="setting_tracker_in_review_dialog">允许创建代码审查时选择跟踪者?<span class="required">&nbsp;&nbsp;</span></label></li>-->
<!--<li><b>设置代码评审的默认跟踪标签:</b></li>-->
<!--<li><label for="setting_tracker_id">跟踪<span class="c_red"> *</span></label>-->
<!--<select id="setting_tracker_id" name="setting[tracker_id]">-->
<!--<option value="1" selected="selected">缺陷</option>-->
<!--<option value="2">功能</option>-->
<!--<option value="3">支持</option>-->
<!--<option value="4">任务</option>-->
<!--</select></li>-->
<!--<li>-->
<!--<label for="setting_hide_code_review_tab">隐藏代码评审页<span class="required">&nbsp;&nbsp;</span></label>-->
<!--<input name="setting[hide_code_review_tab]" type="hidden" value="0"><input id="setting_hide_code_review_tab" name="setting[hide_code_review_tab]" type="checkbox" value="1">-->
<!--</li>-->
<!--<li>-->
<!--<label>若修订存在问题:</label>-->
<!--<input checked="checked" id="setting_auto_relation_1" name="setting[auto_relation]" type="radio" value="1">-->
<!--与之相关的评审问题-->
<!--<input id="setting_auto_relation_2" name="setting[auto_relation]" type="radio" value="2">-->
<!--与之无关的评审问题-->
<!--<input id="setting_auto_relation_0" name="setting[auto_relation]" type="radio" value="0">-->
<!--什么也不做-->
<!--</li>-->
<!--<li>-->
<!--<label>自动分派</label>-->
<!--<input id="auto_assign_enabled" name="auto_assign[enabled]" onchange="setAutoAssignSettingFormEnable();" type="checkbox" value="true">激活-->
<!--</li>-->
<!--</ul>-->
<!--<a href="javascript:viod(0)" class="blue_btn">保存</a>-->
<!--</div>-->
<!--</div>&lt;!&ndash;tbc_08 end&ndash;&gt;-->
</div><!--ctt end-->
</div><!--pro_setting end-->