check if show_sort_and_per_page? returns true before displaying content

make sure tests for view_type_group still work
Merge pull request #920 from ebenenglish/only-show-view-type-if-results

check if show_sort_and_per_page? returns true before displaying content