diff --git a/app/controllers/bids_controller.rb b/app/controllers/bids_controller.rb index 3dd06113e..187b2adec 100644 --- a/app/controllers/bids_controller.rb +++ b/app/controllers/bids_controller.rb @@ -5,19 +5,35 @@ class BidsController < ApplicationController helper :watchers def index - - # @requirement_title = "4" - @limit = 5 - @bid_count = Bid.count + # Modified by nie + # @requirement_title = "4" + @offset, @limit = api_offset_and_limit({:limit => 5}) + @bids = Bid.visible + @bids = @bids.like(params[:name]) if params[:name].present? + @bid_count = @bids.count @bid_pages = Paginator.new @bid_count, @limit, params['page'] @offset ||= @bid_pages.reverse_offset + #@bids = @bids.offset(@offset).limit(@limit).all.reverse unless @offset == 0 - @bids = Bid.offset(@offset).limit(@limit).all.reverse + @bids = @bids.offset(@offset).limit(@limit).all.reverse else - limit = @bid_count%@limit - @bids = Bid.offset(@offset).limit(limit).all.reverse + limit = @bid_count % @limit + @bids = @bids.offset(@offset).limit(limit).all.reverse end - + # @limit = api_offset_and_limit({:limit => 5}) + # @bids = Bid.visible + # @bids = @bids.like(params[:name]) if params[:name].present? + # @bid_count = @bids.count + # @bid_pages = Paginator.new @bid_count, @limit, params['page'] + # @offset ||= @bid_pages.reverse_offset + # #@bids = @bids.offset(@offset).limit(@limit).all.reverse + # unless @offset == 0 + # @bids = @bid_count.offset(@offset).limit(@limit).all.reverse + # else + # limit = @bid_count%@limit + # @bids = @bid_count.offset(@offset).limit(limit).all.reverse + # end + # #end end def show diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb index 781074403..a75fac2eb 100644 --- a/app/controllers/projects_controller.rb +++ b/app/controllers/projects_controller.rb @@ -79,11 +79,20 @@ class ProjectsController < ApplicationController # end def index + #Modified by nie + # @offset, @limit = api_offset_and_limit({:limit => 10}) + # @project_count = Project.visible.count + # @project_pages = Paginator.new @project_count, @limit, params['page'] + # @offset ||= @project_pages.offset + # @projects = Project.visible.offset(@offset).limit(@limit).order('lft').all @offset, @limit = api_offset_and_limit({:limit => 10}) - @project_count = Project.visible.count + @projects = Project.visible + @projects = Project.visible.like(params[:name]) if params[:name].present? + @project_count = @projects.count @project_pages = Paginator.new @project_count, @limit, params['page'] @offset ||= @project_pages.offset - @projects = Project.visible.offset(@offset).limit(@limit).order('lft').all + @projects = @projects.offset(@offset).limit(@limit).order('lft').all + #end respond_to do |format| format.html { render :layout => 'base' diff --git a/app/models/bid.rb b/app/models/bid.rb index 45de3a193..ccc6247f2 100644 --- a/app/models/bid.rb +++ b/app/models/bid.rb @@ -25,7 +25,7 @@ class Bid < ActiveRecord::Base where(nil) else pattern = "%#{arg.to_s.strip.downcase}%" - where("LOWER(identifier) LIKE :p OR LOWER(name) LIKE :p OR LOWER(description) LIKE :p", :p => pattern) + where("LOWER(id) LIKE :p OR LOWER(name) LIKE :p OR LOWER(description) LIKE :p", :p => pattern) end } diff --git a/app/views/bids/_new.html.erb b/app/views/bids/_new.html.erb index 1b45908fe..caf046b78 100644 --- a/app/views/bids/_new.html.erb +++ b/app/views/bids/_new.html.erb @@ -1,16 +1,51 @@ + <%= 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;", :class => 'noline'%><%= f.text_area 'message', :rows => 3, :cols => 65, :value => "我要反馈", :style => "resize: none;", :class => 'noline'%>
- +
<%= submit_tag l(:button_leave_meassge), :name => nil %> - <%= submit_tag l(:button_clear), :name => nil, :onclick => "clearMessage('bid_message_message');", :type => 'button' %>
<%= 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'" %>
<% end %> diff --git a/app/views/bids/index.html.erb b/app/views/bids/index.html.erb index 39ad46c2c..9e83e6413 100644 --- a/app/views/bids/index.html.erb +++ b/app/views/bids/index.html.erb @@ -2,7 +2,15 @@ - +<%= form_tag(bids_path, :method => :get) do %> +
+ <%=l(:label_bid_plural)%> + +
+<% end %>
<%= render :partial => 'bid_show', :locals => {:bids => @bids, :bid_pages => @bid_pages} %>
diff --git a/app/views/projects/index.html.erb b/app/views/projects/index.html.erb index 0124f1f38..b93e2eaca 100644 --- a/app/views/projects/index.html.erb +++ b/app/views/projects/index.html.erb @@ -2,7 +2,15 @@ <%= auto_discovery_link_tag(:atom, {:action => 'index', :format => 'atom', :key => User.current.rss_key}) %> <% end %> -

