From b143093e490044e30a610983676764ffb273194c Mon Sep 17 00:00:00 2001 From: z9han Date: Mon, 22 Dec 2014 15:45:55 +0800 Subject: [PATCH] =?UTF-8?q?1=E3=80=81#1707=20=E8=AF=BE=E7=A8=8B--=E8=B5=84?= =?UTF-8?q?=E6=BA=90=E5=BA=93=EF=BC=9A=E5=85=A8=E7=AB=99=E6=90=9C=E7=B4=A2?= =?UTF-8?q?=E5=BE=97=E5=88=B0=E5=BD=93=E5=89=8D=E4=BD=9C=E4=B8=9A=E6=A8=A1?= =?UTF-8?q?=E5=9D=97=E7=9A=84=E8=B5=84=E6=BA=90=EF=BC=8C=E5=BA=94=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E4=B8=BA=E2=80=9C=E9=80=89=E5=85=A5=E6=88=91=E7=9A=84?= =?UTF-8?q?=E8=AF=BE=E7=A8=8B=E2=80=9D.2=E3=80=81=E5=85=AC=E5=BC=80?= =?UTF-8?q?=E7=A7=81=E6=9C=89=E5=AD=97=E6=A0=B7=E6=9C=AA=E5=B1=85=E4=B8=AD?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/files/_course_list.html.erb | 2 +- public/stylesheets/resource.css | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/app/views/files/_course_list.html.erb b/app/views/files/_course_list.html.erb index a006ef8ab..d02bf157b 100644 --- a/app/views/files/_course_list.html.erb +++ b/app/views/files/_course_list.html.erb @@ -19,7 +19,7 @@
<%= link_to_attachment file, :download => true,:text => truncate(file.filename,length: 35, omission: '...'), :title => file.filename+"\n"+file.description.to_s, :style => "overflow: hidden; white-space: nowrap;text-overflow: ellipsis;",:class => "c_dblue f_14 f_b f_l" %> <% if User.current.logged? %> - <% if is_course_teacher(User.current,@course) && file.author_id == User.current.id %> + <% if is_course_teacher(User.current,@course) && file.author_id == User.current.id && course_contains_attachment?(@course,file) %> <%= link_to("选入我的其他课程",quote_resource_show_course_file_path(@course,file),:class => "f_l re_select",:remote => true) if has_course?(User.current,file) %> <% if delete_allowed && file.container_id == @course.id && file.container_type == "Course" %> diff --git a/public/stylesheets/resource.css b/public/stylesheets/resource.css index 5dc2bcabc..39922d6f1 100644 --- a/public/stylesheets/resource.css +++ b/public/stylesheets/resource.css @@ -72,12 +72,14 @@ a:hover.re_select{ border: 1px solid #64bdd9 !important; color: #64bdd9 !important; margin-left: 10px !important; + text-align: center; } a:hover.re_open { background: #64bdd9; color: #fff !important; text-decoration: none !important; + text-align: center; } a.re_de{ color:#6883b6; margin-left:15px;} .re_con_box{ border-bottom:1px dashed #dadada; padding:10px 0;}