增加用户活动评论数显示
This commit is contained in:
parent
fba39b4b00
commit
71d6dc6d21
|
@ -100,7 +100,7 @@ class ProjectsController < ApplicationController
|
||||||
@project_count = @projects.count
|
@project_count = @projects.count
|
||||||
@project_pages = Paginator.new @project_count, @limit, params['page']
|
@project_pages = Paginator.new @project_count, @limit, params['page']
|
||||||
@offset ||= @project_pages.offset
|
@offset ||= @project_pages.offset
|
||||||
@projects = @projects.offset(@offset).limit(@limit).order('lft').all
|
@projects = @projects.offset(@offset).limit(@limit).order('created_on DESC').all
|
||||||
#end
|
#end
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.html {
|
format.html {
|
||||||
|
@ -109,7 +109,7 @@ class ProjectsController < ApplicationController
|
||||||
unless params[:closed]
|
unless params[:closed]
|
||||||
scope = scope.active
|
scope = scope.active
|
||||||
end
|
end
|
||||||
@projects = scope.visible.offset(@offset).limit(@limit).order('lft').all
|
@projects = scope.visible.offset(@offset).limit(@limit).order('created_on DESC').all
|
||||||
}
|
}
|
||||||
format.api {
|
format.api {
|
||||||
# @offset, @limit = api_offset_and_limit
|
# @offset, @limit = api_offset_and_limit
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
<tr>
|
<tr>
|
||||||
|
|
||||||
<td align="left"><a class="font_lighter"><%= format_activity_day(day) %> <%= format_time(e.event_datetime, false) %></a></td>
|
<td align="left"><a class="font_lighter"><%= format_activity_day(day) %> <%= format_time(e.event_datetime, false) %></a></td>
|
||||||
<% if e.class == Issue %>
|
<% if e.event_type == "issue" %>
|
||||||
<td align="right"><span><%= link_to l(:label_find_all_comments), issue_path(e) %></span><span class="font_lighter"><%= l(:label_comments_count, :count => e.journals.count)%></span></td>
|
<td align="right"><span><%= link_to l(:label_find_all_comments), issue_path(e) %></span><span class="font_lighter"><%= l(:label_comments_count, :count => e.journals.count)%></span></td>
|
||||||
<% end %>
|
<% end %>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
|
@ -24,6 +24,9 @@
|
||||||
<%= textilizable act.description %>
|
<%= textilizable act.description %>
|
||||||
</p></td>
|
</p></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<div style="display: inline-block; float: right; margin-top: 0px"><span><%= link_to l(:label_find_all_comments), respond_path(e.act_id) %></span><a class="font_lighter"><%= l(:label_comments_count, :count => e.act.commit)%></a></div>
|
||||||
<% when 'Journal' %>
|
<% when 'Journal' %>
|
||||||
<tr>
|
<tr>
|
||||||
<% if e.user == User.current%>
|
<% if e.user == User.current%>
|
||||||
|
@ -38,6 +41,9 @@
|
||||||
<%= textilizable act.notes %>
|
<%= textilizable act.notes %>
|
||||||
</p></td>
|
</p></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<div style="display: inline-block; float: right; margin-top: 0px"></div>
|
||||||
<% when 'Changeset' %>
|
<% when 'Changeset' %>
|
||||||
<tr>
|
<tr>
|
||||||
<% if e.user == User.current%>
|
<% if e.user == User.current%>
|
||||||
|
@ -52,6 +58,9 @@
|
||||||
<%= textilizable act.long_comments %>
|
<%= textilizable act.long_comments %>
|
||||||
</p></td>
|
</p></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<div style="display: inline-block; float: right; margin-top: 0px"><span><%= link_to l(:label_find_all_comments), {:controller => 'repositories', :action => 'revision', :id => act.repository.project, :repository_id => act.repository.identifier_param, :rev => act.identifier} %></span><a class="font_lighter"><%= l(:label_comments_count, :count => e.act.count)%></a></div>
|
||||||
<% when 'Message' %>
|
<% when 'Message' %>
|
||||||
<tr>
|
<tr>
|
||||||
<% if e.user == User.current%>
|
<% if e.user == User.current%>
|
||||||
|
@ -66,6 +75,9 @@
|
||||||
<%= textilizable act.content %>
|
<%= textilizable act.content %>
|
||||||
</p></td>
|
</p></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<div style="display: inline-block; float: right; margin-top: 0px"></div>
|
||||||
<% when 'News' %>
|
<% when 'News' %>
|
||||||
<tr>
|
<tr>
|
||||||
<% if e.user == User.current%>
|
<% if e.user == User.current%>
|
||||||
|
@ -80,6 +92,9 @@
|
||||||
<%= textilizable act.description %>
|
<%= textilizable act.description %>
|
||||||
</p></td>
|
</p></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<div style="display: inline-block; float: right; margin-top: 0px"><span><%= link_to l(:label_find_all_comments), {:controller => 'news', :action => 'show', :id => act.id} %></span><a class="font_lighter"><%= l(:label_comments_count, :count => e.act.comments_count)%></a></div>
|
||||||
<% when 'Issue' %>
|
<% when 'Issue' %>
|
||||||
<tr>
|
<tr>
|
||||||
<% if e.user == User.current%>
|
<% if e.user == User.current%>
|
||||||
|
@ -94,31 +109,34 @@
|
||||||
<%= textilizable act.description %>
|
<%= textilizable act.description %>
|
||||||
</p></td>
|
</p></td>
|
||||||
</tr>
|
</tr>
|
||||||
<% end %>
|
<!--modified by nie -->
|
||||||
<tr>
|
<tr>
|
||||||
<td align="left"><a class="font_lighter"></a></td>
|
<td>
|
||||||
<td width="200" align="right" class="a"><span class="font_lighter">
|
<div style="display: inline-block; float: right; margin-top: 0px"><span><%= link_to l(:label_find_all_comments), {:controller => 'issues', :action => 'show', :id => act.id} %></span><a class="font_lighter"><%= l(:label_comments_count, :count => e.act.journals.count)%></a></div>
|
||||||
<% if e.act_type == 'Changeset' %>
|
<% end %>
|
||||||
|
<div style="display: inline-block; float: left; margin-top: 0px" width="200" align="right" class="a"><span class="font_lighter"> <% if e.act_type == 'Changeset' %>
|
||||||
<%= format_time(e.act.committed_on) %>
|
<%= format_time(e.act.committed_on) %>
|
||||||
<% else %>
|
<% else %>
|
||||||
<%= format_time(e.act.created_on) %>
|
<%= format_time(e.act.created_on) %>
|
||||||
<% end %></span></td>
|
<% end %></span></div>
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<!-- <tr><div class="line_under"></div></tr> -->
|
<!-- <tr><div class="line_under"></div></tr> -->
|
||||||
</table></td>
|
</table></td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
|
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
<div class="pagination" style="float:left;">
|
<div class="pagination" style="float:left;">
|
||||||
<ul>
|
<ul>
|
||||||
<%= pagination_links_full @activity_pages %>
|
<%= pagination_links_full @activity_pages %>
|
||||||
<ul>
|
<ul>
|
||||||
</div>
|
</div>
|
||||||
<% else %>
|
<% else %>
|
||||||
<p class="font_description"><%= l(:label_user_activities) %></p>
|
<p class="font_description">
|
||||||
|
<%= l(:label_user_activities) %>
|
||||||
|
</p>
|
||||||
|
|
||||||
<% end %>
|
<% end %>
|
Loading…
Reference in New Issue