--- /dev/null
+/* Copyright 2011 Paul Haensch*/
+/* This file is part of Busy*/
+/**/
+/* Busy is free software: you can redistribute it and/or modify*/
+/* it under the terms of the GNU Affero General Public License as published by*/
+/* the Free Software Foundation, either version 3 of the License, or*/
+/* (at your option) any later version.*/
+/**/
+/* Busy is distributed in the hope that it will be useful,*/
+/* but WITHOUT ANY WARRANTY; without even the implied warranty of*/
+/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the*/
+/* GNU Affero General Public License for more details.*/
+/**/
+/* You should have received a copy of the GNU Affero General Public License*/
+/* along with Busy. If not, see <http://www.gnu.org/licenses/>.*/
+
+.section {
+ margin: .5em;
+ padding: 0em .5em .5em .5em;
+ background-color: #F7F7F7;
+ border-style: solid solid solid solid;
+ border-width: 1px;
+ border-color: #AAF;
+}
+.section h1 {
+ text-align: left;
+ font: normal bold 1.4em sans-serif;
+ margin: .3em 0em .4em 0em;
+ border-style: none none solid none;
+ border-width: 1px; border-color: #AAF;
+}
+
+.key{
+ display: inline-block;
+ width: 30%;
+ border-style: none none dotted none;
+ border-width: 1px;
+ border-color: #AAF;
+}
+.value{
+ display: inline-block;
+ min-width: 40%;
+ border-style: none;
+ border-width: 1px;
+ border-color: #AAF;
+}
+
+.value input {
+ width: 100%;
+}
--- /dev/null
+#!/bin/zsh
+
+metafile=project.meta
+userlist="$(sed -rn 's|^([a-zA-Z0-9_+-]):.+$|\1|p' auth/htpasswd)"
+
+if [ "$ACL_ADMIN" = "false" ]; then
+ reason=noaccess
+ . "./Error.page"
+else
+
+ echo "
+ <div id='LEFT'></div>
+ <div id='MAIN'>
+ <div class='section'><form method='post' accept-charset='utf-8' action='write/$($LOGIN && echo user_)projectadmin.cgi'>
+ <h1>General</h1>
+
+ <fieldset><legend>Title Display</legend>
+ <div class='key'>Project Name</div>
+ <div class='value'><input type='text' name='appName' value='$(sed -rn 's:^name=(.*)$:\1:p' "$metafile")'></div><br>
+ <div class='key'>Project Slogan</div>
+ <div class='value'><input type='text' name='appSlogan' value='$(sed -rn 's:^slogan=(.*)$:\1:p' "$metafile")'></div><br>
+ </fieldset>
+
+ <fieldset><legend>Code Browser</legend>
+ <div class='key'><input type='radio' name='repoType' value='svn' $(grep -q repoType=svn $metafile && echo checked)>SVN Repository</div>
+ <div class='value'><input type='text' name='svnRepo' value='$(sed -rn 's:^svnRepo=(.*)$:\1:p' "$metafile")'></div><br>
+ <div class='key'><input disabled type='radio' name='repoType' value='git' $(grep -q repoType=git $metafile && echo checked)>GIT Repository</div>
+ <div class='value'><input disabled type='text' name='gitRepo' value='$(sed -rn 's:^gitRepo=(.*)$:\1:p' "$metafile")'></div><br>
+ </fieldset>
+
+ <fieldset><legend>Donations</legend>
+ <div class='key'><input type='checkbox' name='useFlattr' value='yes' $(grep -q useFlattr=yes $metafile && echo checked)>Flattr \"Thing\" URL</div>
+ <div class='value'><input type='text' name='flattrThingURL' value='$(sed -rn 's:^flattrThingURL=(.*)$:\1:p' "$metafile")'></div><br>
+ <div class='key'><input type='checkbox' name='useBitcoin' value='yes' $(grep -q useBitcoin=yes $metafile && echo checked)>Bitcoin Address</div>
+ <div class='value'><input type='text' name='btcAddress' value='$(sed -rn 's:^btcAddress=(.*)$:\1:p' "$metafile")'></div><br>
+ <div class='key'><input type='checkbox' name='usePaypal' value='yes' $(grep -q usePaypal=yes $metafile && echo checked)>Paypal Address</div>
+ <div class='value'><input type='text' name='paypalAddress' value='$(sed -rn 's:^paypalAddress=(.*)$:\1:p' "$metafile")'></div><br>
+ </fieldset>
+ </form></div>
+
+ </div>
+ <div id='RIGHT'></div>
+ "
+fi
# You should have received a copy of the GNU Affero General Public License
# along with Busy. If not, see <http://www.gnu.org/licenses/>.
-reason=$(egrep -o '(^|&)r=.+(&|$)' <<<"${QUERY_STRING}" |sed 's,&,,g;s,r=,,')
+[ -z "$reason" ] && reason=$(egrep -o '(^|&)r=.+(&|$)' <<<"${QUERY_STRING}" |sed 's,&,,g;s,r=,,')
[ -z "$reason" ] && reason="other"
-echo '<h2>Error</h2>'
+echo "
+<div id='MAIN'>
+<h2>Error</h2>
+"
case "${reason}" in
tooSmall) echo 'You need to select a file for uploading.'
;;
*) echo 'Unknown generic fuckup :-('
;;
esac
+echo "</div>"
search="$(egrep -o '(^|&)(s=).+(&|$)' <<<"${QUERY_STRING}" |sed -r 's:^&?s=::;s:\+: :g;s:%:\\x:g')"
search="$(echo -e "${search}" |sed 's:\t: :g;s:\r::g;s:\\:\\\\:g' |head -n1)"
-[ -z "$ACL_EDITINTRO" ] && ACL_EDITINTRO=false
-[ -z "$ACL_ADDNEWS" ] && ACL_ADDNEWS=false
-[ -z "$ACL_EDITNEWS" ] && ACL_EDITNEWS=false
-
cat <<WikiEND
<div id="LEFT">
<form method="GET" action="/${SCRIPTNAME}" accept-charset="utf-8">
name=Busy
slogan=Letting You do the Work.
-repo=http://svn.plutz.net/busy
+repoType=svn
+svnRepo=http://svn.plutz.net/busy
+useFlattr=yes
+flattrThingURL=http://flattr.com/thing/599434/Busy-Software-Project-Management