Skip to content
This repository was archived by the owner on May 11, 2019. It is now read-only.

Commit 757434e

Browse files
committed
Added a header and a footer file in the layout/ folder.
Added a link to the help.moinz.de page where i want to document svnmin ;)
1 parent cc8cb94 commit 757434e

File tree

9 files changed

+81
-87
lines changed

9 files changed

+81
-87
lines changed

config.php.template

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
## Svnmin assumes you have one htusers file for authenticating
2929
## your repository users. If you don't use it, comment it out.
3030
################################################################
31-
define ( "ACCESS_USER", "/opt/svn/svnusers.conf");
31+
#define ( "ACCESS_USER", "/opt/svn/svnusers.conf");
3232
define ( 'ACCESS_PASSWORDTYPE', 'crypt'); # Options: crypt, md5
3333

3434
################################################################

create-repository.php

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,11 @@
2424
}
2525
}
2626
?>
27-
<html>
28-
<head><title><?php echo TITLE; ?> - create a new svn repository</title></head>
29-
<body>
30-
<h1>Create a new repository</h1>
27+
<? include 'layout/header.php'; ?>
28+
<h1>Create a new repository</h1>
3129
<form>
3230
<label for="name">Name:</label>
3331
<input type="text" id="name" name="name" />
3432
<input type="submit" />
3533
</form>
36-
</body>
37-
</html>
38-
34+
<? include 'layout/footer.php'; ?>

htusers.php

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,11 @@
55
#
66
#
77
##############
8-
if (not defined('ACCESS_USER'))
9-
die("No ACCESS_USER file provided");
8+
require 'config.php';
9+
10+
if (!defined('ACCESS_USER'))
11+
die("No ACCESS_USER file provided");
1012

11-
require 'config.php';
1213

1314
function modify_htusers_file ( $action, $data, $file = ACCESS_USER ) {
1415

@@ -70,11 +71,7 @@ function modify_htusers_file ( $action, $data, $file = ACCESS_USER ) {
7071
$users[] = array('name' => $t[0], 'password' => $t[1]); # Add them for later display
7172
}
7273
?>
73-
<html>
74-
<head>
75-
<title><?php echo TITLE; ?> - Manage users</title>
76-
</head>
77-
<body>
74+
<? include 'layout/header.php'; ?>
7875
<h1>Manage users</h1>
7976
<form method="POST" action="htusers.php?action=add">
8077
<label for="username">Username</label> <input type="text" name="username" />
@@ -94,5 +91,4 @@ function modify_htusers_file ( $action, $data, $file = ACCESS_USER ) {
9491
</tr>
9592
<?php endforeach; ?>
9693
</table>
97-
</body>
98-
</html>
94+
<? include 'layout/footer.php'; ?>

index.php

Lines changed: 4 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -1,70 +1,13 @@
11
<?php
22
require_once 'config.php';
33
?>
4-
<html>
5-
<head>
6-
<title><?php echo TITLE; ?> - Index</title>
7-
<style>
8-
a {
9-
color:black;
10-
text-decoration:none;
11-
}
12-
body {
4+
<? include 'layout/header.php'; ?>
135

14-
margin:0;
15-
padding:0;
16-
}
17-
#content {
18-
19-
text-align:center;
20-
border-bottom:2px white solid;
21-
}
22-
#content h1 {
23-
color:black;
24-
}
25-
#index-list {
26-
text-align:left;
27-
28-
margin:auto;
29-
30-
width:400px;
31-
padding-bottom:100px;
32-
list-style-type:none;
33-
list-style-image:none;
34-
}
35-
#index-list li {
36-
border:1px grey solid;
37-
padding-left:15px;
38-
padding-top:12px;
39-
padding-bottom:10px;
40-
margin-bottom:5px;
41-
}
42-
43-
#content a {
44-
font-weight:bold;
45-
}
46-
47-
#footer {
48-
text-align:right;
49-
color:grey;
50-
font-size:x-small;
51-
padding-right:50px;
52-
}
53-
</style>
54-
</head>
55-
<body>
56-
<div id="content">
57-
<h1>svnmin</h2>
58-
<ul id="index-list">
6+
<ul id="index-list">
597
<li><a href="htusers.php">Manage users</a></li>
608
<li><a href="svnaccess.php">Manage repository access</a></li>
619
<li><a href="create-repository.php">Create a new repository</a></li>
6210
<li><a href="modify-post-commit.php">Modify the post-commit hook</a></li>
6311
<li><a href="README.markdown">See the README</a></li>
64-
</ul>
65-
</div>
66-
<div id="footer">
67-
<a href="http://www.github.com/ZeissS/svnmin/">Svnmin</a>
68-
</div>
69-
</body>
70-
</html>
12+
</ul>
13+
<? include 'layout/footer.php'; ?>

layout/footer.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
</div>
2+
<div id="footer">
3+
<a href="http://www.github.com/ZeissS/svnmin">Project page</a> | <a href="http://help.moinz.de/svnmin">Help</a>
4+
</div>
5+
</body>
6+
</html>

layout/header.php

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?
2+
# Prints the header. Stuff that should be printed out before the content of the webpage should be placed here.
3+
#
4+
?>
5+
<html>
6+
<head>
7+
<title><? echo TITLE; ?></title>
8+
<link href="layout/layout.css" rel="stylesheet" media="screen" type="text/css" />
9+
</head>
10+
<body>
11+
<div id="header">
12+
<h1><? echo TITLE;?></h1>
13+
</div>
14+
<div id="content">

layout/layout.css

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
a {
2+
color:black;
3+
text-decoration:none;
4+
}
5+
body {
6+
margin:10px;
7+
padding:0;
8+
}
9+
#content {
10+
text-align:center;
11+
border-bottom:2px white solid;
12+
}
13+
#content h1 {
14+
color:black;
15+
}
16+
17+
#index-list {
18+
text-align:left;
19+
20+
margin:auto;
21+
width:400px;
22+
padding-bottom:100px;
23+
list-style-type:none;
24+
list-style-image:none;
25+
}
26+
#index-list li {
27+
border:1px grey solid;
28+
padding-left:15px;
29+
padding-top:12px;
30+
padding-bottom:10px;
31+
margin-bottom:5px;
32+
}
33+
34+
#content a {
35+
font-weight:bold;
36+
}
37+
38+
#footer {
39+
text-align:right;
40+
color:grey;
41+
font-size:x-small;
42+
padding-right:50px;
43+
}

modify-post-commit.php

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,7 @@
3131
closedir($dp);
3232
sort($repositories);
3333
?>
34-
<html>
35-
<head>
36-
<title><?php echo TITLE; ?> - Trigger modify</title>
37-
</head>
38-
<body>
34+
<? include 'layout/header.php'; ?>
3935
<form method="POST">
4036
<label for="repository">Repository:</label>
4137
<select name="repository">
@@ -68,6 +64,4 @@
6864
</span>
6965
</div>
7066
<?php endif; ?>
71-
</body>
72-
</html>
73-
67+
<? include 'layout/footer.php'; ?>

svnaccess.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
}
88
$content = join("", file(ACCESS_CONFIG));
99
?>
10+
<? include 'layout/header.php'; ?>
1011
<form method="POST">
1112
<textarea name="content" rows="30" cols="100"><?php echo $content; ?></textarea><br />
1213
<input type="submit" />
@@ -18,3 +19,4 @@
1819
</div>
1920

2021
</form>
22+
<? include 'layout/footer.php'; ?>

0 commit comments

Comments
 (0)