1 |
616 |
ahitrov |
<form action="/contenido/set_section_pager.html" name="formpager"> |
2 |
|
|
<table border="0" cellpadding="3" cellspacing="0" class="tform"> |
3 |
|
|
<tr><td>Показывать по:</td> |
4 |
|
|
<td width="100%"> |
5 |
|
|
<select name="size" onChange="set_pager(this);" autocomplete="off"> |
6 |
|
|
% for ( qw( 40 80 120 200 500 1000 ) ) { |
7 |
|
|
% my $selected = $size == $_ ? ' selected' : ''; |
8 |
|
|
<option value="<% $_ %>"<% $selected %>><% $_ %></option> |
9 |
|
|
% } |
10 |
|
|
</select> |
11 |
|
|
</td> |
12 |
|
|
<td><input type="hidden" name="sect_id" value="<% $section->id %>"></td> |
13 |
|
|
</tr></table> |
14 |
|
|
</form> |
15 |
|
|
<script> |
16 |
|
|
<!-- |
17 |
|
|
function set_pager( oSelect ) { |
18 |
|
|
var oForm = document.forms['formpager']; |
19 |
|
|
oForm.submit(); |
20 |
|
|
} |
21 |
|
|
//--> |
22 |
|
|
</script> |
23 |
|
|
<%args> |
24 |
|
|
|
25 |
|
|
$section => undef |
26 |
|
|
|
27 |
|
|
</%args> |
28 |
|
|
<%init> |
29 |
|
|
|
30 |
|
|
return unless ref $section; |
31 |
|
|
return if $section->_sorted; |
32 |
|
|
|
33 |
|
|
my $size = $section->_page_size || 40; |
34 |
|
|
|
35 |
|
|
</%init> |