作业左侧增加开启/关闭匿评按钮

This commit is contained in:
sw 2014-11-04 16:15:36 +08:00
parent def7a7f5e3
commit cc69b06616
1 changed files with 20 additions and 4 deletions

View File

@ -76,7 +76,7 @@
<td>
<table>
<tr>
<td style="vertical-align: top;font-size: 16px;text-align: center;">
<td style="vertical-align: top;font-size: 15px;">
<span style=" word-wrap: break-word; word-break: break-all">
<strong>
<%= link_to course.name.to_s, homework_course_path(course) if course %>
@ -85,7 +85,7 @@
</td>
</tr>
<tr>
<td style=" word-wrap: break-word; word-break: break-all;font-size: 16px;text-align: center">
<td style=" word-wrap: break-word; word-break: break-all;font-size: 15px;">
<span style=" color:#ed8924">
<strong><%=link_to(@bid.name, course_for_bid_path(@bid)) %></strong>
</span>
@ -101,8 +101,25 @@
<div class="inf_user_image">
<table>
<% if (User.current.admin?||User.current.id==@bid.author_id) %>
<tr>
<td valign="top" style="padding-left: 8px; font-size: 15px" colspan="2">
<span id="<%=@bid.id %>_anonymous_comment">
<% case @bid.comment_status %>
<% when 0 %>
<%= link_to '启动匿评', start_anonymous_comment_bid_path(@bid), id: "#{@bid.id}_start_anonymous_comment", remote: true %>
<% when 1 %>
<%= link_to '关闭匿评', stop_anonymous_comment_bid_path(@bid), id: "#{@bid.id}_stop_anonymous_comment", remote: true %>
<% when 2 %>
匿评结束
<% end %>
</span>
</td>
</tr>
<% end %>
<tr>
<td valign="top" colspan="2" style="font-size: 16px;padding-left: 8px;">
<td valign="top" colspan="2" style="font-size: 15px;padding-left: 8px;">
<strong>
<%= l(:label_homework_description) %> :
</strong>
@ -118,7 +135,6 @@
<tr>
<td valign="top" style="padding-left: 8px; width:62px;">
<%= l(:label_limit_time) %>:
</td>
<td class="font_lighter_sidebar">
<%= @bid.deadline %>