修改编辑、启动匿评、关闭匿评、提交作业按钮样式

This commit is contained in:
sw 2014-11-18 16:47:04 +08:00
parent 6bfbf5bd2b
commit 6245b6ba33
1 changed files with 25 additions and 7 deletions

View File

@ -17,6 +17,21 @@
+second+"&nbsp;</span><span style='color: #acaeb1;'>秒</span>"); +second+"&nbsp;</span><span style='color: #acaeb1;'>秒</span>");
} }
</script> </script>
<style>
.span_wping{}
.span_wping a{
margin-top: 18px;
margin-bottom: 3px;
width: 43px;
height: 23px;
background: #15bccf;
color: #fff;
text-align: center;
padding-top: 3px;
padding-left: 3px;
}
.span_wping a:hover{ background-color:#03a1b3;}
</style>
<% if bids.blank? %> <% if bids.blank? %>
<%#= l(:label_uncommit_homework) %> <%#= l(:label_uncommit_homework) %>
@ -46,10 +61,12 @@
<% cur_user_homework = cur_user_homework_for_bid(bid) %> <% cur_user_homework = cur_user_homework_for_bid(bid) %>
<% if cur_user_homework!= nil && cur_user_homework.empty? %> <% if cur_user_homework!= nil && cur_user_homework.empty? %>
<% if bid.comment_status == 0 || bid.comment_status == 2%> <% if bid.comment_status == 0 || bid.comment_status == 2%>
<%= link_to l(:label_commit_homework),new_exercise_book_path(bid) %> <span class="span_wping">
<%= link_to l(:label_commit_homework),new_exercise_book_path(bid) %>
</span>
<% else %> <% else %>
<span title="匿评阶段不可提交作业!"> <span title="匿评阶段不可提交作业!" class="span_wping">
<%= l(:label_commit_homework)%> <a style="width:80px; margin:20px 0 0 350px;background:#8e8e8e;">提交作业</a>
</span> </span>
<% end %> <% end %>
<% else %> <% else %>
@ -59,7 +76,7 @@
<% end %> <% end %>
<% end %> <% end %>
<% if (User.current.admin?||User.current.id==bid.author_id) %> <% if (User.current.admin?||User.current.id==bid.author_id) %>
<span id="<%=bid.id %>_anonymous_comment"> <span id="<%=bid.id %>_anonymous_comment" class="span_wping">
<% case bid.comment_status %> <% case bid.comment_status %>
<% when 0 %> <% when 0 %>
<%= link_to '启动匿评', alert_anonymous_comment_bid_path(bid), id: "#{bid.id}_start_anonymous_comment", remote: true, disable_with: '加载中...' %> <%= link_to '启动匿评', alert_anonymous_comment_bid_path(bid), id: "#{bid.id}_start_anonymous_comment", remote: true, disable_with: '加载中...' %>
@ -69,11 +86,12 @@
匿评结束 匿评结束
<% end %> <% end %>
</span> </span>
<%= link_to( <span class="span_wping">
<%= link_to(
l(:button_edit), l(:button_edit),
{:action => 'edit', :controller=>'bids', :course_id =>@course.id, :bid_id => bid.id}, {:action => 'edit', :controller=>'bids', :course_id =>@course.id, :bid_id => bid.id}
:class => 'icon icon-edit'
) %> ) %>
</span>
<%#= link_to( <%#= link_to(
l(:button_delete), l(:button_delete),
{:action => 'homework_destroy', :controller=>'bids', :course_id => bid.id}, {:action => 'homework_destroy', :controller=>'bids', :course_id => bid.id},