From 5ce9bcdb2c7f5220bc2077f30187dc2998dba387 Mon Sep 17 00:00:00 2001 From: nieguanghui Date: Mon, 21 Oct 2013 21:16:41 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E7=AB=9E=E8=B5=9B=EF=BC=8C?= =?UTF-8?q?=E9=9C=80=E6=B1=82=EF=BC=8C=E4=BD=9C=E4=B8=9A=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E6=90=9C=E7=B4=A2bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/bids_controller.rb | 2 ++ app/views/bids/_list_projects.html.erb | 2 +- app/views/bids/contest.html.erb | 4 ++-- app/views/bids/index.html.erb | 3 +++ app/views/projects/_project.html.erb | 2 ++ app/views/projects/index.html.erb | 3 +-- app/views/users/index.html.erb | 8 ++++++-- lib/redmine.rb | 2 +- 8 files changed, 18 insertions(+), 8 deletions(-) diff --git a/app/controllers/bids_controller.rb b/app/controllers/bids_controller.rb index f2e197cd8..557c0ae54 100644 --- a/app/controllers/bids_controller.rb +++ b/app/controllers/bids_controller.rb @@ -26,6 +26,8 @@ class BidsController < ApplicationController else @bids = Bid.visible.where('reward_type = ?', 1) end + + @bids = @bids.like(params[:name]) if params[:name].present? @bid_count = @bids.count diff --git a/app/views/bids/_list_projects.html.erb b/app/views/bids/_list_projects.html.erb index 06a7a85f3..74207a315 100644 --- a/app/views/bids/_list_projects.html.erb +++ b/app/views/bids/_list_projects.html.erb @@ -21,7 +21,7 @@ - + <%= l(:label_system_grade) %>:<%= (b_project.project.project_status.grade.nil? ? 0 : b_project.project.project_status.grade) unless (b_project.project.project_status.nil? && b_project.project.nil?) %> <% if get_prize(b_project).nil? or get_prize(b_project) == "" %> diff --git a/app/views/bids/contest.html.erb b/app/views/bids/contest.html.erb index 576323cbc..28116c641 100644 --- a/app/views/bids/contest.html.erb +++ b/app/views/bids/contest.html.erb @@ -1,5 +1,5 @@ -<%= form_tag(calls_path, :method => :get) do %> +<%= form_tag(:controller => 'bids', :action => 'contest', :method => :get) do %>
@@ -19,7 +19,7 @@ diff --git a/app/views/bids/index.html.erb b/app/views/bids/index.html.erb index 3ef6c4772..5737acf29 100644 --- a/app/views/bids/index.html.erb +++ b/app/views/bids/index.html.erb @@ -23,6 +23,9 @@ diff --git a/app/views/projects/_project.html.erb b/app/views/projects/_project.html.erb index 0a4f0b0e7..d7c454bc3 100644 --- a/app/views/projects/_project.html.erb +++ b/app/views/projects/_project.html.erb @@ -88,7 +88,9 @@ <%= content_tag('span', "#{l(:label_create_time)}: ") %><%= content_tag('span', format_time(@project.created_on)) %>
+ <% if @project.project_type !=1 %> <%= content_tag('span', "#{l(:label_project_grade)}: ")%><%= @project.project_status.grade%> + <% end %>
diff --git a/app/views/projects/index.html.erb b/app/views/projects/index.html.erb index c8f118296..b9f70cfd4 100644 --- a/app/views/projects/index.html.erb +++ b/app/views/projects/index.html.erb @@ -14,8 +14,7 @@
diff --git a/app/views/users/index.html.erb b/app/views/users/index.html.erb index 9861ccc9b..7948dbd92 100644 --- a/app/views/users/index.html.erb +++ b/app/views/users/index.html.erb @@ -117,6 +117,10 @@
<%= link_to image_tag(url_to_avatar(user), :class => 'avatar'), user_path(user) %> <%= content_tag "span", link_to_user(user), :class => "nomargin avatar_name" %> +
+ <%= l(:label_user_grade) %>: <%= user.user_status.grade %> +
+
@@ -125,9 +129,9 @@ <%= l(:label_has_watchers,:count=>User.watched_by(user.id).count) %>
-
+
<% unless user.memberships.empty? %> diff --git a/lib/redmine.rb b/lib/redmine.rb index 1b674d662..38b1a063e 100644 --- a/lib/redmine.rb +++ b/lib/redmine.rb @@ -237,7 +237,7 @@ end Redmine::MenuManager.map :top_college_menu do |menu| menu.push :home, :home_path - menu.push :new_course, {:controller => 'projects', :action => 'course', :project_type => 1 } + menu.push :new_course, {:controller => 'projects', :action => 'course', :project_type => 1} menu.push :new_homework, {:controller => 'bids', :action => 'index', :project_type => 1 } menu.push :new_contest, {:controller => 'bids', :action => 'contest', :project_type => 1} menu.push :projects, { :controller => 'projects', :action => 'index', :project_type => 0 }, :caption => :label_project_plural