允许实训成员编辑实训

This commit is contained in:
huang 2017-09-30 16:43:12 +08:00
parent 90ade97d88
commit cbf70d83cb
1 changed files with 4 additions and 6 deletions

View File

@ -25,12 +25,10 @@
<%= "(#{number_to_human_size(@entry.size)})" if @entry.size %>
<% end %>
<% else %>
<% if @shixun.try(:status).to_i < 2 %>
<% if params[:controller] == "shixuns" && params[:action] == "entry_edit" %>
<a href="javascript:void(0);" onclick="$('#shixun_entry_update_id').submit();" class = "fl mr5">保存</a>
<% elsif params[:action] == "shixun_entry" || params[:action] == "entry_update" %>
<%= link_to "编辑", entry_edit_shixun_path(@shixun, :path => @path, :rev => @rev), :class => "fl mr5", :remote => true %>
<% end %>
<% if params[:controller] == "shixuns" && params[:action] == "entry_edit" %>
<a href="javascript:void(0);" onclick="$('#shixun_entry_update_id').submit();" class = "fl mr5">保存</a>
<% elsif params[:action] == "shixun_entry" || params[:action] == "entry_update" %>
<%= link_to "编辑", entry_edit_shixun_path(@shixun, :path => @path, :rev => @rev), :class => "fl mr5", :remote => true %>
<% end %>
<% end %>