当前用户没有提交作业权限时屏蔽该按钮
This commit is contained in:
parent
da37a12158
commit
91d2b58cf4
|
@ -13,9 +13,11 @@
|
||||||
<span class="font_lighter"><%= l(:label_user_create_project_homework) %></span>
|
<span class="font_lighter"><%= l(:label_user_create_project_homework) %></span>
|
||||||
<span><%= link_to(bid.name, respond_path(bid), :class => 'bid_path') %></span>
|
<span><%= link_to(bid.name, respond_path(bid), :class => 'bid_path') %></span>
|
||||||
<span style="float: right">
|
<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) %>
|
||||||
<% if (User.current.admin?||User.current.id==bid.author_id) %>
|
<% end %>
|
||||||
|
<% if (User.current.admin?||User.current.id==bid.author_id) %>
|
||||||
<%= link_to(
|
<%= link_to(
|
||||||
l(:button_edit),
|
l(:button_edit),
|
||||||
{:action => 'edit', :controller=>'bids', :project_id =>@project.id, :bid_id => bid.id},
|
{:action => 'edit', :controller=>'bids', :project_id =>@project.id, :bid_id => bid.id},
|
||||||
|
|
Loading…
Reference in New Issue