Mercurial > hgrepos > hgweb.cgi > s4
diff s4-blog.sh @ 322:18be0c210dc8
First implementation of icon display in blog_replies.
author | HIROSE Yuuji <yuuji@gentei.org> |
---|---|
date | Thu, 20 Oct 2016 17:20:58 +0859 |
parents | ab11a49bd64e |
children | d19e85a72a29 |
line wrap: on
line diff
--- a/s4-blog.sh Mon Oct 17 09:54:21 2016 +0859 +++ b/s4-blog.sh Thu Oct 20 17:20:58 2016 +0859 @@ -172,6 +172,8 @@ coalesce((SELECT val FROM user_s WHERE name=author AND key='gecos'), author) uname, + (SELECT val FROM user_s WHERE name=author AND key='$iconcachekey') + icon, a.rowid, s.TIME, CASE WHEN s.TIME > '$atime' THEN 'new' ELSE '' END newer, @@ -185,12 +187,20 @@ a_s s ON a.id=s.id; EOF - while IFS='|' read id edit notify uid uname aid tm new hte imgids; do + while IFS='|' read id edit notify uid uname icon aid tm new hte imgids; do nt="<label style=\"font-size: 70%;\"><input type=\"checkbox\" name=\"notifyto\" value=\"$uid\">返信通知送信</label>" + tdcls="repatt${new:+ new}" + imgdir=`getcachedir home/"$uid"`/main + if [ -n "$icon" -a -s "$icon" ]; then + picon="<p class=\"proficon\"><img src=\"$icon\"></p>" + else + picon="" + fi + cat<<EOF <tr id="$id"> -<td${new:+ class="new"}>${edit:+<a href="$elink+$edit">編集</a> }#$aid +<td class="$tdcls">$picon${edit:+<a href="$elink+$edit">編集</a> }#$aid <a href="$hlink+$uid">$uname</a> $tm ${notify:+$nt}</td>