2013-09-13 21:52:24 +08:00
|
|
|
<div id="put-bid-form" style="display: none">
|
|
|
|
<%= form_for "bid_for_save", :remote=>true, :url => {:controller => 'bids', :action => 'add_homework'},
|
|
|
|
:update => "bidding_project_list",
|
|
|
|
:complete => '$("#put-bid-form").hide();' do |f| %>
|
|
|
|
<fieldset><legend><%= l(:label_attachment_plural) %></legend>
|
|
|
|
<p><%= render :partial => 'attachments/form', :locals => {:container => @homework} %></p>
|
|
|
|
</fieldset>
|
|
|
|
<%= submit_tag l(:button_create) %>
|
|
|
|
<% end %>
|
|
|
|
</div>
|
2013-11-14 09:07:55 +08:00
|
|
|
<% 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) %>
|
2013-09-23 13:35:29 +08:00
|
|
|
|
2013-09-13 21:52:24 +08:00
|
|
|
<div class='icon icon-add'>
|
2013-10-09 16:46:56 +08:00
|
|
|
<%= toggle_link l(:label_commit_homework), 'put-bid-form' %>
|
2013-09-13 21:52:24 +08:00
|
|
|
</div>
|
2013-09-23 08:44:48 +08:00
|
|
|
<% elsif @homework_list.empty? %>
|
|
|
|
<div class="font_lighter_sidebar" style="padding-left: 10px">暂无学生提交作业!</div>
|
|
|
|
<% end %>
|
2013-09-13 21:52:24 +08:00
|
|
|
|
|
|
|
<div id='bidding_project_list'>
|
|
|
|
<%= render :partial => 'homework_list', :locals => {:homework => @homework_list} %>
|
|
|
|
</div>
|