diff --git a/app/controllers/homework_attach_controller.rb b/app/controllers/homework_attach_controller.rb index c3ac15197..8eae8b855 100644 --- a/app/controllers/homework_attach_controller.rb +++ b/app/controllers/homework_attach_controller.rb @@ -101,8 +101,8 @@ class HomeworkAttachController < ApplicationController @stars_status_map["star#{star_status.stars.to_i}".to_sym] = percent_m.to_s + "%" end - @jours = @homework.journals_for_messages.order("created_on DESC") @limit = 10 + @jours = @homework.journals_for_messages.order("created_on DESC") @feedback_count = @jours.count @feedback_pages = Paginator.new @feedback_count, @limit, params['page'] @offset ||= @feedback_pages.offset @@ -129,11 +129,11 @@ class HomeworkAttachController < ApplicationController @homework = HomeworkAttach.find(params[:jour_id]) @homework.addjours User.current.id, params[:new_form][:user_message],0 @jours = @homework.journals_for_messages.order("created_on DESC") - #@limit = 10 - #@feedback_count = @jours.count - #@feedback_pages = Paginator.new @feedback_count, @limit, params['page'] - #@offset ||= @feedback_pages.offset - #@jour = @jours[@offset, @limit] + @limit = 10 + @feedback_count = @jours.count + @feedback_pages = Paginator.new @feedback_count, @limit, params['page'] + @offset ||= @feedback_pages.offset + @jour = @jours[@offset, @limit] respond_to do |format| format.js end diff --git a/app/views/homework_attach/addjours.js.erb b/app/views/homework_attach/addjours.js.erb index e0f32581e..e463237e5 100644 --- a/app/views/homework_attach/addjours.js.erb +++ b/app/views/homework_attach/addjours.js.erb @@ -1,4 +1,4 @@ -$('#message').html('<%= escape_javascript(render(:partial => 'showjour', :locals => {:jour =>@jours, :state => false} )) %>'); +$('#message').html('<%= escape_javascript(render(:partial => 'showjour', :locals => {:jour =>@jour, :state => false} )) %>'); $('#pre_show').html('<%= escape_javascript(render(:partial => 'pre_show', :locals => {:content => nil})) %>'); $('#new_form_user_message').val(""); $('#new_form_reference_user_id').val(""); \ No newline at end of file diff --git a/app/views/homework_attach/show.html.erb b/app/views/homework_attach/show.html.erb index d7c1e8eb0..f2c37d9ac 100644 --- a/app/views/homework_attach/show.html.erb +++ b/app/views/homework_attach/show.html.erb @@ -142,7 +142,15 @@