=.=
This commit is contained in:
parent
c6576c71bf
commit
501b491363
|
@ -297,6 +297,14 @@ module UserScoreHelper
|
||||||
return (commit_count + issue_details_count)
|
return (commit_count + issue_details_count)
|
||||||
|
|
||||||
end
|
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)
|
def calculate_user_score(user)
|
||||||
collaboration = calculate_collaboration_count(user)
|
collaboration = calculate_collaboration_count(user)
|
||||||
|
|
|
@ -4,13 +4,14 @@
|
||||||
<% users = User.all%>
|
<% users = User.all%>
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
<th>name</th><th>C</th><th>I</th><th>S</th><th>filecount</th><th>issuecount</th><th>level</th>
|
<th>id</th><th>name</th><th>C</th><th>I</th><th>S</th><th>filecount</th><th>issuecount</th><th>level</th><th>attachconut</th>
|
||||||
</tr>
|
</tr>
|
||||||
<% users.each do |user| %>
|
<% users.each do |user| %>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
|
<td><%= user.id %></td>
|
||||||
<td><%= user.lastname %><%= user.firstname %></td>
|
<td><%= user.lastname %><%= user.firstname %></td>
|
||||||
<td><%= calculate_collaboration_count(user) %></td>
|
<td><%= calculate_collaboration_count(user) %></td>
|
||||||
<td><%= calculate_influence_count(user) %></td>
|
<td><%= calculate_influence_count(user) %></td>
|
||||||
|
@ -18,6 +19,7 @@
|
||||||
<td><%= calculate_file(user) %></td>
|
<td><%= calculate_file(user) %></td>
|
||||||
<td><%= calculate_issue(user) %></td>
|
<td><%= calculate_issue(user) %></td>
|
||||||
<td><%= calculate_level(user) %></td>
|
<td><%= calculate_level(user) %></td>
|
||||||
|
<td><%= calculate_attachments(user) %></td>
|
||||||
|
|
||||||
</tr>
|
</tr>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
Loading…
Reference in New Issue