templates: added empty view, improved pagination