改变了新建需求的界面,对需求的留言框和应标项目的样式
This commit is contained in:
parent
408a626ddd
commit
163fe97e6f
|
@ -62,8 +62,8 @@ class BidsController < ApplicationController
|
|||
end
|
||||
|
||||
def create
|
||||
if params[:user_message].size>0
|
||||
message = params[:user_message][:message]
|
||||
if params[:bid_message].size>0
|
||||
message = params[:bid_message][:message]
|
||||
@bid.add_jour(User.current, message)
|
||||
# if a_message.size > 5
|
||||
# @message = a_message[-5, 5]
|
||||
|
|
|
@ -1,13 +1,15 @@
|
|||
|
||||
<%= form_for('user_message', :remote => true, :method => :post,
|
||||
<%= form_for('bid_message', :remote => true, :method => :post,
|
||||
:url => {:controller => 'bids',
|
||||
:action => 'create',
|
||||
:bid_id => bid,
|
||||
:sta => sta}) do |f|%>
|
||||
<table border="0" width="500px" align="center">
|
||||
<table border="0" width="525px" align="center" style="border-left: 2px solid #acaeb1; border-right: 2px solid #acaeb1;
|
||||
border-top: 2px solid #acaeb1; border-bottom: 2px solid #acaeb1;">
|
||||
<tr>
|
||||
<td><%= f.text_area 'message', :rows => 4, :cols => 65, :value => "我要反馈", :required => true, :style => "resize: none;" %></td>
|
||||
</tr>
|
||||
<td><%= f.text_area 'message', :rows => 4, :cols => 65, :value => "我要反馈", :required => true, :style => "resize: none;", :class => 'noline'%></td>
|
||||
</tr></table>
|
||||
<table border="0" width="525px" align="center">
|
||||
<tr><td align="right"><%= submit_tag l(:button_leave_meassge), :name => nil %>
|
||||
<%= submit_tag l(:button_clear), :name => nil, :onclick => "clearMessage('user_message_message');", :type => 'button' %></td></tr>
|
||||
</table>
|
||||
|
|
|
@ -0,0 +1,42 @@
|
|||
<script type="text/javascript" language="javascript">
|
||||
function clearInfo(id) {
|
||||
$('#'+id).val('');
|
||||
}
|
||||
</script>
|
||||
<%= form_tag({:controller => 'bids',
|
||||
:action => 'index',
|
||||
:remote => true,
|
||||
:method => :post,
|
||||
:id => 'new-bid-form'}) do %>
|
||||
<%= error_messages_for 'bid' %>
|
||||
<table border="0" width="600px" style="border-left: 1px solid #acaeb1; border-right: 1px solid #acaeb1;
|
||||
border-top: 1px solid #acaeb1; border-bottom: 1px solid #acaeb1; margin-top: 60px; margin-left: 30px;">
|
||||
<tr>
|
||||
<td><%= text_field_tag 'bid_title', "为你的需求起个名字~~", :class => 'noline', :required => true, :onfocus => "clearInfo('bid_title')"%></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><div class="tableline"></div></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><%= text_area_tag 'bid_description', "说出你的需求>找到威客来帮你>支付担保金让威客开始工作 >验收付款并评价", :class => 'noline', :required => true, :style => "resize: none;", :rows => 8,
|
||||
:onfocus => "clearInfo('bid_description')" %></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><div class="tableline"></div></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><%= text_field_tag 'bid_budget', "支付担保金额", :class => 'noline', :required => true, :onfocus => "clearInfo('bid_budget')"%></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><div class="tableline"></div></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><%= text_field_tag 'bid_deadline', "投资时限 yyyy-mm-dd", :class => 'noline', :required => true, :onfocus => "clearInfo('bid_deadline')"%></td>
|
||||
</tr>
|
||||
</table>
|
||||
<table id="bidding_table" border="0" width="600" style="margin-top: 20px; margin-left: 30px;">
|
||||
<tr>
|
||||
<td align="right"><%= submit_tag l(:button_new_bid) %></td>
|
||||
</tr>
|
||||
</table>
|
||||
<%end%>
|
|
@ -1,13 +1,18 @@
|
|||
<div class="contextual">
|
||||
<%= link_to("新建需求", {:controller => 'bids', :action => 'new_bid'}, :class => 'icon icon-add', :style => "margin-right: 100px;") %>
|
||||
<div id="put-bid-form" style="display: none">
|
||||
<%= render :partial => 'new_bid' %>
|
||||
</div>
|
||||
<table width="200px" border="0" style="padding-left: 90px; margin-bottom: 15px;">
|
||||
<td class="font_lighter" style="font-size: 18px;">需求列表</td>
|
||||
|
||||
<table width="500px" border="0" style="padding-left: 10px; margin-bottom: 15px; padding-top: 10px;">
|
||||
<td width="100px" class="font_lighter" style="font-size: 16px;">需求列表</td>
|
||||
<td>
|
||||
<div class='icon icon-add' >
|
||||
<%= toggle_link l(:button_bidding), 'put-bid-form', {:focus => 'project_id'} %>
|
||||
</div></td>
|
||||
</table>
|
||||
|
||||
<% @bids.each do |bid|%>
|
||||
|
||||
<table width="80%" border="0" align="center">
|
||||
<table width="80%" border="0" style="padding-left: 10px">
|
||||
<tr>
|
||||
<td colspan="2" valign="top" width="50" ><%= link_to image_tag(url_to_avatar(bid.author), :class => 'avatar'), :class => "avatar" %></td>
|
||||
<td>
|
||||
|
@ -20,9 +25,9 @@
|
|||
<table border="0">
|
||||
<tr>
|
||||
<td style="color: rgb(255, 0, 0);"><strong>悬赏:¥<%= bid.budget%></strong></td>
|
||||
<td class="font_lighter">(<%= bid.biding_projects.count%>)应标</td>
|
||||
<td class="font_lighter">(<%= bid.commit %>)反馈</td>
|
||||
<td class="font_lighter">(<%= bid.watcher_users.count%>)关注</td>
|
||||
<td class="font_lighter">(<%= link_to bid.biding_projects.count, project_for_bid_path(bid)%>)应标</td>
|
||||
<td class="font_lighter">(<%= link_to bid.commit, respond_path(bid)%>)反馈</td>
|
||||
<td class="font_lighter">(<%= link_to bid.watcher_users.count, respond_path(bid)%>)关注</td>
|
||||
</tr>
|
||||
</table></td>
|
||||
<td width="200" align="right" class="a"><a class="font_lighter"> <%= format_time bid.created_at %></a></td>
|
||||
|
@ -40,5 +45,4 @@
|
|||
</table></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<% end %>
|
||||
|
|
|
@ -1,14 +0,0 @@
|
|||
<div class="box tabular">
|
||||
<%= form_tag({:controller => 'bids',
|
||||
:action => 'index',
|
||||
:remote => true,
|
||||
:method => :post,
|
||||
:id => 'new-bid-form'}) do %>
|
||||
<p>需求名称:<%= text_field_tag 'bid_title' %></p>
|
||||
<p>需求描述:</p>
|
||||
<p><%= text_area_tag 'bid_description' %></p>
|
||||
<p>投资预算:<%= text_field_tag 'bid_budget' %></p>
|
||||
<p>投资时限:<%= text_field_tag 'bid_deadline' %></p>
|
||||
<%= submit_tag l(:button_submit) %>
|
||||
<%end%>
|
||||
</div>
|
|
@ -1,28 +1,33 @@
|
|||
<div class="contextual">
|
||||
<div class='icon icon-add' style="margin-right: 30px;">
|
||||
<%= toggle_link "我要应标", 'put-bid-form', {:focus => 'project_id'} %>
|
||||
<%= toggle_link l(:button_bidding), 'put-bid-form', {:focus => 'project_id'} %>
|
||||
</div>
|
||||
</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" align='center' width="500">
|
||||
<table id="bidding_table" border="0" width="400" style="margin-left: 40px;">
|
||||
<tr>
|
||||
<td><%= select_tag 'bid', options_for_select(@option), :name => 'bid' %></td>
|
||||
<td><%= select_tag 'bid', options_for_select(@option), :name => 'bid', :class => 'grayline' %></td>
|
||||
</tr>
|
||||
</table>
|
||||
<table id="bidding_table" border="0" width="400" style="border-left: 1px solid #acaeb1; border-right: 1px solid #acaeb1;
|
||||
border-top: 1px solid #acaeb1; border-bottom: 1px solid #acaeb1; margin-left: 45px;">
|
||||
<tr>
|
||||
<td><%= f.text_area :bid_message, :id => "bid_message", :required => true, :rows => 4, :cols => 40, :value => "请输入应标理由", :style => "resize: none;"%></td>
|
||||
<td><%= f.text_area :bid_message, :id => "bid_message", :required => true, :rows => 4, :cols => 40, :value => "请输入应标理由", :style => "resize: none;", :class => 'noline'%></td>
|
||||
</tr>
|
||||
</table>
|
||||
<table id="bidding_table" border="0" width="400" style="margin-left: 45px;">
|
||||
<tr>
|
||||
<td><%= f.submit "add"%><%= link_to_function l(:button_cancel), '$("#put-bid-form").hide();'%></td>
|
||||
<td><%= f.submit l(:button_add)%><%= link_to_function l(:button_cancel), '$("#put-bid-form").hide();'%></td>
|
||||
</tr>
|
||||
</table>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<table width="200px" border="0" style="padding-left: 15px">
|
||||
<td class="font_lighter" style="font-size: 18px;">应标项目(<%= @bidding_project.count%>)</td>
|
||||
<td class="font_lighter" style="font-size: 18px;">应标项目(<%= @bidding_project.count%>)</td>
|
||||
</table>
|
||||
<div id='bidding_project_list'>
|
||||
<%= render :partial => 'project_list', :locals => {:bidding_project => @bidding_project} %>
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
<td class="info_font"><%= h @bid.name %></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> <%= watcher_link(@bid, User.current) %> </td>
|
||||
<td align="center"> <%= watcher_link(@bid, User.current) %> </td>
|
||||
</tr>
|
||||
</table></td>
|
||||
</tr>
|
||||
|
|
|
@ -1149,4 +1149,5 @@ zh:
|
|||
label_user_response: 用户反馈
|
||||
label_bidding_project: 应标项目
|
||||
button_bidding: 我要应标
|
||||
button_new_bid: 发布需求
|
||||
|
||||
|
|
|
@ -1549,4 +1549,30 @@ a.bid_user {
|
|||
font-family:微软雅黑;
|
||||
color:#acaeb1;
|
||||
font-size:12px;
|
||||
}
|
||||
input[type='text'].noline {
|
||||
border-style: none;
|
||||
border-color: white;
|
||||
border-width: medium;
|
||||
font-size: 16px;
|
||||
color: #ACAEB1;
|
||||
padding: 10px 0px;
|
||||
width: 100%;
|
||||
}
|
||||
.noline {
|
||||
border-style: none;
|
||||
border-color: white;
|
||||
border-width: medium;
|
||||
font-size: 16px;
|
||||
color: #ACAEB1;
|
||||
padding: 10px 0px;
|
||||
width: 100%;
|
||||
}
|
||||
.grayline{
|
||||
border-color: #ACAEB1;
|
||||
border-width: 1px;
|
||||
}
|
||||
div.tableline{
|
||||
height: 1px;
|
||||
background-color: #ACAEB1;
|
||||
}
|
Loading…
Reference in New Issue