c208bd906b3991555db11b9229846c4601ca408c
bernd First strike: list reposito...

bernd authored 12 years ago

1) <?php
Bernd Wurst Added license tags for CC0,...

Bernd Wurst authored 12 years ago

2) /*
3) This file belongs to the Webinterface of schokokeks.org Hosting
4) 
5) Written 2008-2012 by schokokeks.org Hosting, namely
6)   Bernd Wurst <bernd@schokokeks.org>
7)   Hanno Böck <hanno@schokokeks.org>
8) 
9) To the extent possible under law, the author(s) have dedicated all copyright and related and neighboring rights to this software to the public domain worldwide. This software is distributed without any warranty.
10) 
11) You should have received a copy of the CC0 Public Domain Dedication along with this software. If not, see 
12) http://creativecommons.org/publicdomain/zero/1.0/
13) 
14) Nevertheless, in case you use a significant part of this code, we ask (but not require, see the license) that you keep the authors' names in place and return your changes to the public. We would be especially happy if you tell us what you're going to do with this code.
15) */
16) 
bernd First draft of gitolite-mod...

bernd authored 12 years ago

17) require_once('inc/icons.php');
bernd First strike: list reposito...

bernd authored 12 years ago

18) 
19) include('git.php');
20) require_role(ROLE_SYSTEMUSER);
21) 
bernd GIT-URL eingebaut

bernd authored 12 years ago

22) $section = 'git_git';
bernd First draft of gitolite-mod...

bernd authored 12 years ago

23) title("GIT-Zugänge");
bernd First strike: list reposito...

bernd authored 12 years ago

24) 
bernd First draft of gitolite-mod...

bernd authored 12 years ago

25) output("<p>Das verteilte Versionskontrollsystem <a href=\"http://www.git-scm.org\">GIT</a> ist ein populäres Werkzeug um Programmcode zu verwalten. Mit dieser Oberfläche können Sie GIT-repositories erstellen und den Zugriff für mehrere Benutzer festlegen.</p>");
bernd Typo

bernd authored 12 years ago

26) output("<p>Wir verwenden das beliebte System »gitolite« um diese Funktionalität anzubieten. Gitolite erlaubt bei Bedarf weitaus feingliedrigere Kontrolle als dieses Webinterface. Fragen Sie bitte den Support, wenn Sie Interesse daran haben zusätzliche Berechtigungen einzurichten.</p>");
bernd First draft of gitolite-mod...

bernd authored 12 years ago

27) 
28) $repos = list_repos();
29) $users = list_users();
30) 
31) if (count($repos) == 0) {
32)   output("<p><em>bisher haben Sie keine GIT-Repositories</em></p>");
33) } else {
34)   output("<h3>Ihre GIT-Repositories</h3>"); 
35) }
36) 
bernd Setze Berechtigung für gitw...

bernd authored 12 years ago

37) foreach ($repos as $repo => $settings) {
38)   $description = $settings['description'] ? '<br /><em>"'.$settings['description'].'"</em>' : '';
bernd show URL

bernd authored 12 years ago

39)   $url = get_git_url($repo);
bernd Bessere Handhabung öffentli...

bernd authored 12 years ago

40)   $public = isset($settings['users']['gitweb']) && $settings['users']['gitweb'] == 'R';
41)   $public_string = '';
42)   if ($public) {
43)     $public_url = 'http://git.schokokeks.org/'.$repo.'.git';
bernd GIT-URL eingebaut

bernd authored 12 years ago

44)     $git_url = 'git://git.schokokeks.org/'.$repo.'.git';
bernd Kosmetik

bernd authored 12 years ago

45)     $public_string = '<br />(Öffentlicher Lesezugriff über <a href="'.$public_url.'">'.$public_url.'</a> und '.$git_url.')';
bernd Bessere Handhabung öffentli...

bernd authored 12 years ago

46)   }
bernd Sortiere Repositories und U...

bernd authored 12 years ago

47)   output("<div><p><strong>{$repo}</strong> ".internal_link('edit', icon_edit('Zugriffsrechte bearbeiten'), 'repo='.$repo)." ".internal_link('delete', icon_delete('Repository löschen'), 'repo='.$repo)."{$description}<br />push-Adresse: {$url} {$public_string}</p><ul>");
bernd Setze Berechtigung für gitw...

bernd authored 12 years ago

48)   foreach ($settings['users'] as $user => $rights) {
bernd GIT-URL eingebaut

bernd authored 12 years ago

49)     if ($user == 'gitweb' || $user == 'daemon') {
bernd Bessere Handhabung öffentli...

bernd authored 12 years ago

50)       continue;
51)     }