From fefc1bf800136077cffe678edb91e00eafc2c8b0 Mon Sep 17 00:00:00 2001 From: cxt Date: Fri, 21 Oct 2016 19:58:02 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=86=E7=B5=84=E4=BD=9C=E4=B8=9A=E7=9A=84?= =?UTF-8?q?=E5=8A=A8=E6=80=81=E5=92=8C=E8=AF=A6=E6=83=85=E7=9A=84=E8=B0=83?= =?UTF-8?q?=E6=95=B4=E3=80=81=E4=BD=9C=E5=93=81=E5=88=97=E8=A1=A8=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E9=A1=B9=E7=9B=AE=E6=8F=90=E7=A4=BA=E5=92=8C=E8=80=81?= =?UTF-8?q?=E5=B8=88=E5=8A=A0=E5=85=A5=E9=A1=B9=E7=9B=AE=E7=9A=84=E5=8A=9F?= =?UTF-8?q?=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/applied_project_controller.rb | 3 ++ .../_applied_join_project.html.erb | 18 ++++++--- .../_evaluation_un_group_work.html.erb | 16 +++++--- app/views/users/_homework_base_info.html.erb | 40 +------------------ app/views/users/_homework_opr.html.erb | 5 +++ 5 files changed, 32 insertions(+), 50 deletions(-) diff --git a/app/controllers/applied_project_controller.rb b/app/controllers/applied_project_controller.rb index 30978367c..e7909e20d 100644 --- a/app/controllers/applied_project_controller.rb +++ b/app/controllers/applied_project_controller.rb @@ -5,6 +5,9 @@ class AppliedProjectController < ApplicationController if params[:object_id] @project = Project.find_by_id(params[:object_id]) end + if params[:is_teacher] + @is_teacher = 1 + end # @user_id = params[:user_id] # if params[:project_join] # if @project diff --git a/app/views/applied_project/_applied_join_project.html.erb b/app/views/applied_project/_applied_join_project.html.erb index e2c447992..2e2f657d6 100644 --- a/app/views/applied_project/_applied_join_project.html.erb +++ b/app/views/applied_project/_applied_join_project.html.erb @@ -6,11 +6,19 @@
<%= form_tag( url_for(:controller => 'applied_project', :action => 'applied_project_info', :project_id => (@project.nil? ? nil : @project.id)), :remote => true, :id => 'project_applied_form') do %>
- <% sort_projects.each_with_index do |pro, i| %> - <% project = Project.find pro.project_id %> - - -
- <% com_time = project.project_score.commit_time %> - <% forge_time=ForgeActivity.where("project_id=?",project.id).last.updated_at if ForgeActivity.where("project_id=?",project.id).last %> - <% if project.is_public || User.current.member_of?(project) || User.current.admin? %> - <%= link_to image_tag(url_to_avatar(project),:width=>"40",:height => "40",:class => "borderRadius relatePImage"),project_path(project.id,:host=>Setting.host_name),:id=>"project_img_"+project.id.to_s+"_"+activity.id.to_s,:alt =>"项目头像", :target => '_blank' %> - - <% update_time = time_from_now !com_time.nil? && format_time(com_time) > format_time(forge_time) ? com_time : forge_time %> - - <% else %> - <%= image_tag(url_to_avatar(project),:width=>"40",:height => "40",:class => "borderRadius relatePImage",:id=>"project_img_"+project.id.to_s+"_"+activity.id.to_s,:alt =>"项目头像",:title => "私有项目不可访问") %> - - - <% end %> -
- 项目名称:<%=project.name %>
- 创建者:<%=(User.find project.user_id).show_name %>(组长)
- 更新时间:<%=time_from_now !com_time.nil? && format_time(com_time) > format_time(forge_time) ? com_time : forge_time %> -
-
- <% if i == 9 && projects.count > 10 %> - 更多>> - <% end %> - <% if i > 9 && i == (projects.count - 1) %> - 收回<< - <% end %> - <% end %> <% end %> <% end %> diff --git a/app/views/users/_homework_opr.html.erb b/app/views/users/_homework_opr.html.erb index 1074496d8..90acbf830 100644 --- a/app/views/users/_homework_opr.html.erb +++ b/app/views/users/_homework_opr.html.erb @@ -37,6 +37,11 @@ <% end %> <% if activity.homework_type == 3 && activity.homework_detail_group%> + <% if activity.homework_detail_group.base_on_project == 1 %> +
+ 项目(<%=activity.student_work_projects.where("is_leader = 1").count %>) +
+ <% end %>
分组人数:<%=activity.homework_detail_group.min_num %>-<%=activity.homework_detail_group.max_num %> 人