You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
pgfqe6ch8/app/views/projects/settings.html.erb

104 lines
5.8 KiB

6 years ago
<div class="pro_new_setting clear mb20">
<div class="pro_new_setting_leftnav fl">
<ul>
<% show_memu = show_project_memu User.current%>
<% if User.current.allowed_to?(:edit_project, @project) %>
<li><a href="javascript:void(0)" id="pro_st_tb_1" class="<%= show_memu == 'edit_project' ? 'active' : ''%>" onclick="project_setting(1);">信息</a></li>
<% end %>
<% if User.current.allowed_to?(:select_project_modules, @project) %>
<li><a href="javascript:void(0)" id="pro_st_tb_2" class="<%= show_memu == 'select_project_modules' ? 'active' : ''%>" onclick="project_setting(2);">模块</a></li>
<% end %>
<%# if User.current.allowed_to?(:manage_members, @project) %>
<!--<li><a href="javascript:void(0)" id="pro_st_tb_3" class="<%#= show_memu == 'manage_members' ? 'active' : ''%>" onclick="project_setting(3);">成员</a></li>-->
<%# end %>
<!-- <li><a href="javascript:void(0)" id="pro_st_tb_5" class="<%#= show_memu == 'join_org' ? 'active' : ''%>" onclick="project_setting(5);">组织</a></li>-->
<%# if User.current.allowed_to?(:manage_versions, @project) %>
<!--<li><a href="javascript:void(0)" id="pro_st_tb_4" class="<%#= show_memu == 'manage_versions' ? 'active' : ''%>" onclick="project_setting(4);"><%#= l(:milestone) %></a></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><a href="javascript:void(0)" id="pro_st_tb_6" class="<%#= show_memu == 'manage_repository' ? 'active' : ''%>" onclick="project_setting(6);">版本库</a></li>-->
<%# end %>
<%# if !@project.enabled_modules.where("name = 'training_tasks'").empty? %>
<!--<li><a href="javascript:void(0)" id="pro_st_tb_7" class="<%#= show_memu == 'trainig_task' ? 'active' : ''%>" onclick="project_setting(7);">实训任务</a></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>
<div class="with85 fr">
<div class="pro_new_setting_conbox ml15">
<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 == 'join_org' ? 'pro_st_dis' : 'pro_st_undis'%>" id="pro_st_tbc_05">
<%= render :partial=>"projects/settings/join_org" %>
</div>
<!--<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="<%#= show_memu == 'training_task' ? 'pro_st_dis' : 'pro_st_undis'%>" id="pro_st_tbc_07">-->
<!--<%#= render :partial=>"projects/settings/new_trainig_task" if is_project_manager?(User.current.id, @project.id) %>-->
<!--</div>-->
<!--tbc_06 end-->
</div>
</div>
</div>
<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 %>
project_setting(5);
<% end%>
<% end%>
$("div[nhname='pro_setting']").show();
// $(".project_r_h").parent().css({"width":"730px","background-color":"#fff","padding":"10px","margin-left":"10px","margin-bottom":"10px"});
});
/*var windowH = $(window).height();
var contentH = $(".pro_new_setting_conbox").height();
if(windowH > contentH + 329) {
$(".pro_new_setting_conbox").css("margin-bottom",windowH - 329 -contentH + "px");
}else{
$(".pro_new_setting_conbox").css("margin-bottom",0);
}*/
/*$(".pro_new_setting_leftnav ul li").live("click",function(){
var newContentH = $(".pro_new_setting_conbox").height();
if(windowH > newContentH + 329) {
$(".pro_new_setting_conbox").css("margin-bottom",windowH - 329 - newContentH + "px");
}else{
$(".pro_new_setting_conbox").css("margin-bottom",0);
}
});*/
</script>