Fix bug.
This commit is contained in:
parent
564620482a
commit
9817e5a202
|
@ -342,9 +342,9 @@ class AnnouncementsController < ApplicationController
|
||||||
OrbitHelper.set_current_widget_module("announcement")
|
OrbitHelper.set_current_widget_module("announcement")
|
||||||
OrbitHelper.set_params(params,current_user)
|
OrbitHelper.set_params(params,current_user)
|
||||||
Bulletin.remove_expired_status
|
Bulletin.remove_expired_status
|
||||||
sorted,total_pages = get_sorted_annc
|
|
||||||
OrbitHelper.set_page_number(params[:page_no].to_i)
|
OrbitHelper.set_page_number(params[:page_no].to_i)
|
||||||
OrbitHelper.set_page_data_count((params[:data_count].blank? ? 10 : params[:data_count].to_i))
|
OrbitHelper.set_page_data_count((params[:data_count].blank? ? 10 : params[:data_count].to_i))
|
||||||
|
sorted,total_pages = get_sorted_annc
|
||||||
anns = sorted.collect do |a|
|
anns = sorted.collect do |a|
|
||||||
if a["source-site"].blank?
|
if a["source-site"].blank?
|
||||||
statuses = a.statuses_with_classname.collect do |status|
|
statuses = a.statuses_with_classname.collect do |status|
|
||||||
|
|
|
@ -372,7 +372,7 @@ module AnnouncementsHelper
|
||||||
end
|
end
|
||||||
html = render_link_to_edit(html, data["url_to_edit"]) if !data["url_to_edit"].nil?
|
html = render_link_to_edit(html, data["url_to_edit"]) if !data["url_to_edit"].nil?
|
||||||
total_pages = data['total_pages'].to_i rescue 1
|
total_pages = data['total_pages'].to_i rescue 1
|
||||||
if @show_page == false
|
if @show_page == "false"
|
||||||
html = html.gsub("{{pagination_goes_here}}","")
|
html = html.gsub("{{pagination_goes_here}}","")
|
||||||
else
|
else
|
||||||
if total_pages > 1
|
if total_pages > 1
|
||||||
|
|
Loading…
Reference in New Issue