From 02e221eedb747ed83199ab9ea42b9492f21084e0 Mon Sep 17 00:00:00 2001 From: z9hang Date: Tue, 24 Jun 2014 13:57:51 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=EF=BC=9A=E7=BD=91=E7=AB=99?= =?UTF-8?q?=E4=B8=AD=E7=9A=84=E6=97=A7=E5=88=86=E6=95=B0=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E4=B8=BA=E6=96=B0=E5=88=86=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Gemfile.lock | 1 + app/views/layouts/base_users.html.erb | 10 ---------- app/views/open_source_projects/master_apply.html.erb | 6 +----- app/views/users/_user_score.html.erb | 2 +- app/views/users/_user_show.html.erb | 6 +----- 5 files changed, 4 insertions(+), 21 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 189cbabce..1767afd4e 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -185,4 +185,5 @@ DEPENDENCIES sass-rails (~> 3.2.3) seems_rateable! shoulda (> 3.3.2) + therubyracer uglifier (>= 1.0.3) diff --git a/app/views/layouts/base_users.html.erb b/app/views/layouts/base_users.html.erb index b4e1e4eef..5579dfb5b 100644 --- a/app/views/layouts/base_users.html.erb +++ b/app/views/layouts/base_users.html.erb @@ -121,16 +121,6 @@ - diff --git a/app/views/open_source_projects/master_apply.html.erb b/app/views/open_source_projects/master_apply.html.erb index 0288692fc..f99701932 100644 --- a/app/views/open_source_projects/master_apply.html.erb +++ b/app/views/open_source_projects/master_apply.html.erb @@ -39,11 +39,7 @@
- <%= l(:label_user_grade) %>: <%= link_to( format("%.2f" , finall_user_score).to_f, {:controller => 'users', - :action => 'show_score', - :remote => true, - :id => user.id}, - :style=>"color: #EC6300;") %> + <%= l(:label_user_grade) %>: <%= render :partial => 'users/user_score', :locals => {:user => user}%>
diff --git a/app/views/users/_user_score.html.erb b/app/views/users/_user_score.html.erb index 836daa175..d047c11d0 100644 --- a/app/views/users/_user_score.html.erb +++ b/app/views/users/_user_score.html.erb @@ -1,5 +1,5 @@ <%= l(:label_user_grade)%>: -<%= link_to(format("%.2f" , @user.user_score_attr.total_score).to_f, {:controller => 'users', +<%= link_to(format("%.2f" , user.user_score_attr.total_score).to_f, {:controller => 'users', :action => 'show_new_score', :remote => true, :id => user.id diff --git a/app/views/users/_user_show.html.erb b/app/views/users/_user_show.html.erb index 60ab6b152..bf97ad298 100644 --- a/app/views/users/_user_show.html.erb +++ b/app/views/users/_user_show.html.erb @@ -40,11 +40,7 @@
<%= l(:label_user_grade) %>: - <%= link_to( format("%.2f" , finall_user_score).to_f, {:controller => 'users', - :action => 'show_score', - :remote => true, - :id => user.id}, - :style=>"color: #EC6300;") %> + <%= render :partial => 'users/user_score', :locals => {:user => user}%>