格式化代码
This commit is contained in:
parent
c2ff861fba
commit
a7debdae98
|
@ -93,30 +93,30 @@
|
|||
</tr>
|
||||
|
||||
<!-- added by bai 增加个人得分 -->
|
||||
<% messages_count = @user.messages.count %>
|
||||
<% messages_score = messages_count * 0.05%>
|
||||
<% finall_messages_score = messages_score %>
|
||||
<%# 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_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 %>
|
||||
<%# 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 %>
|
||||
<%# 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 %>
|
||||
|
||||
<!-- modified by zjc 新得分显示 -->
|
||||
<tr><td class="score">
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
</div>
|
||||
<div class="memo-section">
|
||||
<div class="contextual-borad">
|
||||
<!-- <%= link_to(
|
||||
<!-- <%#= link_to(
|
||||
image_tag('comment.png'),
|
||||
{:action => 'quote', :id => @memo},
|
||||
:remote => true,
|
||||
|
@ -28,7 +28,7 @@
|
|||
:method => 'get',
|
||||
:title => l(:button_edit)
|
||||
) if @memo.editable_by?(User.current) %>
|
||||
<!-- <%= link_to(
|
||||
<!-- <%#= link_to(
|
||||
image_tag('delete.png'),
|
||||
{:action => 'destroy', :id => @memo},
|
||||
:method => :delete,
|
||||
|
@ -68,9 +68,9 @@
|
|||
<% pages_count = @reply_pages.offset %>
|
||||
<% @replies.each do |reply| %>
|
||||
<div class="reply" id="<%= "reply-#{reply.id}" %>">
|
||||
<p class="font_lighter"><!--<span style="display: inline"><%= pages_count += 1 %>楼 :</span>--></p>
|
||||
<p class="font_lighter"><!--<span style="display: inline"><%#= pages_count += 1 %>楼 :</span>--></p>
|
||||
<div class="contextual-borad">
|
||||
<!-- <%= link_to(
|
||||
<!-- <%#= link_to(
|
||||
image_tag('comment.png'),
|
||||
{:action => 'quote', :id => reply},
|
||||
:remote => true,
|
||||
|
@ -90,7 +90,7 @@
|
|||
{:action => 'edit', :id => reply},
|
||||
:title => l(:button_edit)
|
||||
) if reply.editable_by?(User.current) %>
|
||||
<!-- <%= link_to(
|
||||
<!-- <%#= link_to(
|
||||
image_tag('delete.png'),
|
||||
{:action => 'destroy', :id => reply},
|
||||
:method => :delete,
|
||||
|
|
|
@ -1,33 +1,33 @@
|
|||
<!-- added by bai -->
|
||||
<% messages_count = @user.messages.count %>
|
||||
<% messages_score = messages_count * 0.05%>
|
||||
<% finall_messages_score = messages_score %>
|
||||
<%# 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_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 %>
|
||||
<%# 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 %>
|
||||
<%# 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 %>
|
||||
|
||||
<div><%= l(:label_user_score) %></div>
|
||||
<div> = <%= l(:label_user_score_of_collaboration) %> + <%= l(:label_user_score_of_influence) %> +
|
||||
<%= l(:label_user_score_of_skill)%> + <%= l(:label_user_score_of_active) %></div>
|
||||
<!-- <div> + <%= l(:label_user_score_of_influence) %></div> -->
|
||||
<!-- <div> + <%#= l(:label_user_score_of_influence) %></div> -->
|
||||
<div> = <%= 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 %></div>
|
||||
<div> = <%= format("%.2f" ,@user.user_score_attr.total_score.nil? ? 0:@user.user_score_attr.total_score).to_i %></div>
|
||||
|
|
|
@ -1,28 +1,28 @@
|
|||
<!-- added by bai -->
|
||||
<% messages_count = @user.messages.count %>
|
||||
<% messages_score = messages_count * 0.05%>
|
||||
<% finall_messages_score = messages_score %>
|
||||
<%# 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_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 %>
|
||||
<%# 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 %>
|
||||
<%# 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 %>
|
||||
|
||||
<h3 class="title"><%= l(:label_user_score) %></h3>
|
||||
<div class="inf_user_image">
|
||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue