Merge remote-tracking branch 'origin/szzh' into szzh
This commit is contained in:
commit
c141501085
|
@ -31,6 +31,31 @@ module CoursesHelper
|
|||
# searchStudent(project).count
|
||||
end
|
||||
|
||||
# garble count 混淆数量
|
||||
# alias projectCountOrigin projectCount
|
||||
# def projectCount project
|
||||
# count = projectCountOrigin project
|
||||
# garble count
|
||||
# end
|
||||
|
||||
alias teacherCountOrigin teacherCount
|
||||
def teacherCount project
|
||||
count = teacherCountOrigin project
|
||||
garble count
|
||||
end
|
||||
|
||||
alias studentCountOrigin studentCount
|
||||
def studentCount project
|
||||
count = studentCountOrigin project
|
||||
garble count
|
||||
end
|
||||
|
||||
def garble count
|
||||
count = count.round( 1-count.to_s.size ).to_i
|
||||
return count.to_s if count.to_s.size.eql?(1)
|
||||
count.to_s << '+'
|
||||
end
|
||||
|
||||
# =====================================================================================
|
||||
# return people list
|
||||
def searchTeacherAndAssistant project
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
<% @nav_dispaly_course_label = 1 %>
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title><%= h html_title %></title>
|
||||
<meta name="description" content="<%= Redmine::Info.app_name %>" />
|
||||
<meta name="keywords" content="issue,bug,tracker" />
|
||||
<meta name="description" content="<%= Redmine::Info.app_name %>"/>
|
||||
<meta name="keywords" content="issue,bug,tracker"/>
|
||||
<%= csrf_meta_tag %>
|
||||
<%= favicon %>
|
||||
<%= stylesheet_link_tag 'jquery/jquery-ui-1.9.2', 'application', 'nyan', :media => 'all' %>
|
||||
|
@ -16,18 +16,18 @@
|
|||
<%= call_hook :view_layouts_base_html_head %>
|
||||
<!-- page specific tags -->
|
||||
<%= yield :header_tags -%>
|
||||
</head>
|
||||
<!--add by huang-->
|
||||
<body class="<%= h body_css_classes %>">
|
||||
<div id="wrapper">
|
||||
<div id="wrapper2">
|
||||
<div id="wrapper3">
|
||||
<%= render :partial => 'layouts/base_header'%>
|
||||
<div id="main">
|
||||
<!--added by huang-->
|
||||
<div class="top-content">
|
||||
<% @project = Project.find_by_id(@project.id)%>
|
||||
<% @course = Course.find_by_extra(@project.identifier)%>
|
||||
</head>
|
||||
<!--add by huang-->
|
||||
<body class="<%= h body_css_classes %>">
|
||||
<div id="wrapper">
|
||||
<div id="wrapper2">
|
||||
<div id="wrapper3">
|
||||
<%= render :partial => 'layouts/base_header' %>
|
||||
<div id="main">
|
||||
<!--added by huang-->
|
||||
<div class="top-content">
|
||||
<% @project = Project.find_by_id(@project.id) %>
|
||||
<% @course = Course.find_by_extra(@project.identifier) %>
|
||||
<table>
|
||||
<tr>
|
||||
<td class="info_font" style="width: 240px; color: #15bccf">高校课程实践社区</td>
|
||||
|
@ -43,22 +43,25 @@
|
|||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="padding-left: 8px"><%=link_to request.host()+"/course", :controller => 'projects', :action => 'course' %></td>
|
||||
<td><p class="top-content-list"><%=link_to "主页", home_path %> > <%=link_to l(:label_course_practice), :controller => 'projects', :action => 'course' %> > <%=link_to @project.name, nil %></p></td>
|
||||
<td style="padding-left: 8px"><%= link_to request.host()+"/course", :controller => 'projects', :action => 'course' %></td>
|
||||
<td><p class="top-content-list"><%= link_to "主页", home_path %>
|
||||
> <%= link_to l(:label_course_practice), :controller => 'projects', :action => 'course' %>
|
||||
> <%= link_to @project.name, nil %></p></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end -->
|
||||
<!--project page-->
|
||||
<div id="sidebar">
|
||||
</div>
|
||||
<!-- end -->
|
||||
<!--project page-->
|
||||
<div id="sidebar">
|
||||
<div class="spaceleft">
|
||||
<!--informations-->
|
||||
<div class="inf_user_image">
|
||||
<% @project = Project.find_by_id(@project.id) %>
|
||||
<% @course = Course.find_by_extra(@project.identifier) %>
|
||||
<table>
|
||||
<tr><td valign="top">
|
||||
<% if(@project.project_type==1) %>
|
||||
<tr>
|
||||
<td valign="top">
|
||||
<% if (@project.project_type==1) %>
|
||||
<% if get_avatar?(@project) %>
|
||||
<%= image_tag(url_to_avatar(@project), :class => "avatar2") %>
|
||||
<% else %>
|
||||
|
@ -68,15 +71,17 @@
|
|||
<%= image_tag(url_to_avatar(@project), :class => "avatar2") %>
|
||||
<% end %> </td>
|
||||
<td>
|
||||
<table><tr>
|
||||
<table>
|
||||
<tr>
|
||||
<td class="info-course"><%= @project.name %></td>
|
||||
</tr>
|
||||
<tr><td align="center">
|
||||
<tr>
|
||||
<td align="center">
|
||||
<div id="join_in_course">
|
||||
<%if User.current.logged? %>
|
||||
<% if User.current.logged? %>
|
||||
<% if @course.teacher.id == User.current.id %>
|
||||
<%= link_to l(:label_course_modify_settings), {:controller => 'projects', :action => 'settings', :id => @project} %>
|
||||
<%= render :partial => 'courses/set_course_time', :locals => {:project => @project}%>
|
||||
<%= render :partial => 'courses/set_course_time', :locals => {:project => @project} %>
|
||||
<% else %>
|
||||
|
||||
<%= join_in_course(@project, User.current) %>
|
||||
|
@ -89,7 +94,9 @@
|
|||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
</td></tr></table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
@ -106,12 +113,11 @@
|
|||
<% end %>
|
||||
|
||||
<td class="font_index">
|
||||
<!-- %= link_to "#{@project.members.count}", project_member_path(@project) ,:course =>'1'% -->
|
||||
<!-- 1 教师; 2 学生;0 全部-->
|
||||
<%= link_to "#{teacherCount(@project)}", project_member_path(@project, :role => 1) ,:course =>'1'%>
|
||||
<%= link_to "#{teacherCount(@project)}", project_member_path(@project, :role => 1), :course => '1' %>
|
||||
</td>
|
||||
<td class="font_index">
|
||||
<%= link_to "#{studentCount(@project)}", project_member_path(@project, :role => 2) ,:course =>'1'%>
|
||||
<%= link_to "#{studentCount(@project)}", project_member_path(@project, :role => 2), :course => '1' %>
|
||||
</td>
|
||||
<td class="font_index"><%= link_to files_count, project_files_path(@project) %></td>
|
||||
<tr class="font_aram">
|
||||
|
@ -134,37 +140,44 @@
|
|||
<!--info-->
|
||||
|
||||
<div class="inf_user_context">
|
||||
<table style="font-family:微软雅黑" >
|
||||
<table style="font-family:微软雅黑">
|
||||
|
||||
<!-- addedby bai 教师姓名加超链接、加入开课时间、结课时间与课时 -->
|
||||
<tr>
|
||||
<td valign="top" style="padding-left: 8px; width:60px"><%= l(:label_main_teacher) %> :</td><td class="font_lighter_sidebar"><%= link_to(@course.teacher.lastname+@course.teacher.firstname, user_path(@course.teacher)) %></td>
|
||||
<td valign="top" style="padding-left: 8px; width:60px"><%= l(:label_main_teacher) %> :</td>
|
||||
<td class="font_lighter_sidebar"><%= link_to(@course.teacher.lastname+@course.teacher.firstname, user_path(@course.teacher)) %></td>
|
||||
</tr>
|
||||
|
||||
<tr class="hidden">
|
||||
<td valign="top" style="padding-left: 8px;"><%= l(:label_setup_time) %> :</td><td class="font_lighter_sidebar"><%= @course.setup_time %></td>
|
||||
<td valign="top" style="padding-left: 8px;"><%= l(:label_setup_time) %> :</td>
|
||||
<td class="font_lighter_sidebar"><%= @course.setup_time %></td>
|
||||
</tr>
|
||||
|
||||
<tr class="hidden">
|
||||
<td valign="top" style="padding-left: 8px;"><%= l(:label_endup_time) %> :</td><td class="font_lighter_sidebar"><%= @course.endup_time %></td>
|
||||
<td valign="top" style="padding-left: 8px;"><%= l(:label_endup_time) %> :</td>
|
||||
<td class="font_lighter_sidebar"><%= @course.endup_time %></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top" style="padding-left: 8px;"><%= l(:label_class_period) %> :</td><td class="font_lighter_sidebar"><%= @course.class_period %> <%= l(:label_class_hour)%></td>
|
||||
<td valign="top" style="padding-left: 8px;"><%= l(:label_class_period) %> :</td>
|
||||
<td class="font_lighter_sidebar"><%= @course.class_period %> <%= l(:label_class_hour) %></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top" style="padding-left: 8px;"><%= l(:label_main_term) %> :</td><td class="font_lighter_sidebar"><%= @course.time %> <%= @course.term %></td>
|
||||
<td valign="top" style="padding-left: 8px;"><%= l(:label_main_term) %> :</td>
|
||||
<td class="font_lighter_sidebar"><%= @course.time %> <%= @course.term %></td>
|
||||
</tr>
|
||||
<!-- end -->
|
||||
|
||||
<% unless @course.teacher.user_extensions.nil?%>
|
||||
<% unless @course.teacher.user_extensions.nil? %>
|
||||
<tr>
|
||||
<td valign="top" style="padding-left: 8px;"><%= l(:label_teacher_work_unit) %> :</td><td class="font_lighter_sidebar"><%= @course.teacher.user_extensions.school %></td>
|
||||
<td valign="top" style="padding-left: 8px;"><%= l(:label_teacher_work_unit) %> :</td>
|
||||
<td class="font_lighter_sidebar"><%= @course.teacher.user_extensions.school %></td>
|
||||
</tr>
|
||||
<% else %>
|
||||
<tr>
|
||||
<td valign="top" style="padding-left: 8px;"><%= l(:label_teacher_work_unit) %> :</td><td class="font_lighter_sidebar"><%= l(:field_course_un) %></td>
|
||||
<td valign="top" style="padding-left: 8px;"><%= l(:label_teacher_work_unit) %> :</td>
|
||||
<td class="font_lighter_sidebar"><%= l(:field_course_un) %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
|
||||
|
@ -201,37 +214,37 @@
|
|||
<!-- added by william -for tag -->
|
||||
<div class="user_tags">
|
||||
<div id="tags">
|
||||
<%= render :partial => 'tags/tag', :locals => {:obj => @project,:object_flag => "2"}%>
|
||||
<%= render :partial => 'tags/tag', :locals => {:obj => @project, :object_flag => "2"} %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="user_underline"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="content">
|
||||
</div>
|
||||
<div id="content">
|
||||
<div class="tabs_new">
|
||||
<ul>
|
||||
<li>
|
||||
<%= link_to l(:label_course_overview), project_path(@project), :class => link_class(:overview) %>
|
||||
</li>
|
||||
<li>
|
||||
<%= link_to l(:label_homework), homework_project_path(@project), :class => link_class(:homework) ,:project_type => 1 %>
|
||||
<%= link_to l(:label_homework), homework_project_path(@project), :class => link_class(:homework), :project_type => 1 %>
|
||||
</li>
|
||||
<li>
|
||||
<%= link_to l(:label_course_file), project_files_path(@project), :class => link_class(:files)%>
|
||||
<%= link_to l(:label_course_file), project_files_path(@project), :class => link_class(:files) %>
|
||||
</li>
|
||||
<li>
|
||||
<%= link_to l(:label_course_news), {:controller => 'news', :action => 'index', :project_id => @project}, :class => link_class(:news) %>
|
||||
</li>
|
||||
<li>
|
||||
<%= link_to l(:label_course_board), { :controller => 'boards', :action => 'index', :project_id => @project}, :class => link_class(:boards) %>
|
||||
<%= link_to l(:label_course_board), {:controller => 'boards', :action => 'index', :project_id => @project}, :class => link_class(:boards) %>
|
||||
</li>
|
||||
<li>
|
||||
<%= link_to l(:label_course_feedback), project_feedback_path(@project), :class => link_class(:feedback)%>
|
||||
<%= link_to l(:label_course_feedback), project_feedback_path(@project), :class => link_class(:feedback) %>
|
||||
</li>
|
||||
<!-- <li><%= link_to(l(:label_course_repository), {:controller => 'repositories', :action => 'show', :id => @project, :repository_id => nil, :path => nil, :rev => nil, :course => 1 })%></li> -->
|
||||
<% if User.current.logged? && (User.current.admin? || (!Member.where('user_id = ? and project_id = ?', User.current.id, @project.id).first.nil? && (Member.where('user_id = ? and project_id = ?', User.current.id, @project.id).first.roles&Role.where('id = ? or id = ?', 7, 9)).size >0))%>
|
||||
<!-- <li><%= link_to(l(:label_course_repository), {:controller => 'repositories', :action => 'show', :id => @project, :repository_id => nil, :path => nil, :rev => nil, :course => 1}) %></li> -->
|
||||
<% if User.current.logged? && (User.current.admin? || (!Member.where('user_id = ? and project_id = ?', User.current.id, @project.id).first.nil? && (Member.where('user_id = ? and project_id = ?', User.current.id, @project.id).first.roles&Role.where('id = ? or id = ?', 7, 9)).size >0)) %>
|
||||
|
||||
<% end %>
|
||||
</ul>
|
||||
|
@ -242,16 +255,16 @@
|
|||
<div style="clear:both;"></div>
|
||||
<!--gcm-->
|
||||
|
||||
</div>
|
||||
<!--gcm move it mistakenly-->
|
||||
<%= render :partial => 'layouts/base_footer'%>
|
||||
</div>
|
||||
<div id="ajax-indicator" style="display:none;">
|
||||
</div>
|
||||
<!--gcm move it mistakenly-->
|
||||
<%= render :partial => 'layouts/base_footer' %>
|
||||
</div>
|
||||
<div id="ajax-indicator" style="display:none;">
|
||||
<span><%= l(:label_loading) %></span>
|
||||
</div>
|
||||
<div id="ajax-modal" style="display:none;"></div>
|
||||
</div>
|
||||
</div>
|
||||
<%= call_hook :view_layouts_base_body_bottom %>
|
||||
</body>
|
||||
</div>
|
||||
<div id="ajax-modal" style="display:none;"></div>
|
||||
</div>
|
||||
</div>
|
||||
<%= call_hook :view_layouts_base_body_bottom %>
|
||||
</body>
|
||||
</html>
|
|
@ -109,7 +109,7 @@
|
|||
<div class='desc_item text_nowrap' style="width: 310px;">
|
||||
[<%= get_course_term project %>]
|
||||
<%= link_to( project.name, project_path(project.id), :class => "d-g-blue d-p-project-name",:title => "#{project.name}" )%>
|
||||
(<%= "#{studentCount(project)}人" %><%#= link_to "#{studentCount(project)}人", project_member_path(project, :role => 2) ,:course =>'1' %>)
|
||||
(<%= "#{studentCount(project)}人" %>)
|
||||
<% files_count = (project.attachments.count.to_i+Version.joins(:project).where("projects.id=#{project.id}").count.to_i).to_s %>
|
||||
(<%=link_to "#{files_count}份", project_files_path(project) %>资料)
|
||||
</div>
|
||||
|
@ -161,13 +161,11 @@
|
|||
<div class='desc_item text_nowrap' style="width: 310px;">
|
||||
[<%= get_course_term project %>]
|
||||
<%= link_to( project.name, project_path(project.id), :class => "d-g-blue d-p-project-name",:title => "#{project.name}" )%>
|
||||
(<%= link_to "#{studentCount(project)}人", project_member_path(project, :role => 2) ,:course =>'1' %>)
|
||||
(<%= "#{studentCount(project)}人" %>)
|
||||
<% files_count = (project.attachments.count.to_i+Version.joins(:project).where("projects.id=#{project.id}").count.to_i).to_s %>
|
||||
(<%=link_to "#{files_count}份", project_files_path(project) %>资料)
|
||||
</div>
|
||||
<!-- <div class='desc_item' style="">
|
||||
<span class='font_lighter' title=<%#=project.description.to_s%>><%#=project.description.truncate(25, omission: '...')%></span>
|
||||
</div> -->
|
||||
|
||||
<div class='join_course_link'>
|
||||
<% if !course_endTime_timeout?(project)%>
|
||||
<div >
|
||||
|
@ -207,7 +205,7 @@
|
|||
<div class='desc_item text_nowrap' style="width: 310px;">
|
||||
[<%= get_course_term project %>]
|
||||
<%= link_to( project.name, project_path(project.id), :class => "d-g-blue d-p-project-name",:title => "#{project.name}" )%>
|
||||
(<%= link_to "#{studentCount(project)}人", project_member_path(project, :role => 2) ,:course =>'1' %>)
|
||||
<%= "#{studentCount(project)}人" %> )
|
||||
<% files_count = (project.attachments.count.to_i+Version.joins(:project).where("projects.id=#{project.id}").count.to_i).to_s %>
|
||||
(<%=link_to "#{files_count}份", project_files_path(project) %>资料)
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue