Mercurial > hgrepos > hgweb.cgi > s4
diff s4-funcs.sh @ 243:466ea3e4b039
Search box localted to the top of home page.
author | HIROSE Yuuji <yuuji@gentei.org> |
---|---|
date | Sun, 10 Jul 2016 20:39:37 +0859 |
parents | 7dd85c224bbb |
children | b915381669d6 |
line wrap: on
line diff
--- a/s4-funcs.sh Fri Jul 08 19:26:09 2016 +0859 +++ b/s4-funcs.sh Sun Jul 10 20:39:37 2016 +0859 @@ -1421,6 +1421,18 @@ EOF } +search_form() { + cat<<-EOF + <div class="fr"> + <form action="$myname"> + <input type="text" name="kwd" value="" + placeholder=" 全記事からの検索 " width="10"> + <input type="hidden" name="stage" value="searchart"> + </form> + </div> + EOF +} + showhome() { # $1=userRowIdToShow err showhome \$1=$1 @@ -1450,8 +1462,9 @@ fi . ./s4-blog.sh - tf=$tmpd/title.$$ pf=$tmpd/profile.$$ bf=$tmpd/blogs.$$ - echo "$gecos さん" > $tf + tf=$tmpd/title.$$ pf=$tmpd/profile.$$ bf=$tmpd/blogs.$$ sf=$tmpd/search.$$ + search_form > $sf + echo "$gecos さん" > $tf viewtable $formdir/user.def user $1 > $pf sqcond="WHERE name='$uname' AND key='profimg' AND type LIKE 'file:image%'" @@ -1472,6 +1485,7 @@ -D_PROFILE_="spaste(\`$pf')$conflink" \ -D_PROFIMG_="spaste(\`$imf')" \ -D_BLOGS_="spaste(\`$bf')" \ + -D_SEARCH_="spaste(\`$sf')" \ -D_NBLOG_="$nblog" \ -D_GROUPS_="syscmd(\`cat')" \ $layout/html.m4.html $layout/home.m4.html @@ -1532,18 +1546,6 @@ </div> EOF fi - cat<<EOF -<div class="fold"> -`cgi_checkbox srchall yes id="sa"`<label - for="sa">SNS全体から検索</label> -<div> -EOF - cgi_form searchart<<EOF -<label>`cgi_text kwd`という語を含む記事を全部から検索</label> -EOF - cat<<EOF -</div></div> -EOF fi # # Record access log