From e3294bf8097cd2f58a39015ab5efb419df4612f4 Mon Sep 17 00:00:00 2001 From: fanqiang <316257774@qq.com> Date: Fri, 9 Aug 2013 16:26:26 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=9C=80=E6=B1=82=E7=95=99?= =?UTF-8?q?=E8=A8=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/bids/_bid_show.html.erb | 3 +- app/views/bids/_history.html.erb | 3 +- app/views/bids/_new.html.erb | 76 +++++++++++++++------------ app/views/bids/_project_list.html.erb | 6 ++- app/views/bids/index.html.erb | 7 ++- app/views/words/_new.html.erb | 74 +++++++++++++++----------- config/locales/zh.yml | 2 + 7 files changed, 100 insertions(+), 71 deletions(-) diff --git a/app/views/bids/_bid_show.html.erb b/app/views/bids/_bid_show.html.erb index 2df13422e..685e800f1 100644 --- a/app/views/bids/_bid_show.html.erb +++ b/app/views/bids/_bid_show.html.erb @@ -1,4 +1,5 @@ +
<%= l(:label_requirement_list) %> <% if User.current.logged? %> @@ -6,7 +7,6 @@ <%= toggle_link l(:button_new_bid), 'put-bid-form', {:focus => 'project_id'} %> <% end %>
- <% bids.each do |bid|%> @@ -21,6 +21,7 @@
+ diff --git a/app/views/bids/_history.html.erb b/app/views/bids/_history.html.erb index e68dff1cb..4a4002df1 100644 --- a/app/views/bids/_history.html.erb +++ b/app/views/bids/_history.html.erb @@ -21,11 +21,10 @@ <% end %>
<%= l(:label_price) %><%= l(:label_RMB_sign) %><%= bid.budget%> (<%= link_to bid.biding_projects.count, project_for_bid_path(bid)%>)<%= l(:label_competitive_bidding) %> (<%= link_to bid.commit, respond_path(bid)%>)<%= l(:label_responses) %>
-<% if User.current.logged? %> +
<%= render :partial => 'new', :locals => {:bid => @bid, :sta => @state} %>
-<% end %> <% unless state%> <% if journals.size > 5 %> diff --git a/app/views/bids/_new.html.erb b/app/views/bids/_new.html.erb index a953a8183..85495490d 100644 --- a/app/views/bids/_new.html.erb +++ b/app/views/bids/_new.html.erb @@ -10,11 +10,11 @@ background: url("../images/button/bg104.jpg") no-repeat scroll left top transparent; padding: 0px 0px 4px 0px; border-radius: 2px; - border: 1px solid rgb(148, 148, 148); - box-shadow: none; - text-shadow: none; - margin-top: -10px; - /*margin-right: -4px;*/ + border: 1px solid rgb(148, 148, 148); + box-shadow: none; + text-shadow: none; + margin-top: -10px; + /*margin-right: -4px;*/ } input[type="button"].bid_btn { width: 60px; @@ -25,11 +25,11 @@ background: url("../images/button/bg104.jpg") no-repeat scroll left top transparent; padding: 0px 0px 4px 0px; border-radius: 2px; - border: 1px solid rgb(148, 148, 148); - box-shadow: none; - text-shadow: none; - margin-top: -10px; - margin-right: -2px; + border: 1px solid rgb(148, 148, 148); + box-shadow: none; + text-shadow: none; + margin-top: -10px; + margin-right: -2px; } textarea:focus { border: #d5dee9 1px solid; @@ -37,33 +37,43 @@ -<%= form_for('bid_message', :remote => true, :method => :post, - :url => {:controller => 'bids', - :action => 'create', - :id => bid, - :sta => sta}) do |f|%> +<%= form_for('bid_message', :remote => true, :method => :post, +:url => {:controller => 'bids', +:action => 'create', +:id => bid, +:sta => sta}) do |f|%> +<% if User.current.logged? %> - -
<%= f.text_area 'message', :rows => 3, :cols => 65, :value => "我要反馈", :onfocus => "clearInfo('bid_message_message')", :onblur => "showInfo('bid_message_message')", :style => "resize: none;", :class => 'noline'%>
- <%= f.text_field :reference_user_id, :style=>"display:none"%> - - + +
<%= submit_tag l(:button_leave_meassge), :name => nil , :class => "bid_btn", :onmouseout => "this.style.backgroundPosition = 'left top'", :onmouseover => "this.style.backgroundPosition = 'left -30px'"%> - <%= submit_tag l(:button_clear), :name => nil, :onclick => "clearMessage('bid_message_message');", :type => 'button', :class => "bid_btn", :onmouseout => "this.style.backgroundPosition = 'left top'", :onmouseover => "this.style.backgroundPosition = 'left -30px'" %>
<%= f.text_area 'message', :rows => 3, :cols => 65, :value => "#{l(:label_my_respond)}", :onfocus => "clearInfo('bid_message_message', '#{l(:label_my_respond)}')", :onblur => "showInfo('bid_message_message', '#{l(:label_my_respond)}')", :style => "resize: none;", :class => 'noline'%>
+<%= f.text_field :reference_user_id, :style=>"display:none"%> + + + + +
<%= submit_tag l(:button_leave_meassge), :name => nil , :class => "bid_btn", :onmouseout => "this.style.backgroundPosition = 'left top'", :onmouseover => "this.style.backgroundPosition = 'left -30px'"%> + <%= submit_tag l(:button_clear), :name => nil, :onclick => "clearMessage('bid_message_message');", :type => 'button', :class => "bid_btn", :onmouseout => "this.style.backgroundPosition = 'left top'", :onmouseover => "this.style.backgroundPosition = 'left -30px'" %>
+<% else %> +
+ <%= l(:label_user_login_tips) %> + <%= link_to l(:label_user_login_new), signin_path %> +
+<% end %> <% end %> diff --git a/app/views/bids/_project_list.html.erb b/app/views/bids/_project_list.html.erb index 5c8d29503..e1a30f397 100644 --- a/app/views/bids/_project_list.html.erb +++ b/app/views/bids/_project_list.html.erb @@ -2,10 +2,12 @@ <%= render_flash_messages %> + <% if User.current.logged? %> + <%= toggle_link l(:button_bidding), 'put-bid-form' %> + + <% end %>
应标项目(<%= @bidding_project.count%>)
- <%= toggle_link l(:button_bidding), 'put-bid-form' %> -
<% @bidding_project.each do |b_project|%> diff --git a/app/views/bids/index.html.erb b/app/views/bids/index.html.erb index ebf7d5a6d..5b594ee96 100644 --- a/app/views/bids/index.html.erb +++ b/app/views/bids/index.html.erb @@ -1,5 +1,9 @@ - +<% if User.current.logged? %> +
+
+ <%= toggle_link l(:button_new_bid), 'put-bid-form', {:focus => 'project_id'} %> +
<% end %> <%= form_tag(bids_path, :method => :get) do %>
<%=l(:label_bid_plural)%> @@ -10,6 +14,7 @@
<%end%> + <% if User.current.logged? %>