diff --git a/app/controllers/bids_controller.rb b/app/controllers/bids_controller.rb index 10b282710..846956106 100644 --- a/app/controllers/bids_controller.rb +++ b/app/controllers/bids_controller.rb @@ -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] diff --git a/app/views/bids/_new.html.erb b/app/views/bids/_new.html.erb index c6ab08a4a..9585f0131 100644 --- a/app/views/bids/_new.html.erb +++ b/app/views/bids/_new.html.erb @@ -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|%> - +
- - + +
<%= f.text_area 'message', :rows => 4, :cols => 65, :value => "我要反馈", :required => true, :style => "resize: none;" %>
<%= f.text_area 'message', :rows => 4, :cols => 65, :value => "我要反馈", :required => true, :style => "resize: none;", :class => 'noline'%>
+
<%= submit_tag l(:button_leave_meassge), :name => nil %> <%= submit_tag l(:button_clear), :name => nil, :onclick => "clearMessage('user_message_message');", :type => 'button' %>
diff --git a/app/views/bids/_new_bid.html.erb b/app/views/bids/_new_bid.html.erb new file mode 100644 index 000000000..2ec149e19 --- /dev/null +++ b/app/views/bids/_new_bid.html.erb @@ -0,0 +1,42 @@ + +<%= form_tag({:controller => 'bids', +:action => 'index', +:remote => true, +:method => :post, +:id => 'new-bid-form'}) do %> +<%= error_messages_for 'bid' %> + + + + + + + + + + + + + + + + + + + + + + +
<%= text_field_tag 'bid_title', "为你的需求起个名字~~", :class => 'noline', :required => true, :onfocus => "clearInfo('bid_title')"%>
<%= text_area_tag 'bid_description', "说出你的需求>找到威客来帮你>支付担保金让威客开始工作 >验收付款并评价", :class => 'noline', :required => true, :style => "resize: none;", :rows => 8, + :onfocus => "clearInfo('bid_description')" %>
<%= text_field_tag 'bid_budget', "支付担保金额", :class => 'noline', :required => true, :onfocus => "clearInfo('bid_budget')"%>
<%= text_field_tag 'bid_deadline', "投资时限 yyyy-mm-dd", :class => 'noline', :required => true, :onfocus => "clearInfo('bid_deadline')"%>
+ + + + +
<%= submit_tag l(:button_new_bid) %>
+<%end%> \ No newline at end of file diff --git a/app/views/bids/index.html.erb b/app/views/bids/index.html.erb index 0cb206d03..0ae6754e7 100644 --- a/app/views/bids/index.html.erb +++ b/app/views/bids/index.html.erb @@ -1,13 +1,18 @@ -
- <%= link_to("新建需求", {:controller => 'bids', :action => 'new_bid'}, :class => 'icon icon-add', :style => "margin-right: 100px;") %> + - - + +
需求列表
+ +
需求列表 +
+ <%= toggle_link l(:button_bidding), 'put-bid-form', {:focus => 'project_id'} %> +
<% @bids.each do |bid|%> - +
@@ -40,5 +45,4 @@
<%= link_to image_tag(url_to_avatar(bid.author), :class => 'avatar'), :class => "avatar" %> @@ -20,9 +25,9 @@ - - - + + +
悬赏:¥<%= bid.budget%>(<%= bid.biding_projects.count%>)应标(<%= bid.commit %>)反馈(<%= bid.watcher_users.count%>)关注(<%= link_to bid.biding_projects.count, project_for_bid_path(bid)%>)应标(<%= link_to bid.commit, respond_path(bid)%>)反馈(<%= link_to bid.watcher_users.count, respond_path(bid)%>)关注
<%= format_time bid.created_at %>
- <% end %> diff --git a/app/views/bids/new_bid.html.erb b/app/views/bids/new_bid.html.erb deleted file mode 100644 index bfda90733..000000000 --- a/app/views/bids/new_bid.html.erb +++ /dev/null @@ -1,14 +0,0 @@ -
-<%= form_tag({:controller => 'bids', - :action => 'index', - :remote => true, - :method => :post, - :id => 'new-bid-form'}) do %> -

需求名称:<%= text_field_tag 'bid_title' %>

-

需求描述:

-

<%= text_area_tag 'bid_description' %>

-

投资预算:<%= text_field_tag 'bid_budget' %>

-

投资时限:<%= text_field_tag 'bid_deadline' %>

- <%= submit_tag l(:button_submit) %> - <%end%> -
diff --git a/app/views/bids/show_project.html.erb b/app/views/bids/show_project.html.erb index 8a5d13f99..7f06cd1b7 100644 --- a/app/views/bids/show_project.html.erb +++ b/app/views/bids/show_project.html.erb @@ -1,28 +1,33 @@
- <%= toggle_link "我要应标", 'put-bid-form', {:focus => 'project_id'} %> + <%= toggle_link l(:button_bidding), 'put-bid-form', {:focus => 'project_id'} %>
- +
应标项目(<%= @bidding_project.count%>)应标项目(<%= @bidding_project.count%>)
<%= render :partial => 'project_list', :locals => {:bidding_project => @bidding_project} %> diff --git a/app/views/layouts/base_bids.html.erb b/app/views/layouts/base_bids.html.erb index 94d1de53b..3c8289168 100644 --- a/app/views/layouts/base_bids.html.erb +++ b/app/views/layouts/base_bids.html.erb @@ -38,7 +38,7 @@ <%= h @bid.name %> - <%= watcher_link(@bid, User.current) %> + <%= watcher_link(@bid, User.current) %> diff --git a/config/locales/zh.yml b/config/locales/zh.yml index 1cd32883d..78c932470 100644 --- a/config/locales/zh.yml +++ b/config/locales/zh.yml @@ -1149,4 +1149,5 @@ zh: label_user_response: 用户反馈 label_bidding_project: 应标项目 button_bidding: 我要应标 + button_new_bid: 发布需求 diff --git a/public/themes/redpenny-master/stylesheets/application.css b/public/themes/redpenny-master/stylesheets/application.css index f98cfc003..e24540d32 100644 --- a/public/themes/redpenny-master/stylesheets/application.css +++ b/public/themes/redpenny-master/stylesheets/application.css @@ -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; } \ No newline at end of file