socialforge/app/views/bids/show_project.html.erb

73 lines
3.3 KiB
Plaintext
Raw Normal View History

2014-04-16 10:42:49 +08:00
<% if @bid.homework_type == Bid::HomeworkFile %>
<!-- 提交文件类型 -->
2014-05-22 11:00:13 +08:00
<%= render :partial => 'homework' %>
2013-11-05 16:53:00 +08:00
<% else %>
<!-- 提交引用项目 -->
2014-05-22 11:00:13 +08:00
<script type="text/javascript" language="javascript">
function clearInfo(id, content) {
var text = $('#' + id);
if (text.val() == content) {
$('#' + id).val('');
}
}
function showInfo(id, content) {
var text = $('#' + id);
if (text.val() == '') {
$('#' + id).val(content);
}
}
2013-11-05 16:53:00 +08:00
2014-05-22 11:00:13 +08:00
function cancel() {
$("#put-bid-form").hide();
}
</script>
<% if User.current.logged? %>
<!--我要竞标弹出框-->
<div id='flash' style="float:left; width: 100%; display: none"></div>
<div id="put-bid-form" style="display: none">
<%= form_for "bid_for_save", :remote => true, :url => {:controller => 'bids', :action => 'add'},
:update => "bidding_project_list",
:complete => '$("#put-bid-form").hide();' do |f| %>
<table id="bidding_table" border="0" width="100%" style="margin-left: 40px;">
<tr>
<td><%= select_tag 'bid', options_for_select(select_option_helper(@option)), :name => 'bid', :class => 'grayline' %></td>
2014-05-22 15:33:38 +08:00
<div id="prompt_create_pro">
2014-05-22 11:00:13 +08:00
<td>
2013-11-05 16:53:00 +08:00
2014-05-22 11:00:13 +08:00
<div class="font_lighter" style="font-size: 13px;">
<%= link_to '创建项目', new_project_path(course: 0, project_type: 0), :target => '_blank' %>
</div>
</td>
</div>
</tr>
2014-05-22 15:33:38 +08:00
<% if @bid.reward_type == Bid::Homework %>
2014-05-22 11:00:13 +08:00
<tr>
<td><%= 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' %></td>
</tr>
<% else %>
<tr>
<td><%= f.text_area :bid_message, :id => "bid_message", :required => true, :rows => 4, :cols => 40, :placeholder => l(:label_bid_reason), :style => "resize: none;", :class => 'noline' %></td>
</tr>
<% end %>
<tr>
<td align="right">
<%= submit_tag l(:button_add), :name => nil, :class => "enterprise",
:onmouseout => "this.style.backgroundPosition = 'left top'",
:onmouseover => "this.style.backgroundPosition = 'left -30px'" %>
<%= submit_tag l(:button_cancel), :name => nil, :onclick => "cancel();",
:type => 'button', :class => "enterprise", :onmouseout => "this.style.backgroundPosition = 'left top'",
:onmouseover => "this.style.backgroundPosition = 'left -30px'" %>
</td>
</tr>
</table>
<% end %>
</div>
<% end %>
<div id='bidding_project_list'>
<%= render :partial => 'project_list', :locals => {:bidding_project => @bidding_project, :bid => @bid} %>
</div>
2013-11-05 16:53:00 +08:00
<% end %>