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

86 lines
4.5 KiB
Plaintext
Raw Normal View History

<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) %>
<li><a 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 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 id="pro_st_tb_3" class="<%= show_memu == 'manage_members' ? 'active' : ''%>" onclick="project_setting(3);">成员</a></li>
<% end %>
<li><a 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 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 id="pro_st_tb_6" class="<%= show_memu == 'manage_repository' ? 'active' : ''%>" onclick="project_setting(6);">版本库</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="pro_new_setting_conbox fl ml10">
<div class="">
<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>
</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
});
var windowH = $(window).height();
var contentH = $(".pro_new_setting_conbox").height();
if(windowH >795.5) {
$(".pro_new_setting_conbox").css("margin-bottom",windowH - 329 -contentH + "px");
}
2016-03-05 03:16:04 +08:00
</script>