修复新建账号申请项目时在申请列表无法显示的BUG #1180

This commit is contained in:
sw 2014-08-06 15:10:53 +08:00
parent c155ebdfd7
commit 22335b23a6
3 changed files with 8 additions and 3 deletions

View File

@ -53,10 +53,13 @@ module MembersHelper
# 当前申请加入的成员名单
def render_principals_for_applied_members(project)
scope = Principal.active.sorted.applied_members(project).like(params[:q])
scope = project.applied_projects.map(&:user)
principal_count = scope.count
principal_pages = Redmine::Pagination::Paginator.new principal_count, 10, params['page']
principals = scope.offset(principal_pages.offset).limit(principal_pages.per_page).all
offset ||= principal_pages.offset
principals = scope[offset, 10]
#principals = scope.offset(principal_pages.offset).limit(principal_pages.per_page).all
#principals = ApplicationController.new.paginateHelper scope,10
s = content_tag('div', principals_check_box_tags_ex('membership[user_ids][]', principals), :id => 'principals')

View File

@ -21,7 +21,7 @@
<%= sort_header_tag('field_file_dense', :caption => l(:field_file_dense), :default_order => 'desc', :scope => "col", :id => "vzebra-field_file_dense") %>
<%= sort_header_tag('downloads', :caption => l(:field_downloads), :default_order => 'desc', :scope => "col", :id => "vzebra-action") %>
<%= sort_header_tag('operation', :caption => "", :scope => "col", :id => "vzebra-children") %>
<!-- <%= sort_header_tag('description', :caption => l(:field_description)) %> -->
<!-- <%#= sort_header_tag('description', :caption => l(:field_description)) %> -->
</tr>
</thead>
<tbody>

View File

@ -104,6 +104,8 @@
<div class="memo-content">
<%= textilizable(@topic, :content) %>
<%= link_to_attachments @topic, :author => false %>
<%# options = {:author => true, :deletable => @topic.author.eql?(User.current)} %>
<%#= render :partial => 'attachments/app_link', :locals => {:attachments => @topi.attachments, :options => options} %>
</div>
<div class="memo-timestamp">
<div style="float: left"><%= authoring @topic.created_on, @topic.author %></div>