From: <mp...@kr...> - 2007-01-24 16:00:18
|
Revision: 3525 Author: mpeters Date: 2007-01-24 11:00:05 -0500 (Wed, 24 Jan 2007) Log Message: ----------- dont show paging vars if theres only one page; it just clutters stuff up Modified Paths: -------------- trunk/krang/lib/Krang/HTMLPager.pm Modified: trunk/krang/lib/Krang/HTMLPager.pm =================================================================== --- trunk/krang/lib/Krang/HTMLPager.pm 2007-01-23 23:50:17 UTC (rev 3524) +++ trunk/krang/lib/Krang/HTMLPager.pm 2007-01-24 16:00:05 UTC (rev 3525) @@ -296,9 +296,13 @@ <tmpl_if next_page_number><a href="javascript:go_page('<tmpl_var next_page_number>')">>></a></tmpl_if> - <tmpl_if show_big_view><a href="javascript:show_big_view('0')">show <tmpl_var user_page_size> per page</a></p></div> - <tmpl_else><a href="javascript:show_big_view('1')">show <tmpl_var big_view_page_size> per page</a></p></div> +<tmpl_if show_big_view> + <a href="javascript:show_big_view('0')">show <tmpl_var user_page_size> per page</a></p></div> +<tmpl_else> + <tmpl_if page_numbers> + <a href="javascript:show_big_view('1')">show <tmpl_var big_view_page_size> per page</a></p></div> </tmpl_if> +</tmpl_if> <tmpl_else> <div class="no-border"><p class="left2"><b> None Found</b></p></div> @@ -941,11 +945,13 @@ { page_number => $total_pages, page_number_label => $total_pages }) if $end != $total_pages; } else { - @page_numbers = - map { { page_number => $_, - page_number_label=> $_, - is_current_page => ($_ eq $curr_page_num) } } - (1..$total_pages); + if( $total_pages > 1 ) { + @page_numbers = + map { { page_number => $_, + page_number_label=> $_, + is_current_page => ($_ eq $curr_page_num) } } + (1..$total_pages); + } } # Determine row number at which display starts |