diff --git a/app/views/projects/settings.html.erb b/app/views/projects/settings.html.erb
index e70e20cef..3fc9a89d6 100644
--- a/app/views/projects/settings.html.erb
+++ b/app/views/projects/settings.html.erb
@@ -2,13 +2,15 @@
$(function(){
<%if @select_tab%>
<%if @select_tab == "modules"%>
- project_setting(2);
+ project_setting(2);
+ <% elsif @select_tab == "members"%>
+ project_setting(3);
<% elsif @select_tab == "versions"%>
- project_setting(4);
- $("#pro_st_edit_ban").toggle();
+ project_setting(4);
+ $("#pro_st_edit_ban").toggle();
<% elsif @select_tab == "repositories" %>
- project_setting(6);
- $("#pro_st_edit_ku").toggle();
+ project_setting(6);
+ $("#pro_st_edit_ku").toggle();
<%else%>
<% end%>
<% end%>
diff --git a/app/views/projects/settings/_new_edit.html.erb b/app/views/projects/settings/_new_edit.html.erb
index a8998ece5..8de9b8229 100644
--- a/app/views/projects/settings/_new_edit.html.erb
+++ b/app/views/projects/settings/_new_edit.html.erb
@@ -19,11 +19,6 @@
-
- 组织 :
- <%= select_tag :organization_id,options_for_select(project_organizations_id_option,@project.organization_id),{} %>
-
-
公开 :
>
diff --git a/app/views/projects/settings/_new_repositories.html.erb b/app/views/projects/settings/_new_repositories.html.erb
index be793a409..410bd8c32 100644
--- a/app/views/projects/settings/_new_repositories.html.erb
+++ b/app/views/projects/settings/_new_repositories.html.erb
@@ -59,7 +59,7 @@
-<%= labelled_form_for :repository, @repository, :url =>project_repositories_path(@project),:html => {:id => 'repository-form',:method=>"post"} do |f| %>
+<%= labelled_form_for :repository, @repository, :url =>project_repositories_path(@project),:html => {:id => 'repository-form',:method=>"post",:autocomplete=>'off'} do |f| %>
@@ -79,6 +79,8 @@
<% end %>
+
+
* <%=l(:label_repository_name)%>:
<%= f.text_field :identifier, :disabled =>@repository.nil? || @repository.identifier_frozen? ? true:false,:label=>"", :no_label => true %>
<% unless @repository.identifier_frozen? %>
@@ -87,7 +89,7 @@
* <%=l(:label_password)%>
- <%= f.password_field :upassword, :label=> "", :no_label => true %>
+ <%= f.password_field :upassword, :label=> "", :no_label => true%>
<%= l(:label_upassword_info)%>
diff --git a/app/views/student_work/_add_score_reply.html.erb b/app/views/student_work/_add_score_reply.html.erb
index 2866b2da6..417d3d2c1 100644
--- a/app/views/student_work/_add_score_reply.html.erb
+++ b/app/views/student_work/_add_score_reply.html.erb
@@ -1,4 +1,5 @@
<%= form_for('', :remote => true, :method => :post,:url => add_score_reply_student_work_index_path(:score_id => score.id)) do |f|%>
<%= f.text_area 'message', :class => 'ping_text', :placeholder => l(:text_caracters_maximum,:count=>250),:maxlength => 250 %>
+
回复
<% end%>
\ No newline at end of file
diff --git a/app/views/student_work/_evaluation_student_work_title.html.erb b/app/views/student_work/_evaluation_student_work_title.html.erb
deleted file mode 100644
index f19438f78..000000000
--- a/app/views/student_work/_evaluation_student_work_title.html.erb
+++ /dev/null
@@ -1,47 +0,0 @@
-
- 学号
-
-
- <%= link_to "姓名",@show_all ? student_work_index_path(:homework => @homework.id,:order => "name", :sort => @score, :name => @name, :group => @group) : "javascript:void(0)",:class => "f14 f_b c_dark fl"%>
- <% if @show_all && @order == "name"%>
- <%= link_to "",student_work_index_path(:homework => @homework.id,:order => "name", :sort => @score, :name => @name, :group => @group) ,:class => @score == 'desc' ? 'st_up' : 'st_down'%>
- <% end%>
-
-
- 作品名称
-
-
- <%= link_to "时间",@show_all ? student_work_index_path(:homework => @homework.id,:order => "created_at", :sort => @score, :name => @name, :group => @group) : "javascript:void(0)",:class => "f14 f_b c_dark fl"%>
- <% if @show_all && @order == "created_at"%>
- <%= link_to "",student_work_index_path(:homework => @homework.id,:order => "created_at", :sort => @score, :name => @name, :group => @group) ,:class => @score == 'desc' ? 'st_up' : 'st_down'%>
- <% end%>
-
-
- <%= link_to "教师",@show_all ? student_work_index_path(:homework => @homework.id,:order => "teacher_score", :sort => @score, :name => @name, :group => @group) : "javascript:void(0)",:class => "f14 f_b c_dark fl"%>
- <% if @show_all && @order == "teacher_score"%>
- <%= link_to "", student_work_index_path(:homework => @homework.id,:order => "teacher_score", :sort => @score, :name => @name, :group => @group) ,:class => @score == 'desc' ? 'st_up' : 'st_down'%>
- <% end%>
-
-
- <%= link_to "教辅",@show_all ? student_work_index_path(:homework => @homework.id,:order => "teaching_asistant_score", :sort => @score, :name => @name, :group => @group) : "javascript:void(0)",:class => "f14 f_b c_dark fl"%>
- <% if @show_all && @order == "teaching_asistant_score"%>
- <%= link_to "", student_work_index_path(:homework => @homework.id,:order => "teaching_asistant_score", :sort => @score, :name => @name, :group => @group) ,:class => @score == 'desc' ? 'st_up' : 'st_down'%>
-
- <% end%>
-
-
- <% if @homework.homework_type == 1%>
- <%= link_to "匿评",@show_all ? student_work_index_path(:homework => @homework.id,:order => "student_score", :sort => @score, :name => @name, :group => @group) : "javascript:void(0)",:class => "f14 f_b c_dark fl"%>
- <% elsif @homework.homework_type == 2%>
- <%= link_to "系统",@show_all ? student_work_index_path(:homework => @homework.id,:order => "student_score", :sort => @score, :name => @name, :group => @group) : "javascript:void(0)",:class => "f14 f_b c_dark fl"%>
- <% end %>
- <% if @show_all && @order == "student_score"%>
- <%= link_to "", student_work_index_path(:homework => @homework.id,:order => "student_score", :sort => @score, :name => @name, :group => @group) ,:class => @score == 'desc' ? 'st_up' : 'st_down'%>
- <% end%>
-
-
- <%= link_to "成绩",@show_all ? student_work_index_path(:homework => @homework.id,:order => "score", :sort => @score, :name => @name, :group => @group) : "javascript:void(0)",:class => "f14 f_b c_dark fl"%>
- <% if @show_all && @order == "score"%>
- <%= link_to "", student_work_index_path(:homework => @homework.id,:order => "score", :sort => @score, :name => @name, :group => @group) ,:class => @score == 'desc' ? 'st_up' : 'st_down'%>
- <% end%>
-
\ No newline at end of file
diff --git a/app/views/student_work/_evaluation_title.html.erb b/app/views/student_work/_evaluation_title.html.erb
new file mode 100644
index 000000000..bb1919472
--- /dev/null
+++ b/app/views/student_work/_evaluation_title.html.erb
@@ -0,0 +1,8 @@
+
\ No newline at end of file
diff --git a/app/views/student_work/_evaluation_un_title.html.erb b/app/views/student_work/_evaluation_un_title.html.erb
new file mode 100644
index 000000000..8ca855e9b
--- /dev/null
+++ b/app/views/student_work/_evaluation_un_title.html.erb
@@ -0,0 +1,37 @@
+
+
+ 作品信息
+
+
+ <%= link_to "教师评分",@show_all ? student_work_index_path(:homework => @homework.id,:order => "teacher_score", :sort => @score, :name => @name, :group => @group) : "javascript:void(0)",:class => "c_dark f14 fb fl ml10"%>
+ <% if @show_all && @order == "teacher_score"%>
+ <%= link_to "", student_work_index_path(:homework => @homework.id,:order => "teacher_score", :sort => @score, :name => @name, :group => @group) ,:class => "#{@score == 'desc' ? 'st_up' : 'st_down'} mt19"%>
+ <% end%>
+
+
+ <%= link_to "教辅评分",@show_all ? student_work_index_path(:homework => @homework.id,:order => "teaching_asistant_score", :sort => @score, :name => @name, :group => @group) : "javascript:void(0)",:class => "c_dark f14 fb fl ml10"%>
+ <% if @show_all && @order == "teaching_asistant_score"%>
+ <%= link_to "", student_work_index_path(:homework => @homework.id,:order => "teaching_asistant_score", :sort => @score, :name => @name, :group => @group) ,:class => "#{@score == 'desc' ? 'st_up' : 'st_down'} mt19"%>
+ <% end%>
+
+ <% if @homework.homework_type == 2%>
+
+ <%= link_to "系统评分",@show_all ? student_work_index_path(:homework => @homework.id,:order => "system_score", :sort => @score, :name => @name, :group => @group) : "javascript:void(0)",:class => "c_dark f14 fb fl ml10"%>
+ <% if @show_all && @order == "system_score"%>
+ <%= link_to "", student_work_index_path(:homework => @homework.id,:order => "system_score", :sort => @score, :name => @name, :group => @group) ,:class => "#{@score == 'desc' ? 'st_up' : 'st_down'} mt19"%>
+ <% end%>
+
+ <% end%>
+
+ <%= link_to "匿评",@show_all ? student_work_index_path(:homework => @homework.id,:order => "student_score", :sort => @score, :name => @name, :group => @group) : "javascript:void(0)",:class => "c_dark f14 fb fl ml10"%>
+ <% if @show_all && @order == "student_score"%>
+ <%= link_to "", student_work_index_path(:homework => @homework.id,:order => "student_score", :sort => @score, :name => @name, :group => @group) ,:class => "#{@score == 'desc' ? 'st_up' : 'st_down'} mt19"%>
+ <% end%>
+
+
+ <%= link_to "成绩",@show_all ? student_work_index_path(:homework => @homework.id,:order => "score", :sort => @score, :name => @name, :group => @group) : "javascript:void(0)",:class => "c_dark f14 fb fl ml10"%>
+ <% if @show_all && @order == "score"%>
+ <%= link_to "", student_work_index_path(:homework => @homework.id,:order => "score", :sort => @score, :name => @name, :group => @group) ,:class => "#{@score == 'desc' ? 'st_up' : 'st_down'} mt19"%>
+ <% end%>
+
+
\ No newline at end of file
diff --git a/app/views/student_work/_evaluation_un_work.html.erb b/app/views/student_work/_evaluation_un_work.html.erb
new file mode 100644
index 000000000..d3bac240d
--- /dev/null
+++ b/app/views/student_work/_evaluation_un_work.html.erb
@@ -0,0 +1,76 @@
+
+
+
+
+
+ <% student_work_name = student_work.name.nil? || student_work.name.empty? ? student_work.user.show_name + '的作品' : student_work.name%>
+ <%= link_to student_work_name, student_work_path(student_work),:remote => true,:title => student_work_name, :class => "linkGrey f14"%>
+
+
+
+
+
+ 姓名:<%= student_work.user.show_name%>
+
+
+ 学号:
+ <%= student_work.user.user_extensions.nil? ? "--" : student_work.user.user_extensions.student_id%>
+
+
+ 时间:
+ <% if Time.parse(@homework.end_time.to_s).strftime("%Y-%m-%d") < Time.parse(student_work.created_at.to_s).strftime("%Y-%m-%d") %>
+ 迟交
+ <% else%>
+ <%= format_time student_work.created_at%>
+ <% end %>
+
+
+
+
+
+
+ <%= student_work.teacher_score.nil? ? "--" : format("%.1f",student_work.teacher_score)%>
+
+
+ <%= student_work.teaching_asistant_score.nil? ? "--" : format("%.1f",student_work.teaching_asistant_score)%>
+
+
+ <% if @homework.homework_type == 2%>
+
+
+ <%= student_work.system_score.nil? ? "--" : format("%.1f",student_work.system_score)%>
+
+ <% end%>
+
+ <%= student_work.student_score.nil? ? "--" : format("%.1f",student_work.student_score)%>
+ <% unless student_work.student_score.nil?%>
+
+ (<%= student_work.student_works_scores.where(:reviewer_role => 3).count%>)
+
+
+ 现共有
+ <%= student_work.student_works_scores.where(:reviewer_role => 3).count%>
+ 名学生进行了匿评,平均分为
+ <%= format("%.1f",student_work.student_score)%> 分。
+
+ <% end%>
+
+
+
+ <% score = student_work.respond_to?("score") ? student_work.score : (student_work.final_score || 0) - student_work.absence_penalty - student_work.late_penalty%>
+
+ <%= score.nil? ? "--" : format("%.1f",score)%>
+ <% unless score.nil?%>
+
+ 作品最终评分为
+ <%= student_work.final_score%> 分。
+ 迟交扣分
+ <%= student_work.late_penalty%> 分,
+ 缺评扣分
+ <%= student_work.absence_penalty%> 分,
+ 最终成绩为
+ <%= format("%.1f",score)%> 分。
+
+ <% end%>
+
+
\ No newline at end of file
diff --git a/app/views/student_work/_evaluation_work.html.erb b/app/views/student_work/_evaluation_work.html.erb
index be07269c3..f8b9addbd 100644
--- a/app/views/student_work/_evaluation_work.html.erb
+++ b/app/views/student_work/_evaluation_work.html.erb
@@ -1,29 +1,51 @@
-" id="student_work_<%= student_work.id%>">
+
<% is_my_work = student_work.user == User.current%>
-
- <% if is_my_work%>
-
- <%= student_work.user.user_extensions.nil? ? "--" : student_work.user.user_extensions.student_id%>
-
- <% else%>
- --
- <% end%>
-
-
- <% if is_my_work%>
- <%= link_to student_work.user.show_name,user_path(student_work.user),:title => student_work.user.show_name, :class => "c_blue02" %>
- <% else%>
- <%= link_to "匿名","javascript:void(0)", :class => "c_blue02"%>
- <% end%>
-
-
- <% student_work_name = student_work.name.nil? || student_work.name.empty? ? '匿名的作品' : student_work.name%>
- <%= link_to student_work_name, student_work_path(student_work),:remote => true, :title => student_work.name, :class => "c_blue02"%>
+
+
+
+ <% if is_my_work%>
+ <% student_work_name = student_work.name.nil? || student_work.name.empty? ? student_work.user.show_name + '的作品' : student_work.name%>
+ <%= link_to student_work_name, student_work_path(student_work),:remote => true,:title => student_work_name, :class => "linkGrey f14"%>
+ <% else%>
+ <%= link_to "匿名的作品", student_work_path(student_work),:remote => true,:title => student_work_name, :class => "linkGrey f14"%>
+ <% end%>
+
+
+
+
+
+ 姓名:
+ <% if is_my_work%>
+ <%= student_work.user.show_name%>
+ <% else%>
+ 匿名
+ <% end%>
+
+
+ 学号:
+ <% if is_my_work%>
+
+ <%= student_work.user.user_extensions.nil? ? "--" : student_work.user.user_extensions.student_id%>
+
+ <% else%>
+ --
+ <% end%>
+
+
+ 时间:
+ <% if Time.parse(@homework.end_time.to_s).strftime("%Y-%m-%d") < Time.parse(student_work.created_at.to_s).strftime("%Y-%m-%d") %>
+ 迟交
+ <% else%>
+ <%= format_time student_work.created_at%>
+ <% end %>
+
+
+
+
<% my_score = student_work_score(student_work,User.current) %>
-
- <%= my_score.nil? ? "--" : format("%.2f",my_score.score)%>
+
+ <%= my_score.nil? ? "--" : format("%.1f",my_score.score)%>
-
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/app/views/student_work/_evaluation_work_title.html.erb b/app/views/student_work/_evaluation_work_title.html.erb
deleted file mode 100644
index 0be6228bb..000000000
--- a/app/views/student_work/_evaluation_work_title.html.erb
+++ /dev/null
@@ -1,12 +0,0 @@
-
- 学号
-
-
- 学生姓名
-
-
- 作品名称
-
-
- <%= link_to "我的评分","javascript:void(0)",:class => "c_dark f14 fb fl"%>
-
\ No newline at end of file
diff --git a/app/views/student_work/_jour_replay.html.erb b/app/views/student_work/_jour_replay.html.erb
index 77fb476bf..4b594d7f4 100644
--- a/app/views/student_work/_jour_replay.html.erb
+++ b/app/views/student_work/_jour_replay.html.erb
@@ -6,9 +6,9 @@
<% if jour.user==User.current || User.current.admin? %>
<%= link_to(l(:label_bid_respond_delete), destroy_score_reply_student_work_index_path(:jour_id => jour.id),
- :remote => true, :confirm => l(:text_are_you_sure), :title => l(:button_delete), :class => "fr c_purple") %>
+ :remote => true, :confirm => l(:text_are_you_sure), :title => l(:button_delete), :class => "fr linkBlue mr5") %>
<% end %>
-
+
<%=format_time jour.created_on %>
diff --git a/app/views/student_work/_new_project.html.erb b/app/views/student_work/_new_project.html.erb
new file mode 100644
index 000000000..3d9214c7d
--- /dev/null
+++ b/app/views/student_work/_new_project.html.erb
@@ -0,0 +1,31 @@
+
diff --git a/app/views/student_work/_programing_work_show.html.erb b/app/views/student_work/_programing_work_show.html.erb
index b259e20a5..b5ff8f064 100644
--- a/app/views/student_work/_programing_work_show.html.erb
+++ b/app/views/student_work/_programing_work_show.html.erb
@@ -1,78 +1,102 @@
-
+
-
- 上交时间:
-
+ 上交时间:
<%=format_time @work.created_at %>
- <% if @work.user != User.current%>
-
+
+ <% if @work.user == User.current && @homework.homework_detail_manual.comment_status == 1 %>
+
+
+ <%= link_to("", student_work_path(@work),:method => 'delete', :confirm => l(:text_are_you_sure), :class => "pic_del") %>
+
+
+ <%= link_to "",new_student_work_path(:homework => @homework.id),:class => "pic_edit"%>
+
+ <% end%>
+ <% if @homework.homework_detail_manual.comment_status == 3 && @work.user != User.current%>
+
<%= render :partial => 'student_work_praise' %>
<% end%>
+
-
- 编程代码:
-
-
- <%= text_format @work.description%>
+
编程代码:
+
+ <%= text_format(@work.description) if @work.description%>
<% if @is_teacher%>
-
测试结果:
-
-
-
- 输入
- 输出
- 测试结果
-
- <%@homework.homework_tests.each do |test|%>
- ">
-
- <%= test.input%>
-
-
- <%= test.output%>
-
- <% student_work_test = StudentWorkTest.where(:homework_test_id => test.id,:student_work_id => @work.id).first%>
- <%= student_work_test.nil? ? "正在编译" : student_work_test.status_to_s%>
-
-
- <% end%>
- <% student_work_test = @work.student_work_test.first%>
- <% if student_work_test && student_work_test.error_msg && !student_work_test.error_msg.empty?%>
-
-
- <%= student_work_test.error_msg%>
-
-
- <% end%>
-
-
-
-
+
+
+ 测试结果:
+
+
+ <% @work.student_work_tests.each_with_index do |test, index| %>
+
+
+ 第<%= @work.student_work_tests.count - index%>次测试
+
+
+ <%= test.created_at.to_s(:db) %>
+
+
+
+ <% if test.status.to_i == -2 %>
+
+ <%= test.results.first %>
+
+ <% else %>
+
+
+ <% test.results.each_with_index do |x, i| %>
+
+ 测试<%=i+1%>
+ <% if x["status"].to_i != 0 %>
+ 测试错误!
+ 您的输出:
+ <%=x["result"]%>
+ 正确输出:
+ <%=x["output"]%>
+
+ <% else %>
+ 测试正确!
+
+ <% end %>
+
+ <% end %>
+
+
+ <% end %>
+ <% end %>
+
-
-
- <%= render :partial => 'add_score',:locals => {:work => @work,:score => @score}%>
-
<% end%>
+
+
+ <% if @is_teacher || (@homework.homework_detail_manual.comment_status == 2 && @work.user != User.current )%>
+
+
+ <%= render :partial => 'add_score',:locals => {:work => @work,:score => @score}%>
+
+ <% end%>
+
+
-
- <%@work.student_works_scores.order("updated_at desc").each do |score|%>
+
+ <%@student_work_scores.each do |score|%>
- <%= render :partial => 'student_work_score',:locals => {:score => score}%>
+ <%= render :partial => 'student_work_score',:locals => {:score => score,:is_last => score == @student_work_scores.last}%>
<% end%>
-
-
收起
+
+
+
收起
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/app/views/student_work/_set_score_rule.html.erb b/app/views/student_work/_set_score_rule.html.erb
new file mode 100644
index 000000000..7deed7fb8
--- /dev/null
+++ b/app/views/student_work/_set_score_rule.html.erb
@@ -0,0 +1,63 @@
+<%= form_for('new_form',:url => {:controller => 'student_work',:action => 'set_score_rule',:homework => homework.id},:method => "post") do |f|%>
+
+<% end%>
diff --git a/app/views/student_work/_show.html.erb b/app/views/student_work/_show.html.erb
index f6580659e..2aa14be71 100644
--- a/app/views/student_work/_show.html.erb
+++ b/app/views/student_work/_show.html.erb
@@ -1,72 +1,74 @@
-
-
-
- 上交时间:
- <%=format_time @work.created_at %>
-
+
+
+
+ 上交时间:
+ <%=format_time @work.created_at %>
+
- <% if !@is_teacher && @work.user == User.current && (@homework.homework_type != 1 || @homework.homework_detail_manual.comment_status == 1) %>
-
-
- <%= link_to("", student_work_path(@work),:method => 'delete', :confirm => l(:text_are_you_sure), :class => "pic_del") %>
-
-
- <%= link_to "",edit_student_work_path(@work),:class => "pic_edit"%>
-
- <% end%>
- <% if (@homework.homework_type != 1 || @homework.homework_detail_manual.comment_status == 3) && @work.user != User.current%>
-
-
- <%= render :partial => 'student_work_praise' %>
-
- <% end%>
-
-
-
-
-
-
- <% if @work.project%>
-
- 关联项目:
- <%= link_to( @work.project.name, project_path(@work.project.id), :class => "c_blue02" )%>
-
- <% end%>
-
- 内容:
-
- <%= text_format(@work.description) if @work.description%>
-
+ <% if @work.user == User.current && @homework.homework_detail_manual.comment_status == 1 %>
+
+
+ <%= link_to("", student_work_path(@work),:method => 'delete', :confirm => l(:text_are_you_sure), :class => "pic_del") %>
+
+
+ <%= link_to "",edit_student_work_path(@work),:class => "pic_edit"%>
+
+ <% end%>
+ <% if @homework.homework_detail_manual.comment_status == 3 && @work.user != User.current%>
+
+
+ <%= render :partial => 'student_work_praise' %>
+
+ <% end%>
-
-
- 附件:
- <% if @work.attachments.empty?%>
- 尚未提交附件
- <% else%>
-
- <%= render :partial => 'work_attachments', :locals => {:attachments => @work.attachments} %>
-
+
+
+
+ <% if @work.project%>
+
+ 关联项目:
+ <%= link_to( @work.project.name, project_path(@work.project.id), :class => "linkBlue" )%>
+
<% end%>
-
-
- <% if @is_teacher || (@homework.homework_type == 1 && @homework.homework_detail_manual.comment_status == 2 && @work.user != User.current )%>
-
-
- <%= render :partial => 'add_score',:locals => {:work => @work,:score => @score}%>
+
+ 内容:
+
+ <%= text_format(@work.description) if @work.description%>
- <% end%>
-
+
+
+
+ 附件:
+ <% if @work.attachments.empty?%>
+ 尚未提交附件
+ <% else%>
+
+ <%= render :partial => 'work_attachments', :locals => {:attachments => @work.attachments} %>
+
+ <% end%>
+
+
+
+ <% if @is_teacher || (@homework.homework_detail_manual.comment_status == 2 && @work.user != User.current )%>
+
+
+ <%= render :partial => 'add_score',:locals => {:work => @work,:score => @score}%>
+
+ <% end%>
+
+
+
-
- <%@work.student_works_scores.order("updated_at desc").each do |score|%>
-
- <%= render :partial => 'student_work_score',:locals => {:score => score}%>
-
- <% end%>
-
-
收起
-
-
\ No newline at end of file
+
+ <%@student_work_scores.each do |score|%>
+
+ <%= render :partial => 'student_work_score',:locals => {:score => score,:is_last => score == @student_work_scores.last}%>
+
+ <% end%>
+
+
+ 收起
+
+
\ No newline at end of file
diff --git a/app/views/student_work/_student_work_score.html.erb b/app/views/student_work/_student_work_score.html.erb
index 8d10853f8..c800ae8d0 100644
--- a/app/views/student_work/_student_work_score.html.erb
+++ b/app/views/student_work/_student_work_score.html.erb
@@ -1,24 +1,31 @@
-
+
<% show_real_name = @is_teacher || score.user == User.current || score.user.allowed_to?(:as_teacher,@course) %>
<%= link_to image_tag(url_to_avatar(show_real_name ? score.user : ""), :width => "34", :height => "34"), show_real_name ? user_path(score.user) : "javascript:void(0)",:class => "ping_pic fl" %>
-
- <%= link_to show_real_name ? score.user.show_name : "匿名", show_real_name ? user_path(score.user) : "javascript:void(0)", :title => show_real_name ? score.user.show_name : "匿评用户", :class => "c_blue fl" %>
-
(<%= student_work_score_role score%>)
+
+ <%= link_to show_real_name ? score.user.show_name : "匿名", show_real_name ? user_path(score.user) : "javascript:void(0)", :title => show_real_name ? score.user.show_name : "匿评用户", :class => "linkBlue fl" %>
+
+ (<%= student_work_score_role score%>)
+
评分:
-
<%= score.score%>分
-
回复
-
- <%=format_time score.updated_at %>
-
+
+ <%= score.score%>分
+
+
回复
+
+ <%=format_time score.updated_at %>
+
+
<%= score.comment%>
+
<%= render :partial => 'work_attachments', :locals => {:attachments => score.attachments} %>
+
- <%= render :partial => 'add_score_reply',:locals => {:score => score}%>
+ <%= render :partial => 'add_score_reply',:locals => {:score => score,:is_last => is_last}%>
@@ -27,6 +34,6 @@
<%= render :partial => 'jour_replay',:locals => {:jour => jour}%>
<% end%>
+
-
-
\ No newline at end of file
+
diff --git a/app/views/student_work/_student_work_title.html.erb b/app/views/student_work/_student_work_title.html.erb
deleted file mode 100644
index 24e6a1b37..000000000
--- a/app/views/student_work/_student_work_title.html.erb
+++ /dev/null
@@ -1,37 +0,0 @@
-
- 学号
-
-
- <%= link_to "姓名",@show_all ? student_work_index_path(:homework => @homework.id,:order => "name", :sort => @score, :name => @name, :group => @group) : "javascript:void(0)",:class => "f14 f_b c_dark fl"%>
- <% if @show_all && @order == "name"%>
- <%= link_to "",student_work_index_path(:homework => @homework.id,:order => "name", :sort => @score, :name => @name, :group => @group) ,:class => @score == 'desc' ? 'st_up' : 'st_down'%>
- <% end%>
-
-
- 作品名称
-
-
- <%= link_to "时间",@show_all ? student_work_index_path(:homework => @homework.id,:order => "created_at", :sort => @score, :name => @name, :group => @group) : "javascript:void(0)",:class => "f14 f_b c_dark fl"%>
- <% if @show_all && @order == "created_at"%>
- <%= link_to "",student_work_index_path(:homework => @homework.id,:order => "created_at", :sort => @score, :name => @name, :group => @group) ,:class => @score == 'desc' ? 'st_up' : 'st_down'%>
- <% end%>
-
-
- <%= link_to "教师",@show_all ? student_work_index_path(:homework => @homework.id,:order => "teacher_score", :sort => @score, :name => @name, :group => @group) : "javascript:void(0)",:class => "f14 f_b c_dark fl"%>
- <% if @show_all && @order == "teacher_score"%>
- <%= link_to "", student_work_index_path(:homework => @homework.id,:order => "teacher_score", :sort => @score, :name => @name, :group => @group) ,:class => @score == 'desc' ? 'st_up' : 'st_down'%>
- <% end%>
-
-
- <%= link_to "教辅",@show_all ? student_work_index_path(:homework => @homework.id,:order => "teaching_asistant_score", :sort => @score, :name => @name, :group => @group) : "javascript:void(0)",:class => "f14 f_b c_dark fl"%>
- <% if @show_all && @order == "teaching_asistant_score"%>
- <%= link_to "", student_work_index_path(:homework => @homework.id,:order => "teaching_asistant_score", :sort => @score, :name => @name, :group => @group) ,:class => @score == 'desc' ? 'st_up' : 'st_down'%>
-
- <% end%>
-
-
- <%= link_to "成绩",@show_all ? student_work_index_path(:homework => @homework.id,:order => "score", :sort => @score, :name => @name, :group => @group) : "javascript:void(0)",:class => "f14 f_b c_dark fl"%>
- <% if @show_all && @order == "score"%>
- <%= link_to "", student_work_index_path(:homework => @homework.id,:order => "score", :sort => @score, :name => @name, :group => @group) ,:class => @score == 'desc' ? 'st_up' : 'st_down'%>
- <% end%>
-
\ No newline at end of file
diff --git a/app/views/student_work/_work_attachments.html.erb b/app/views/student_work/_work_attachments.html.erb
index f303897bc..a75f68f70 100644
--- a/app/views/student_work/_work_attachments.html.erb
+++ b/app/views/student_work/_work_attachments.html.erb
@@ -1,8 +1,8 @@
<% attachments.each_with_index do |attachment,i| %>
- <%= link_to_short_attachment attachment, :class => 'link_file', :download => true -%>
- <%= link_to(' '.html_safe, attachment_path(attachment, :format => 'js'), :method => 'delete', :remote => true, :title => '删除', :class => 'remove-upload', :confirm => l(:text_are_you_sure)) if attachment.id && User.current == attachment.author %>
-
(<%= number_to_human_size attachment.filesize %>)
+ <%= link_to_short_attachment attachment, :class => 'link_file_a fl', :download => true -%>
+ <%= link_to(' '.html_safe, attachment_path(attachment, :format => 'js'), :method => 'delete', :remote => true, :title => '删除', :class => 'remove-upload fl', :confirm => l(:text_are_you_sure)) if attachment.id && User.current == attachment.author %>
+
(<%= number_to_human_size attachment.filesize %>)
<% end -%>
diff --git a/app/views/student_work/add_score.js.erb b/app/views/student_work/add_score.js.erb
index 1de92b51a..6cb5bd6d8 100644
--- a/app/views/student_work/add_score.js.erb
+++ b/app/views/student_work/add_score.js.erb
@@ -2,39 +2,16 @@ $("#add_student_score_<%= @work.id%>").html("<%= escape_javascript(render :parti
$('#score_<%= @work.id%>').peSlider({range: 'min'});
<% if @is_new%>
- $("#score_list_<%= @work.id%>").prepend("<%= escape_javascript(render :partial => 'student_work_score', :locals => {:score => @score}) %>
");
+ $("#score_list_<%= @work.id%>").find("div:last").find("ul").addClass("ping_line");
+ $("#score_list_<%= @work.id%>").prepend("<%= escape_javascript(render :partial => 'student_work_score', :locals => {:score => @score,:is_last => true}) %>
");
<% else %>
- $("#work_score_<%= @score.id%>").html("<%= escape_javascript(render :partial => 'student_work_score', :locals => {:score => @score}) %>");
+ $("#work_score_<%= @score.id%>").html("<%= escape_javascript(render :partial => 'student_work_score', :locals => {:score => @score,:is_last => @is_last}) %>");
<% end%>
$("#score_list_<%= @work.id%>").removeAttr("style");
<% if @is_teacher %>
- <% if @homework.homework_type == 1%>
- $("#student_work_<%= @work.id%>").replaceWith("<%= escape_javascript(render :partial => 'evaluation_student_work',:locals => {:student_work => @work}) %>");
- <% elsif @homework.homework_type == 2%>
- $("#student_work_<%= @work.id%>").replaceWith("<%= escape_javascript(render :partial => 'evaluation_student_work',:locals => {:student_work => @work}) %>");
- <% else%>
- $("#student_work_<%= @work.id%>").replaceWith("<%= escape_javascript(render :partial => 'student_work',:locals => {:student_work => @work}) %>");
- <% end%>
+ $("#student_work_<%= @work.id%>").replaceWith("<%= escape_javascript(render :partial => 'evaluation_un_work',:locals => {:student_work => @work}) %>");
<% else %>
$("#student_work_<%= @work.id%>").replaceWith("<%= escape_javascript(render :partial => 'evaluation_work',:locals => {:student_work => @work}) %>");
<% end%>
-
-
-$(function(){
- //匿评评分提示
- $(".student_score_info").bind("mouseover",function(e){
- $(this).find("div").show();
- });
- $(".student_score_info").bind("mouseout",function(e){
- $(this).find("div").hide();
- });
- //最终成绩提示
- $(".student_final_scor_info").bind("mouseover",function(e){
- $(this).find("div").show();
- });
- $(".student_final_scor_info").bind("mouseout",function(e){
- $(this).find("div").hide();
- });
-});
diff --git a/app/views/student_work/add_score_reply.js.erb b/app/views/student_work/add_score_reply.js.erb
index 28704630f..f21870cd5 100644
--- a/app/views/student_work/add_score_reply.js.erb
+++ b/app/views/student_work/add_score_reply.js.erb
@@ -1,4 +1,4 @@
-$("#add_score_reply_<%= @score.id%>").html("<%= escape_javascript(render :partial => 'add_score_reply', :locals => {:score => @score}) %>");
+$("#add_score_reply_<%= @score.id%>").html("<%= escape_javascript(render :partial => 'add_score_reply', :locals => {:score => @score,:is_last => @is_last}) %>");
<% if @status && @status == 1%>
$("#replay_histroy_<%= @score.id%>").prepend("<%= escape_javascript(render :partial => 'jour_replay', :locals => {:jour => @jour}) %>");
$("#add_score_reply_<%= @score.id%>").hide();
diff --git a/app/views/student_work/edit.html.erb b/app/views/student_work/edit.html.erb
index 6e36447d2..25a65f039 100644
--- a/app/views/student_work/edit.html.erb
+++ b/app/views/student_work/edit.html.erb
@@ -1,52 +1,62 @@
-
-
编辑作品
+
-
-
-
- <%= labelled_form_for @work,:html => { :multipart => true } do |f|%>
-
-
- * 作品名称 :
-
- 项目信息
-
-
-
-
-
-
+
-
- 关联项目 :
- <%= f.select :project,options_for_select(user_projects_option,@work.project_id), {},{:class => "bo02 mb10"} %>
-
-
+
-
-
- *
- 作品描述 :
-
-
-
-
-
-
- 添加附件 :
- <%= render :partial => 'attachments/new_form',:locals => {:container => @work} %>
-
-
-
- 提交作品
- <%= link_to "返 回".html_safe, student_work_index_path(:homework => @homework), :class => "blue_btn grey_btn fl c_white"%>
+
+
+
+
+ <%= labelled_form_for @work,:html => { :multipart => true } do |f|%>
+
+ 提示:作品名称和描述中不要出现真实的姓名信息
+
-
-
- <% end%>
-
-
+
+
+
+
+ <%= render :partial => 'users/user_homework_attachment', :locals => {:container => @work, :has_program=>false} %>
+
+
+
+
确定
+
或
+ <%= link_to "取消", student_work_index_path(:homework => @homework), :class => "fr mr10 mt3"%>
+
+
+ <% end%>
+
-
-
diff --git a/app/views/student_work/index.html.erb b/app/views/student_work/index.html.erb
index 0250a7eed..5398b7084 100644
--- a/app/views/student_work/index.html.erb
+++ b/app/views/student_work/index.html.erb
@@ -1,5 +1,12 @@
-
-
-
+ //设置评分规则
+ function set_score_rule(){
+ $('#ajax-modal').html('<%= escape_javascript(render :partial => 'student_work/set_score_rule',:locals => {:homework => @homework}) %>');
+ showModal('ajax-modal', '350px');
+ $('#ajax-modal').siblings().remove();
+ $('#ajax-modal').before("
" +
+ " ");
+ $('#ajax-modal').parent().css("top","25%").css("left","35%").css("position","fixed");
+ }
-
- 返 回 顶 部
-
-
-
-
-
+
-
-
-
-
- <%= link_to "所有作品(#{@stundet_works.count} )".html_safe,student_work_index_path(:homework => @homework.id), :class => "fl"%>
-
- <% if @show_all%>
-
- <%= select_tag(:late_penalty,options_for_select(course_group_list(@course),@group), {:class => "fl h22 w100 ml10"}) if(@is_teacher && course_group_list(@course).count > 0) %>
-
搜索
- <%= link_to("缺评情况",student_work_absence_penalty_student_work_index_path(:homework => @homework.id), :class => "student_work_search fl", :target => "_blank") if((@is_teacher || User.current.admin?) && @homework.homework_type == 1) %>
- <% end%>
+
+
+
\ No newline at end of file
diff --git a/app/views/student_work/new.html.erb b/app/views/student_work/new.html.erb
index c72f9d422..f9b242443 100644
--- a/app/views/student_work/new.html.erb
+++ b/app/views/student_work/new.html.erb
@@ -1,83 +1,104 @@
+
-
-
创建作品
+
+
-
-
-
- <%= form_for(@stundet_work,
- :html => { :multipart => true },
- :url => {:controller => 'student_work',
- :action => 'create',
- :homework => @homework.id
- }) do |f|%>
-
- <% if @homework.homework_type == 1%>
-
- 提示:匿评作业提交的作品,作品名称和描述中不能出现真实的姓名信息
-
- <% end%>
-
- * 作品名称 :
- <%= f.text_field "name", :required => true, :size => 60, :class => "bo fl", :maxlength => 200, :placeholder => "作品名称", :onkeyup => "regexStudentWorkName();" %>
- <% if @homework.homework_type != 2%>
-
- 项目信息
-
-
- <% end%>
-
-
-
-
-
- 选择项目 :
- <%= f.select :project_id,options_for_select(user_projects_option), {},{:class => "bo02 mb10"} %>
-
-
-
-
- *
- <%= @homework.homework_type == 2 ? "提交代码" : "作品描述"%>
- :
-
- <% if @homework.homework_type == 2 && @homework.homework_detail_programing%>
- <%= f.text_area "description", :class => "w620 hwork_txt h400", :placeholder => "作品描述不能为空", :onkeyup => "regexStudentWorkDescription();", :value => @homework.homework_detail_programing.language == "1" ? c_stantard_code_student : c_stantard_code_student_%>
- <% else %>
- <%= f.text_area "description", :class => "w620 hwork_txt", :placeholder => "作品描述不能为空", :onkeyup => "regexStudentWorkDescription();"%>
- <% end%>
-
-
-
-
- <% if @homework.homework_type != 2%>
-
- 添加附件 :
- <%= render :partial => 'attachments/new_form' %>
-
-
- <% end%>
-
- 提交作品
- <%= link_to "返 回".html_safe, student_work_index_path(:homework => @homework), :class => "blue_btn grey_btn fl c_white"%>
-
-
-
- <% end%>
+
+
+
-
\ No newline at end of file
+
+
+
+
+ <%= form_for(@student_work,
+ :html => { :multipart => true },
+ :url => {:controller => 'student_work',
+ :action => 'create',
+ :homework => @homework.id
+ }) do |f|%>
+
+ 提示:作品名称和描述中不要出现真实的姓名信息
+
+
+
+
+ <%= f.text_field "name", :required => true, :size => 60, :class => "InputBox W700", :maxlength => 200, :placeholder => "请简洁的概括作品的功能或特性", :onkeyup => "regexStudentWorkName();" %>
+
+
+
+
+ <%= f.text_area "description", :class => "InputBox W700 H150", :placeholder => "请介绍你的作品", :onkeyup => "regexStudentWorkDescription();"%>
+
+
+
+
+
+
+ <%= render :partial => 'users/user_homework_attachment', :locals => {:container => @student_work, :has_program=>false} %>
+
+
+
+
+
+
+ <%= select_tag :project_id, options_for_select(user_projects_option, @student_work.project_id), {:class => "InputBox W680 fl"} %>
+ <%#=link_to "", new_project_path, :class => "ml5 mt5 SetUpIcon fl", :title => "快速创建"%>
+
+
+
+
+
+
确定
+
或
+ <%= link_to "取消", user_homeworks_user_path(User.current.id), :class => "fr mr10 mt3"%>
+
+
+ <% end%>
+
+
\ No newline at end of file
diff --git a/app/views/student_work/show.js.erb b/app/views/student_work/show.js.erb
index 1c8874c2f..e6b99c146 100644
--- a/app/views/student_work/show.js.erb
+++ b/app/views/student_work/show.js.erb
@@ -1,11 +1,11 @@
-if($("#about_hwork_<%= @work.id%>").children().length > 0)
- {$("#about_hwork_<%= @work.id%>").html("");}
-else
- {
- <% if @homework.homework_type == 2%>
- $("#about_hwork_<%= @work.id%>").html("<%= escape_javascript(render :partial => 'programing_work_show') %>");
- <% else%>
- $("#about_hwork_<%= @work.id%>").html("<%= escape_javascript(render :partial => 'show') %>");
- <% end%>
- $('#score_<%= @work.id%>').peSlider({range: 'min'});
- }
\ No newline at end of file
+if($("#about_hwork_<%= @work.id%>").children().length > 0){
+ $("#about_hwork_<%= @work.id%>").html("");
+}
+else{
+ <% if @homework.homework_type == 2%>
+ $("#about_hwork_<%= @work.id%>").html("<%= escape_javascript(render :partial => 'programing_work_show') %>");
+ <% else%>
+ $("#about_hwork_<%= @work.id%>").html("<%= escape_javascript(render :partial => 'show') %>");
+ <% end%>
+ $('#score_<%= @work.id%>').peSlider({range: 'min'});
+}
\ No newline at end of file
diff --git a/app/views/system_messages/index.html.erb b/app/views/system_messages/index.html.erb
new file mode 100644
index 000000000..4ed40757b
--- /dev/null
+++ b/app/views/system_messages/index.html.erb
@@ -0,0 +1,3 @@
+<% @system_messages.each do |sm| %>
+
+<% end %>
diff --git a/app/views/tags/_tag_list.html.erb b/app/views/tags/_tag_list.html.erb
index b512f1ef3..49c9b2351 100644
--- a/app/views/tags/_tag_list.html.erb
+++ b/app/views/tags/_tag_list.html.erb
@@ -2,7 +2,8 @@
<% if @tags.size > 0 %>
<% @tags.each do |tag| %>
-
<%= link_to tag, :controller => "tags", :action => "index", :q => tag, :object_flag => object_flag, :obj_id => obj.id %>
+ <%#= link_to tag, :controller => "tags", :action => "index", :q => tag, :object_flag => object_flag, :obj_id => obj.id %>
+ <%= tag %>
<% case object_flag %>
<% when '10' %>
diff --git a/app/views/tags/update_tag_name.js.erb b/app/views/tags/update_tag_name.js.erb
new file mode 100644
index 000000000..b72b0c33f
--- /dev/null
+++ b/app/views/tags/update_tag_name.js.erb
@@ -0,0 +1,40 @@
+//本js使用的新的tag显示方法
+<% if @obj_flag == '3'%>
+$('#tags_show_issue').html('<%= escape_javascript(render :partial => 'tags/tag_name',
+ :locals => {:obj => @obj,:non_list_all => false,:object_flag => @obj_flag}) %>');
+//$('#put-tag-form-issue').hide();
+$('#name-issue').val("");
+<% elsif @obj_flag == '1'%>
+$('#tags_show').html('<%= escape_javascript(render :partial => 'tags/tag_user_new_name',
+ :locals => {:obj => @obj,:non_list_all => false,:object_flag => @obj_flag}) %>');
+$('#tags_name3').val("");
+<% elsif @obj_flag == '2'%>
+$('#tags_show').html('<%= escape_javascript(render :partial => 'tags/tag_project_new_name',
+ :locals => {:obj => @obj,:non_list_all => false,:object_flag => @obj_flag}) %>');
+$('#tags_name2').val("");
+<% elsif @obj_flag == '6'%>
+<%if @course%>
+$("#tags_show-<%=@obj.class%>-<%=@obj.id%>").empty();
+$("#tags_show-<%=@obj.class%>-<%=@obj.id%>").html('<%= escape_javascript(render :partial => 'tags/tag_list',
+ :locals => {:obj => @obj,:object_flag => @obj_flag,:select_tag_name => @select_tag_name}) %>');
+$("#files_tag").html("<%= escape_javascript(render :partial => "files/tag_yun", :locals => {:tag_list => @tag_list,:course => @course,:tag_name => @select_tag_name}) %>");
+<%else%>
+$("#tags_show-<%=@obj.class%>-<%=@obj.id%>").empty();
+$("#tags_show-<%=@obj.class%>-<%=@obj.id%>").html('<%= escape_javascript(render :partial => 'tags/course_attachment_tag_name',
+ :locals => {:obj => @obj,:non_list_all => false,:object_flag => @obj_flag}) %>');
+<%end%>
+
+$("#tags_name_<%=@obj.id%>").val("");
+$("#add_tag_<%=@obj.id%>").hide();
+<% elsif @obj_flag == '9'%>
+$('#tags_show').html('<%= escape_javascript(render :partial => 'tags/new_tag_name',
+ :locals => {:obj => @obj,:non_list_all => false,:object_flag => @obj_flag}) %>');
+$('#tags_name').val("");
+<% elsif @obj_flag == '10'%>
+//$("#put-tag-form-<%#=@obj.class%>-<%#=@obj.id%>").hide();
+<% else%>
+$('#tags_show').html('<%= escape_javascript(render :partial => 'tags/tag_name',
+ :locals => {:obj => @obj,:non_list_all => false,:object_flag => @obj_flag}) %>');
+$('#tags_name').val("");
+//$('#put-tag-form').hide();
+<% end %>
\ No newline at end of file
diff --git a/app/views/users/_course_attachment.html.erb b/app/views/users/_course_attachment.html.erb
index e0d04548b..41961f05b 100644
--- a/app/views/users/_course_attachment.html.erb
+++ b/app/views/users/_course_attachment.html.erb
@@ -1,11 +1,11 @@
-
+
- <%= link_to image_tag(url_to_avatar(activity.author), :width => "90", :height => "90"), user_path(activity.author_id), :alt => "用户头像" %>
+ <%= link_to image_tag(url_to_avatar(activity.author), :width => "50", :height => "50"), user_path(activity.author_id), :alt => "用户头像" %>
-
+
<% if activity.try(:author).try(:realname) == ' ' %>
<%= link_to activity.try(:author), user_path(activity.author_id), :class => "newsBlue mr15" %>
<% else %>
@@ -15,7 +15,7 @@
<%= link_to activity.course.name.to_s+"(课程名称)", course_path(activity.container_id), :class => "newsBlue ml15", :style=>"word-break:break-all" %>
-
+
diff --git a/app/views/users/_course_create.html.erb b/app/views/users/_course_create.html.erb
index b86f55385..b69e6ee86 100644
--- a/app/views/users/_course_create.html.erb
+++ b/app/views/users/_course_create.html.erb
@@ -1,11 +1,11 @@
-
+
-
+
-
尹教授 TO
+
-
+
diff --git a/app/views/users/_course_homework.html.erb b/app/views/users/_course_homework.html.erb
index a3d4992c5..58b29696c 100644
--- a/app/views/users/_course_homework.html.erb
+++ b/app/views/users/_course_homework.html.erb
@@ -1,37 +1,30 @@
-
+
- <%= link_to image_tag(url_to_avatar(activity.user), :width => "90", :height => "90"), user_path(activity.user_id), :alt => "用户头像" %>
+ <%= link_to image_tag(url_to_avatar(activity.user), :width => "50", :height => "50"), user_path(activity.user_id), :alt => "用户头像" %>
-
+
<% if activity.try(:user).try(:realname) == ' ' %>
- <%= link_to activity.try(:user), user_path(activity.user_id), :class => "newsBlue mr15" %>
+ <%= link_to activity.try(:user), user_path(activity.user_id,:host=>Setting.host_user), :class => "newsBlue mr15" %>
<% else %>
- <%= link_to activity.try(:user).try(:realname), user_path(activity.user_id), :class => "newsBlue mr15" %>
+ <%= link_to activity.try(:user).try(:realname), user_path(activity.user_id,:host=>Setting.host_user), :class => "newsBlue mr15" %>
<% end %> TO
- <%= link_to activity.course.name.to_s+" | 课程作业", course_path(activity.course_id), :class => "newsBlue ml15", :style=>"word-break:break-all" %>
+ <%= link_to activity.course.name.to_s+" | 课程作业", homework_common_index_path(:course => activity.course.id, :host=> Setting.host_course), :class => "newsBlue ml15"%>
-
- <%= link_to activity.name.to_s, student_work_index_path(:homework => activity.id), :class => "postGrey", :style=>"word-break:break-all" %>
+
+ <%= link_to activity.name.to_s, student_work_index_path(:homework => activity.id,:host=> Setting.host_course), :class => "postGrey"%>
- <%= link_to "提交("+activity.student_works.count.to_s+")", student_work_index_path(:homework => activity.id), :class=> "c_blue" %>
+ <%= student_work_activity_submit_status(homework: activity) %>
-
截止时间:<%= format_date(activity.end_time) %>
+
截止时间:<%= activity.end_time.to_s %>
-
- 作业描述:<%= activity.description.html_safe %>
+
+ <%= activity.description.html_safe %>
-
-
+
diff --git a/app/views/users/_course_journalsformessage.html.erb b/app/views/users/_course_journalsformessage.html.erb
index 90d5d05ee..12c082dfa 100644
--- a/app/views/users/_course_journalsformessage.html.erb
+++ b/app/views/users/_course_journalsformessage.html.erb
@@ -1,11 +1,11 @@
-
+
-
+
-
尹教授 TO
+
-
+
diff --git a/app/views/users/_course_message.html.erb b/app/views/users/_course_message.html.erb
index 05caa1f91..a58c10f8c 100644
--- a/app/views/users/_course_message.html.erb
+++ b/app/views/users/_course_message.html.erb
@@ -1,118 +1,120 @@
-
-
-
- <%= link_to image_tag(url_to_avatar(activity.author), :width => "90", :height => "90"), user_path(activity.author_id), :alt => "用户头像" %>
-
-
-
- <% if activity.try(:author).try(:realname) == ' ' %>
- <%= link_to activity.try(:author), user_path(activity.author_id), :class => "newsBlue mr15" %>
- <% else %>
- <%= link_to activity.try(:author).try(:realname), user_path(activity.author_id), :class => "newsBlue mr15" %>
- <% end %>
- TO
- <%= link_to activity.course.name.to_s+" | 课程讨论区", course_path(activity.course), :class => "newsBlue ml15 mr5", :style=>"word-break:break-all"%>
- <%#= link_to activity.course.name.to_s+"(课程讨论区)", course_path(activity.course), :class => "newsBlue ml15 mr5", :style=>"word-break:break-all"%>
-
-
- <% if activity.parent_id.nil? %>
- <%= link_to activity.subject.to_s.html_safe, course_boards_path(activity.course,:parent_id =>activity.id, :topic_id => activity.id), :class=> "postGrey", :style=>"word-break:break-all" %>
- <% else %>
- <%= link_to activity.parent.subject.to_s.html_safe, course_boards_path(activity.course,:parent_id =>activity.parent_id, :topic_id => activity.id), :class=> "postGrey", :style=>"word-break:break-all"%>
- <% end %>
-
-
-
发帖时间:<%= format_date(activity.created_on) %>
-
-
+
+
+
+ <%= link_to image_tag(url_to_avatar(activity.author), :width => "50", :height => "50"), user_path(activity.author_id,:host=>Setting.host_user), :alt => "用户头像" %>
+
+
+
+ <% if activity.try(:author).try(:realname) == ' ' %>
+ <%= link_to activity.try(:author), user_path(activity.author_id,:host=>Setting.host_user), :class => "newsBlue mr15" %>
+ <% else %>
+ <%= link_to activity.try(:author).try(:realname), user_path(activity.author_id,:host=>Setting.host_user), :class => "newsBlue mr15" %>
+ <% end %>
+ TO
+ <%= link_to activity.course.name.to_s+" | 课程讨论区", course_boards_path(activity.course,:host=> Setting.host_course), :class => "newsBlue ml15 mr5"%>
+
+
+ <% if activity.parent_id.nil? %>
+ <%= link_to activity.subject.to_s.html_safe, course_boards_path(activity.course,:parent_id =>activity.id, :topic_id => activity.id,:host=> Setting.host_course), :class=> "postGrey" %>
+ <% else %>
+ <%= link_to activity.parent.subject.to_s.html_safe, course_boards_path(activity.course,:parent_id =>activity.parent_id, :topic_id => activity.id,:host=> Setting.host_course), :class=> "postGrey"%>
+ <% end %>
+
+
+ 发帖时间:<%= format_time(activity.created_on) %>
+
-
帖子描述:
- <% if activity.parent_id.nil? %>
- <%= activity.content.to_s.html_safe%>
- <% else %>
- <%= activity.parent.content.to_s.html_safe%>
- <% end %>
-
-
-
-
-
-
+
+ <% if activity.parent_id.nil? %>
+ <%= activity.content.to_s.html_safe%>
+ <% else %>
+ <%= activity.parent.content.to_s.html_safe%>
+ <% end %>
+
+
-
-
+
+
-
-
- <% count=0 %>
-
回复(
- <% if activity.parent_id.nil? %>
- <% count=activity.replies_count%>
- <%=count %>
- <% else %>
- <% count=activity.parent.replies_count%>
- <%=count %>
+
+
+
+
+
+ <% count=0 %>
+
回复(
+ <% if activity.parent %>
+ <% count=activity.parent.children.count%>
+ <% else %>
+ <% count=activity.children.count%>
+ <% end %>
+ <%= count %>
+ )
+
<%#=format_date(activity.updated_on)%>
+ <%if count > 2 %>
+
+ <% end %>
+
+
+ <% activity= activity.parent ? activity.parent : activity%>
+ <% replies_all_i = 0 %>
+ <% if count > 0 %>
+
+
+ <% activity.children.reorder("created_on desc").each do |reply|%>
+ <% replies_all_i=replies_all_i+1 %>
+
+
+ <%= link_to image_tag(url_to_avatar(reply.author), :width => "33", :height => "33", :class =>"mt8"), user_path(reply.author_id,:host=>Setting.host_user), :alt => "用户头像" %>
+
+
+
+ <% if reply.try(:author).try(:realname) == ' ' %>
+ <%= link_to reply.try(:author), user_path(reply.author_id,:host=>Setting.host_user), :class => "newsBlue mr10 f14" %>
+ <% else %>
+ <%= link_to reply.try(:author).try(:realname), user_path(reply.author_id,:host=>Setting.host_user), :class => "newsBlue mr10 f14" %>
+ <% end %>
+ <%= format_time(reply.created_on) %>
+
+
+ <%= reply.content.html_safe %>
+
+
+
+
<% end %>
- )
-
<%#=format_date(activity.updated_on)%>
- <%if count>2 %>
-
- <% end %>
-
+
-
- <% activity= activity.parent_id.nil? ? activity:activity.parent%>
- <% replies_all_i = 0 %>
- <% unless activity.children.empty? %>
-
-
- <% activity.children.reorder("created_on desc").each do |reply|%>
- <% replies_all_i=replies_all_i+1 %>
-
-
- <%= link_to image_tag(url_to_avatar(reply.author), :width => "45", :height => "45"), user_path(reply.author_id), :alt => "用户头像" %>
-
-
-
- <% if reply.try(:author).try(:realname) == ' ' %>
- <%= link_to reply.try(:author), user_path(reply.author_id), :class => "newsBlue mr10 f14" %>
- <% else %>
- <%= link_to reply.try(:author).try(:realname), user_path(reply.author_id), :class => "newsBlue mr10 f14" %>
- <% end %>
- <%= format_date(reply.created_on) %>
- <%#= link_to(
- l(:button_delete),
- {:controller => 'messages', :action => 'destroy', :id => reply.id, :board_id => reply.board_id, :is_board => 'false'},
- :method => :post,
- :data => {:confirm => l(:text_are_you_sure)},
- :title => l(:button_delete),
- :class => 'replyGrey fr ml10'
- ) if reply.course_destroyable_by?(User.current) %>
-
-
-
<%= reply.content.html_safe %>
-
-
-
- <% end %>
-
-
- <% end %>
+
+
+
+
+
diff --git a/app/views/users/_course_news.html.erb b/app/views/users/_course_news.html.erb
index dbeb8d450..90680cf82 100644
--- a/app/views/users/_course_news.html.erb
+++ b/app/views/users/_course_news.html.erb
@@ -1,75 +1,54 @@
-
-
+
+
- <%= link_to image_tag(url_to_avatar(activity.author), :width => "90", :height => "90"), user_path(activity.author_id), :alt => "用户头像" %>
+ <%= link_to image_tag(url_to_avatar(activity.author), :width => "50", :height => "50"), user_path(activity.author_id), :alt => "用户头像" %>
-
+
<% if @ctivity.try(:author).try(:realname) == ' ' %>
<%= link_to activity.try(:author), user_path(activity.author_id), :class => "newsBlue mr15" %>
<% else %>
<%= link_to activity.try(:author).try(:realname), user_path(activity.author_id), :class => "newsBlue mr15" %>
<% end %> TO
- <%= link_to activity.course.name.to_s+" | 课程通知", course_path(activity.course), :class => "newsBlue ml15", :style => "word-break:break-all" %>
+ <%= link_to activity.course.name.to_s+" | 课程通知", course_news_index_path(activity.course), :class => "newsBlue ml15" %>
-
- <%= link_to activity.title.to_s, news_path(activity), :class => "postGrey", :style => "word-break:break-all" %>
+
+ <%= link_to activity.title.to_s, news_path(activity), :class => "postGrey" %>
-
-
发布时间:<%= format_date(activity.created_on) %>
+
+ 发布时间:<%= format_time(activity.created_on) %>
-
通知描述:<%= activity.description.html_safe %>
-
-
-
+
+ <%= activity.description.html_safe %>
- <% count=activity.comments_count %>
-
回复(<%= count %>)
+ <% count=activity.comments.count %>
+
+ 回复(<%= count %>)
+
<%#= format_date(activity.updated_on) %>
<%if count>2 %>
-
+
<% end %>
-
- <%#= render :partial => 'course_news_reply',:locals => { :contest => @contest, :journals => @jour, :state => false}%>
-
<% replies_all_i = 0 %>
- <% unless activity.comments.empty? %>
-
+ <% if count > 0 %>
+
<% activity.comments.reorder("created_on desc").each do |comment| %>
- <% replies_all_i=replies_all_i+1 %>
-
+ <% replies_all_i = replies_all_i + 1 %>
+
- <%= link_to image_tag(url_to_avatar(comment.author), :width => "45", :height => "45"), user_path(comment.author_id), :alt => "用户头像" %>
+ <%= link_to image_tag(url_to_avatar(comment.author), :width => "33", :height => "33", :class =>"mt8"), user_path(comment.author_id), :alt => "用户头像" %>
@@ -78,10 +57,7 @@
<% else %>
<%= link_to comment.try(:author).try(:realname), user_path(comment.author_id), :class => "newsBlue mr10 f14" %>
<% end %>
- <%= format_date(comment.created_on) %>
- <%#= link_to_if_authorized_course l(:button_delete), {:controller => 'comments', :action => 'destroy', :id => activity, :comment_id => comment},
- :data => {:confirm => l(:text_are_you_sure)}, :method => :delete, :title => l(:button_delete) %>
-
+ <%= format_time(comment.created_on) %>
<%= comment.comments.html_safe %>
@@ -90,6 +66,23 @@
<% end %>
- <% end %>
+ <% end %>
+
+
+
<%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), user_path(activity.author_id), :alt => "用户头像" %>
+
+
+ <%= form_for('new_form',:url => {:controller => 'comments', :action => 'create', :id => activity},:method => "post", :remote => true) do |f|%>
+
+
+
+
发送
+
+
+ <% end%>
+
+
+
+
\ No newline at end of file
diff --git a/app/views/users/_course_news_reply.html.erb b/app/views/users/_course_news_reply.html.erb
deleted file mode 100644
index c3f8571be..000000000
--- a/app/views/users/_course_news_reply.html.erb
+++ /dev/null
@@ -1,177 +0,0 @@
-
-<%= javascript_include_tag "/assets/kindeditor/kindeditor",'/assets/kindeditor/pasteimg' %>
-
-<% if @news.commentable? %>
-
-<% end %>
-
-
-
- <%= form_for('new_form', :method => :post,
- :url => {:controller => 'words', :action => 'leave_course_message'},:html => {:id=>'leave_message_form'}) do |f|%>
- <%= hidden_field_tag :asset_id,params[:asset_id],:required => false,:style => 'display:none' %>
-
-
- <% end %>
-
-
-
-
-
-
-
-
-
-
diff --git a/app/views/users/_course_poll.html.erb b/app/views/users/_course_poll.html.erb
index 97b3b759d..0b91a6ed3 100644
--- a/app/views/users/_course_poll.html.erb
+++ b/app/views/users/_course_poll.html.erb
@@ -1,20 +1,21 @@
<% has_commit = has_commit_poll?(activity.id ,User.current)%>
<% poll_name = activity.polls_name.empty? ? l(:label_poll_new) : activity.polls_name%>
+<% if ( activity.polls_status==2) %>
-
+
- <%= link_to image_tag(url_to_avatar(activity.user), :width => "90", :height => "90"), user_path(activity.user_id), :alt => "用户头像" %>
+ <%= link_to image_tag(url_to_avatar(activity.user), :width => "50", :height => "50"), user_path(activity.user_id), :alt => "用户头像" %>
-
+
<% if activity.try(:user).try(:realname) == ' ' %>
<%= link_to activity.try(:user), user_path(activity.user_id), :class => "newsBlue mr15" %>
<% else %>
<%= link_to activity.try(:user).try(:realname), user_path(activity.user_id), :class => "newsBlue mr15" %>
<% end %>
TO
- <%= link_to Course.find(activity.polls_group_id).name.to_s+" | 问卷", course_path(activity.polls_group_id), :class => "newsBlue ml15", :style=>"word-break:break-all" %>
+ <%= link_to Course.find(activity.polls_group_id).name.to_s+" | 问卷", poll_index_path(:polls_type => "Course", :polls_group_id => activity.polls_group_id), :class => "newsBlue ml15" %>
@@ -25,11 +26,11 @@
<%= link_to poll_name, poll_path(activity.id), :class => "postGrey"%>
<% end %>
-
-
发布时间:<%= format_date(activity.published_at) %>
+
+ 发布时间:<%= format_time(activity.published_at) %>
-
问卷描述:<%=activity.polls_description.html_safe.to_s%>
-
+
<%=activity.polls_description.html_safe.to_s%>
+
-
\ No newline at end of file
+
+<% end %>
\ No newline at end of file
diff --git a/app/views/users/_influence_new_score_index.html.erb b/app/views/users/_influence_new_score_index.html.erb
index 505785351..f99cdee19 100644
--- a/app/views/users/_influence_new_score_index.html.erb
+++ b/app/views/users/_influence_new_score_index.html.erb
@@ -5,4 +5,4 @@
<%= l('userscore.active.update_issues')%> * 2 = <%= option_num.issue_done_ratio %> * 2 = <%= option_num.issue_done_ratio * 2 %>
<%= l('userscore.active.release_issues')%> * 4 = <%= option_num.post_issue %> * 4 = <%= option_num.post_issue * 4 %>
<%= l('userscore.active.release_messages')%> * 1 = <%= option_num.memo %> * 2 = <%= option_num.memo * 2 %>
-
<%= l(:label_user_score_of_active)%> = <%= option_num.changeset * 4 %> + <%= option_num.document * 4 %> + <%= option_num.attachment * 4 %> + <%= option_num.issue_done_ratio * 2 %> + <%= option_num.post_issue * 4 %> + <%= option_num.memo * 2 %> = <%= active(option_num) %>
\ No newline at end of file
+
<%= l(:label_user_score_of_active)%> = <%= option_num.changeset * 4 %> + <%= option_num.document * 4 %> + <%= option_num.attachment * 4 %> + <%= option_num.issue_done_ratio * 2 %> + <%= option_num.post_issue * 4 %> + <%= option_num.memo * 2 %> = <%= project_active(option_num) %>
\ No newline at end of file
diff --git a/app/views/users/_project_attachment.html.erb b/app/views/users/_project_attachment.html.erb
index 731737610..5215e9ccc 100644
--- a/app/views/users/_project_attachment.html.erb
+++ b/app/views/users/_project_attachment.html.erb
@@ -1,11 +1,11 @@
-
+
-
+
-
尹教授 TO
+
-
+
diff --git a/app/views/users/_project_create.html.erb b/app/views/users/_project_create.html.erb
index 913aeb3d0..862087e68 100644
--- a/app/views/users/_project_create.html.erb
+++ b/app/views/users/_project_create.html.erb
@@ -1,11 +1,11 @@
-
+
-
+
-
尹教授 TO
+
-
+
diff --git a/app/views/users/_project_document.html.erb b/app/views/users/_project_document.html.erb
index 4a7fa1f4d..e6067e860 100644
--- a/app/views/users/_project_document.html.erb
+++ b/app/views/users/_project_document.html.erb
@@ -1,11 +1,11 @@
-
+
-
+
-
尹教授 TO
+
-
+
diff --git a/app/views/users/_project_issue.html.erb b/app/views/users/_project_issue.html.erb
index 4badcff42..07f7c452b 100644
--- a/app/views/users/_project_issue.html.erb
+++ b/app/views/users/_project_issue.html.erb
@@ -1,126 +1,110 @@
-
-
+
+
- <%= link_to image_tag(url_to_avatar(activity.author), :width => "90", :height => "90"), user_path(activity.author_id), :alt => "用户头像" %>
+ <%= link_to image_tag(url_to_avatar(activity.author), :width => "50", :height => "50"), user_path(activity.author_id), :alt => "用户头像" %>
-
+
<% if activity.try(:author).try(:realname) == ' ' %>
<%= link_to activity.try(:author), user_path(activity.author_id), :class => "newsBlue mr15" %>
<% else %>
<%= link_to activity.try(:author).try(:realname), user_path(activity.author_id), :class => "newsBlue mr15" %>
<% end %> TO
- <%= link_to activity.project.name.to_s+" | 项目缺陷", project_path(activity.project), :class => "newsBlue ml15", :style=>"word-break:break-all" %>
-
-
- <%= link_to activity.subject.to_s, issue_path(activity), :class => "postGrey", :style=>"word-break:break-all" %>
- <%= get_issue_priority(activity.priority_id)[1] %>
+ <%= link_to activity.project.name.to_s+" | 项目缺陷", project_issues_path(activity.project), :class => "newsBlue ml15"%>
+
+
+ <%= link_to activity.subject.to_s, issue_path(activity), :class => "postGrey" %>
+
+ <%= get_issue_priority(activity.priority_id)[1] %>
+
指派给
<% unless activity.assigned_to_id.nil? %>
- <% if activity.try(:assigned_to).try(:realname) == ' ' %>
- <%= link_to activity.try(:assigned_to), user_path(activity.assigned_to_id), :class => "newsBlue mr15" %>
- <% else %>
- <%= link_to activity.try(:assigned_to).try(:realname), user_path(activity.assigned_to_id), :class => "newsBlue mr15" %>
- <% end %>
+ <% if activity.try(:assigned_to).try(:realname) == ' ' %>
+ <%= link_to activity.try(:assigned_to), user_path(activity.assigned_to_id), :class => "newsBlue mr15" %>
+ <% else %>
+ <%= link_to activity.try(:assigned_to).try(:realname), user_path(activity.assigned_to_id), :class => "newsBlue mr15" %>
+ <% end %>
<% end %>
-
时间:<%=format_date(activity.created_on) %>
+
+ 时间:
+ <%=format_time(activity.created_on) %>
+
+
+
+ <% if activity.description? %>
+ <%= textAreailizable activity, :description, :attachments => activity.attachments %>
+ <% end %>
+ <%#= activity.description.html_safe %>
-
缺陷描述:<%= activity.description.html_safe %>
<% if activity.attachments.any? %>
<% activity.attachments.each do |attachment| %>
-
+
- <%= link_to_short_attachment attachment, :class => 'homepagePostFileAtt newsBlue', :download => true -%>
+ <%= link_to_short_attachment attachment,:length=> 58, :class => 'homepagePostFileAtt newsBlue', :download => true -%>
- <% if attachment.is_text? %>
- <%= link_to image_tag('magnifier.png'),
- :controller => 'attachments',
- :action => 'show',
- :id => attachment,
- :filename => attachment.filename %>
- <% end %>
- (
+ <% if attachment.is_text? %>
+ <%= link_to image_tag('magnifier.png'),
+ :controller => 'attachments',
+ :action => 'show',
+ :id => attachment,
+ :filename => attachment.filename %>
+ <% end %>
+ (
<%= number_to_human_size attachment.filesize %>)
-
+
<% end %>
<% end %>
-
-
- <% count=activity.journals.count %>
-
回复(<%= count %>)
+ <% count = activity.journals.count %>
+
回复(<%= count %>)
<%#= format_date(activity.updated_on) %>
- <% if count>2 %>
+ <% if count > 2 %>
+
+ 展开更多
+
+
<% end %>
-
-
+
<% replies_all_i = 0 %>
- <% unless activity.journals.empty? %>
-
+ <% if count > 0 %>
+
<% activity.journals.reorder("created_on desc").each do |reply| %>
- <% replies_all_i=replies_all_i+1 %>
-
+ <% replies_all_i=replies_all_i + 1 %>
+
- <%= link_to image_tag(url_to_avatar(reply.user), :width => "45", :height => "45"), user_path(reply.user_id), :alt => "用户头像" %>
+ <%= link_to image_tag(url_to_avatar(reply.user), :width => "33", :height => "33", :class =>"mt8"), user_path(reply.user_id), :alt => "用户头像" %>
<% if reply.try(:user).try(:realname) == ' ' %>
<%= link_to reply.try(:user), user_path(reply.user_id), :class => "newsBlue mr10 f14" %>
- <% else %>
+ <% else %>
<%= link_to reply.try(:user).try(:realname), user_path(reply.user_id), :class => "newsBlue mr10 f14" %>
<% end %>
- <%= format_date(reply.created_on) %>
-
-
+ <%= format_time(reply.created_on) %>
+
+
+ <% if reply.details.any? %>
+ <% details_to_strings(reply.details).each do |string| %>
+
<%= string %>
+ <% end %>
+ <% end %>
+
<%= reply.notes.html_safe %>
- <% if reply.details.any? %>
- <% details_to_strings(reply.details).each do |string| %>
-
<%= string %>
- <% end %>
- <% else %>
-
<%= reply.notes.html_safe %>
- <% end %>
@@ -128,5 +112,37 @@
<% end %>
+
+
+
<%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), user_path(activity.author_id), :alt => "用户头像" %>
+
+
+ <%= form_for('new_form',:url => add_journal_issue_path(activity.id),:method => "post", :remote => true) do |f|%>
+
+
+
+
发送
+
+
+ <% end%>
+
+
+
+
+
-
\ No newline at end of file
+
+
\ No newline at end of file
diff --git a/app/views/users/_project_journal.html.erb b/app/views/users/_project_journal.html.erb
index cc5036ede..692354f9f 100644
--- a/app/views/users/_project_journal.html.erb
+++ b/app/views/users/_project_journal.html.erb
@@ -1,11 +1,11 @@
-
+
-
+
-
尹教授 TO
+
-
+
diff --git a/app/views/users/_project_message.html.erb b/app/views/users/_project_message.html.erb
index e9fdb87e1..d734ad982 100644
--- a/app/views/users/_project_message.html.erb
+++ b/app/views/users/_project_message.html.erb
@@ -1,89 +1,68 @@
-
-
+
+
- <%= link_to image_tag(url_to_avatar(activity.author), :width => "90", :height => "90"), user_path(activity.author_id), :alt => "用户头像" %>
+ <%= link_to image_tag(url_to_avatar(activity.author), :width => "50", :height => "50"), user_path(activity.author_id), :alt => "用户头像" %>
-
+
<% if activity.try(:author).try(:realname) == ' ' %>
<%= link_to activity.try(:author), user_path(activity.author_id), :class => "newsBlue mr15" %>
<% else %>
<%= link_to activity.try(:author).try(:realname), user_path(activity.author_id), :class => "newsBlue mr15" %>
<% end %>
TO
- <%= link_to activity.project.name.to_s+" | 项目讨论区",project_path(activity.project), :class => "newsBlue ml15 mr5", :style=>"word-break:break-all"%>
+ <%= link_to activity.project.name.to_s+" | 项目讨论区",project_boards_path(activity.project), :class => "newsBlue ml15 mr5"%>
-
+
<% if activity.parent_id.nil? %>
- <%= link_to activity.subject.to_s.html_safe, project_boards_path(activity.project,:parent_id =>activity.id, :topic_id => activity.id), :class=> "postGrey", :style=>"word-break:break-all" %>
+ <%= link_to activity.subject.to_s.html_safe, project_boards_path(activity.project,:parent_id =>activity.id, :topic_id => activity.id), :class=> "postGrey"
+ %>
<% else %>
- <%= link_to activity.parent.subject.to_s.html_safe, project_boards_path(activity.project,:parent_id =>activity.parent_id, :topic_id => activity.id), :class=> "postGrey", :style=>"word-break:break-all"%>
+ <%= link_to activity.parent.subject.to_s.html_safe, project_boards_path(activity.project,:parent_id =>activity.parent_id, :topic_id => activity.id), :class=> "postGrey"
+ %>
<% end %>
-
-
时间:<%= format_date(activity.created_on) %>
+
+ 时间:<%= format_time(activity.created_on) %>
-
帖子描述:
+
<% if activity.parent_id.nil? %>
<%= activity.content.to_s.html_safe%>
<% else %>
<%= activity.parent.content.to_s.html_safe%>
<% end %>
-
-
<% count=0 %>
-
回复(
- <% if activity.parent_id.nil? %>
- <% count=activity.replies_count%>
- <%=count %>
+
+ <% count = 0 %>
+
回复(
+ <% if activity.parent %>
+ <% count=activity.parent.children.count%>
<% else %>
- <% count=activity.parent.replies_count%>
- <%=count %>
+ <% count=activity.children.count%>
<% end %>
+ <%=count %>
)
<%#=format_date(activity.updated_on)%>
<%if count>2 %>
-
+
<% end %>
-
-
-
+
<% activity= activity.parent_id.nil? ? activity : activity.parent %>
<% replies_all_i = 0 %>
- <% unless activity.children.empty? %>
-
+ <% if count > 0 %>
+
<% activity.children.reorder("created_on desc").each do |reply| %>
<% replies_all_i=replies_all_i+1 %>
-
+
- <%= link_to image_tag(url_to_avatar(reply.author), :width => "45", :height => "45"), user_path(reply.author_id), :alt => "用户头像" %>
+ <%= link_to image_tag(url_to_avatar(reply.author), :width => "33", :height => "33", :class =>"mt8"), user_path(reply.author_id), :alt => "用户头像" %>
@@ -92,16 +71,7 @@
<% else %>
<%= link_to reply.try(:author).try(:realname), user_path(reply.author_id), :class => "newsBlue mr10 f14" %>
<% end %>
- <%= format_date(reply.created_on) %>
- <%#= link_to(
- l(:button_delete),
- {:controller => 'messages', :action => 'destroy', :id => reply.id, :board_id => reply.board_id, :is_board => 'false'},
- :method => :post,
- :data => {:confirm => l(:text_are_you_sure)},
- :title => l(:button_delete),
- :class => 'replyGrey fr ml10'
- ) if reply.course_destroyable_by?(User.current) %>
-
+ <%= format_time(reply.created_on) %>
<%= reply.content.html_safe %>
@@ -111,5 +81,25 @@
<% end %>
+
+
+
<%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), user_path(activity.author_id), :alt => "用户头像" %>
+
+
+ <%= form_for('new_form',:url => {:controller=>'messages',:action => 'reply', :id => activity.id, :board_id => activity.board_id, :is_board => 'true'},:method => "post", :remote => true) do |f|%>
+
+
+
+
+
发送
+
+
+ <% end%>
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/views/users/_project_news.html.erb b/app/views/users/_project_news.html.erb
index 9e4dfaf24..a347ffd3a 100644
--- a/app/views/users/_project_news.html.erb
+++ b/app/views/users/_project_news.html.erb
@@ -1,11 +1,11 @@
-
+
-
+
-
尹教授 TO
+
-
+
diff --git a/app/views/users/_resource_share_for_project_popup.html.erb b/app/views/users/_resource_share_for_project_popup.html.erb
index e5d1732e4..40bbd5e7c 100644
--- a/app/views/users/_resource_share_for_project_popup.html.erb
+++ b/app/views/users/_resource_share_for_project_popup.html.erb
@@ -30,11 +30,11 @@
<% if !projects.empty? %>
<% projects.each do |project| %>
-
diff --git a/app/views/users/_resource_share_popup.html.erb b/app/views/users/_resource_share_popup.html.erb
index 2fc515b4a..ed2ed44a6 100644
--- a/app/views/users/_resource_share_popup.html.erb
+++ b/app/views/users/_resource_share_popup.html.erb
@@ -30,11 +30,11 @@
<% if !courses.empty? %>
<% courses.each do |course| %>
-
diff --git a/app/views/users/_resources_list.html.erb b/app/views/users/_resources_list.html.erb
index b41b9f28f..f134e8f42 100644
--- a/app/views/users/_resources_list.html.erb
+++ b/app/views/users/_resources_list.html.erb
@@ -1,22 +1,25 @@
<% if attachments.nil? || attachments.empty? %>
+
+
+
<% else %>
<% attachments.each do |attach| %>
-
- <% end %>
+
+ <% end %>
<% end %>
diff --git a/app/views/users/_score_new_index.html.erb b/app/views/users/_score_new_index.html.erb
index e50b240fd..c1d23d0ed 100644
--- a/app/views/users/_score_new_index.html.erb
+++ b/app/views/users/_score_new_index.html.erb
@@ -5,8 +5,8 @@
<%= l(:label_user_score_of_skill)%> + <%= l(:label_user_score_of_active) %>
= <%= format("%.2f" ,collaboration(option_num)).to_i %> + <%= format("%.2f" , influence(option_num) ).to_i %>
- + <%= "(" if skill(option_num) < 0 %> <%= format("%.2f" , skill(option_num)).to_i %> <%= ")" if skill(option_num) < 0 %> + <%= format("%.2f" , active(option_num)).to_i %>
- <% if (format("%.2f" ,collaboration(option_num)).to_i + format("%.2f" , influence(option_num) ).to_i + format("%.2f" , skill(option_num)).to_i + format("%.2f" , active(option_num)).to_i) < 0 %>
+ + <%= "(" if skill(option_num) < 0 %> <%= format("%.2f" , skill(option_num)).to_i %> <%= ")" if skill(option_num) < 0 %> + <%= format("%.2f" ,project_active(option_num)).to_i %>
+ <% if (format("%.2f" ,collaboration(option_num)).to_i + format("%.2f" , influence(option_num) ).to_i + format("%.2f" , skill(option_num)).to_i + format("%.2f" , project_active(option_num)).to_i) < 0 %>
<%= l(:label_score_less_than_zero) %>
<% else %>
= <%= format("%.2f" ,option_num.total_score).to_i %>
diff --git a/app/views/users/_show_new_score.html.erb b/app/views/users/_show_new_score.html.erb
index 2081c38d6..4e89506a6 100644
--- a/app/views/users/_show_new_score.html.erb
+++ b/app/views/users/_show_new_score.html.erb
@@ -68,7 +68,7 @@
<%= link_to l(:label_user_score_of_active), "javascript:void(0)", :onclick => "show_div('influence_new_score_index')" %> :
- <%= format("%.2f" , active(option_num)).to_i %>
+ <%= format("%.2f" , project_active(option_num)).to_i %>
diff --git a/app/views/users/_show_user_resource.html.erb b/app/views/users/_show_user_resource.html.erb
index a27a51d65..24d81a787 100644
--- a/app/views/users/_show_user_resource.html.erb
+++ b/app/views/users/_show_user_resource.html.erb
@@ -1,26 +1,67 @@
-
\ No newline at end of file
+ <% end %>
+
diff --git a/app/views/users/_user_activities.html.erb b/app/views/users/_user_activities.html.erb
index b43d0d54e..ba9e970b6 100644
--- a/app/views/users/_user_activities.html.erb
+++ b/app/views/users/_user_activities.html.erb
@@ -1,105 +1,79 @@
-<% user_activities.each do |user_activity|
- unless user_activities.nil? %>
-
- <% act= user_activity.act unless user_activity.act_type == "ProjectCreateInfo" %>
- <% case user_activity.container_type.to_s %>
- <% when 'Course' %>
- <% if act %>
- <% case user_activity.act_type.to_s %>
- <% when 'HomeworkCommon' %>
- <%= render :partial => 'course_homework', :locals => {:activity => act,:user_activity =>user_activity} %>
- <% when 'News' %>
- <%= render :partial => 'course_news', :locals => {:activity => act,:user_activity =>user_activity} %>
- <% when 'Message'%>
- <%= render :partial => 'course_message', :locals => {:activity => act,:user_activity =>user_activity} %>
- <%# when 'Course'%>
- <%#= render :partial => 'course_create', :locals => {:activity => act,:user_activity =>user_activity} %>
- <%# when 'Attachment' %>
- <%#= render :partial => 'course_attachment', :locals => {:activity => act, :user_activity => user_activity} %>
- <%# when 'JournalsForMessage' %>
- <%#= render :partial => 'course_journalsformessage', :locals => {:activity => act, :user_activity => user_activity} %>
- <% when 'Poll' %>
- <%= render :partial => 'course_poll', :locals => {:activity => act, :user_activity => user_activity} %>
- <% end %>
- <% end %>
- <% when 'Project' %>
- <% if act %>
- <% case user_activity.act_type.to_s %>
- <% when 'Issue' %>
- <%= render :partial => 'project_issue', :locals => {:activity => act,:user_activity =>user_activity} %>
- <% when 'Message' %>
- <%= render :partial => 'project_message', :locals => {:activity => act,:user_activity =>user_activity} %>
- <%# when 'Journal' %>
- <%#= render :partial => 'project_journal', :locals => {:activity => act,:user_activity =>user_activity} %>
- <%# when 'News' %>
- <%#= render :partial => 'project_news', :locals => {:activity => act,:user_activity =>user_activity} %>
- <%# when 'Document' %>
- <%#= render :partial => 'project_document', :locals => {:activity => act,:user_activity =>user_activity} %>
- <%# when 'Attachment' %>
- <%#= render :partial => 'project_attachment', :locals => {:activity => act,:user_activity =>user_activity} %>
- <%# when 'ProjectCreateInfo' %>
- <%#= render :partial => 'project_create', :locals => {:activity => act,:user_activity =>user_activity} %>
- <% end %>
- <% end %>
- <% end %>
- <% end %>
-<% end %>
-
\ No newline at end of file
+<%= javascript_include_tag "/assets/kindeditor/kindeditor",'/assets/kindeditor/pasteimg',"init_activity_KindEditor" %>
+
+<% first_user_activity = user_activities.first.id unless user_activities.first.nil? %>
+<% user_activities.each do |user_activity|
+ if user_activities %>
+
+ <% act= user_activity.act unless user_activity.act_type == "ProjectCreateInfo" %>
+ <% case user_activity.container_type.to_s %>
+ <% when 'Course' %>
+ <% if act %>
+ <% case user_activity.act_type.to_s %>
+ <% when 'HomeworkCommon' %>
+ <%= render :partial => 'course_homework', :locals => {:activity => act,:user_activity_id =>user_activity.id,:first_user_activity =>first_user_activity,:page => page} %>
+ <% when 'News' %>
+ <%= render :partial => 'course_news', :locals => {:activity => act,:user_activity_id =>user_activity.id,:first_user_activity =>first_user_activity,:page => page} %>
+ <% when 'Message'%>
+ <%= render :partial => 'course_message', :locals => {:activity => act,:user_activity_id =>user_activity.id,:first_user_activity =>first_user_activity,:page => page} %>
+ <% when 'Poll' %>
+ <%= render :partial => 'course_poll', :locals => {:activity => act, :user_activity_id => user_activity.id,:first_user_activity =>first_user_activity,:page => page} %>
+ <% end %>
+ <% end %>
+ <% when 'Project' %>
+ <% if act %>
+ <% case user_activity.act_type.to_s %>
+ <% when 'Issue' %>
+ <%= render :partial => 'project_issue', :locals => {:activity => act,:user_activity_id =>user_activity.id,:first_user_activity =>first_user_activity,:page => page} %>
+ <% when 'Message' %>
+ <%= render :partial => 'project_message', :locals => {:activity => act,:user_activity_id =>user_activity.id,:first_user_activity =>first_user_activity,:page => page} %>
+ <% end %>
+ <% end %>
+ <% end %>
+ <% end %>
+<% end %>
+
+<% if user_activities.count == 10%>
+
展开更多<%=link_to "", user_activities_path(@user.id,:type => type,:page => page),:id => "more_activities_link",:remote => "true",:class => "none" %>
+ <%#= link_to "点击展开更多",user_activities_path(@user.id,:type => type,:page => page),:id => "show_more_activities",:remote => "true",:class => "loadMore mt10 f_grey"%>
+<% end%>
+
+
\ No newline at end of file
diff --git a/app/views/users/_user_homework_attachment.html.erb b/app/views/users/_user_homework_attachment.html.erb
index 1613b144e..9b7c6c06a 100644
--- a/app/views/users/_user_homework_attachment.html.erb
+++ b/app/views/users/_user_homework_attachment.html.erb
@@ -46,8 +46,13 @@
-
上传附件
- <%#= link_to "资源库", user_import_resource_user_path(User.current.id),:class => "FilesBtn fl mr15 mt3",:remote => true%>
+
+
上传附件
+ <%= link_to "资源库",{:controller => 'users',:action=>'user_import_resource',:id=>User.current.id,:homework_id=>container.id},:class => "FilesBtn fl mt3 mr20",:remote => true%>
+ <% if defined?(has_program) && has_program %>
+
编程
+
+ <% end %>
<% content_for :header_tags do %>
diff --git a/app/views/users/_user_homework_form.html.erb b/app/views/users/_user_homework_form.html.erb
index 8340306e0..6e07e7122 100644
--- a/app/views/users/_user_homework_form.html.erb
+++ b/app/views/users/_user_homework_form.html.erb
@@ -1,44 +1,93 @@
-<%= javascript_include_tag "/assets/kindeditor/kindeditor" %>
+<% content_for :header_tags do %>
+ <%= javascript_include_tag "/assets/kindeditor/kindeditor",'/assets/kindeditor/pasteimg'%>
+ <%= javascript_include_tag 'homework','baiduTemplate' %>
+
+<% end %>
+
+
+
+
+
+ <% if edit_mode %>
+ <%= f.kindeditor :description, :editor_id => 'homework_description_editor', :height => "150px", :owner_id => homework.id, :owner_type => OwnerTypeHelper::HOMEWORKCOMMON %>
+ <% else %>
+ <%= hidden_field_tag :asset_id, params[:asset_id], :required => false, :style => 'display:none' %>
+ <%= f.kindeditor :description, :editor_id => 'homework_description_editor', :height => "150px" %>
+ <% end %>
+
+
+
+
+
+ <%= select_tag :course_id, options_for_select(get_as_teacher_courses(User.current), homework.course_id), {:class => "InputBox w709",:value => "请选择发布作业的课程"} %>
+
+
+
+
+
+
+ <%= render :partial => 'users/user_homework_attachment', :locals => {:container => homework, :has_program=>!(edit_mode && homework.homework_type == 1)} %>
+
+
+
+
+ <% if edit_mode %>
+
确定
+
或
+ <%= link_to "取消",user_homeworks_user_path(User.current.id),:class => "fr mr10 mt3"%>
+ <% else %>
+
发送
+
或
+
取消
+ <% end %>
+
+
+
+
-
- <% if edit_mode %>
- <%= f.kindeditor :description,:editor_id => 'homework_description_editor',:height => "150px",:owner_id => homework.id,:owner_type =>OwnerTypeHelper::HOMEWORKCOMMON %>
- <% else %>
- <%= hidden_field_tag :asset_id,params[:asset_id],:required => false,:style => 'display:none' %>
- <%= f.kindeditor :description,:editor_id => 'homework_description_editor',:height => "150px" %>
- <% end %>
-
+
+
+
-
- <%= render :partial => 'users/user_homework_attachment', :locals => { :container => homework } %>
+
-
-
-
\ No newline at end of file
+
+
diff --git a/app/views/users/_user_homework_list.html.erb b/app/views/users/_user_homework_list.html.erb
index fa9b1537a..c6e827291 100644
--- a/app/views/users/_user_homework_list.html.erb
+++ b/app/views/users/_user_homework_list.html.erb
@@ -3,7 +3,7 @@
- <%=link_to image_tag(url_to_avatar(homework_common.user),width:"90px", height: "90px"), user_activities_path(homework_common.user.id)%>
+ <%=link_to image_tag(url_to_avatar(homework_common.user),width:"50px", height: "50px"), user_activities_path(homework_common.user.id)%>
@@ -11,14 +11,36 @@
TO
<%= link_to homework_common.course.name, course_path(homework_common.course_id), :class => "newsBlue ml15"%>
-
+
<%= link_to homework_common.name,student_work_index_path(:homework => homework_common.id),:class => "postGrey"%>
-
+
+ <% if homework_common.homework_detail_manual.comment_status == 1%>
+
未开启匿评
+ <% elsif homework_common.homework_detail_manual.comment_status == 2%>
+
匿评中
+ <% elsif homework_common.homework_detail_manual.comment_status == 3%>
+
匿评已结束
+ <% end%>
<%= user_for_homework_common homework_common,is_teacher %>
+ <% if homework_common.homework_type == 2 && is_teacher%>
+
+ <%= link_to "模拟答题", new_user_commit_homework_users_path(homework_id: homework_common.id, is_test: true), class: 'c_blue test-program-btn', title: '教师可以通过模拟答题设置作业的标准答案' %>
+
+ <% end %>
+ <% if homework_common.homework_type == 2%>
+
+ 语言:
+ <% if homework_common.homework_detail_programing.language.to_i == 1%>
+ C
+ <% elsif homework_common.homework_detail_programing.language.to_i == 2%>
+ C++
+ <% end%>
+
+ <% end %>
<%= l(:label_end_time)%>:<%= homework_common.end_time%>
@@ -30,8 +52,8 @@
<%= render :partial => 'student_work/work_attachments', :locals => {:attachments => homework_common.attachments} %>
- <%# if is_teacher%>
- <% if false%>
+ <% if is_teacher%>
+ <%# if false%>
@@ -42,6 +64,9 @@
<%= link_to(l(:label_bid_respond_delete), homework_common_path(homework_common),:method => 'delete', :confirm => l(:text_are_you_sure), :class => "postOptionLink") %>
+
+ <%= homework_anonymous_comment homework_common %>
+
@@ -52,5 +77,6 @@
<% end%>
-
-
\ No newline at end of file
+<% if homework_commons.count == 10%>
+ <%= link_to "加载更多",user_homeworks_user_path(User.current.id,:page => page),:id => "user_show_more_homework",:remote => "true",:class => "loadMore f_grey"%>
+<% end%>
\ No newline at end of file
diff --git a/app/views/users/_user_jours.html.erb b/app/views/users/_user_jours.html.erb
index 9d7a601d5..75a7d0fda 100644
--- a/app/views/users/_user_jours.html.erb
+++ b/app/views/users/_user_jours.html.erb
@@ -8,7 +8,7 @@
div.ke-toolbar .ke-outline{border:none;}
div.respond-form .reply_btn{margin-left:565px;margin-top:5px;}
- div.recall_con{width:600px;}
+ div.recall_con{width:570px;}
div.recall_con .reply_btn{margin-left:555px;margin-top:5px;}
<%= javascript_include_tag "/assets/kindeditor/kindeditor",'/assets/kindeditor/pasteimg' %>
diff --git a/app/views/users/_user_programing_attr.html.erb b/app/views/users/_user_programing_attr.html.erb
new file mode 100644
index 000000000..498005010
--- /dev/null
+++ b/app/views/users/_user_programing_attr.html.erb
@@ -0,0 +1,44 @@
+
+
+
+
+
+
+ <%= options_for_select({"C语言"=>1, "C++"=>2}, (edit_mode && homework.is_program_homework?) ? homework.language : 1) %>
+
+
+ <% if edit_mode && homework.is_program_homework? %>
+ <% homework.homework_tests.each_with_index do |test, index| %>
+
+
+
+
+ <% if index != 0 %>
+
+ <% end %>
+
+
+ <% end %>
+ <% else %>
+
+ <% end %>
+
+
+
温馨提示:您可以在发布作业后,在作业“模拟答题”中进行标准代码的检测。
+
确 定
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/views/users/add_exist_file_to_course.js.erb b/app/views/users/add_exist_file_to_course.js.erb
index 08737f5ca..c61790c40 100644
--- a/app/views/users/add_exist_file_to_course.js.erb
+++ b/app/views/users/add_exist_file_to_course.js.erb
@@ -1,4 +1,9 @@
<% if @flag == true%>
+$("#search_div").html('<%= escape_javascript( render :partial => 'resource_search_form',:locals => {:user=>@user,:type=>@type} ) %>');
+$("#resources_list").html('<%= escape_javascript( render :partial => 'resources_list' ,:locals=>{ :attachments => @attachments})%>');
+$("#res_count").html(0);
+$("#checkboxAll").attr('checked',false);
+$("#res_all_count").html(<%= @atta_count%>);
closePopUp();
<% else%>
<% end %>
\ No newline at end of file
diff --git a/app/views/users/add_exist_file_to_project.js.erb b/app/views/users/add_exist_file_to_project.js.erb
index 08737f5ca..c61790c40 100644
--- a/app/views/users/add_exist_file_to_project.js.erb
+++ b/app/views/users/add_exist_file_to_project.js.erb
@@ -1,4 +1,9 @@
<% if @flag == true%>
+$("#search_div").html('<%= escape_javascript( render :partial => 'resource_search_form',:locals => {:user=>@user,:type=>@type} ) %>');
+$("#resources_list").html('<%= escape_javascript( render :partial => 'resources_list' ,:locals=>{ :attachments => @attachments})%>');
+$("#res_count").html(0);
+$("#checkboxAll").attr('checked',false);
+$("#res_all_count").html(<%= @atta_count%>);
closePopUp();
<% else%>
<% end %>
\ No newline at end of file
diff --git a/app/views/users/import_resources_to_homework.js.erb b/app/views/users/import_resources_to_homework.js.erb
new file mode 100644
index 000000000..b77590095
--- /dev/null
+++ b/app/views/users/import_resources_to_homework.js.erb
@@ -0,0 +1,16 @@
+<% unless @attachments.empty?%>
+ <% @attachments.each_with_index do |attachment, i| %>
+ $("#attachments_fields").append(
+ '
'+
+ '<%= text_field_tag("attachments[p#{i}][filename]", attachment.filename, :class => "filename link_file", :readonly=>"readonly")%>'+
+ '<%= text_field_tag("attachments[p#{i}][description]", attachment.description, :maxlength => 254, :placeholder => l(:label_optional_description), :class => "description", :style=>"display: inline-block;") %>'+
+ '<%= l(:field_is_public)%>: '+
+ '<%= check_box_tag("attachments[p#{i}][is_public_checkbox]", attachment.is_public,attachment.is_public == 1 ? true : false,:class => "is_public")%>'+
+ '<%= link_to(" ".html_safe, attachment_path(attachment, :attachment_id => "p#{i}", :format => "js"), :method => "delete", :remote => true, :class => "remove-upload") unless attachment.id.nil? %>'+
+ '<%= hidden_field_tag "attachments[p#{i}][token]", "#{attachment.token}" %>'+
+ ' '+
+ '
')
+
+ <% end %>
+ hideModal();
+<% end %>
\ No newline at end of file
diff --git a/app/views/users/new_user_commit_homework.html.erb b/app/views/users/new_user_commit_homework.html.erb
new file mode 100644
index 000000000..19a971ece
--- /dev/null
+++ b/app/views/users/new_user_commit_homework.html.erb
@@ -0,0 +1,134 @@
+<% content_for :header_tags do %>
+ <%= javascript_include_tag "/assets/kindeditor/kindeditor",'/assets/kindeditor/pasteimg' %>
+ <%= javascript_include_tag 'homework','baiduTemplate' %>
+<% end %>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <%= form_for(@student_work,
+ :html => { :multipart => true },
+ :url => {:controller => 'users',
+ :action => 'user_commit_homework',
+ :student_work_id => @student_work.id,
+ :homework => @homework.id
+ },
+ :method => :post) do |f|%>
+
+
+ 请使用 <%= @homework.language_name %> 语言编写
+
+
+ <%= f.text_area :name, id: 'program-title', class:"InputBox W700", placeholder:"请概括你的代码的功能" %>
+
+
+ <%= f.text_area :description, id: 'program-src', class:"InputBox W700 H150", placeholder:"请贴入你的代码", rows: 10 %>
+
+
+
+
测试代码
+ <% unless @is_test %>
+
提交代码
+ <% end %>
+
+
+ <% end %>
+
+
+
+
+
+
+ <% @student_work.student_work_tests.each_with_index do |test, index| %>
+
+
第<%= @student_work.student_work_tests.count - index%>次测试
<%= test.created_at.to_s(:db) %>
+
+
+ <% if test.status.to_i == -2 %>
+
<%= test.results.first %>
+ <% else %>
+
+
+ <% test.results.each_with_index do |x, i| %>
+ 测试<%=i+1%>
+ <% if x["status"].to_i != 0 %>
+ 测试错误!
+ 您的输出:
+ <%=x["result"]%>
+ 正确输出:
+ <%=x["output"]%>
+
+
+ <% else %>
+ 测试正确!
+
+
+ <% end %>
+ <% end %>
+
+
+ <% end %>
+ <% end %>
+
+
\ No newline at end of file
diff --git a/app/views/users/resource_search.js.erb b/app/views/users/resource_search.js.erb
index 894c1d2fa..d295ce003 100644
--- a/app/views/users/resource_search.js.erb
+++ b/app/views/users/resource_search.js.erb
@@ -1,3 +1,5 @@
$("#resources_list").html('<%= escape_javascript( render :partial => 'resources_list' ,:locals=>{ :attachments => @attachments})%>');
$("#pages").html('<%= pagination_links_full @atta_pages, @atta_count, :per_page_links => false, :remote => @is_remote, :flag => true %>');
-$("#res_all_count").html(<%= @atta_count%>);
\ No newline at end of file
+$("#res_all_count").html(<%= @atta_count%>);
+$("#res_count").html(0);
+$("#checkboxAll").attr('checked',false);
\ No newline at end of file
diff --git a/app/views/users/show.html.erb b/app/views/users/show.html.erb
index 74ca48595..de166b4e7 100644
--- a/app/views/users/show.html.erb
+++ b/app/views/users/show.html.erb
@@ -1,58 +1,41 @@
-
-
-
-
-<%= render :partial => 'users/user_activities', :locals => {:user_activities => @user_activities,:page => 0} %>
\ No newline at end of file
+<%= render :partial => 'users/user_activities', :locals => {:user_activities => @user_activities,:page => 0,:type => @type} %>
diff --git a/app/views/users/show.js.erb b/app/views/users/show.js.erb
index 0ce84cf0e..eb5de9c6a 100644
--- a/app/views/users/show.js.erb
+++ b/app/views/users/show.js.erb
@@ -1,4 +1,2 @@
-$("#show_more_activities").replaceWith("<%= escape_javascript( render :partial => 'users/user_activities',:locals => {:user_activities => @user_activities, :page => @page} )%>");
-<% if @user_activities.count < 10%>
-$(window).off("scroll", scrollHandler);
-<% end%>
+$("#show_more_activities").replaceWith("<%= escape_javascript( render :partial => 'users/user_activities',:locals => {:user_activities => @user_activities, :page => @page,:type => @type} )%>");
+
diff --git a/app/views/users/show_chen.erb b/app/views/users/show_chen.erb
deleted file mode 100644
index 11c007b39..000000000
--- a/app/views/users/show_chen.erb
+++ /dev/null
@@ -1,279 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
(作业描述)系统中有多个ckeditor,且每个ckeditor的id未知,怎么样做到当光标聚焦某个ckeditor的文本框中,该编辑器的默认值应自动消失的处理;网络拓扑图开发;
-
-
-
-
-
-
-
-
-
-
-
-
-
-
(作业描述)系统中有多个ckeditor,且每个ckeditor的id未知,怎么样做到当光标聚焦某个ckeditor的文本框中,该编辑器的默认值应自动消失的处理;网络拓扑图开发;
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
(缺陷描述)系统中有多个ckeditor,且每个ckeditor的id未知,怎么样做到当光标聚焦某个ckeditor的文本框中,该编辑器的默认值应自动消失的处理;网络拓扑图开发;
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
软件工程是一门研究用工程化方法构建和维护有效的、实用的和高质量的软件的学科。它涉及程序设计语言、数据库、软件开发工具、系统平台、标准、设计模式等方面。
-
-
-
-
-
\ No newline at end of file
diff --git a/app/views/users/user_commit_homework.html.erb b/app/views/users/user_commit_homework.html.erb
new file mode 100644
index 000000000..a7416cf40
--- /dev/null
+++ b/app/views/users/user_commit_homework.html.erb
@@ -0,0 +1,114 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/views/users/user_homeworks.html.erb b/app/views/users/user_homeworks.html.erb
index e232579f9..f375496d1 100644
--- a/app/views/users/user_homeworks.html.erb
+++ b/app/views/users/user_homeworks.html.erb
@@ -1,35 +1,24 @@
+
+
-<% if User.current.user_extensions && User.current.user_extensions.identity == 0 && User.current.allowed_to?(:add_course, nil, :global => true)%>
+<% if @is_teacher%>
-
-
-
-
-
<% homework = HomeworkCommon.new %>
<%= labelled_form_for homework,:url => user_new_homework_users_path,:method => "post" do |f| %>
@@ -38,14 +27,6 @@
<% end%>
-
-<%else%>
-
-
-
-
<% end%>
<%= render :partial => 'users/user_homework_list', :locals => {:homework_commons => @homework_commons,:page => 0} %>
diff --git a/app/views/users/user_homeworks.js.erb b/app/views/users/user_homeworks.js.erb
index a2e778a21..b6703dd43 100644
--- a/app/views/users/user_homeworks.js.erb
+++ b/app/views/users/user_homeworks.js.erb
@@ -1,4 +1,2 @@
$("#user_show_more_homework").replaceWith("<%= escape_javascript( render :partial => 'users/user_homework_list',:locals => {:homework_commons => @homework_commons, :page => @page} )%>");
-<% if @homework_commons.count < 10%>
- $(window).off("scroll", scrollHandler);
-<% end%>
+
diff --git a/app/views/users/user_import_resource.js.erb b/app/views/users/user_import_resource.js.erb
index ce70d68ad..32a2cd697 100644
--- a/app/views/users/user_import_resource.js.erb
+++ b/app/views/users/user_import_resource.js.erb
@@ -1,7 +1,8 @@
-$('#ajax-modal').html('<%= escape_javascript(render :partial => 'users/show_user_homeworks') %>');
-showModal('ajax-modal', '580px');
-$('#ajax-modal').css('height','300px').css("width","580px");
+$('#ajax-modal').html('<%= escape_javascript(render :partial => 'users/show_user_resource',:locals => {:user => @user,:homework_id=>@homework_id}) %>');
+showModal('ajax-modal', '730px');
+$('#ajax-modal').css('height','500px').css("width","730px");
$('#ajax-modal').siblings().remove();
-$('#ajax-modal').before("
" +
-" ");
-$('#ajax-modal').parent().css("top","20%").css("left","25%").css("position","fixed");
\ No newline at end of file
+$('#ajax-modal').before("");
+$('#ajax-modal').parent().css("top","30%").css("left","").css("position","fixed").css("padding-left","16px").css("padding-bottom","16px").css("padding-right","16px");
+$('#ajax-modal').parent().addClass("popbox").addClass("referenceResourcesPopup");
\ No newline at end of file
diff --git a/app/views/users/user_messages.html.erb b/app/views/users/user_messages.html.erb
index 207572a1c..5ac9f7e8e 100644
--- a/app/views/users/user_messages.html.erb
+++ b/app/views/users/user_messages.html.erb
@@ -1,37 +1,79 @@
-
-
+
-<% if @message_alls.count >0 %>
+<% if @message_alls.count >0 || @user_system_messages.count >0 %>
+ <% if params[:type].nil? || params[:type] == "unviewed" %>
+
+ <% end %>
+ <%# 系统消息 %>
+ <% if params[:type] != 'system_messages' %>
+ <% @user_system_messages.each do |usm| %>
+
+
+ <%= image_tag("/images/logo.png", width: "30px", height: "30px", class: "mt3") %>
+
+
+ Trustie平台 发布新消息:
+
+ 【系统消息】
+
+
+ <%= link_to usm.subject.nil? ? (usm.content.nil? ? usm.description.html_safe : usm.content.html_safe) : usm.subject, user_system_messages_path(User.current),
+ :id => "content_link_#{usm.id}",
+ :onmouseover =>"message_titile_show($(this),event);",
+ :onmouseout => "message_titile_hide($(this));"
+ %>
+
+
+ <% unless usm.subject.nil? %>
+
标题: <%= usm.subject %>
+ <% end %>
+ <% if usm.description.nil? && usm.content.nil? %>
+
+ <% else %>
+
内容:
<%= usm.description.html_safe %>
+ <% end %>
+
+ <%= time_tag(usm.created_at).html_safe %>
+
+ <% end %>
+ <% end %>
<%# 课程消息 %>
<% unless @message_alls.nil? %>
<% @message_alls.each do |ma| %>
@@ -43,7 +85,11 @@
<%= link_to ma.course_message.title, {:controller => 'news', :action => 'show', :id => ma.course_message.id },
:class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
- :title => "#{ma.course_message.title}" %>
+ :onmouseover =>"message_titile_show($(this),event)",
+ :onmouseout => "message_titile_hide($(this))" %>
+
+ <%= ma.course_message.title.html_safe %>
+
<%= time_tag(ma.created_at).html_safe %>
<% end %>
@@ -54,16 +100,54 @@
<%= link_to ma.course_message.comments.html_safe, {:controller => 'news', :action => 'show', :id => ma.course_message.commented.id },
:class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
- :title => "#{ma.course_message.comments.html_safe}" %>
+ :onmouseover =>"message_titile_show($(this),event)",
+ :onmouseout => "message_titile_hide($(this))" %>
+
+ <%= ma.course_message.comments.html_safe %>
+
<%= time_tag(ma.created_at).html_safe %>
<% end %>
- <% if ma.course_message_type == "HomeworkCommon" %>
+ <% if ma.course_message_type == "HomeworkCommon" && ma.status != 1 %>
<%=link_to image_tag(url_to_avatar(ma.course_message.user), :width => "30", :height => "30"), user_path(ma.course_message.user) %>
<%=link_to ma.course_message.user, user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher" %>">发布了作业:
- <%= link_to ma.course_message.name, student_work_index_path(:homework => ma.course_message.id),:class => "newsGrey", :title => "#{ma.course_message.name}" %>
+ <%= link_to ma.course_message.name, student_work_index_path(:homework => ma.course_message.id),
+ :class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
+ :onmouseover =>"message_titile_show($(this),event)",
+ :onmouseout => "message_titile_hide($(this))" %>
+
+ <%= ma.course_message.name %>
+
+ <%= time_tag(ma.created_at).html_safe %>
+
+ <% end %>
+ <% if ma.course_message_type == "HomeworkCommon" && ma.status == 1 %>
+
+ <%=link_to image_tag(url_to_avatar(ma.course_message.user), :width => "30", :height => "30"), user_path(ma.course_message.user) %>
+ <%=link_to ma.course_message.user, user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher" %>">发布的作业:
+ <% if ma.viewed == 0 %>
+
+ <%= link_to ma.course_message.name, student_work_index_path(:homework => ma.course_message.id),
+ :class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
+ :onmouseover =>"message_titile_show($(this),event)",
+ :onmouseout => "message_titile_hide($(this))" %>
+
+
+ <%= ma.course_message.name %>
+
+ 截止时间快到了!
+ <% else %>
+
+ <%= link_to ma.course_message.name, student_work_index_path(:homework => ma.course_message.id), :class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
+ :onmouseover =>"message_titile_show($(this),event)",
+ :onmouseout => "message_titile_hide($(this))"%>
+
+
+ <%= ma.course_message.name %>
+
+ <% end %>
<%= time_tag(ma.created_at).html_safe %>
<% end %>
@@ -74,7 +158,11 @@
<%= link_to format_activity_title(" #{ma.course_message.polls_name.nil? ? "未命名问卷" : ma.course_message.polls_name}"), poll_path(ma.course_message.id),
:class=>"#{ma.viewed==0?"newsBlack":"newsGrey"}",
- :title => "#{ma.course_message.polls_name}" %>
+ :onmouseover =>"message_titile_show($(this),event)",
+ :onmouseout => "message_titile_hide($(this))" %>
+
+ <%= ma.course_message.polls_name %>
+
<%= time_tag(ma.created_at).html_safe %>
<% end %>
@@ -82,10 +170,21 @@
<%=link_to image_tag(url_to_avatar(ma.course_message.author), :width => "30", :height => "30"), user_path(ma.course_message.author) %>
<%=link_to ma.course_message.author, user_path(ma.course_message.author), :class => "newsBlue homepageNewsPublisher" %>"><%= ma.course_message.parent_id.nil? ? "发布了课程帖子:" : "评论了课程帖子:" %>
-
- <%=link_to ma.course_message.subject.html_safe, course_boards_path(ma.course_message.course,:parent_id => ma.course_message.parent_id ? ma.course_message.parent_id : ma.course_message.id,
- :topic_id => ma.course_message.id),:class=>"#{ma.viewed==0?"newsBlack":"newsGrey"}",
- :title => "#{ma.course_message.subject.html_safe}" %>
+ <% if ma.course_message.parent_id.nil? %>
+
+ <%= link_to ma.course_message.subject, course_boards_path(ma.course_message.course, :parent_id => ma.course_message.parent_id ? ma.course_message.parent_id : ma.course_message.id, :topic_id => ma.course_message.id),
+ :class => "#{ma.viewed==0 ? "newsBlack" : "newsGrey"}",
+ :title => "#{ma.course_message.subject.html_safe}" %>
+ <% else %>
+
+ <%= link_to ma.course_message.content.html_safe, course_boards_path(ma.course_message.course, :parent_id => ma.course_message.parent_id ? ma.course_message.parent_id : ma.course_message.id, :topic_id => ma.course_message.id),
+ :class => "#{ma.viewed==0 ? "newsBlack" : "newsGrey"}",
+ :onmouseover =>"message_titile_show($(this),event)",
+ :onmouseout => "message_titile_hide($(this))" %>
+
+ <%= ma.course_message.content.html_safe %>
+
+ <% end %>
<%= time_tag(ma.created_at).html_safe %>
@@ -96,23 +195,81 @@
<%=link_to ma.course_message.user, user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher" %>"><%= ma.status == 0 ? "评阅了作品:" : "重新评阅了作品:" %>
<% unless ma.content.nil? %>
- <%= link_to ma.content.html_safe, student_work_index_path(:homework => ma.course_message.student_work.homework_common_id),:class=>"newsGrey",:title => "#{ma.content.html_safe}" %>
+ <%= link_to ma.content.html_safe, student_work_index_path(:homework => ma.course_message.student_work.homework_common_id),
+ :class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
+ :onmouseover =>"message_titile_show($(this),event)",
+ :onmouseout => "message_titile_hide($(this))" %>
+
+ <%= ma.content.html_safe %>
+
<% end %>
<%= time_tag(ma.created_at).html_safe %>
<% end %>
<% if ma.course_message_type == "JournalsForMessage" %>
+ <% if ma.course_message.jour_type == 'Course' %>
+
+
+ <%= link_to image_tag(url_to_avatar(ma.course_message.user), :width => "30", :height => "30"), user_path(ma.course_message.user) %>
+
+ <%= link_to ma.course_message.user, user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher" %>
+ ">在课程中留言了:
+
+
+ <%= link_to ma.course_message.notes.html_safe, course_feedback_path(:id => ma.course_id),
+ :class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
+ :onmouseover => "message_titile_show($(this),event)",
+ :onmouseout => "message_titile_hide($(this))" %>
+
+
+ <%= ma.course_message.notes.html_safe %>
+
+ <%= time_tag(ma.created_at).html_safe %>
+
+
+ <% else %>
+
+
+ <%= link_to image_tag(url_to_avatar(ma.course_message.user), :width => "30", :height => "30"), user_path(ma.course_message.user) %>
+
+ <%= link_to ma.course_message.user, user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher" %>
+ ">回复了作品评论:
+
+
+ <%= link_to ma.course_message.notes, student_work_index_path(:homework => ma.course_message.jour.student_work.homework_common_id), :class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
+ :onmouseover => "message_titile_show($(this),event)",
+ :onmouseout => "message_titile_hide($(this))" %>
+
+
+ <%= ma.course_message.notes %>
+
+ <%= time_tag(ma.created_at).html_safe %>
+
+ <% end %>
+ <% end %>
+ <% end %>
+
+ <% if ma.class == ForgeMessage %>
+ <% if ma.forge_message_type == "AppliedProject" %>
- <%=link_to image_tag(url_to_avatar(ma.course_message.user), :width => "30", :height => "30"), user_path(ma.course_message.user) %>
- <%=link_to ma.course_message.user, user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher" %>">回复了作品评论:
+
+ <%=link_to image_tag(url_to_avatar(ma.forge_message.user), :width => "30", :height => "30"), user_path(ma.forge_message.user) %>
+
+
+ <%=link_to ma.forge_message.user, user_path(ma.forge_message.user), :class => "newsBlue homepageNewsPublisher" %>
+ ">申请加入项目:
+
- <%= link_to ma.course_message.notes, student_work_index_path(:homework => ma.course_message.jour.student_work.homework_common_id),:class=>"newsGrey",:title => "#{ma.course_message.notes}" %>
+ <%= link_to ma.project, settings_project_path(:id => ma.project, :tab => "members"), :class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
+ :onmouseover => "message_titile_show($(this),event)",
+ :onmouseout => "message_titile_hide($(this))" %>
+
+
+ <%= ma.project %>
+
<%= time_tag(ma.created_at).html_safe %>
<% end %>
- <% end %>
-
- <% if ma.class == ForgeMessage %>
<% if ma.forge_message_type == "Issue" %>
@@ -123,8 +280,13 @@
">指派了问题给你:
- <%= link_to ma.forge_message.subject, issue_path(:id => ma.forge_message.id), :class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",:title => "#{ma.forge_message.subject}" %>
+ <%= link_to ma.forge_message.subject, issue_path(:id => ma.forge_message.id), :class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
+ :onmouseover => "message_titile_show($(this),event)",
+ :onmouseout => "message_titile_hide($(this))" %>
+
+ <%= ma.forge_message.subject %>
+
<%= time_tag(ma.created_at).html_safe %>
<% end %>
@@ -141,8 +303,14 @@
<%= link_to get_issue_des_update(ma.forge_message).html_safe,
issue_path(:id => ma.forge_message.journalized_id), :class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
- :title => "#{get_issue_des_update(ma.forge_message).html_safe}" %>
+ :onmouseover =>"message_titile_show($(this),event)",
+ :onmouseout => "message_titile_hide($(this))" %>
+
+
问题标题: <%= ma.forge_message.journalized.subject %>
+
更新内容:
+
<%= get_issue_des_update(ma.forge_message).html_safe %>
+
<%= time_tag(ma.created_at).html_safe %>
<% end %>
@@ -151,11 +319,27 @@
<%=link_to image_tag(url_to_avatar(ma.forge_message.author), :width => "30", :height => "30"), user_path(ma.forge_message.author) %>
<%=link_to ma.forge_message.author, user_path(ma.forge_message.author), :class => "newsBlue homepageNewsPublisher" %>
"><%= ma.forge_message.parent_id.nil? ? "发布了项目帖子:" : "评论了项目帖子:" %>
-
- <%=link_to ma.forge_message.subject.html_safe, project_boards_path(ma.forge_message.project,
- :parent_id => ma.forge_message.parent_id ? ma.forge_message.parent_id : ma.forge_message.id,
- :topic_id => ma.forge_message.id),:class=>"#{ma.viewed==0?"newsBlack":"newsGrey"}",
- :title => "#{ma.forge_message.subject.html_safe}" %>
+ <% if ma.forge_message.parent_id.nil? %>
+
+ <%= link_to ma.forge_message.subject, project_boards_path(ma.forge_message.project,
+ :parent_id => ma.forge_message.parent_id ? ma.forge_message.parent_id : ma.forge_message.id,
+ :topic_id => ma.forge_message.id), :class => "#{ma.viewed==0 ? "newsBlack" : "newsGrey"}",
+ :onmouseover => "message_titile_show($(this),event)",
+ :onmouseout => "message_titile_hide($(this))" %>
+
+ <%= ma.forge_message.subject.html_safe %>
+
+ <% else %>
+
+ <%= link_to ma.forge_message.content.html_safe, project_boards_path(ma.forge_message.project,
+ :parent_id => ma.forge_message.parent_id ? ma.forge_message.parent_id : ma.forge_message.id,
+ :topic_id => ma.forge_message.id), :class => "#{ma.viewed==0 ? "newsBlack" : "newsGrey"}",
+ :onmouseover => "message_titile_show($(this),event)",
+ :onmouseout => "message_titile_hide($(this))" %>
+
+ <%= ma.forge_message.content.html_safe %>
+
+ <% end %>
<%= time_tag(ma.created_at).html_safe %>
<% end %>
@@ -169,8 +353,15 @@
">发布了新闻:
- <%= link_to ("#{ma.forge_message.title.html_safe}"), {:controller => 'news', :action => 'show', :id => ma.forge_message.id}, :class => "newsGrey", :title => "#{ma.forge_message.title.html_safe}" %>
+ <%= link_to ("#{ma.forge_message.title.html_safe}"), {:controller => 'news', :action => 'show', :id => ma.forge_message.id},
+ :class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
+ :onmouseover => "message_titile_show($(this),event)",
+ :onmouseout => "message_titile_hide($(this))" %>
+
+
+ <%= ma.forge_message.title.html_safe %>
+
<%= time_tag(ma.created_at).html_safe %>
<% end %>
@@ -181,7 +372,13 @@
">评论了新闻:
<%= link_to "#{ma.forge_message.comments.html_safe}",
- {:controller => 'news', :action => 'show', :id => ma.forge_message.commented.id },:class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}", :title => "#{ma.forge_message.comments.html_safe}"%>
+ {:controller => 'news', :action => 'show', :id => ma.forge_message.commented.id },:class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
+ :onmouseover => "message_titile_show($(this),event)",
+ :onmouseout => "message_titile_hide($(this))" %>
+
+
+ <%= ma.forge_message.comments.html_safe %>
+
<%= time_tag(ma.created_at).html_safe %>
<% end %>
@@ -197,9 +394,29 @@
<%=link_to ma.memo.author, user_path(ma.memo.author), :class => "newsBlue homepageNewsPublisher" %>
" ><%= ma.memo.parent_id.nil? ? "在贴吧发布帖子:" : "回复了贴吧帖子:" %>
-
- <%= link_to ma.memo.subject, forum_memo_path(ma.memo.forum_id, ma.memo.parent_id ? ma.memo.parent_id: ma.memo.id),:class => "newsGrey" , :title => "#{ma.memo.content.html_safe}" %>
-
+ <% if ma.memo.parent_id.nil? %>
+
+ <%= link_to ma.memo.subject, forum_memo_path(ma.memo.forum_id, ma.memo.parent_id ? ma.memo.parent_id: ma.memo.id), :class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
+ :onmouseover =>"message_titile_show($(this),event)",
+ :onmouseout => "message_titile_hide($(this))" %>
+
+
+
标题: <%= ma.memo.subject %>
+
内容:
+
<%= ma.memo.content.html_safe %>
+
+ <% else %>
+
+ <%= link_to ma.memo.content.html_safe, forum_memo_path(ma.memo.forum_id, ma.memo.parent_id ? ma.memo.parent_id: ma.memo.id), :class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
+ :onmouseover =>"message_titile_show($(this),event)",
+ :onmouseout => "message_titile_hide($(this))" %>
+
+
+
标题: <%= ma.memo.subject %>
+
内容:
+
<%= ma.memo.content.html_safe %>
+
+ <% end %>
<%= time_tag(ma.memo.created_at).html_safe %>
<% end %>
@@ -216,9 +433,15 @@
"><%= ma.journals_for_message.reply_id == 0 ? "给你留言了:" : "回复了你的留言:" %>
- <%= link_to ma.journals_for_message.notes.html_safe, feedback_path(ma.journals_for_message.jour_id), :class => "newsGrey", :title => "#{ma.journals_for_message.notes}" %>
+ <%= link_to ma.journals_for_message.notes.html_safe, feedback_path(ma.journals_for_message.jour_id), :class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
+ :onmouseover =>"message_titile_show($(this),event)",
+ :onmouseout => "message_titile_hide($(this))" %>
+
+ <%= ma.journals_for_message.notes.html_safe %>
+
<%= time_tag(ma.journals_for_message.created_on).html_safe %>
+
<% end %>
<% end %>
@@ -236,7 +459,34 @@
+
diff --git a/app/views/users/user_newfeedback.html.erb b/app/views/users/user_newfeedback.html.erb
index 556069a1f..b94e33b16 100644
--- a/app/views/users/user_newfeedback.html.erb
+++ b/app/views/users/user_newfeedback.html.erb
@@ -1,11 +1,6 @@
-
-
-
-
-
-
-
+<%= javascript_include_tag "/assets/kindeditor/kindeditor",'/assets/kindeditor/pasteimg',"init_KindEditor","user" %>
-<%= javascript_include_tag "/assets/kindeditor/kindeditor",'/assets/kindeditor/pasteimg',"user" %>
-
-
-
-
-
-
+
<%= form_for('new_form',:url => leave_user_message_path(@user.id),:method => "post") do |f|%>
-
+
-
取消
-
留言
+
取消
+
留言
<% end%>
diff --git a/app/views/users/user_ref_resource_search.js.erb b/app/views/users/user_ref_resource_search.js.erb
new file mode 100644
index 000000000..52f54bee4
--- /dev/null
+++ b/app/views/users/user_ref_resource_search.js.erb
@@ -0,0 +1,2 @@
+$("#user_ref_resources").html('<%= escape_javascript(render :partial => 'resources_list',:locals=>{:attachments => @attachments})%>');
+$("#resource_ref_pages").html('<%= pagination_links_full @atta_pages, @atta_count, :per_page_links => false, :remote => @is_remote, :flag => true %>');
\ No newline at end of file
diff --git a/app/views/users/user_resource.html.erb b/app/views/users/user_resource.html.erb
index 819bec04d..096d6e8f5 100644
--- a/app/views/users/user_resource.html.erb
+++ b/app/views/users/user_resource.html.erb
@@ -4,9 +4,9 @@
<%= stylesheet_link_tag 'leftside' %>
<%= javascript_include_tag 'attachments'%>
-
-
-
+
+
+
-