Merge branch 'develop' of 10.0.47.245:/home/trustie2 into develop

exceptionHandle
kg 11 years ago
commit 57e5cda513

@ -8,7 +8,7 @@ module NoUsesHelper
css = no_use_css(objects) << options[0].to_s
# ([watcher_css(objects), watched ? 'icon icon-fav ' : 'icon icon-fav-off '].join(' ') << options[0].to_s)
text = clicked ? l(:no_use) : l(:cancel_no_use)
text = clicked ? l(:cancel_no_use) : l(:no_use)
url = no_uses_path(
:object_type => objects.first.class.to_s.underscore,

@ -297,6 +297,14 @@ module UserScoreHelper
return (commit_count + issue_details_count)
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)
collaboration = calculate_collaboration_count(user)

@ -17,7 +17,7 @@ class RelativeMemo < ActiveRecord::Base
# validates_length_of :subject, maximum: 50
#validates_length_of :content, maximum: 3072
validate :cannot_reply_to_locked_topic, :on => :create
validates_uniqueness_of :osp_id, :scope => [:subject, :context]
validates_uniqueness_of :osp_id, :scope => [:subject, :content]
acts_as_tree :counter_cache => :replies_count, :order => "#{RelativeMemo.table_name}.created_at ASC"
acts_as_attachable

@ -48,7 +48,7 @@
<div id="sidebar">
<div class="spaceleft">
<div class="inf_user_image">
<% @open_source_project = OpenSourceProject.find(params[:id])%>
<% @open_source_project = OpenSourceProject.find(params[:open_source_project_id] || params[:id])%>
<table>
<tr>
<td><%= image_tag('../images/avatars/Project/0', :class => 'avatar2') %></td>
@ -69,9 +69,9 @@
<div class="user_fans">
<table width="240" border="0">
<tr align="center" width="80px">
<td class="font_index"><%= 0 %></td>
<td class="font_index"><%= @open_source_project.users_count %></td>
<td class="font_index"><%= 0 %></td>
<td class="font_index"><%= @open_source_project.topics.count %></td>
<td class="font_index"><%= @open_source_project.commit_count %></td>
</tr>
<tr class="font_aram">

@ -63,6 +63,6 @@
<div class="tags">
<div id="tags">
<%= image_tag( "/images/sidebar/tags.png") %>
<%= render :partial => 'tags/tag_name', :locals => {:obj => project,:object_flag => "7",:non_list_all => true }%>
<%= render :partial => 'tags/tag_name', :locals => {:obj => project,:object_flag => "8",:non_list_all => true }%>
</div>
</div>

@ -125,6 +125,9 @@ li {
padding-right: 5px;
text-align: left;
}
.nav-search-con{
padding-top: 7px;
}
</style>
<%#======================================================================box before%>
<div class="tb-navigation" data-spm="a230r.1.3">
@ -137,17 +140,17 @@ li {
</div>
<div class="nav-container">
<div class="nav-topbar nav-category-group" data-group="nav-topbar">
<div data-group="nav-topbar">
<div class="nav-topbar-content">
<ul>
<li class="has-arrow">查找条件><span class="nav-topbar-arror"></span>
<li class="nav-search-con">查找条件><span class="nav-topbar-arror"></span>
</li>
<li>
<span class="topbar-search J_TopbarSearch">
<%= show_condition(@app_dir, @language, @created_at, params[:name]) %>
</span>
</li>
<li>共 <span class="h"><%= @os_project_count %></span> 个开源项目</li>
<li class="nav-search-con">共 <span class="h"><%= @os_project_count %></span> 个开源项目</li>
<!-- <li class="related-count"><a href="/search?q=iphone&amp;app=vproduct&amp;vlist=1&amp;from_combo=true">8款相关产品</a></li> -->
</ul>
</div>

@ -67,7 +67,7 @@
<div class="tags">
<div id="tags">
<%= image_tag( "/images/sidebar/tags.png") %>
<%= render :partial => 'tags/tag_name', :locals => {:obj => @memo,:object_flag => "8",:non_list_all => true }%>
<%= render :partial => 'tags/tag_name', :locals => {:obj => @memo,:object_flag => "9",:non_list_all => true }%>
</div>
</div>
</div>

@ -4,13 +4,14 @@
<% users = User.all%>
<table>
<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>
<% users.each do |user| %>
<tr>
<td><%= user.id %></td>
<td><%= user.lastname %><%= user.firstname %></td>
<td><%= calculate_collaboration_count(user) %></td>
<td><%= calculate_influence_count(user) %></td>
@ -18,6 +19,7 @@
<td><%= calculate_file(user) %></td>
<td><%= calculate_issue(user) %></td>
<td><%= calculate_level(user) %></td>
<td><%= calculate_attachments(user) %></td>
</tr>
<% end %>

Loading…
Cancel
Save