2016-10-12 14:38:46 +08:00
|
|
|
<div class="pro_new_setting clear mb10">
|
2016-10-12 14:13:52 +08:00
|
|
|
<div class="pro_new_setting_leftnav fl">
|
|
|
|
<ul>
|
|
|
|
<% show_memu = show_project_memu User.current%>
|
|
|
|
<% if User.current.allowed_to?(:edit_project, @project) %>
|
2016-10-28 09:12:59 +08:00
|
|
|
<li><a href="javascript:void(0)" id="pro_st_tb_1" class="<%= show_memu == 'edit_project' ? 'active' : ''%>" onclick="project_setting(1);">信息</a></li>
|
2016-10-12 14:13:52 +08:00
|
|
|
<% end %>
|
|
|
|
<% if User.current.allowed_to?(:select_project_modules, @project) %>
|
2016-10-28 09:12:59 +08:00
|
|
|
<li><a href="javascript:void(0)" id="pro_st_tb_2" class="<%= show_memu == 'select_project_modules' ? 'active' : ''%>" onclick="project_setting(2);">模块</a></li>
|
2016-10-12 14:13:52 +08:00
|
|
|
<% end %>
|
|
|
|
<% if User.current.allowed_to?(:manage_members, @project) %>
|
2016-10-28 09:12:59 +08:00
|
|
|
<li><a href="javascript:void(0)" id="pro_st_tb_3" class="<%= show_memu == 'manage_members' ? 'active' : ''%>" onclick="project_setting(3);">成员</a></li>
|
2016-10-12 14:13:52 +08:00
|
|
|
<% end %>
|
2016-10-28 09:12:59 +08:00
|
|
|
<li><a href="javascript:void(0)" id="pro_st_tb_5" class="<%= show_memu == 'join_org' ? 'active' : ''%>" onclick="project_setting(5);">组织</a></li>
|
2016-10-12 14:13:52 +08:00
|
|
|
<% if User.current.allowed_to?(:manage_versions, @project) %>
|
2016-10-28 09:12:59 +08:00
|
|
|
<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>
|
2016-10-12 14:13:52 +08:00
|
|
|
<% end %>
|
|
|
|
<!--<li id="pro_st_tb_5" class="pro_st_normaltab" onclick="project_setting(5);">问题类别</li>-->
|
|
|
|
<% if User.current.allowed_to?(:manage_repository, @project) %>
|
2016-10-28 09:12:59 +08:00
|
|
|
<li><a href="javascript:void(0)" id="pro_st_tb_6" class="<%= show_memu == 'manage_repository' ? 'active' : ''%>" onclick="project_setting(6);">版本库</a></li>
|
2016-10-12 14:13:52 +08:00
|
|
|
<% 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="pro_new_setting_conbox fl ml10">
|
|
|
|
<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><!–tbc_05 end–>-->
|
|
|
|
<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>
|
|
|
|
</div>
|
|
|
|
|
2016-03-05 03:16:04 +08:00
|
|
|
<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();
|
2016-10-12 14:13:52 +08:00
|
|
|
// $(".project_r_h").parent().css({"width":"730px","background-color":"#fff","padding":"10px","margin-left":"10px","margin-bottom":"10px"});
|
2016-03-05 03:16:04 +08:00
|
|
|
});
|
2016-10-12 14:38:46 +08:00
|
|
|
var windowH = $(window).height();
|
|
|
|
var contentH = $(".pro_new_setting_conbox").height();
|
2016-10-12 17:18:35 +08:00
|
|
|
if(windowH > contentH + 329) {
|
2016-10-12 14:38:46 +08:00
|
|
|
$(".pro_new_setting_conbox").css("margin-bottom",windowH - 329 -contentH + "px");
|
2016-10-12 17:18:35 +08:00
|
|
|
}else{
|
|
|
|
$(".pro_new_setting_conbox").css("margin-bottom",0);
|
2016-10-12 14:38:46 +08:00
|
|
|
}
|
2016-10-12 17:18:35 +08:00
|
|
|
$(".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);
|
|
|
|
}
|
|
|
|
});
|
2016-03-05 03:16:04 +08:00
|
|
|
</script>
|
|
|
|
|