Mercurial > hgrepos > hgweb.cgi > s4
changeset 797:56adb6e5ee68 feature-world
Add world-links to Grps entry of topmenu
author | HIROSE Yuuji <yuuji@gentei.org> |
---|---|
date | Sun, 14 Jun 2020 11:15:45 +0900 |
parents | 8646ec4bd6fc |
children | 91016ff5edb3 |
files | examples/common/default/html.m4.html s4-funcs.sh s4-world.sh |
diffstat | 3 files changed, 13 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/examples/common/default/html.m4.html Sun Jun 14 10:14:12 2020 +0900 +++ b/examples/common/default/html.m4.html Sun Jun 14 11:15:45 2020 +0900 @@ -23,8 +23,8 @@ <!-- <li><a href="?blog">話題作成</a></li> --> <li><a href="?mems" accesskey="2" title="Shortcut: 2 Members">参加者一覧</a></li> - <li><a href="?grps" accesskey="3" title="Shortcut: 3 -Groups">グループ一覧</a></li> + <li class="casmenu"><a href="?grps" accesskey="3" title="Shortcut: 3 +Groups">グループ一覧</a>ifdef(`_S4WORLDGRPS_',`_S4WORLDGRPS_')</li> ifdef(`_S4WORLDNAME_',`', ` <li><a href="?invite" accesskey="4" title="Shortcut: 4 Invite">招待</a></li>')dnl
--- a/s4-funcs.sh Sun Jun 14 10:14:12 2020 +0900 +++ b/s4-funcs.sh Sun Jun 14 11:15:45 2020 +0900 @@ -99,9 +99,9 @@ if [ -n "$S4WORLDLIST" ]; then . ./s4-world.sh 2>> tmp/debug.out # Variables set in s4-world.sh - # $S4WORLDS, $S4WROLDNAME + # $S4WORLDS, $S4WROLDNAME, $S4WORLDGRPS # Files created in s4-world.sh - # $worldlistfile, $worldoptionfile, $worldnamefile + # $worldlistfile, $worldoptionfile, $worldnamefile, $worldgrpfile err S4WORLDS set to $S4WORLDS ----- fi @@ -461,7 +461,9 @@ _m4() { #S4NAME=f,f,f m4 ${S4NAME:+"-D_S4NAME_=${S4NAME}"} ${S4CSS:+-D_S4CSS_="$S4CSS"} \ + ${S4WORLD:+-D_S4WORLD_="$S4WORLD"} \ ${S4WORLDNAME:+-D_S4WORLDNAME_="$S4WORLDNAME"} \ + ${S4WORLDGRPS:+-D_S4WORLDGRPS_="$S4WORLDGRPS"} \ ${S4WORLDS:+-D_S4WORLDS_="$S4WORLDS"} "$@" } ismember() {
--- a/s4-world.sh Sun Jun 14 10:14:12 2020 +0900 +++ b/s4-world.sh Sun Jun 14 11:15:45 2020 +0900 @@ -5,6 +5,7 @@ case "$S4WORLDLIST" in *:*:*) worldlistfile=cache/worldlist + worldgrpfile=cache/worldgrps worldoptionfile=cache/worldoption worldnamefile=cache/worldname if [ ! -e $worldlistfile -o $worldlistfile -ot s4-config.sh \ @@ -13,7 +14,7 @@ then echo S4MASTERURL=$S4MASTERURL >> tmp/debug.out cat <<-EOF > $worldlistfile - ▼<div><table> + <div><table> <tr><th>World List</th></tr> <tr><td title="Base World$nl拠点となるWorldです">⇒ <a href="${S4MASTERURL:-$URL}">Base</a></td></tr> @@ -36,14 +37,18 @@ if [ -s "$worldoptionfile" ]; then echo "<option value=\"s4-config.sh\">Base</option>" >> $worldoptionfile echo "</table>$nl</div>" >> $worldlistfile + sed 's/href="\([^>]*\)"/href="\1?grps"/' $worldlistfile \ + > $worldgrpfile else true > $worldoptionfile; true > $worldlistfile # Remove contents rm -f ${worldnamefile}.* fi fi if [ -s "$worldlistfile" ]; then - S4WORLDS=": spaste(\`$worldlistfile')" + S4WORLDS="▼spaste(\`$worldlistfile')" S4WORLDNAME=${S4WORLD:+`cat $worldnamefile.$S4WORLD`} + S4WORLDGRPS="▼spaste(\`$worldgrpfile')" + err S4WORLDGRPS=$S4WORLDGRPS fi ;; esac