changeset 235:014f459543d5

Put Prev/Next button at the bottom of list in addition to above
author HIROSE Yuuji <yuuji@gentei.org>
date Sat, 25 Jun 2016 09:49:02 +0859
parents 52a802a655a9
children 19b92549b5b7
files s4-funcs.sh
diffstat 1 files changed, 8 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/s4-funcs.sh	Sat Jun 25 08:57:26 2016 +0859
+++ b/s4-funcs.sh	Sat Jun 25 09:49:02 2016 +0859
@@ -1666,15 +1666,18 @@
   <p>${total}件中の$((offset+1))件めから${kwd:+" - 検索語: $kwd"}</p>
 EOF
   if [ $((offset+limit)) -lt $total ]; then
+    nextbtn=$(
     cat<<EOF
-<div class="right"><form action="$myname" method="POST">
+<div class="right clear"><form action="$myname" method="POST">
 `cgi_submit 次の${limit}件`
 `cgi_hidden kwd "$kwd"`
 `cgi_hidden stage "$stage"`
 `cgi_hidden offset $((offset + limit))`</form></div>
 EOF
+	   )
   fi
   if [ $offset -gt 0 ]; then
+    prevbtn=$(
     cat<<EOF
 <form action="$myname" method="POST">
 `cgi_submit 前の${limit}件`
@@ -1682,7 +1685,10 @@
 `cgi_hidden kwd "$kwd"`
 `cgi_hidden offset $((offset - limit))`</form>
 EOF
+    )
   fi
+  pnbtn="$nextbtn$prevbtn"
+  echo $pnbtn
 
   err ListEntry: `echo "$sql"\;`
 
@@ -1704,6 +1710,7 @@
     echo "<br>$name${ownerp:+<br>$ownerp}"
     echo "</div>"
   done
+  echo ${pnbtn:+"<hr>$nextbtn$prevbtn"}
 )
 listmember() {
   listentry user "$@"

yatex.org