Signed-off-by: alan <547533434@qq.com>
This commit is contained in:
parent
b1a60d3118
commit
0b6f35055d
|
@ -3,7 +3,7 @@
|
||||||
<%=link_to l(:label_my_course), user_courses_user_path(User.current.id) %>
|
<%=link_to l(:label_my_course), user_courses_user_path(User.current.id) %>
|
||||||
<ul class="course_sub_menu">
|
<ul class="course_sub_menu">
|
||||||
<% course_index = 0 %>
|
<% course_index = 0 %>
|
||||||
<% User.current.courses.each do |course| %>
|
<% cache User.current.courses.each do |course| %>
|
||||||
<% if !course_endTime_timeout?(course) %>
|
<% if !course_endTime_timeout?(course) %>
|
||||||
<%= render :partial => 'layouts/user_homework_list', :locals => {:course => course,:course_index => course_index} %>
|
<%= render :partial => 'layouts/user_homework_list', :locals => {:course => course,:course_index => course_index} %>
|
||||||
<% course_index += 1 %>
|
<% course_index += 1 %>
|
||||||
|
|
|
@ -70,6 +70,7 @@
|
||||||
<!--add by huang-->
|
<!--add by huang-->
|
||||||
<body>
|
<body>
|
||||||
<div id="Container">
|
<div id="Container">
|
||||||
|
|
||||||
<%= render :partial => 'layouts/new_header'%>
|
<%= render :partial => 'layouts/new_header'%>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
|
|
||||||
|
@ -103,6 +104,7 @@
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
</div><!--TopBar end-->
|
</div><!--TopBar end-->
|
||||||
|
|
||||||
<div id="content">
|
<div id="content">
|
||||||
<div id="LSide" class="fl">
|
<div id="LSide" class="fl">
|
||||||
<div class="project_info">
|
<div class="project_info">
|
||||||
|
@ -165,6 +167,7 @@
|
||||||
<% end %><!--end-->
|
<% end %><!--end-->
|
||||||
<!--menu 左侧工具栏 -->
|
<!--menu 左侧工具栏 -->
|
||||||
<!--project_new_type: 1为开发组;2为科研组;3为朋友圈子-->
|
<!--project_new_type: 1为开发组;2为科研组;3为朋友圈子-->
|
||||||
|
|
||||||
<div id="project_memu_list">
|
<div id="project_memu_list">
|
||||||
<% if @project.project_new_type == 1 || @project.project_new_type.nil? %>
|
<% if @project.project_new_type == 1 || @project.project_new_type.nil? %>
|
||||||
<%= render :partial => 'projects/development_group', :locals => {:project => @project}%>
|
<%= render :partial => 'projects/development_group', :locals => {:project => @project}%>
|
||||||
|
@ -174,6 +177,7 @@
|
||||||
<%= render :partial => 'projects/friend_group', :locals => {:project => @project}%>
|
<%= render :partial => 'projects/friend_group', :locals => {:project => @project}%>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- end -->
|
<!-- end -->
|
||||||
</div><!--项目侧导航 end-->
|
</div><!--项目侧导航 end-->
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
|
|
|
@ -1,52 +1,57 @@
|
||||||
<% attaments_num = @project.attachments.count+Attachment.where(["`container_type` = 'Version' and `container_id` in (?)",@project.versions.map{ |v| v.id}]).all.count %>
|
<% cache @project do %>
|
||||||
|
|
||||||
<div class="subNav">
|
<div class="subNav">
|
||||||
<%= link_to l(:label_activity), {:controller => 'projects', :action => 'show', :id => @project.id}, :class => "f14 c_blue02" %>
|
<%= link_to l(:label_activity), {:controller => 'projects', :action => 'show', :id => @project.id}, :class => "f14 c_blue02" %>
|
||||||
<% unless ForgeActivity.where("project_id = ?", @project.id).count == 0 %>
|
<% unless ForgeActivity.where("project_id = ?", @project.id).count == 0 %>
|
||||||
<a class="subnav_num">(<%= ForgeActivity.where("project_id = ?", @project.id).count %>)</a>
|
<a class="subnav_num">(<%= ForgeActivity.where("project_id = ?", @project.id).count %>)</a>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
<% unless @project.enabled_modules.where("name = 'issue_tracking'").empty? %>
|
<% unless @project.enabled_modules.where("name = 'issue_tracking'").empty? %>
|
||||||
<div class="subNav">
|
<div class="subNav">
|
||||||
<%= link_to l(:label_issue_tracking), project_issues_path(@project), :class => "f14 c_blue02" %>
|
<%= link_to l(:label_issue_tracking), project_issues_path(@project), :class => "f14 c_blue02" %>
|
||||||
<% unless @project.issues.visible.all.count == 0 %>
|
<% unless @project.issues.visible.all.count == 0 %>
|
||||||
<a class="subnav_num">(<%= @project.issues.visible.all.count %>)</a>
|
<a class="subnav_num">(<%= @project.issues.visible.all.count %>)</a>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% if User.current.member_of?(@project) %>
|
<% if User.current.member_of?(@project) %>
|
||||||
<%= link_to "+"+l(:label_release_issue), new_project_issue_path(@project) , :class => "subnav_green" %>
|
<%= link_to "+"+l(:label_release_issue), new_project_issue_path(@project) , :class => "subnav_green" %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% unless @project.enabled_modules.where("name = 'boards'").empty? %>
|
<% unless @project.enabled_modules.where("name = 'boards'").empty? %>
|
||||||
<div class="subNav">
|
<div class="subNav">
|
||||||
<%= link_to l(:project_module_boards), project_boards_path(@project), :class => "f14 c_blue02" %>
|
<%= link_to l(:project_module_boards), project_boards_path(@project), :class => "f14 c_blue02" %>
|
||||||
<% unless @project.boards.first.topics.count == 0 %>
|
<% unless @project.boards.first.topics.count == 0 %>
|
||||||
<a class="subnav_num">(<%= @project.boards.first.topics.count %>)</a>
|
<a class="subnav_num">(<%= @project.boards.first.topics.count %>)</a>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% if User.current.member_of?(@project) %>
|
<% if User.current.member_of?(@project) %>
|
||||||
<%= link_to "+"+l(:project_module_boards_post), project_boards_path(@project, :flag => true), :layout => 'base_projects', :class => "subnav_green ml105" %>
|
<%= link_to "+"+l(:project_module_boards_post), project_boards_path(@project, :flag => true), :layout => 'base_projects', :class => "subnav_green ml105" %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
<% end%>
|
<% end%>
|
||||||
<% unless @project.enabled_modules.where("name = 'files'").empty? %>
|
<% unless @project.enabled_modules.where("name = 'files'").empty? %>
|
||||||
<div class="subNav">
|
|
||||||
<%= link_to l(:project_module_files), project_files_path(@project), :class => "f14 c_blue02" %>
|
<div class="subNav">
|
||||||
<% unless attaments_num == 0 %>
|
<% attaments_num = @project.attachments.count+Attachment.where(["`container_type` = 'Version' and `container_id` in (?)",@project.versions.map{ |v| v.id}]).all.count %>
|
||||||
<a class="subnav_num">(<%= attaments_num %>)</a>
|
<%= link_to l(:project_module_files), project_files_path(@project), :class => "f14 c_blue02" %>
|
||||||
<% end %>
|
<% unless attaments_num == 0 %>
|
||||||
<% if User.current.member_of?(@project) %>
|
<a class="subnav_num">(<%= attaments_num %>)</a>
|
||||||
<%= link_to "+"+l(:label_upload_source), project_files_path(@project,:flag => true), :class => "subnav_green ml95" %>
|
<% end %>
|
||||||
<% end %>
|
<% if User.current.member_of?(@project) %>
|
||||||
</div>
|
<%= link_to "+"+l(:label_upload_source), project_files_path(@project,:flag => true), :class => "subnav_green ml95" %>
|
||||||
|
<% end %>
|
||||||
|
</div>
|
||||||
|
|
||||||
<% end %>
|
<% end %>
|
||||||
<%# --版本库被设置成私有、module中设置不显示、没有创建版本库 三种情况不显示-- %>
|
<%# --版本库被设置成私有、module中设置不显示、没有创建版本库 三种情况不显示-- %>
|
||||||
<% if visible_repository?(@project) %>
|
<% if visible_repository?(@project) %>
|
||||||
<div class="subNav">
|
<div class="subNav">
|
||||||
<%= link_to l(:project_module_repository), {:controller => 'repositories', :action => 'show', :id => @project.id}, :class => "f14 c_blue02" %>
|
<%= link_to l(:project_module_repository), {:controller => 'repositories', :action => 'show', :id => @project.id}, :class => "f14 c_blue02" %>
|
||||||
<a class="subnav_num">(<%= @project.repositories.count %>)</a>
|
<a class="subnav_num">(<%= @project.repositories.count %>)</a>
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
<!-- more -->
|
<!-- more -->
|
||||||
<div class="subNav subNav_jiantou" id="expand_tools_expand" nhtype="toggle4cookie" data-id="expand_tool_more" data-target="#navContent" data-val="retract"><%= l(:label_project_more) %></div>
|
<div class="subNav subNav_jiantou" id="expand_tools_expand" nhtype="toggle4cookie" data-id="expand_tool_more" data-target="#navContent" data-val="retract"><%= l(:label_project_more) %></div>
|
||||||
<ul class="navContent" id="navContent">
|
<ul class="navContent" id="navContent">
|
||||||
<%= render 'projects/tools_expand' %>
|
<%= render 'projects/tools_expand' %>
|
||||||
</ul>
|
</ul>
|
||||||
|
<% end %>
|
|
@ -1,3 +1,4 @@
|
||||||
|
<% cache @project %>
|
||||||
<% attaments_num = @project.attachments.count+Attachment.where(["`container_type` = 'Version' and `container_id` in (?)",@project.versions.map{ |v| v.id}]).all.count %>
|
<% attaments_num = @project.attachments.count+Attachment.where(["`container_type` = 'Version' and `container_id` in (?)",@project.versions.map{ |v| v.id}]).all.count %>
|
||||||
<div class="subNav">
|
<div class="subNav">
|
||||||
<%= link_to l(:label_activity), {:controller => 'projects', :action => 'show', :id => @project.id}, :class => "f14 c_blue02" %>
|
<%= link_to l(:label_activity), {:controller => 'projects', :action => 'show', :id => @project.id}, :class => "f14 c_blue02" %>
|
||||||
|
@ -37,4 +38,4 @@
|
||||||
<%= link_to "+"+l(:label_upload_source), project_files_path(@project,:flag => true), :class => "subnav_green ml95" %>
|
<%= link_to "+"+l(:label_upload_source), project_files_path(@project,:flag => true), :class => "subnav_green ml95" %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
<% end%>
|
<% end%>
|
||||||
|
|
Loading…
Reference in New Issue