项目、课程、竞赛留言模块分页控件修复

This commit is contained in:
z9hang 2014-11-05 09:51:30 +08:00
parent 13c3ac8551
commit 7d4d3f590c
6 changed files with 17 additions and 17 deletions

View File

@ -672,10 +672,10 @@ class CoursesController < ApplicationController
page = 1 + offset / @limit
end
@feedback_count = @jours.count
@feedback_pages = Paginator.new @feedback_count, @limit, page
@offset ||= @feedback_pages.offset
@jour = @jours[@offset, @limit]
#@feedback_count = @jours.count
#@feedback_pages = Paginator.new @feedback_count, @limit, page
#@offset ||= @feedback_pages.offset
@jour = paginateHelper @jours,10
@state = false
respond_to do |format|
format.html{render :layout => 'base_courses'}

View File

@ -424,10 +424,10 @@ class ProjectsController < ApplicationController
end
@feedback_count = @jours.count
@feedback_pages = Paginator.new @feedback_count, @limit, @page
@offset ||= @feedback_pages.offset
@jour = @jours[@offset, @limit]
#@feedback_count = @jours.count
#@feedback_pages = Paginator.new @feedback_count, @limit, @page
#@offset ||= @feedback_pages.offset
@jour = paginateHelper @jours,10
@state = false
@base_courses_tag = @project.project_type

View File

@ -1,3 +1,4 @@
<div class="dis">
<div class="msg_box" id='leave-message'>
<h4>留言内容</h4>
<%= render :partial => 'new', :locals => {:contest => @contest, :sta => @state} %>
@ -9,4 +10,5 @@
<%= render :partial => 'history',:locals => { :contest => @contest, :journals => @jour, :state => false} %>
</div>
<ul class="wlist"><%= pagination_links_full @obj_pages, @obj_count, :per_page_links => false, :remote => true, :flag => true%></ul>
<ul class="wlist"><%= pagination_links_full @obj_pages, @obj_count, :per_page_links => false, :remote => false, :flag => true%></ul>
</div>

View File

@ -1,3 +1,4 @@
<div class="dis">
<div class="msg_box" id='leave-message'>
<% reply_allow = JournalsForMessage.create_by_user? User.current %>
@ -26,4 +27,5 @@
<div id="history">
<%= render :partial => 'history',:locals => { :contest => @contest, :journals => @jour, :state => false} %>
</div>
<ul class="wlist"><%= pagination_links_full @obj_pages, @obj_count, :per_page_links => false, :remote => false, :flag => true%></ul>
</div>

View File

@ -43,10 +43,4 @@ function checkMaxLength() {
}
</script>
<div class="pagination" style="float:left;">
<ul>
<%= pagination_links_full @feedback_pages %>
</ul>
</div>
<% html_title(l(:label_course_feedback)) -%>

View File

@ -1,3 +1,4 @@
<div class="dis">
<div class="msg_box" id='leave-message'>
<% reply_allow = JournalsForMessage.create_by_user? User.current %>
@ -26,4 +27,5 @@
<div id="history">
<%= render :partial => 'history',:locals => { :contest => @contest, :journals => @jour, :state => false} %>
</div>
<ul class="wlist"><%= pagination_links_full @obj_pages, @obj_count, :per_page_links => false, :remote => false, :flag => true%></ul>
</div>