NKUT footer displaying number of visitors and last update time
This commit is contained in:
parent
82ffc7c3fd
commit
05faefb301
|
@ -38,6 +38,8 @@ $(document).ready(function() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
$('.page_footer').append($('#last_update_date')[0]);
|
||||||
});
|
});
|
||||||
// Ad Banner FX code [end]
|
// Ad Banner FX code [end]
|
||||||
|
|
||||||
|
|
|
@ -2,6 +2,7 @@ class PagesController < ApplicationController
|
||||||
include ApplicationHelper
|
include ApplicationHelper
|
||||||
before_filter :get_item, :only => [:index_from_link, :show_from_link]
|
before_filter :get_item, :only => [:index_from_link, :show_from_link]
|
||||||
before_filter :check_frontend_open, :only => [:index,:show]
|
before_filter :check_frontend_open, :only => [:index,:show]
|
||||||
|
before_filter :get_last_update_date, :only => [:index,:show]
|
||||||
# caches_page :index
|
# caches_page :index
|
||||||
|
|
||||||
def index
|
def index
|
||||||
|
@ -214,4 +215,8 @@ class PagesController < ApplicationController
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def get_last_update_date
|
||||||
|
@last_update_date = t(:total_visitors)+' : '+ Impression.count.to_s+' | '+t(:update_at)+' : '+Bulletin.order_by(:updated_at.desc).limit(1).first[:updated_at].to_s
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -41,5 +41,6 @@
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
<div id='last_update_date_wrap' style='display:none;'><div id='last_update_date'><%= @last_update_date %></div></div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
Loading…
Reference in New Issue