<% membership = User.current.memberships.all(:conditions => Project.visible_condition(User.current)) option = [] membership.each do |member| unless(member.project.project_type==1) member.member_roles.each{|role| if role.allowed_to?(:quote_project) option << member.project end } end end %>
<%= form_for "bid_for_save", :url => {:controller => 'bids', :action => 'add'}, :update => "bidding_project_list" do |f| %>
<%= select_tag 'bid', options_for_select(select_option_helper(option)), :name => 'bid', :class => 'grayline', style:'width:83%;' %>
<%= link_to '创建项目', new_project_path(course: 0, project_type: 0), :target=>'_blank'%>
<%= f.text_area :bid_message, :id => "bid_message", :required => true, :rows => 4, :cols => 40, :placeholder => l(:label_bid_reason_homework), :style => "resize: none;", :class => 'noline'%>
<%= submit_tag l(:label_commit_homework), :name => nil , :class => "enterprise"%>
<% end %>