|
|
|
@ -15,7 +15,13 @@
|
|
|
|
|
<span style="float: right">
|
|
|
|
|
<% if(User.current.logged? && (!Member.where('user_id = ? and project_id = ?', User.current.id, bid.courses.first.id).first.nil? && (Member.where('user_id = ? and project_id = ?', User.current.id, bid.courses.first.id).first.roles&Role.where('id = ? or id = ? or id =?',5, 10, 7)).size >0)) %>
|
|
|
|
|
<%# 提交作业按钮 %>
|
|
|
|
|
<%= link_to l(:label_commit_homework), '#OpenWindow', rel: 'leanModal', onclick: "showSubH(#{bid.id}, '#{bid.name}');" if User.current.member_of?(@project) %>
|
|
|
|
|
<!--<%= link_to l(:label_commit_homework), '#OpenWindow', rel: 'leanModal', onclick: "showSubH(#{bid.id}, '#{bid.name}');" if User.current.member_of?(@project) %>-->
|
|
|
|
|
<% cur_user_homework = cur_user_homework_for_bid(bid) %>
|
|
|
|
|
<% if cur_user_homework!= nil && cur_user_homework.count == 0 %>
|
|
|
|
|
<%= link_to l(:label_commit_homework),new_homework_attach_path(bid) %>
|
|
|
|
|
<% else %>
|
|
|
|
|
<span style="color: green; float: right"><%= l(:lable_has_commit_homework)%></span>
|
|
|
|
|
<% end %>
|
|
|
|
|
<% end %>
|
|
|
|
|
<% if (User.current.admin?||User.current.id==bid.author_id) %>
|
|
|
|
|
<%= link_to(
|
|
|
|
|