X-Git-Url: http://git.pjr.cc/?p=gwvp.git;a=blobdiff_plain;f=gwvplib%2Fgwvprepoadmin.php;h=df122d6816dbbb292a42c2f0ae0f2f275a909ea2;hp=53cf4b13016531152782a95451f641cc41a9cf85;hb=d5dbb5b8065eb6290c0a2b573e343f6ad3f8fb26;hpb=b6726ee3ec11d6e5f5afd2827e701f9c601cfa00 diff --git a/gwvplib/gwvprepoadmin.php b/gwvplib/gwvprepoadmin.php index 53cf4b1..df122d6 100644 --- a/gwvplib/gwvprepoadmin.php +++ b/gwvplib/gwvprepoadmin.php @@ -16,6 +16,9 @@ function gwvp_RepoAdminCallMe() case "create": return "gwvp_CreateRepoPage"; break; + case "docreate": + return "gwvp_DoCreateRepoPage"; + break; default: return "gwvp_RepoAdminPage"; } @@ -35,6 +38,60 @@ function gwvp_RepoAdminPage() gwvp_goMainPage("gwvp_RepoAdminPageBody"); } +function gwvp_CreateRepoPage() +{ + gwvp_goMainPage("gwvp_CreateRepoPageBody"); +} + +function gwvp_DoCreateRepoPage() +{ + global $BASE_URL; + + $reponame = $_REQUEST["reponame"]; + + if(gwvp_createGitRepo($reponame)) { + gwvp_SendMessage("info", "Repo, $reponame, created"); + header("Location: $BASE_URL/admin/repos"); + } + + +} + +function gwvp_CreateRepoPageBody() +{ + global $BASE_URL, $repo_base; + + echo "

Create a Repo

"; + echo "
"; + echo ""; + echo ""; + echo ""; + echo "
Repository Name
Repository Description
"; + echo "

Permissions

"; + + // no, this bit is wrong, need to come up with something better + echo ""; + echo ""; + echo ""; + echo "
AnonymousAuthenticatedGroup
"; + // anon permission dialog + echo " Can anonymous users see the repo?
"; + echo " Can anonymous user clone from the repo (read-only)?
"; + echo "
"; + // authed permission dialog + echo " Can any authenticated user see the repo?
"; + echo " Can any authenticated user clone from the repo (read-only)?
"; + echo " Can any authenticated user clone *TO* the repo (read/write)?
"; + echo "
"; + // group permissions dialog + echo " Can any authenticated user see the repo?
"; + echo " Can any authenticated user clone from the repo (read-only)?
"; + echo " Can any authenticated user clone *TO* the repo (read/write)?
"; + + echo "
"; + echo "
"; + echo "
"; +} function gwvp_RepoAdminPageBody() { @@ -61,4 +118,6 @@ function gwvp_RepoAdminPageBody() return; } + + ?> \ No newline at end of file