|
|
|
@ -62,7 +62,7 @@
|
|
|
|
|
<ul class="d-p-projectlist">
|
|
|
|
|
<% projects = find_miracle_project(10, 3) %>
|
|
|
|
|
<% projects.map do |project| %>
|
|
|
|
|
<!--<% cache cache_key_for_project(project) do %> -->
|
|
|
|
|
<!--<%# cache cache_key_for_project(project) do %> -->
|
|
|
|
|
<li style="position:relative;height:6em;" class='<%= cycle("odd", "even") %>'>
|
|
|
|
|
<div style="float: left;">
|
|
|
|
|
<%= image_tag(get_project_avatar(project), :class => "avatar-4") %>
|
|
|
|
@ -73,43 +73,43 @@
|
|
|
|
|
(<%= link_to "#{projectCount(project)}人", project_member_path(project) ,:course =>'0' %>)
|
|
|
|
|
</div>
|
|
|
|
|
<div class='text_nowrap' style="float: left;margin:5px; margin-left: 10px; width: 380px;">
|
|
|
|
|
<span class='font_lighter' title =<%=project.description.to_s%>><%=project.description.truncate(50, omission: '...')%></span>
|
|
|
|
|
<span class='font_lighter' title =<%=project.short_description.to_s%>><%=project.short_description.truncate(50, omission: '...')%></span>
|
|
|
|
|
</div>
|
|
|
|
|
<div style="position:absolute; bottom:0;right:0;margin:5px 10px 5px 5px ;">
|
|
|
|
|
<% issue_count = project.issues.count %>
|
|
|
|
|
<% issue_journal_count = project.issue_changes.count %>
|
|
|
|
|
<% issue_score = issue_count * 0.2 %>
|
|
|
|
|
<% issue_journal_score = issue_journal_count * 0.1 %>
|
|
|
|
|
<% finall_issue_score = issue_score + issue_journal_score %>
|
|
|
|
|
<%# issue_count = project.issues.count %>
|
|
|
|
|
<%# issue_journal_count = project.issue_changes.count %>
|
|
|
|
|
<%# issue_score = issue_count * 0.2 %>
|
|
|
|
|
<%# issue_journal_score = issue_journal_count * 0.1 %>
|
|
|
|
|
<%# finall_issue_score = issue_score + issue_journal_score %>
|
|
|
|
|
|
|
|
|
|
<% new_count = project.news.count %>
|
|
|
|
|
<% new_score = new_count * 0.1 %>
|
|
|
|
|
<% finall_new_score = new_score %>
|
|
|
|
|
<%# new_count = project.news.count %>
|
|
|
|
|
<%# new_score = new_count * 0.1 %>
|
|
|
|
|
<%# finall_new_score = new_score %>
|
|
|
|
|
|
|
|
|
|
<% document_count = project.documents.count %>
|
|
|
|
|
<% file_score = document_count * 0.1 %>
|
|
|
|
|
<% finall_file_score = file_score %>
|
|
|
|
|
<%# document_count = project.documents.count %>
|
|
|
|
|
<%# file_score = document_count * 0.1 %>
|
|
|
|
|
<%# finall_file_score = file_score %>
|
|
|
|
|
|
|
|
|
|
<% changeset_count = project.changesets.count %>
|
|
|
|
|
<% code_submit_score = changeset_count * 0.3 %>
|
|
|
|
|
<% finall_code_submit_score = code_submit_score %>
|
|
|
|
|
<%# changeset_count = project.changesets.count %>
|
|
|
|
|
<%# code_submit_score = changeset_count * 0.3 %>
|
|
|
|
|
<%# finall_code_submit_score = code_submit_score %>
|
|
|
|
|
|
|
|
|
|
<% board_message_count = 0 %>
|
|
|
|
|
<% project.boards.each do |board| %>
|
|
|
|
|
<% board_message_count += board.messages_count %>
|
|
|
|
|
<% end %>
|
|
|
|
|
<% topic_score = board_message_count * 0.1 %>
|
|
|
|
|
<% finall_topic_score = topic_score %>
|
|
|
|
|
<%# board_message_count = 0 %>
|
|
|
|
|
<%# project.boards.each do |board| %>
|
|
|
|
|
<%# board_message_count += board.messages_count %>
|
|
|
|
|
<%# end %>
|
|
|
|
|
<%# topic_score = board_message_count * 0.1 %>
|
|
|
|
|
<%# finall_topic_score = topic_score %>
|
|
|
|
|
|
|
|
|
|
<% finall_project_score = finall_issue_score + finall_new_score + finall_file_score + finall_code_submit_score + topic_score %>
|
|
|
|
|
<%= content_tag "span", l(:label_project_score)+ ":" + format("%.2f" , finall_project_score ),
|
|
|
|
|
<%# finall_project_score = finall_issue_score + finall_new_score + finall_file_score + finall_code_submit_score + topic_score %>
|
|
|
|
|
<%= content_tag "span", l(:label_project_score)+ ":" + project_score(project),
|
|
|
|
|
:style => "cursor: pointer; display: inline-block; float: right; color: #ec6300; ",
|
|
|
|
|
:title => "项目得分,综合考虑了项目的各项活动,反映了该项目的活跃程度",
|
|
|
|
|
:class => "tooltip",
|
|
|
|
|
:id => "tooltip-#{project.id}" %>
|
|
|
|
|
</div>
|
|
|
|
|
</li>
|
|
|
|
|
<!--<%end %> -->
|
|
|
|
|
<!--<%#end %> -->
|
|
|
|
|
<% end; reset_cycle %>
|
|
|
|
|
</ul>
|
|
|
|
|
</div>
|
|
|
|
@ -122,7 +122,7 @@
|
|
|
|
|
<div class="user-message-box-list" style="margin-top: 10px;">
|
|
|
|
|
<%activities = find_all_activities%>
|
|
|
|
|
<% activities.each do |event| %>
|
|
|
|
|
<!--<% cache cache_key_for_event(event) do %> -->
|
|
|
|
|
<!--<%# cache cache_key_for_event(event) do %> -->
|
|
|
|
|
<li style="display: block;height:60px; padding-bottom: 4px;">
|
|
|
|
|
<div class="inner-right" style="float: left; height: 100%; ">
|
|
|
|
|
<%= image_tag url_to_avatar(event.event_author), :class => "avatar-3" %>
|
|
|
|
@ -133,7 +133,7 @@
|
|
|
|
|
<p style="margin-top: 4px;"><span style="color: rgb(172, 174, 177)"><%= l(:field_updated_on) %><%= time_tag_welcome event.event_datetime %>前</span> <span style="float: right; color: rgb(172, 174, 177);"><%= show_event_reply event %></span></p>
|
|
|
|
|
</div>
|
|
|
|
|
</li>
|
|
|
|
|
<!--<%end %> --><!-- cache -->
|
|
|
|
|
<!--<%#end %> --><!-- cache -->
|
|
|
|
|
<% end %>
|
|
|
|
|
</div>
|
|
|
|
|
</ul>
|
|
|
|
|