<%=l(:label_project_plural)%>

+<%= form_tag(projects_path, :method => :get) do %> +
+ <%=l(:label_project_plural)%> + +
+<% end %>
<%= render_project_hierarchy(@projects)%> diff --git a/app/views/users/index.html.erb b/app/views/users/index.html.erb index 69775f698..207f6e149 100644 --- a/app/views/users/index.html.erb +++ b/app/views/users/index.html.erb @@ -65,17 +65,18 @@ <% html_title(l(:label_user_plural)) -%> <% else %> -
+ +
+<%= l(:label_user_plural)%> <%= form_tag(users_path, :method => :get) do %> -
+ +
+ <% end %> +
+
 
diff --git a/config/locales/zh.yml b/config/locales/zh.yml index dfed39345..addafbc49 100644 --- a/config/locales/zh.yml +++ b/config/locales/zh.yml @@ -1120,7 +1120,7 @@ zh: field_closed_on: Closed setting_default_projects_tracker_ids: Default trackers for new projects label_total_time: 合计 - label_create_time: 创建时间 #Customer added! + label_create_time: 创建时间 #Customer added!Added by nie label_current_contributors: 位当前贡献者 label_lines_of_code: 行代码 label_since_last_commits: 距离上次提交时间 @@ -1141,6 +1141,7 @@ zh: label_post_on: 发表了 label_find_all_comments: 查看所有评论 label_updated_time_on: " 更新于 %{value} " + label_bid_plural: 需求 #added by liuping button_unfollow: 取消关注 button_follow: 关注 diff --git a/public/images/button/Thumbs.db b/public/images/button/Thumbs.db new file mode 100644 index 000000000..26c0ae67c Binary files /dev/null and b/public/images/button/Thumbs.db differ diff --git a/public/images/button/bg1.jpg b/public/images/button/bg1.jpg new file mode 100644 index 000000000..0e73b2c10 Binary files /dev/null and b/public/images/button/bg1.jpg differ diff --git a/public/images/button/bg10.jpg b/public/images/button/bg10.jpg new file mode 100644 index 000000000..f0bdb03cc Binary files /dev/null and b/public/images/button/bg10.jpg differ diff --git a/public/images/button/bg100.jpg b/public/images/button/bg100.jpg new file mode 100644 index 000000000..3eb9490e7 Binary files /dev/null and b/public/images/button/bg100.jpg differ diff --git a/public/images/button/bg102.jpg b/public/images/button/bg102.jpg new file mode 100644 index 000000000..e43cde964 Binary files /dev/null and b/public/images/button/bg102.jpg differ diff --git a/public/images/button/bg103.jpg b/public/images/button/bg103.jpg new file mode 100644 index 000000000..411901ef4 Binary files /dev/null and b/public/images/button/bg103.jpg differ diff --git a/public/images/button/bg104.jpg b/public/images/button/bg104.jpg new file mode 100644 index 000000000..e01e8ae93 Binary files /dev/null and b/public/images/button/bg104.jpg differ diff --git a/public/images/button/bg11.jpg b/public/images/button/bg11.jpg new file mode 100644 index 000000000..f730edfeb Binary files /dev/null and b/public/images/button/bg11.jpg differ diff --git a/public/images/button/bg12.jpg b/public/images/button/bg12.jpg new file mode 100644 index 000000000..2e598b59b Binary files /dev/null and b/public/images/button/bg12.jpg differ diff --git a/public/images/button/bg13.jpg b/public/images/button/bg13.jpg new file mode 100644 index 000000000..38bc2b5f2 Binary files /dev/null and b/public/images/button/bg13.jpg differ diff --git a/public/images/button/bg16.jpg b/public/images/button/bg16.jpg new file mode 100644 index 000000000..648b234a6 Binary files /dev/null and b/public/images/button/bg16.jpg differ diff --git a/public/images/button/bg17.jpg b/public/images/button/bg17.jpg new file mode 100644 index 000000000..4985ac9a4 Binary files /dev/null and b/public/images/button/bg17.jpg differ diff --git a/public/images/button/bg18.jpg b/public/images/button/bg18.jpg new file mode 100644 index 000000000..b4f8f3fe6 Binary files /dev/null and b/public/images/button/bg18.jpg differ diff --git a/public/images/button/bg19.jpg b/public/images/button/bg19.jpg new file mode 100644 index 000000000..c6278a1e1 Binary files /dev/null and b/public/images/button/bg19.jpg differ diff --git a/public/images/button/bg2.jpg b/public/images/button/bg2.jpg new file mode 100644 index 000000000..16bb498b5 Binary files /dev/null and b/public/images/button/bg2.jpg differ diff --git a/public/images/button/bg20.jpg b/public/images/button/bg20.jpg new file mode 100644 index 000000000..325fd5f5e Binary files /dev/null and b/public/images/button/bg20.jpg differ diff --git a/public/images/button/bg21.jpg b/public/images/button/bg21.jpg new file mode 100644 index 000000000..e7739f0ab Binary files /dev/null and b/public/images/button/bg21.jpg differ diff --git a/public/images/button/bg22.jpg b/public/images/button/bg22.jpg new file mode 100644 index 000000000..2262fab1f Binary files /dev/null and b/public/images/button/bg22.jpg differ diff --git a/public/images/button/bg23.jpg b/public/images/button/bg23.jpg new file mode 100644 index 000000000..9d0ab8be5 Binary files /dev/null and b/public/images/button/bg23.jpg differ diff --git a/public/images/button/bg24.jpg b/public/images/button/bg24.jpg new file mode 100644 index 000000000..6943cd306 Binary files /dev/null and b/public/images/button/bg24.jpg differ diff --git a/public/images/button/bg25.jpg b/public/images/button/bg25.jpg new file mode 100644 index 000000000..c9a196583 Binary files /dev/null and b/public/images/button/bg25.jpg differ diff --git a/public/images/button/bg26.jpg b/public/images/button/bg26.jpg new file mode 100644 index 000000000..b1bd753e5 Binary files /dev/null and b/public/images/button/bg26.jpg differ diff --git a/public/images/button/bg27.jpg b/public/images/button/bg27.jpg new file mode 100644 index 000000000..d7587dc25 Binary files /dev/null and b/public/images/button/bg27.jpg differ diff --git a/public/images/button/bg28.jpg b/public/images/button/bg28.jpg new file mode 100644 index 000000000..67fe5b9c1 Binary files /dev/null and b/public/images/button/bg28.jpg differ diff --git a/public/images/button/bg29.jpg b/public/images/button/bg29.jpg new file mode 100644 index 000000000..44ffc34f1 Binary files /dev/null and b/public/images/button/bg29.jpg differ diff --git a/public/images/button/bg3.jpg b/public/images/button/bg3.jpg new file mode 100644 index 000000000..2a0dacd4a Binary files /dev/null and b/public/images/button/bg3.jpg differ diff --git a/public/images/button/bg30.jpg b/public/images/button/bg30.jpg new file mode 100644 index 000000000..5b9b477da Binary files /dev/null and b/public/images/button/bg30.jpg differ diff --git a/public/images/button/bg31.jpg b/public/images/button/bg31.jpg new file mode 100644 index 000000000..e32b01c2b Binary files /dev/null and b/public/images/button/bg31.jpg differ diff --git a/public/images/button/bg32.jpg b/public/images/button/bg32.jpg new file mode 100644 index 000000000..4573d1711 Binary files /dev/null and b/public/images/button/bg32.jpg differ diff --git a/public/images/button/bg33.jpg b/public/images/button/bg33.jpg new file mode 100644 index 000000000..44c1bc118 Binary files /dev/null and b/public/images/button/bg33.jpg differ diff --git a/public/images/button/bg34.jpg b/public/images/button/bg34.jpg new file mode 100644 index 000000000..e593973f5 Binary files /dev/null and b/public/images/button/bg34.jpg differ diff --git a/public/images/button/bg35.jpg b/public/images/button/bg35.jpg new file mode 100644 index 000000000..3773bc94b Binary files /dev/null and b/public/images/button/bg35.jpg differ diff --git a/public/images/button/bg36.jpg b/public/images/button/bg36.jpg new file mode 100644 index 000000000..429316707 Binary files /dev/null and b/public/images/button/bg36.jpg differ diff --git a/public/images/button/bg37.jpg b/public/images/button/bg37.jpg new file mode 100644 index 000000000..286a30230 Binary files /dev/null and b/public/images/button/bg37.jpg differ diff --git a/public/images/button/bg38.jpg b/public/images/button/bg38.jpg new file mode 100644 index 000000000..9f168959b Binary files /dev/null and b/public/images/button/bg38.jpg differ diff --git a/public/images/button/bg39.jpg b/public/images/button/bg39.jpg new file mode 100644 index 000000000..eda5526b1 Binary files /dev/null and b/public/images/button/bg39.jpg differ diff --git a/public/images/button/bg40.jpg b/public/images/button/bg40.jpg new file mode 100644 index 000000000..012756f14 Binary files /dev/null and b/public/images/button/bg40.jpg differ diff --git a/public/images/button/bg41.jpg b/public/images/button/bg41.jpg new file mode 100644 index 000000000..23652c484 Binary files /dev/null and b/public/images/button/bg41.jpg differ diff --git a/public/images/button/bg42.jpg b/public/images/button/bg42.jpg new file mode 100644 index 000000000..047abccb5 Binary files /dev/null and b/public/images/button/bg42.jpg differ diff --git a/public/images/button/bg43.jpg b/public/images/button/bg43.jpg new file mode 100644 index 000000000..076f32c9a Binary files /dev/null and b/public/images/button/bg43.jpg differ diff --git a/public/images/button/bg44.jpg b/public/images/button/bg44.jpg new file mode 100644 index 000000000..f34dd1832 Binary files /dev/null and b/public/images/button/bg44.jpg differ diff --git a/public/images/button/bg45.jpg b/public/images/button/bg45.jpg new file mode 100644 index 000000000..338418c03 Binary files /dev/null and b/public/images/button/bg45.jpg differ diff --git a/public/images/button/bg46.jpg b/public/images/button/bg46.jpg new file mode 100644 index 000000000..883101d6f Binary files /dev/null and b/public/images/button/bg46.jpg differ diff --git a/public/images/button/bg47.jpg b/public/images/button/bg47.jpg new file mode 100644 index 000000000..f6dd6eb1e Binary files /dev/null and b/public/images/button/bg47.jpg differ diff --git a/public/images/button/bg48.jpg b/public/images/button/bg48.jpg new file mode 100644 index 000000000..812617e8d Binary files /dev/null and b/public/images/button/bg48.jpg differ diff --git a/public/images/button/bg49.jpg b/public/images/button/bg49.jpg new file mode 100644 index 000000000..635374f2a Binary files /dev/null and b/public/images/button/bg49.jpg differ diff --git a/public/images/button/bg50.jpg b/public/images/button/bg50.jpg new file mode 100644 index 000000000..7556c947d Binary files /dev/null and b/public/images/button/bg50.jpg differ diff --git a/public/images/button/bg7.jpg b/public/images/button/bg7.jpg new file mode 100644 index 000000000..c6b13ecf5 Binary files /dev/null and b/public/images/button/bg7.jpg differ diff --git a/public/images/button/css-logo.gif b/public/images/button/css-logo.gif new file mode 100644 index 000000000..82f8c3276 Binary files /dev/null and b/public/images/button/css-logo.gif differ diff --git a/public/images/button/delete.gif b/public/images/button/delete.gif new file mode 100644 index 000000000..05f41fcf9 Binary files /dev/null and b/public/images/button/delete.gif differ diff --git a/public/images/button/favorite.gif b/public/images/button/favorite.gif new file mode 100644 index 000000000..a8551b545 Binary files /dev/null and b/public/images/button/favorite.gif differ diff --git a/public/images/button/help.gif b/public/images/button/help.gif new file mode 100644 index 000000000..75f221f4b Binary files /dev/null and b/public/images/button/help.gif differ diff --git a/public/images/button/ok.gif b/public/images/button/ok.gif new file mode 100644 index 000000000..d0e539a79 Binary files /dev/null and b/public/images/button/ok.gif differ diff --git a/public/images/button/register.gif b/public/images/button/register.gif new file mode 100644 index 000000000..11b9af1d2 Binary files /dev/null and b/public/images/button/register.gif differ diff --git a/public/images/button/reset.gif b/public/images/button/reset.gif new file mode 100644 index 000000000..226cb2f37 Binary files /dev/null and b/public/images/button/reset.gif differ diff --git a/public/images/button/submit1.gif b/public/images/button/submit1.gif new file mode 100644 index 000000000..add821bfe Binary files /dev/null and b/public/images/button/submit1.gif differ diff --git a/public/images/button/submit2.gif b/public/images/button/submit2.gif new file mode 100644 index 000000000..d787ee0be Binary files /dev/null and b/public/images/button/submit2.gif differ diff --git a/public/images/button/submit3.gif b/public/images/button/submit3.gif new file mode 100644 index 000000000..24a9cc36f Binary files /dev/null and b/public/images/button/submit3.gif differ diff --git a/public/themes/redpenny-master/stylesheets/application.css b/public/themes/redpenny-master/stylesheets/application.css index e87a82ae9..94359e393 100644 --- a/public/themes/redpenny-master/stylesheets/application.css +++ b/public/themes/redpenny-master/stylesheets/application.css @@ -1045,7 +1045,9 @@ pre,code,.line-code font-family:'Source Code Pro', helvetica, Arial; } - +.autoscroll { + overflow-x: visible; +} @@ -1085,10 +1087,10 @@ div.wiki-description { } .information { - margin-top: 0px; + margin-top: 20px; margin-left: 607px; float: left; - height: 108px; + height: auto; width: 246px; font-family: helvetica,arial,sans-serif; color: rgb(0, 0, 0); @@ -1105,7 +1107,6 @@ a.project { float: left; margin-top: 0px; width: 908px; - min-height: 120px; height: auto; margin-bottom: 5px; } @@ -1126,16 +1127,16 @@ a.root { padding-top: 10px; padding-left: 10px; padding-bottom: 10px; - margin-bottom: 20px; - background-color: #f5f5f5; - border: 1px solid #eee; - border: 1px solid rgba(0, 0, 0, 0.05); - -webkit-border-radius: 4px; + margin-bottom: 0px; + /*background-color: #f5f5f5;*/ + border-bottom: 1px solid #eee; + border-bottom: 1px solid rgba(0, 0, 0, 0.05); + /*-webkit-border-radius: 4px; -moz-border-radius: 4px; border-radius: 4px; -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05); -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05); - box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05); + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05);*/ } .reviews { @@ -1194,6 +1195,10 @@ a.img-tag3{ margin-left: 10px; } +p.stats { + margin: 0px; +} + .add-info { float: left; margin-top: 0px; @@ -1201,6 +1206,7 @@ a.img-tag3{ width: 908px; margin-bottom: 5px; } + .main-language { float: left; height: 18px; @@ -1208,7 +1214,12 @@ a.img-tag3{ font-size: 13px; font-family: helvetica,arial,sans-serif; line-height: 18px; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + -o-text-overflow: ellipsis; } + .licences { float: left; height: 18px; @@ -1255,16 +1266,16 @@ a.tag { min-height: 20px; height: auto; padding: 19px 19px 6px 19px; - margin-bottom: 20px; - background-color: #f5f5f5; - border: 1px solid #eee; - border: 1px solid rgba(0, 0, 0, 0.05); - -webkit-border-radius: 4px; + margin-bottom: 0px; + /*background-color: #f5f5f5;*/ + border-bottom: 1px solid #eee; + border-bottom: 1px solid rgba(0, 0, 0, 0.05); + /*-webkit-border-radius: 4px; -moz-border-radius: 4px; border-radius: 4px; -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05); -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05); - box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05); + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05);*/ } .float_right { @@ -1608,6 +1619,45 @@ div.member_content { width: 600px; margin-left: 40px; } + +/* + * Designed for search content + * Added by nie + */ +div.project-search-block { + margin-top: 0px; + margin-bottom: 10px; + padding: 10px; + width: 888px; + border-top: 1px solid rgb(242,242,242); + border-bottom: 1px solid rgb(242, 242, 242); + margin-left: auto; + margin-right: auto; +} + +div.project-search-block span { + margin-left: 0px; + font-size: 1.5em; +} + +div.project-search { + display: inline-block; + float: right; + margin-right: 160px; +} +div.project-search input[type="submit"] { + width: 40px; + font-family: Arial,Helvetica,sans-serif; + font-size: 12px; + color: rgb(5, 5, 5); + padding: 0px; + background: -moz-linear-gradient(center top , rgb(255, 255, 255) 0%, rgb(235, 235, 235) 50%, rgb(219, 219, 219) 50%, rgb(181, 181, 181)) repeat scroll 0% 0% transparent; + border-radius: 4px; + border: 1px solid rgb(148, 148, 148); + box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.2), 0px 0px 2px rgb(255, 255, 255) inset; + text-shadow: 0px -1px 0px rgba(0, 0, 0, 0.2), 0px 1px 0px rgb(255, 255, 255); + cursor: pointer; +} /*by fanqiang*/ img.avatar3 { width: 50px; @@ -1632,13 +1682,14 @@ input[type='text'].noline { width: 100%; } .noline { - border-style: none; - border-color: white; - border-width: medium; - font-size: 16px; + /*border-style: none; + border-color: white;*/ + border: #d5dee9 1px solid; + font-size: 12px; color: #ACAEB1; padding: 10px 0px; width: 100%; + cursor: text; } .grayline{ border-color: #ACAEB1;