tazbug rev 76
Admin can del messages, small css fix and add .hgignore
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Tue Feb 04 22:26:37 2014 +0100 (2014-02-04) |
parents | 7a7e798ecd1c |
children | 37608e2568ca |
files | .hgignore web/bugs.cgi web/style.css |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/.hgignore Tue Feb 04 22:26:37 2014 +0100 1.3 @@ -0,0 +1,1 @@ 1.4 +web/bug
2.1 --- a/web/bugs.cgi Mon Feb 03 23:55:02 2014 +0100 2.2 +++ b/web/bugs.cgi Tue Feb 04 22:26:37 2014 +0100 2.3 @@ -23,18 +23,15 @@ 2.4 do 2.5 lang=${lang%;*} lang=${lang# } lang=${lang%-*} 2.6 case "$lang" in 2.7 - en) LANG="C" ;; 2.8 - de) LANG="de_DE" ;; 2.9 - es) LANG="es_ES" ;; 2.10 - fr) LANG="fr_FR" ;; 2.11 - it) LANG="it_IT" ;; 2.12 - pt) LANG="pt_BR" ;; 2.13 - ru) LANG="ru_RU" ;; 2.14 - zh) LANG="zh_TW" ;; 2.15 + en) LANG="C" && break ;; 2.16 + de) LANG="de_DE" && break ;; 2.17 + es) LANG="es_ES" && break ;; 2.18 + fr) LANG="fr_FR" && break ;; 2.19 + it) LANG="it_IT" && break ;; 2.20 + pt) LANG="pt_BR" && break ;; 2.21 + ru) LANG="ru_RU" && break ;; 2.22 + zh) LANG="zh_TW" && break ;; 2.23 esac 2.24 - if echo "$po" | fgrep -q "$lang"; then 2.25 - break 2.26 - fi 2.27 done 2.28 unset IFS 2.29 export LANG LC_ALL=$LANG 2.30 @@ -330,9 +327,10 @@ 2.31 if [ "$MSG" ]; then 2.32 msgid=$(echo $msg | cut -d "." -f 2) 2.33 del="" 2.34 - # User can delete his post. 2.35 - [ "$user" == "$USER" ] && \ 2.36 + # User can delete his post has well as admin. 2.37 + if [ "$user" == "$USER" ] || admin_user; then 2.38 del="<a href=\"?id=$id&delmsg=$msgid\">delete</a>" 2.39 + fi 2.40 cat << EOT 2.41 <p><strong>$USER</strong> $DATE $del</p> 2.42 <pre>
3.1 --- a/web/style.css Mon Feb 03 23:55:02 2014 +0100 3.2 +++ b/web/style.css Tue Feb 04 22:26:37 2014 +0100 3.3 @@ -116,7 +116,7 @@ 3.4 max-width: 720px; 3.5 } 3.6 3.7 -#newbug textarea { width: 460px; } 3.8 +#newbug textarea { width: 480px; } 3.9 3.10 #edit textarea { width: 100%; height: 240px; } 3.11 3.12 @@ -148,7 +148,7 @@ 3.13 /* Form */ 3.14 3.15 form { display: inline; } 3.16 -textarea { border: 2px solid #ccc; padding: 4px; width: 100%; } 3.17 +textarea { border: 2px solid #ccc; padding: 4px; min-height: 60px; } 3.18 select { min-width: 180px; } 3.19 input[type="submit"], input[type="text"], input[type="password"], 3.20 select, #tools a { 3.21 @@ -167,7 +167,7 @@ 3.22 3.23 input[type="text"], input[type="password"] { 3.24 background: #fefefe; border: 2px solid #ccc; 3.25 - width: 460px; } 3.26 + width: 480px; } 3.27 /*input[type="file"] { border: 2px solid #ddd; }*/ 3.28 /*input[type="checkbox"] { background: #fefefe; }*/ 3.29