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 %> 人