mirror of
https://gitlab.com/fdroid/fdroidserver.git
synced 2024-11-04 22:40:12 +01:00
Redesigned the next/previous page switcher to allow direct access to any page.
This commit is contained in:
parent
8f50665e8c
commit
ef4f189a1a
@ -240,21 +240,31 @@ class FDroid
|
||||
$out.=$matches;
|
||||
|
||||
$out.='<hr><p>';
|
||||
if($query_vars['fdpage']==1) {
|
||||
$out.="<<first ";
|
||||
$out.="<prev ";
|
||||
} else {
|
||||
$out.='<a href="'.makelink($query_vars, array('fdpage'=>1)).'"><<first</a> ';
|
||||
$out.='<a href="'.makelink($query_vars, array('fdpage'=>($query_vars['fdpage']-1))).'"><<prev</a> ';
|
||||
}
|
||||
|
||||
$out.='<div style="float:left;">';
|
||||
$out.=' Page '.$query_vars['fdpage'].' of '.$numpages.' ';
|
||||
if($query_vars['fdpage']==$numpages) {
|
||||
$out.="next> ";
|
||||
$out.="last>> ";
|
||||
} else {
|
||||
$out.='</div>';
|
||||
|
||||
$out.='<div style="float:right;">';
|
||||
if($query_vars['fdpage']!=$numpages) {
|
||||
$out.='<a href="'.makelink($query_vars, array('fdpage'=>($query_vars['fdpage']+1))).'">next></a> ';
|
||||
$out.='<a href="'.makelink($query_vars, array('fdpage'=>$numpages)).'">last>></a> ';
|
||||
}
|
||||
$out.='</div>';
|
||||
|
||||
$out.='<div style="text-align:center;">';
|
||||
for($i=1;$i<=$numpages;$i++) {
|
||||
if($i == $query_vars['fdpage']) {
|
||||
$out.='<b>'.$i.'</b>';
|
||||
} else {
|
||||
$out.='<a href="'.makelink($query_vars, array('fdpage'=>$i)).'">';
|
||||
$out.=$i;
|
||||
$out.='</a>';
|
||||
}
|
||||
$out.=' ';
|
||||
}
|
||||
$out.=' ';
|
||||
$out.='</div>';
|
||||
|
||||
$out.='</p>';
|
||||
} else if($query_vars['fdfilter']!='') {
|
||||
$out.='<p>No matches</p>';
|
||||
|
Loading…
Reference in New Issue
Block a user