From 501b4913637473af8b827f563f3c4822d6231512 Mon Sep 17 00:00:00 2001 From: Wen Date: Mon, 5 May 2014 10:03:13 +0800 Subject: [PATCH 1/4] =.= --- app/helpers/user_score_helper.rb | 8 ++++++++ app/views/test/index.html.erb | 4 +++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/app/helpers/user_score_helper.rb b/app/helpers/user_score_helper.rb index 43ee05db8..d9ab8730a 100644 --- a/app/helpers/user_score_helper.rb +++ b/app/helpers/user_score_helper.rb @@ -297,6 +297,14 @@ module UserScoreHelper return (commit_count + issue_details_count) end + + + def calculate_attachments(user) + attachments = Attachment.where("container_type IS NOT NULL AND container_type <> 'Issue' AND author_id = ?", user.id).count + + return attachments + + end def calculate_user_score(user) collaboration = calculate_collaboration_count(user) diff --git a/app/views/test/index.html.erb b/app/views/test/index.html.erb index eeef0f3da..17c7089d1 100644 --- a/app/views/test/index.html.erb +++ b/app/views/test/index.html.erb @@ -4,13 +4,14 @@ <% users = User.all%> - + <% users.each do |user| %> + @@ -18,6 +19,7 @@ + <% end %> From dc4e928741ea0dc76ac853c43b301cf7384f4fae Mon Sep 17 00:00:00 2001 From: huangjingquan Date: Mon, 5 May 2014 10:17:50 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E4=BF=AE=E6=94=B9tag=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E5=BC=82=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/open_source_projects/index.html.erb | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/app/views/open_source_projects/index.html.erb b/app/views/open_source_projects/index.html.erb index 0e9f1008a..01848edce 100644 --- a/app/views/open_source_projects/index.html.erb +++ b/app/views/open_source_projects/index.html.erb @@ -125,6 +125,9 @@ li { padding-right: 5px; text-align: left; } +.nav-search-con{ + padding-top: 7px; +} <%#======================================================================box before%>
@@ -137,17 +140,17 @@ li {
nameCISfilecountissuecountlevelidnameCISfilecountissuecountlevelattachconut
<%= user.id %> <%= user.lastname %><%= user.firstname %> <%= calculate_collaboration_count(user) %> <%= calculate_influence_count(user) %><%= calculate_file(user) %> <%= calculate_issue(user) %> <%= calculate_level(user) %><%= calculate_attachments(user) %>
@@ -69,9 +69,9 @@
<%= image_tag('../images/avatars/Project/0', :class => 'avatar2') %>
- - + + diff --git a/app/views/open_source_projects/_os_project.html.erb b/app/views/open_source_projects/_os_project.html.erb index cae5b963b..43161f993 100644 --- a/app/views/open_source_projects/_os_project.html.erb +++ b/app/views/open_source_projects/_os_project.html.erb @@ -63,6 +63,6 @@
<%= image_tag( "/images/sidebar/tags.png") %> - <%= render :partial => 'tags/tag_name', :locals => {:obj => project,:object_flag => "7",:non_list_all => true }%> + <%= render :partial => 'tags/tag_name', :locals => {:obj => project,:object_flag => "8",:non_list_all => true }%>
diff --git a/app/views/relative_memos/show.html.erb b/app/views/relative_memos/show.html.erb index 2d85a19aa..be870b7eb 100644 --- a/app/views/relative_memos/show.html.erb +++ b/app/views/relative_memos/show.html.erb @@ -67,7 +67,7 @@
<%= image_tag( "/images/sidebar/tags.png") %> - <%= render :partial => 'tags/tag_name', :locals => {:obj => @memo,:object_flag => "8",:non_list_all => true }%> + <%= render :partial => 'tags/tag_name', :locals => {:obj => @memo,:object_flag => "9",:non_list_all => true }%>
From 9b151567f191ccec6eb39cf8fe827f8f7b5ab72e Mon Sep 17 00:00:00 2001 From: fanqiang <316257774@qq.com> Date: Wed, 7 May 2014 08:16:25 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=B2=A1=E6=9C=89?= =?UTF-8?q?=E5=B8=AE=E5=8A=A9=E6=98=BE=E7=A4=BA=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/helpers/no_uses_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/helpers/no_uses_helper.rb b/app/helpers/no_uses_helper.rb index a7a5ac24b..2baaf23b6 100644 --- a/app/helpers/no_uses_helper.rb +++ b/app/helpers/no_uses_helper.rb @@ -8,7 +8,7 @@ module NoUsesHelper css = no_use_css(objects) << options[0].to_s # ([watcher_css(objects), watched ? 'icon icon-fav ' : 'icon icon-fav-off '].join(' ') << options[0].to_s) - text = clicked ? l(:no_use) : l(:cancel_no_use) + text = clicked ? l(:cancel_no_use) : l(:no_use) url = no_uses_path( :object_type => objects.first.class.to_s.underscore,
<%= 0 %> <%= @open_source_project.users_count %><%= 0 %><%= @open_source_project.topics.count %><%= @open_source_project.commit_count %>