parent
ca9da99f7e
commit
60be338848
@ -1,9 +1,10 @@
|
||||
class HomeworkAttach < ActiveRecord::Base
|
||||
attr_accessible :bid_id, :user_id
|
||||
|
||||
include Redmine::SafeAttributes
|
||||
belongs_to :user
|
||||
belongs_to :bid
|
||||
|
||||
safe_attributes "bid_id",
|
||||
"user_id"
|
||||
acts_as_attachable
|
||||
|
||||
end
|
||||
|
@ -1,5 +1,7 @@
|
||||
$('#bidding_project_list').html('<%= escape_javascript(render(:partial => 'homework_list', :locals => {:homework => @homework_list})) %>');
|
||||
$('#put-bid-form-partial').html(' <%= escape_javascript( render( :partial => 'attachments/form', :locals => {:container => @homework}) )%>')
|
||||
$('#put-bid-form-partial').html(' <%= escape_javascript( render( :partial => 'attachments/form') )%>')
|
||||
$('#flash_notice').remove()
|
||||
$("#project_id").val("请选择项目");
|
||||
$("#bid_message").val( "<%= l(:label_bid_reason) %>" );
|
||||
$("#put-bid-form").hide();
|
||||
alert('<%= @homework_flag %>');
|
@ -0,0 +1,15 @@
|
||||
<h3><%= l :label_bidding_homework %></h3>
|
||||
<div id="put-bid-form">
|
||||
<%= form_for HomeworkAttach.new, :method => :post, :url => {:controller => 'bids', :action => 'add_homework'}, :update => "bidding_project_list", :complete => '$("#put-bid-form").hide();', :html => {:multipart => true} do |f| %>
|
||||
<fieldset>
|
||||
<legend>
|
||||
<%= l(:label_attachment_plural) %>
|
||||
</legend>
|
||||
<p id="put-bid-form-partial">
|
||||
<%= render :partial => 'attachments/form' %>
|
||||
</p>
|
||||
</fieldset>
|
||||
<%= submit_tag l(:button_create) %>
|
||||
<%= link_to (t :button_back), project_for_bid_homework_path %>
|
||||
<% end %>
|
||||
</div>
|
Loading…
Reference in new issue