diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb index c1593e320..fc331e96d 100644 --- a/app/controllers/projects_controller.rb +++ b/app/controllers/projects_controller.rb @@ -842,7 +842,6 @@ class ProjectsController < ApplicationController @project = nil end -# added by bai def show_projects_score render :layout => false end diff --git a/app/views/projects/_issue_score_index.html.erb b/app/views/projects/_issue_score_index.html.erb index 7353ce5a3..729369280 100644 --- a/app/views/projects/_issue_score_index.html.erb +++ b/app/views/projects/_issue_score_index.html.erb @@ -1,6 +1,4 @@ - -
<%= l(:label_issue_number) %> * 4 = <%= issue_num(@project) %> * 4 = <%= format("%.2f" , issue_num(@project) * 4).to_i %>
-
<%= l(:label_issue_journal_number) %> * 1 = <%= issue_journal_num(@project) %> * 1 = <%= format("%.2f" , issue_journal_num(@project)).to_i %>
-
<%= l(:label_issue_score) %> = <%= format("%.2f" , issue_num(@project) * 4).to_i %> + <%= format("%.2f" , issue_journal_num(@project)).to_i %> - = <%= format("%.2f" , issue_score(@project)).to_i %>
- \ No newline at end of file +
<%= l(:label_issue_number) %> * 4 = <%= issue_num(project) %> * 4 = <%= format("%.2f" , issue_num(project) * 4).to_i %>
+
<%= l(:label_issue_journal_number) %> * 1 = <%= issue_journal_num(project) %> * 1 = <%= format("%.2f" , issue_journal_num(project)).to_i %>
+
<%= l(:label_issue_score) %> = <%= format("%.2f" , issue_num(project) * 4).to_i %> + <%= format("%.2f" , issue_journal_num(project)).to_i %> + = <%= format("%.2f" , issue_score(project)).to_i %>
diff --git a/app/views/projects/_news_score_index.html.erb b/app/views/projects/_news_score_index.html.erb index b3d66efeb..c936ece05 100644 --- a/app/views/projects/_news_score_index.html.erb +++ b/app/views/projects/_news_score_index.html.erb @@ -1,5 +1,2 @@ - -
<%= l(:label_new_number) %> * 1 = <%= news_num(@project) %> * 1 = <%= format("%.2f" , news_score(@project)).to_i %>
-
<%= l(:label_news_score) %> = <%= format("%.2f" , news_score(@project)).to_i %>
- \ No newline at end of file +
<%= l(:label_news_score) %> = <%= format("%.2f" , news_score(@project)).to_i %>
\ No newline at end of file diff --git a/app/views/projects/_project_score_index.html.erb b/app/views/projects/_project_score_index.html.erb index 3cee4413c..7a3022f44 100644 --- a/app/views/projects/_project_score_index.html.erb +++ b/app/views/projects/_project_score_index.html.erb @@ -3,8 +3,8 @@ <%= l(:label_projects_score) %>
= <%= l(:label_issue_score) %> + <%= l(:label_news_score) %> + <%= l(:label_file_score) %> + <%= l(:label_code_submit_score) %> + <%= l(:label_topic_score) %>
-
= <%= format("%.2f" , issue_score(@project)).to_i %> + <%= format("%.2f" , news_score(@project)).to_i %> + - <%= format("%.2f" , documents_score(@project)).to_i %> + <%= format("%.2f" , changesets_score(@project)).to_i %> + - <%= format("%.2f" , board_message_score(@project)).to_i %>
-
= <%= format("%.2f" , project_scores(@project)).to_i %>
+
= <%= format("%.2f" , issue_score(project)).to_i %> + <%= format("%.2f" , news_score(project)).to_i %> + + <%= format("%.2f" , documents_score(project)).to_i %> + <%= format("%.2f" , changesets_score(project)).to_i %> + + <%= format("%.2f" , board_message_score(project)).to_i %>
+
= <%= format("%.2f" , project_scores(project)).to_i %>
\ No newline at end of file diff --git a/app/views/projects/_show_projects_score.html.erb b/app/views/projects/_show_projects_score.html.erb index 156e63f7b..57af1f138 100644 --- a/app/views/projects/_show_projects_score.html.erb +++ b/app/views/projects/_show_projects_score.html.erb @@ -21,35 +21,65 @@ + +
- <%= render :partial => 'projects/project_score_index', :locals => {:index => 0 } %> + <%= render :partial => 'projects/project_score_index', :locals => {:project => @project } %>
\ No newline at end of file diff --git a/app/views/projects/show_projects_score.js.erb b/app/views/projects/show_projects_score.js.erb index 540db5395..bf84cbe73 100644 --- a/app/views/projects/show_projects_score.js.erb +++ b/app/views/projects/show_projects_score.js.erb @@ -1,5 +1,3 @@ - $('#ajax-modal').html('<%= escape_javascript(render :partial => 'projects/show_projects_score') %>'); showModal('ajax-modal', '400px'); $('#ajax-modal').addClass('new-watcher'); - \ No newline at end of file