From e43822cc308da576f48bafb95998de5623840126 Mon Sep 17 00:00:00 2001 From: cxt Date: Sat, 24 Oct 2015 14:47:13 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=97=A0=E6=B3=95=E5=90=8C=E6=97=B6?= =?UTF-8?q?=E5=BC=95=E7=94=A8=E5=A4=9A=E4=B8=AA=E8=B5=84=E6=BA=90=E5=BA=93?= =?UTF-8?q?=E7=9A=84=E8=B5=84=E6=BA=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../users/import_resources_to_homework.js.erb | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/app/views/users/import_resources_to_homework.js.erb b/app/views/users/import_resources_to_homework.js.erb index 61fcd294d..c929f48e5 100644 --- a/app/views/users/import_resources_to_homework.js.erb +++ b/app/views/users/import_resources_to_homework.js.erb @@ -1,13 +1,13 @@ <% unless @attachments.empty?%> - <% @attachments.each_with_index do |attachment, i| %> + <% @attachments.each do |attachment| %> $("#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;") %>'+ + ''+ + '<%= text_field_tag("attachments[p#{attachment.id}][filename]", attachment.filename, :class => "filename link_file", :readonly=>"readonly")%>'+ + '<%= text_field_tag("attachments[p#{attachment.id}][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}" %>'+ + '<%= check_box_tag("attachments[p#{attachment.id}][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#{attachment.id}", :format => "js"), :method => "delete", :remote => true, :class => "remove-upload") unless attachment.id.nil? %>'+ + '<%= hidden_field_tag "attachments[p#{attachment.id}][token]", "#{attachment.token}" %>'+ ''+ '
') From 274db8d0801dca7c98671a346cad86b27ddcab56 Mon Sep 17 00:00:00 2001 From: cxt Date: Sat, 24 Oct 2015 14:53:49 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E4=BD=9C=E5=93=81=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E7=9A=84=E4=BD=9C=E4=B8=9A=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E9=99=84=E4=BB=B6=E7=9A=84=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/student_work/index.html.erb | 4 ++++ public/stylesheets/courses.css | 2 ++ 2 files changed, 6 insertions(+) diff --git a/app/views/student_work/index.html.erb b/app/views/student_work/index.html.erb index 0ea5e7055..c8d3a2546 100644 --- a/app/views/student_work/index.html.erb +++ b/app/views/student_work/index.html.erb @@ -139,6 +139,10 @@
+
+ <%= render :partial => 'student_work/work_attachments', :locals => {:attachments => @homework.attachments} %> +
+
截止时间:<%= @homework.end_time %>
<% if @homework.homework_detail_manual%> diff --git a/public/stylesheets/courses.css b/public/stylesheets/courses.css index 41771eb6e..23a1a95ac 100644 --- a/public/stylesheets/courses.css +++ b/public/stylesheets/courses.css @@ -1045,6 +1045,8 @@ a.pro_mes_w{ height:20px; display:block; color:#999999;} .rside_work_con{ width:650px;} a.c_grey{ color:#999999;} a:hover.c_grey{ color:#333;} +a.link_file_a{ background:url(../images/pic_file.png) 0 2px no-repeat; padding-left:20px; } +a:hover.link_file_a{ background:url(../images/pic_file.png) 0 -25px no-repeat; color:#3ca5c6;} .link_file_a{ display:block; max-width:450px;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;} .last_time{width:auto; text-align:right; margin-right:70px;} .link_file_box{ width:360px;}