<% for user in @users -%>
">
- <%= avatar(user, :size => "14") %><%= link_to h(user.login), edit_user_path(user) %>
- <%= h(user.firstname) %>
- <%= h(user.lastname) %>
- <%= mail_to(h(user.mail)) %>
- <%= checked_image user.admin? %>
- <%= format_time(user.created_on) %>
- <%= format_time(user.last_login_on) unless user.last_login_on.nil? %>
- <%= change_status_link(user) %>
+ <%= avatar(user, :size => "14") %><%= link_to h(user.login), edit_user_path(user) %>
+ <%= h(user.firstname) %>
+ <%= h(user.lastname) %>
+ <%= mail_to(h(user.mail)) %>
+ <%= checked_image user.admin? %>
+ <%= format_time(user.created_on) %>
+ <%= format_time(user.last_login_on) unless user.last_login_on.nil? %>
+ <%= change_status_link(user) %>
<%= delete_link user_path(user, :back_url => admin_users_path(params)) unless User.current == user %>
<% end -%>
diff --git a/app/views/admin/users.html.erb b/app/views/admin/users.html.erb
index 8bd1ef446..4a76a42ef 100644
--- a/app/views/admin/users.html.erb
+++ b/app/views/admin/users.html.erb
@@ -37,18 +37,9 @@
<%= sort_header_tag('admin', :caption => l(:field_admin), :default_order => 'desc') %>
<%= sort_header_tag('created_on', :caption => l(:field_created_on), :default_order => 'desc') %>
<%= sort_header_tag('last_login_on', :caption => l(:field_last_login_on), :default_order => 'desc') %>
-
+
-
-
-
-
-
-
-
-
-
<% for user in @users -%>
">
@@ -59,7 +50,7 @@
<%= checked_image user.admin? %>
<%= format_time(user.created_on) %>
<%= format_time(user.last_login_on) unless user.last_login_on.nil? %>
- <%= change_status_link(user) %>
+ <%= change_status_link(user) %>
<%= delete_link user_path(user, :back_url => admin_users_path(params)) unless User.current == user %>
<% end -%>
diff --git a/app/views/courses/feedback.html.erb b/app/views/courses/feedback.html.erb
index 903b0b5fc..a5d7326e0 100644
--- a/app/views/courses/feedback.html.erb
+++ b/app/views/courses/feedback.html.erb
@@ -79,7 +79,7 @@ function checkMaxLength() {
return false;"} %>
<% end %>
<% if journal.delete_by_user?(User.current) %>
- <%= link_to(l(:button_delete), {:controller => 'words', :action => 'destroy', :object_id => journal, :user_id => journal.user}, :method => :delete,:remote => true)%>
+ <%= link_to(l(:button_delete), {:controller => 'words', :action => 'destroy', :object_id => journal, :user_id => journal.user}, :method => :delete,:confirm => l(:text_are_you_sure),:remote => true)%>
<% end %>
diff --git a/app/views/issues/show.html.erb b/app/views/issues/show.html.erb
index 89fc862d0..204dd519a 100644
--- a/app/views/issues/show.html.erb
+++ b/app/views/issues/show.html.erb
@@ -4,7 +4,9 @@
<%= render :partial => 'action_menu' %>
-<%= issue_heading(@issue) %>
+
+ <%= issue_heading(@issue) %>
+
@@ -25,9 +27,9 @@
<% end %>
-
+
-
+
<%= render_issue_subject_with_tree(@issue) %>
diff --git a/app/views/projects/_member_list.html.erb b/app/views/projects/_member_list.html.erb
index 15a02df93..89a88e51c 100644
--- a/app/views/projects/_member_list.html.erb
+++ b/app/views/projects/_member_list.html.erb
@@ -23,8 +23,8 @@
<% else%>
<%= content_tag "div", content_tag("p", rolesToLanguage(member.roles.sort.collect(&:to_s)).join(', ')), :class => "clear avatar_name" %>
-
- <%= l(:label_user_for_project_grade) %>: <%= format("%.2f" ,UserGrade.find_by_user_id_and_project_id(member[:user_id], @project.id).grade).to_i %>
+
+ <%= l(:label_user_for_project_grade) %>: <%= format("%.2f" ,user_scores(member.user,2,@project).total_score).to_i %>
<% end %>
diff --git a/app/views/stores/_search_bar.html.erb b/app/views/stores/_search_bar.html.erb
index c91f90e96..884f8b263 100644
--- a/app/views/stores/_search_bar.html.erb
+++ b/app/views/stores/_search_bar.html.erb
@@ -4,5 +4,5 @@
<%= submit_tag l(:label_search), :class => "enterprise"%>
<% end %>
-
鍏ㄧ珯鏂囦欢鎼滅储銆備笉浼氭悳绱㈢鏈夐」鐩腑鐨勫唴瀹广佸鐢熷凡缁忔彁浜ょ殑浣滀笟銆
+
鍏ㄧ珯鏂囦欢鎼滅储銆備笉浼氭悳绱㈢鏈夐」鐩腑鐨勫唴瀹广
\ No newline at end of file
diff --git a/app/views/users/_activity_new_score_index.html.erb b/app/views/users/_activity_new_score_index.html.erb
index 0ceb8f157..b592b508d 100644
--- a/app/views/users/_activity_new_score_index.html.erb
+++ b/app/views/users/_activity_new_score_index.html.erb
@@ -1,8 +1,9 @@
-鎶鏈緱鍒嗭細
- 韪╁埆浜虹殑甯栧瓙 -2
- 甯栧瓙琚竴绾т細鍛橀《 +4
- 甯栧瓙琚簩绾т細鍛橀《 +6
- 甯栧瓙琚笁绾т細鍛橀《 +8
- 甯栧瓙琚竴绾т細鍛樿俯 -2
- 甯栧瓙琚簩绾т細鍛樿俯 -4
- 甯栧瓙琚笁绾т細鍛樿俯 -6
\ No newline at end of file
+
+ 韪╁埆浜虹殑甯栧瓙鏁伴噺 * (-2) = <%= option_num.tread %> * (-2) = <%= option_num.tread * (-2) %>
+ 甯栧瓙琚竴绾т細鍛橀《鐨勬鏁 * 4 = <%= option_num.praise_by_one %> * 4 = <%= option_num.praise_by_one * 4 %>
+ 甯栧瓙琚簩绾т細鍛橀《鐨勬鏁 * 6 = <%= option_num.praise_by_two %> * 6 = <%= option_num.praise_by_two * 6 %>
+ 甯栧瓙琚笁绾т細鍛橀《鐨勬鏁 * 8 = <%= option_num.praise_by_three %> * 8 = <%= option_num.praise_by_three * 8 %>
+ 甯栧瓙琚竴绾т細鍛樿俯鐨勬鏁 * (-2) = <%= option_num.tread_by_one %> * (-2) = <%= option_num.tread_by_one * (-2) %>
+ 甯栧瓙琚簩绾т細鍛樿俯鐨勬鏁 * (-4) = <%= option_num.tread_by_two %> * (-4) = <%= option_num.tread_by_two * (-4) %>
+ 甯栧瓙琚笁绾т細鍛樿俯鐨勬鏁 * (-6) = <%= option_num.tread_by_three %> * (-6) = <%= option_num.tread_by_three * (-6) %>
+ 鎶鏈緱鍒 = <%= option_num.tread * (-2) %> + <%= option_num.praise_by_one * 4 %> + <%= option_num.praise_by_two * 6 %> + <%= option_num.praise_by_three * 8 %> + (<%= option_num.tread_by_one * (-2) %>) + ( <%= option_num.tread_by_two * (-4) %>) + (<%= option_num.tread_by_three * (-6) %>) = <%= skill(option_num) %>
\ No newline at end of file
diff --git a/app/views/users/_influence_new_score_index.html.erb b/app/views/users/_influence_new_score_index.html.erb
index 9985d26cd..9977494b9 100644
--- a/app/views/users/_influence_new_score_index.html.erb
+++ b/app/views/users/_influence_new_score_index.html.erb
@@ -1,6 +1,7 @@
-椤圭洰璐$尞寰楀垎锛
- 鎻愪氦浠g爜 +4
- 鎻愪氦鏂囨。 +4
- 鎻愪氦闄勪欢 +4
- 鏇存柊缂洪櫡瀹屾垚搴 +2
- 鍙戝竷缂洪櫡 +4
\ No newline at end of file
+
+ 鎻愪氦浠g爜娆℃暟 * 4 = <%= option_num.changeset %> * 4 = <%= option_num.changeset * 4 %>
+ 鎻愪氦鏂囨。娆℃暟 * 4 = <%= option_num.document %> * 4 = <%= option_num.document * 4 %>
+ 鎻愪氦闄勪欢娆℃暟 * 4 = <%= option_num.attachment %> * 4 = <%= option_num.attachment * 4 %>
+ 鏇存柊缂洪櫡瀹屾垚搴︽鏁 * 2 = <%= option_num.issue_done_ratio %> * 2 = <%= option_num.issue_done_ratio * 2 %>
+ 鍙戝竷缂洪櫡鏁伴噺 * 4 = <%= option_num.post_issue %> * 4 = <%= option_num.post_issue * 4 %>
+ 椤圭洰璐$尞寰楀垎 = <%= option_num.changeset * 4 %> + <%= option_num.document * 4 %> + <%= option_num.attachment * 4 %> + <%= option_num.issue_done_ratio * 2 %> + <%= option_num.post_issue * 4 %> = <%= active(option_num) %>
\ No newline at end of file
diff --git a/app/views/users/_memberships.html.erb b/app/views/users/_memberships.html.erb
index 5f61d2ce2..2c18ed416 100644
--- a/app/views/users/_memberships.html.erb
+++ b/app/views/users/_memberships.html.erb
@@ -1,4 +1,4 @@
-<% roles = Role.find_all_givable %>
+<% roles = Role.find_all_givable[0..2] %>
<% projects = Project.active.all %>
@@ -50,12 +50,19 @@
<%= l(:label_no_data) %>
<% end %>
+
<% if projects.any? %>
-
<%=l(:label_project_new)%>
+<%=l(:label_project_new)%>
<%= form_for(:membership, :remote => true, :url => user_memberships_path(@user)) do %>
-<%= select_tag 'membership[project_id]', options_for_membership_project_select(@user, projects) %>
+<%= select_tag 'membership[project_id]', options_for_membership_project_select(@user, projects)%>
<%= l(:label_role_plural) %>:
<% roles.each do |role| %>
<%= check_box_tag 'membership[role_ids][]', role.id %> <%=h role %>
diff --git a/app/views/users/_project_new_score_index.html.erb b/app/views/users/_project_new_score_index.html.erb
index 45e0b0600..d627fba91 100644
--- a/app/views/users/_project_new_score_index.html.erb
+++ b/app/views/users/_project_new_score_index.html.erb
@@ -1,2 +1,3 @@
-
褰卞搷鍔涘緱鍒嗭細
- 琚叧娉ㄤ汉鏁 +2/浜
+
+ 琚叧娉ㄤ汉鏁 * 2 = <%= option_num.follow %> * 2 = <%= option_num.follow * 2 %>
+ 褰卞搷鍔涘緱鍒 = <%= option_num.follow * 2 %>
diff --git a/app/views/users/_score_new_index.html.erb b/app/views/users/_score_new_index.html.erb
index ff13e5299..539c55f80 100644
--- a/app/views/users/_score_new_index.html.erb
+++ b/app/views/users/_score_new_index.html.erb
@@ -1,34 +1,10 @@
-<%# messages_count = @user.messages.count %>
-<%# messages_score = messages_count * 0.05%>
-<%# finall_messages_score = messages_score %>
-
-<%# journals_count = @user.journals.count %>
-<%# journals_score = journals_count * 0.1 %>
-<%# user_changesets_count = @user.changesets.count %>
-<%# user_changesets_score = user_changesets_count * 0.3 %>
-<%# finall_user_project_score = journals_score + user_changesets_score %>
-
-<%# journals_for_messages_count = @user.journals_messages.count %>
-<%# activities_count = @user.activities.count %>
-<%# journals_for_messages_score = journals_for_messages_count * 0.05 %>
-<%# activities_score = activities_count * 0.2 %>
-<%# finall_activity_score = journals_for_messages_score + activities_score %>
-
-<%# news_count = @user.news.count %>
-<%# news_score = news_count * 0.1 %>
-<%# wiki_contents_count = @user.wiki_contents.count %>
-<%# wiki_contents_score = wiki_contents_count * 0.1 %>
-<%# comments_count = @user.comments.count %>
-<%# comments_score = comments_count * 0.1 %>
-<%# finall_influence_score = news_score + wiki_contents_score + comments_score %>
-<%# finall_user_score = finall_messages_score + finall_user_project_score + finall_activity_score + finall_influence_score %>
<%= l(:label_user_score) %>
= <%= l(:label_user_score_of_collaboration) %> + <%= l(:label_user_score_of_influence) %> +
<%= l(:label_user_score_of_skill)%> + <%= l(:label_user_score_of_active) %>
- = <%= format("%.2f" ,@user.user_score_attr.collaboration.nil? ? 0:@user.user_score_attr.collaboration).to_i %> + <%= format("%.2f" , @user.user_score_attr.influence.nil? ? 0:@user.user_score_attr.influence ).to_i %>
- + <%= format("%.2f" , @user.user_score_attr.skill.nil? ? 0:@user.user_score_attr.skill).to_i %> + <%= format("%.2f" , @user.user_score_attr.active.nil? ? 0:@user.user_score_attr.active).to_i %>
- = <%= format("%.2f" ,@user.user_score_attr.total_score.nil? ? 0:@user.user_score_attr.total_score).to_i %>
+ = <%= format("%.2f" ,collaboration(option_num)).to_i %> + <%= format("%.2f" , influence(option_num) ).to_i %>
+ + <%= "(" if skill(option_num) < 0 %> <%= format("%.2f" , skill(option_num)).to_i %> <%= ")" if skill(option_num) < 0 %> + <%= format("%.2f" , active(option_num)).to_i %>
+ = <%= format("%.2f" ,option_num.total_score).to_i %>
diff --git a/app/views/users/_show_new_score.html.erb b/app/views/users/_show_new_score.html.erb
index e9ca499f4..c0e731a65 100644
--- a/app/views/users/_show_new_score.html.erb
+++ b/app/views/users/_show_new_score.html.erb
@@ -1,28 +1,4 @@
-<%# messages_count = @user.messages.count %>
-<%# messages_score = messages_count * 0.05%>
-<%# finall_messages_score = messages_score %>
-
-<%# journals_count = @user.journals.count %>
-<%# journals_score = journals_count * 0.1 %>
-<%# user_changesets_count = @user.changesets.count %>
-<%# user_changesets_score = user_changesets_count * 0.3 %>
-<%# finall_user_project_score = journals_score + user_changesets_score %>
-
-<%# journals_for_messages_count = @user.journals_messages.count %>
-<%# activities_count = @user.activities.count %>
-<%# journals_for_messages_score = journals_for_messages_count * 0.05 %>
-<%# activities_score = activities_count * 0.2 %>
-<%# finall_activity_score = journals_for_messages_score + activities_score %>
-
-<%# news_count = @user.news.count %>
-<%# news_score = news_count * 0.1 %>
-<%# wiki_contents_count = @user.wiki_contents.count %>
-<%# wiki_contents_score = wiki_contents_count * 0.1 %>
-<%# comments_count = @user.comments.count %>
-<%# comments_score = comments_count * 0.1 %>
-<%# finall_influence_score = news_score + wiki_contents_score + comments_score %>
-<%# finall_user_score = finall_messages_score + finall_user_project_score + finall_activity_score + finall_influence_score %>
<%= l(:label_user_score) %>
@@ -37,8 +13,9 @@
- <%= l(:label_user_score) %>
- <%= format("%.2f" , @user.user_score_attr.total_score).to_i %>
+ <%= l(:label_user_score) %>
+ <% option_num = get_option_number(@user,1) %>
+ <%= format("%.2f" , option_num.total_score).to_i %>
@@ -46,31 +23,57 @@