From 3e3d103828ce5a0419bcb68082ce12cff25e7386 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Tue, 25 Nov 2014 10:15:34 +0800 Subject: [PATCH] =?UTF-8?q?1.=E5=A2=9E=E5=8A=A0=E5=BC=80=E5=90=AF=E5=8C=BF?= =?UTF-8?q?=E8=AF=84=E4=B9=8B=E5=90=8E=E5=AD=A6=E7=94=9F=E8=83=BD=E6=8F=90?= =?UTF-8?q?=E4=BA=A4=E4=BD=9C=E4=B8=9A=202.=E4=BF=AE=E6=94=B9=E5=AD=A6?= =?UTF-8?q?=E7=94=9F=E4=BD=9C=E4=B8=9A=E7=BC=96=E8=BE=91=E5=92=8C=E5=88=A0?= =?UTF-8?q?=E9=99=A4=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/bids/_bid_homework_show.html.erb | 14 ++++---------- app/views/courses/homework.html.erb | 4 +++- app/views/homework_attach/_homework.html.erb | 16 +++++++++++----- .../homework_attach/_homeworks_list.html.erb | 7 ------- public/stylesheets/css.css | 2 +- 5 files changed, 19 insertions(+), 24 deletions(-) diff --git a/app/views/bids/_bid_homework_show.html.erb b/app/views/bids/_bid_homework_show.html.erb index 870bd692b..630d7552c 100644 --- a/app/views/bids/_bid_homework_show.html.erb +++ b/app/views/bids/_bid_homework_show.html.erb @@ -58,16 +58,10 @@ <% if User.current.logged? && is_cur_course_student(@course) %> <% cur_user_homework = cur_user_homework_for_bid(bid) %> - <% if cur_user_homework!= nil && cur_user_homework.empty? %> - <% if bid.comment_status == 0 || bid.comment_status == 2%> - - <%= link_to l(:label_commit_homework),new_exercise_book_path(bid) %> - - <% else %> - - 提交作业 - - <% end %> + <% if cur_user_homework && cur_user_homework.empty? %> + + <%= link_to l(:label_commit_homework),new_exercise_book_path(bid) %> + <% else %> <%= l(:lable_has_commit_homework)%> diff --git a/app/views/courses/homework.html.erb b/app/views/courses/homework.html.erb index 68ec0dc2e..81201bef5 100644 --- a/app/views/courses/homework.html.erb +++ b/app/views/courses/homework.html.erb @@ -9,7 +9,9 @@ <% if User.current.logged? && (User.current.admin? || (!Member.where('user_id = ? and course_id = ?', User.current.id, @course.id).first.nil? && (Member.where('user_id = ? and course_id = ?', User.current.id, @course.id).first.roles&Role.where(id: [3, 4, 7, 9] )).size >0))%> <%= link_to(l(:label_course_homework_new), {:controller => 'courses', :action => 'new_homework'}, :class => 'icon icon-add') %> <% else %> - <%= l(:label_coursejoin_tip) %> + + <%= l(:label_coursejoin_tip) %> + <% end %>
diff --git a/app/views/homework_attach/_homework.html.erb b/app/views/homework_attach/_homework.html.erb index b821e2495..d11ea3333 100644 --- a/app/views/homework_attach/_homework.html.erb +++ b/app/views/homework_attach/_homework.html.erb @@ -49,8 +49,8 @@ <% else %> <% if is_my_homework %> - - <% if @bid.comment_status == 0 %> + + <% if @bid.comment_status == 0 || @bid.open_anonymous_evaluation == 0 %>
  • <%= link_to l(:button_edit), edit_homework_attach_path(homework) %> <% if homework.user == User.current || User.current.admin? %> @@ -68,10 +68,14 @@ <%= l(:button_edit) %> <% if homework.user == User.current || User.current.admin? %> - <%=l(:label_bid_respond_delete)%> + + <%=l(:label_bid_respond_delete)%> + <% else %> - <%=l(:label_logout) %> + + <%=l(:label_logout) %> + <% end %>
  • <% end %> @@ -88,7 +92,9 @@ <% elsif @bid.comment_status == 2%>
  • - <%= l(:label_anonymous_comments) %> + + <%= l(:label_anonymous_comments) %> + <% if Time.parse(@bid.deadline.to_s).strftime("%Y-%m-%d") < Time.parse(homework.created_at.to_s).strftime("%Y-%m-%d") %>   迟交! <% end %> diff --git a/app/views/homework_attach/_homeworks_list.html.erb b/app/views/homework_attach/_homeworks_list.html.erb index a8736592c..8ef696e0c 100644 --- a/app/views/homework_attach/_homeworks_list.html.erb +++ b/app/views/homework_attach/_homeworks_list.html.erb @@ -35,16 +35,9 @@
  • 您还没交作业,请创建作业!
  • - <% if @bid.comment_status == 0 || @bid.open_anonymous_evaluation == 0%> -
  • <%= link_to "提交作业", new_exercise_book_path(@bid), :style => "width:80px; margin:20px 0 0 350px;" %>
  • - <% else %> -
  • - 提交作业 -
  • - <% end %>
    <% end %> diff --git a/public/stylesheets/css.css b/public/stylesheets/css.css index b3acd8f83..b382b6d46 100644 --- a/public/stylesheets/css.css +++ b/public/stylesheets/css.css @@ -55,7 +55,7 @@ ul.wlist{ float:right; border-bottom:none; height:30px; margin-top:20px;line-hei .c_grey{ color:#999; font-weight:normal;} .dis ul li.wname02 a{ width:200px; font-size:14px; color:#595959; padding:20px 0 0 15px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;} .dis ul li.wmine{ margin:12px 0 0 10px;} -.dis ul li.wmine a{ color:#3d7ec2; text-align:center; width:50px; font-weight: bold;} +.dis ul li.wmine a{ color:#3d7ec2; text-align:center; width:50px; font-weight: bold;line-height: 1.9;} .wzan{ margin:15px 0 0 25px; width:32px; height:44px;} .wzan a{ display: block;text-align: center;} a.wzan_img{background:url(images/pic_zan.png) 0 -59px no-repeat; display:block; height:31px; width:30px; color:#fff;}