# HG changeset patch # User HIROSE Yuuji # Date 1565931703 -32400 # Node ID 1e40019d1bb1da49af13f4357b06191ff4429172 # Parent a03bfd5d242a361517c5ca550d686cc4c27b82f0 Indicate notification mode in submit button diff -r a03bfd5d242a -r 1e40019d1bb1 examples/common/default/default.css --- a/examples/common/default/default.css Fri Aug 16 09:48:19 2019 +0900 +++ b/examples/common/default/default.css Fri Aug 16 14:01:43 2019 +0900 @@ -310,7 +310,8 @@ position: fixed; top: 0em; left: 0; } -form.summary input[type=submit] {background: #cfc;} +form.summary input[type=submit], +input[type="submit"].all {background: #cfc;} /* * PR Web diff -r a03bfd5d242a -r 1e40019d1bb1 s4-blog.sh --- a/s4-blog.sh Fri Aug 16 09:48:19 2019 +0900 +++ b/s4-blog.sh Fri Aug 16 14:01:43 2019 +0900 @@ -27,6 +27,15 @@ # $1=articleid $2=user mode=`getgroupattr $grp regmode` } +blog_getteam() { + # $1=rowid of blog + blogid="${1%%[!A-Z0-9a-z_]*}" + # team cannot get `getvalbyid blog team "$blogid"` because it's not + # defined in blog.def. Yes, it is Illegal USE!! + query "SELECT val FROM blog_s + WHERE id=(SELECT id FROM blog WHERE rowid=$blogid) + AND key='team';" +} blog_notify_reply() ( # $1=blogid $2=ReplyingUser $3=WrittenText $4(optional)=Action blogid="${1%%[!A-Z0-9a-z_]*}" @@ -50,11 +59,8 @@ fi ;; no) emails="" ;; - *) team=`query "SELECT val FROM blog_s - WHERE id=(SELECT id FROM blog WHERE rowid=$blogid) - AND key='team';"` - # team cannot get `getvalbyid blog team "$blogid"` because it's not - # defined in blog.def. Yes, it is Illegal USE!! + *) team=`blog_getteam "$blogid"` + # team cannot get by `getvalbyid blog team "$blogid"` emails=`TEAM=$team collectemail $blogowner` ;; esac ## 2017-0210 Respond to the direct reply mark such as: >#1234 @@ -159,8 +165,10 @@ else # if writable isgrpowner "$user" "$blogowner" && isgrpadmin=true # (*1) fi - case `getvalbyid blog notify "$rowid"` in # "all", "admin" or "no" (or NULL) - admin) notifyto=1 ;; + blog_notify=`getvalbyid blog notify "$rowid"` + blog_team=`blog_getteam "$rowid"` + case "$blog_notify" in # "all", "admin" or "no" (or NULL) + admin) notifyto=adm ;; *) notifyto="" ;; esac case `getvalbyid blog mode "$rowid"` in @@ -221,7 +229,7 @@ echo "クイズモードは本人と管理者の書き込みのみが表示されます。" ;; esac | html p 'class="warn"' - echo '' + echo '
' if [ x"$blogtype" = x"クイズ" ]; then if $isgroup; then if ! isgrpowner "$user" "$blogowner"; then @@ -436,6 +444,7 @@ touchhelp="${touchpanel:+

$help

}" filehelp="《添付の注意》 $file_accept_help" + ntmode="通知モード=$blog_notify${blog_team:+ (team=$blog_team)}" textform='
@@ -445,7 +454,7 @@
"'
添付ファイル(${filesize_max_MB}以下):"'
- + ' cat<<-EOF