From a521af21fd30e34d0ae9cfbf8296c89938312620 Mon Sep 17 00:00:00 2001 From: paul Date: Mon, 26 Mar 2012 20:17:05 +0000 Subject: [PATCH] started Admin interface, integrated flattr svn path=/trunk/; revision=35 --- Admin.css | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ Admin.page | 44 ++++++++++++++++++++++++++++++++++++++++++++ Error.page | 8 ++++++-- Home.page | 4 ---- project.meta | 5 ++++- 5 files changed, 104 insertions(+), 7 deletions(-) create mode 100644 Admin.css create mode 100644 Admin.page diff --git a/Admin.css b/Admin.css new file mode 100644 index 0000000..043ed88 --- /dev/null +++ b/Admin.css @@ -0,0 +1,50 @@ +/* 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 .*/ + +.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%; +} diff --git a/Admin.page b/Admin.page new file mode 100644 index 0000000..c3ec24e --- /dev/null +++ b/Admin.page @@ -0,0 +1,44 @@ +#!/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 " +
+
+
+

General

+ +
Title Display +
Project Name
+

+
Project Slogan
+

+
+ +
Code Browser +
SVN Repository
+

+
GIT Repository
+

+
+ +
Donations +
Flattr \"Thing\" URL
+

+
Bitcoin Address
+

+
Paypal Address
+

+
+
+ +
+ + " +fi diff --git a/Error.page b/Error.page index 519dfbb..98538b9 100644 --- a/Error.page +++ b/Error.page @@ -15,10 +15,13 @@ # You should have received a copy of the GNU Affero General Public License # along with Busy. If not, see . -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 '

Error

' +echo " +
+

Error

+" case "${reason}" in tooSmall) echo 'You need to select a file for uploading.' ;; @@ -33,3 +36,4 @@ case "${reason}" in *) echo 'Unknown generic fuckup :-(' ;; esac +echo "
" diff --git a/Home.page b/Home.page index 88dd0d5..01d5b1b 100644 --- a/Home.page +++ b/Home.page @@ -2,10 +2,6 @@ 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 <
diff --git a/project.meta b/project.meta index 415c0ec..533c9b4 100644 --- a/project.meta +++ b/project.meta @@ -1,3 +1,6 @@ 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 -- 2.39.2