|
|
@ -30,13 +30,21 @@
|
|
|
|
<div id="identifier-pannel" style="display:none">
|
|
|
|
<div id="identifier-pannel" style="display:none">
|
|
|
|
<%= link_to image_tag('/images/qrweixin.jpg', size: '150x150', alt: 'trustie', class: "weixin" ), home_path %>
|
|
|
|
<%= link_to image_tag('/images/qrweixin.jpg', size: '150x150', alt: 'trustie', class: "weixin" ), home_path %>
|
|
|
|
<div class="weixin-content">微信扫码</div>
|
|
|
|
<div class="weixin-content">微信扫码</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="main-content-bar" id="main-content-bar">
|
|
|
|
<div class="main-content-bar" id="main-content-bar">
|
|
|
|
<div style="float: left">
|
|
|
|
<div style="float: left">
|
|
|
|
<%= image_tag '/images/transparent.png', size: "75x75" %>
|
|
|
|
<!-- <#%= image_tag(get_project_avatar(@first_page), size: "75x75") %> -->
|
|
|
|
|
|
|
|
<% if get_avatar?(@first_page) %>
|
|
|
|
|
|
|
|
<%= image_tag(url_to_avatar(@first_page), size: "75x75") %>
|
|
|
|
|
|
|
|
<% else %>
|
|
|
|
|
|
|
|
<%= image_tag '/images/transparent.png', size: "75x75" %>
|
|
|
|
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="welcome_left" id="welcome_left">
|
|
|
|
<div class="welcome_left" id="welcome_left">
|
|
|
|
<span class="font_welcome_trustie"><%= l(:label_welcome_trustie) %><%= l(:label_welcome_trustie_project) %></span> <span class="font_welcome_tdescription">, <%= l(:label_welcome_trustie_project_description) %></span>
|
|
|
|
<% unless @first_page.nil? %>
|
|
|
|
|
|
|
|
<span class="font_welcome_trustie"><%= @first_page.title %></span> <span class="font_welcome_tdescription">, <%= @first_page.description %></span>
|
|
|
|
|
|
|
|
<% end %>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="search-bar" id="search-bar">
|
|
|
|
<div class="search-bar" id="search-bar">
|
|
|
|
<%= render :partial => "search_project", :locals => {:project_type => 0}%>
|
|
|
|
<%= render :partial => "search_project", :locals => {:project_type => 0}%>
|
|
|
@ -54,7 +62,7 @@
|
|
|
|
<ul class="d-p-projectlist">
|
|
|
|
<ul class="d-p-projectlist">
|
|
|
|
<% projects = find_miracle_project(10, 3) %>
|
|
|
|
<% projects = find_miracle_project(10, 3) %>
|
|
|
|
<% projects.map do |project| %>
|
|
|
|
<% 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") %>'>
|
|
|
|
<li style="position:relative;height:6em;" class='<%= cycle("odd", "even") %>'>
|
|
|
|
<div style="float: left;">
|
|
|
|
<div style="float: left;">
|
|
|
|
<%= image_tag(get_project_avatar(project), :class => "avatar-4") %>
|
|
|
|
<%= image_tag(get_project_avatar(project), :class => "avatar-4") %>
|
|
|
@ -65,43 +73,43 @@
|
|
|
|
(<%= link_to "#{projectCount(project)}人", project_member_path(project) ,:course =>'0' %>)
|
|
|
|
(<%= link_to "#{projectCount(project)}人", project_member_path(project) ,:course =>'0' %>)
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class='text_nowrap' style="float: left;margin:5px; margin-left: 10px; width: 380px;">
|
|
|
|
<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>
|
|
|
|
<div style="position:absolute; bottom:0;right:0;margin:5px 10px 5px 5px ;">
|
|
|
|
<div style="position:absolute; bottom:0;right:0;margin:5px 10px 5px 5px ;">
|
|
|
|
<% issue_count = project.issues.count %>
|
|
|
|
<%# issue_count = project.issues.count %>
|
|
|
|
<% issue_journal_count = project.issue_changes.count %>
|
|
|
|
<%# issue_journal_count = project.issue_changes.count %>
|
|
|
|
<% issue_score = issue_count * 0.2 %>
|
|
|
|
<%# issue_score = issue_count * 0.2 %>
|
|
|
|
<% issue_journal_score = issue_journal_count * 0.1 %>
|
|
|
|
<%# issue_journal_score = issue_journal_count * 0.1 %>
|
|
|
|
<% finall_issue_score = issue_score + issue_journal_score %>
|
|
|
|
<%# finall_issue_score = issue_score + issue_journal_score %>
|
|
|
|
|
|
|
|
|
|
|
|
<% new_count = project.news.count %>
|
|
|
|
<%# new_count = project.news.count %>
|
|
|
|
<% new_score = new_count * 0.1 %>
|
|
|
|
<%# new_score = new_count * 0.1 %>
|
|
|
|
<% finall_new_score = new_score %>
|
|
|
|
<%# finall_new_score = new_score %>
|
|
|
|
|
|
|
|
|
|
|
|
<% document_count = project.documents.count %>
|
|
|
|
<%# document_count = project.documents.count %>
|
|
|
|
<% file_score = document_count * 0.1 %>
|
|
|
|
<%# file_score = document_count * 0.1 %>
|
|
|
|
<% finall_file_score = file_score %>
|
|
|
|
<%# finall_file_score = file_score %>
|
|
|
|
|
|
|
|
|
|
|
|
<% changeset_count = project.changesets.count %>
|
|
|
|
<%# changeset_count = project.changesets.count %>
|
|
|
|
<% code_submit_score = changeset_count * 0.3 %>
|
|
|
|
<%# code_submit_score = changeset_count * 0.3 %>
|
|
|
|
<% finall_code_submit_score = code_submit_score %>
|
|
|
|
<%# finall_code_submit_score = code_submit_score %>
|
|
|
|
|
|
|
|
|
|
|
|
<% board_message_count = 0 %>
|
|
|
|
<%# board_message_count = 0 %>
|
|
|
|
<% project.boards.each do |board| %>
|
|
|
|
<%# project.boards.each do |board| %>
|
|
|
|
<% board_message_count += board.messages_count %>
|
|
|
|
<%# board_message_count += board.messages_count %>
|
|
|
|
<% end %>
|
|
|
|
<%# end %>
|
|
|
|
<% topic_score = board_message_count * 0.1 %>
|
|
|
|
<%# topic_score = board_message_count * 0.1 %>
|
|
|
|
<% finall_topic_score = topic_score %>
|
|
|
|
<%# finall_topic_score = topic_score %>
|
|
|
|
|
|
|
|
|
|
|
|
<% finall_project_score = finall_issue_score + finall_new_score + finall_file_score + finall_code_submit_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 ),
|
|
|
|
<%= content_tag "span", l(:label_project_score)+ ":" + project_score(project),
|
|
|
|
:style => "cursor: pointer; display: inline-block; float: right; color: #ec6300; ",
|
|
|
|
:style => "cursor: pointer; display: inline-block; float: right; color: #ec6300; ",
|
|
|
|
:title => "项目得分,综合考虑了项目的各项活动,反映了该项目的活跃程度",
|
|
|
|
:title => "项目得分,综合考虑了项目的各项活动,反映了该项目的活跃程度",
|
|
|
|
:class => "tooltip",
|
|
|
|
:class => "tooltip",
|
|
|
|
:id => "tooltip-#{project.id}" %>
|
|
|
|
:id => "tooltip-#{project.id}" %>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</li>
|
|
|
|
</li>
|
|
|
|
<!--<%end %> -->
|
|
|
|
<!--<%#end %> -->
|
|
|
|
<% end; reset_cycle %>
|
|
|
|
<% end; reset_cycle %>
|
|
|
|
</ul>
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
@ -114,7 +122,7 @@
|
|
|
|
<div class="user-message-box-list" style="margin-top: 10px;">
|
|
|
|
<div class="user-message-box-list" style="margin-top: 10px;">
|
|
|
|
<%activities = find_all_activities%>
|
|
|
|
<%activities = find_all_activities%>
|
|
|
|
<% activities.each do |event| %>
|
|
|
|
<% 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;">
|
|
|
|
<li style="display: block;height:60px; padding-bottom: 4px;">
|
|
|
|
<div class="inner-right" style="float: left; height: 100%; ">
|
|
|
|
<div class="inner-right" style="float: left; height: 100%; ">
|
|
|
|
<%= image_tag url_to_avatar(event.event_author), :class => "avatar-3" %>
|
|
|
|
<%= image_tag url_to_avatar(event.event_author), :class => "avatar-3" %>
|
|
|
@ -125,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>
|
|
|
|
<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>
|
|
|
|
</div>
|
|
|
|
</li>
|
|
|
|
</li>
|
|
|
|
<!--<%end %> --><!-- cache -->
|
|
|
|
<!--<%#end %> --><!-- cache -->
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</ul>
|
|
|
|
</ul>
|
|
|
|