s4

changeset 418:a183d6e0ed5e

Search board in group home revised to similar position in user home
author HIROSE Yuuji <yuuji@gentei.org>
date Sun, 19 Feb 2017 14:27:06 +0859
parents 0dd65b535c9d
children fef2044ab892
files s4-funcs.sh
diffstat 1 files changed, 22 insertions(+), 7 deletions(-) [+]
line diff
     1.1 --- a/s4-funcs.sh	Sun Feb 19 14:16:17 2017 +0859
     1.2 +++ b/s4-funcs.sh	Sun Feb 19 14:27:06 2017 +0859
     1.3 @@ -1590,9 +1590,15 @@
     1.4        placeholder="このユーザの書込検索"
     1.5        help="★★ $g さんの書き込みから検索します$nl$help"
     1.6        ;;
     1.7 +    grp=*)
     1.8 +      a=`echo "${1#grp=}"|htmlescape`
     1.9 +      g=`gecos ${1#grp=}`
    1.10 +      auth="<input type=\"hidden\" name=\"owner\" value=\"$a\">"
    1.11 +      placeholder="このグループからの検索"
    1.12 +      ;;
    1.13    esac
    1.14    cat<<-EOF
    1.15 -	<div class="fr">
    1.16 +	<div class="right">
    1.17  	<form action="$myname">$auth
    1.18  	<input type="text" name="kwd" value="" title="$help"
    1.19  	 placeholder=" $placeholder " width="10" accesskey="k">
    1.20 @@ -2086,6 +2092,7 @@
    1.21  ## err showgroup2: grp=$grp qgrp="[$(sqlquote $grp)]"
    1.22    if isgroup "$grp"; then
    1.23      tf=$tmpd/title.$$
    1.24 +    sf=$tmpd/search.$$
    1.25      bodyclass=`query "SELECT val FROM grp_s
    1.26  	       WHERE gname=$qgrp AND key='regmode';"`
    1.27      if ismember "$user" "$grp"; then
    1.28 @@ -2096,13 +2103,16 @@
    1.29        ismember="" # bodyclass="group"
    1.30      fi
    1.31      bodyclass="$bodyclass grouphome"
    1.32 +    echo "<div class=\"search\">`search_form grp=\"$grp\"`</div>"> $sf
    1.33      echo "グループ $grp" > $tf
    1.34 +
    1.35      showgroupsub $formdir/grp.def "$grid" | \
    1.36 -	_m4 -D_TITLE_="spaste(\`$tf')" \
    1.37 +	_m4 -D_TITLE_="syscmd(\`cat $tf')" \
    1.38  	    -D_FORM_="syscmd(\`cat')" \
    1.39  	    -D_BODYCLASS_="$bodyclass" \
    1.40  	    -D_DUMPTABLE_="" \
    1.41 -	    $htmlheader $layout/form+dump.m4.html
    1.42 +	    $htmlheader $sf $layout/form+dump.m4.html
    1.43 +	    # $htmlheader $layout/form+dump.m4.html
    1.44      	# $htmlheader is defined in grp()
    1.45    else				# if $grp is removed at par2table
    1.46      listgroup
    1.47 @@ -2194,10 +2204,15 @@
    1.48    fi
    1.49    echo '</div></div>'
    1.50    echo '<h2>話題一覧</h2>'
    1.51 -  cgi_form searchart<<EOF
    1.52 -<label>`cgi_text kwd`という語を含むコメントを検索</label>
    1.53 -`cgi_hidden owner $grp`
    1.54 -EOF
    1.55 +  thelp="1ヶ月分のまとめには上部検索窓に @month と入れてください。"
    1.56 +  cat<<-EOF
    1.57 +	<form class="summary" action="$myname" title="$thelp">
    1.58 +	`cgi_hidden owner "$grp"`
    1.59 +	`cgi_hidden kwd "@week"`
    1.60 +	`cgi_hidden stage searchart`
    1.61 +	`cgi_submit "一週間のまとめ"`
    1.62 +	</form>
    1.63 +	EOF
    1.64    cond="where a.id in (select id from blog_s where key='owner' and val=$qgrp) order by ctime desc"
    1.65    colstate="state:稼動状態:frozen=rowclass=凍結"
    1.66    DT_CHLD=article:blogid \