diff options
Diffstat (limited to 'root/html/includes')
-rw-r--r-- | root/html/includes/footer.tt | 3 | ||||
-rw-r--r-- | root/html/includes/header.tt | 10 | ||||
-rw-r--r-- | root/html/includes/mirrorslist.tt | 40 | ||||
-rw-r--r-- | root/html/includes/new/checkurl.tt | 1 | ||||
-rw-r--r-- | root/html/includes/new/confirm.tt | 6 | ||||
-rw-r--r-- | root/html/includes/new/host_information.tt | 19 | ||||
-rw-r--r-- | root/html/includes/new/invalid_mirror.tt | 1 | ||||
-rw-r--r-- | root/html/includes/new/invalid_uri.tt | 1 | ||||
-rw-r--r-- | root/html/includes/new/mirror_exists.tt | 1 | ||||
-rw-r--r-- | root/html/includes/new/overlap_hosts.tt | 1 | ||||
-rw-r--r-- | root/html/includes/new/success.tt | 3 | ||||
-rw-r--r-- | root/html/includes/new/unsupported_protocol.tt | 1 | ||||
-rw-r--r-- | root/html/includes/new/url_form.tt | 5 |
13 files changed, 92 insertions, 0 deletions
diff --git a/root/html/includes/footer.tt b/root/html/includes/footer.tt new file mode 100644 index 0000000..2a1c949 --- /dev/null +++ b/root/html/includes/footer.tt @@ -0,0 +1,3 @@ +<!-- $Id$ --> +</body> +</html> diff --git a/root/html/includes/header.tt b/root/html/includes/header.tt new file mode 100644 index 0000000..5319e52 --- /dev/null +++ b/root/html/includes/header.tt @@ -0,0 +1,10 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html> +<!-- $Id$ --> +<head> +<title></title> +<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> +[% c.prototype.define_javascript_functions %] +</head> + +<body> diff --git a/root/html/includes/mirrorslist.tt b/root/html/includes/mirrorslist.tt new file mode 100644 index 0000000..fd855f5 --- /dev/null +++ b/root/html/includes/mirrorslist.tt @@ -0,0 +1,40 @@ +<form action="[% c.uri_for() %]"> +<select name="country"> +<option value="">--</option> +[% FOREACH country = c.model('Mirrors').country_list %] +<option value="[% country.code %]" [% "selected=select" IF country.code == c.req.param('country') %]>[% country.name | html %]</option> +[% END %] +</select> +<input type="submit"> +</form> + +[% db = c.model('Mirrors') %] +[% mirrorslist = db.find_mirrors({ + 'protocol' => c.req.param('protocol'), + 'country' => c.req.param('country'), +}) %] +[% FOREACH item = mirrorslist %] +[% IF loop.first %] +<table border=1> +<tr><th>Server name</th><th>Location</th><th>Urls</th><tr> +[% END %] +<tr> +[% urls = db.find_urls({ "hostname" => item.hostname }) %] +<td> +[% item.hostname | html %] +</td> +<td> +[% IF item.name %] +[% item.continent | html %], [% item.name | html %] +[% END %] +</td> +<td> +[% FOREACH u = urls %] +<a href="[% u.url %]">[% u.protocol %]</a> +[% END %] +</td> +</tr> +[% IF loop.last %] +</table> +[% END %] +[% END %] diff --git a/root/html/includes/new/checkurl.tt b/root/html/includes/new/checkurl.tt new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/root/html/includes/new/checkurl.tt @@ -0,0 +1 @@ + diff --git a/root/html/includes/new/confirm.tt b/root/html/includes/new/confirm.tt new file mode 100644 index 0000000..b3eb3f3 --- /dev/null +++ b/root/html/includes/new/confirm.tt @@ -0,0 +1,6 @@ +<div id="foo"> +[% c.prototype.form_remote_tag({ url => c.uri_for('confirm'), update => 'foo' } ) %] +<input type="hidden" name="confirm" value="1"> +<input type="submit"> +</form> +</div> diff --git a/root/html/includes/new/host_information.tt b/root/html/includes/new/host_information.tt new file mode 100644 index 0000000..78c04c2 --- /dev/null +++ b/root/html/includes/new/host_information.tt @@ -0,0 +1,19 @@ +Enter Info for [% uri.host %] + +<form action="[% c.uri_for() %]" method="POST"> +<input type="hidden" name="url" value="[% uri | html %]"> +<input type="hidden" name="hostinfo" value="1"> + +[% location.name %] / [% location.continent %]<br> + +Country: +<select name="country"> +<option value="">--</option> +[% FOREACH country = c.model('Mirrors').country_list %] +<option value="[% country.code %]" [% "selected=select" IF country.code == location.code %]>[% country.name | html %]</option> +[% END %] +</select> + +City: <input type="text" name="city"> +<input type="submit"> +</form> diff --git a/root/html/includes/new/invalid_mirror.tt b/root/html/includes/new/invalid_mirror.tt new file mode 100644 index 0000000..f22d0f3 --- /dev/null +++ b/root/html/includes/new/invalid_mirror.tt @@ -0,0 +1 @@ +This url seems to not contain a valid mirror. diff --git a/root/html/includes/new/invalid_uri.tt b/root/html/includes/new/invalid_uri.tt new file mode 100644 index 0000000..87ced3c --- /dev/null +++ b/root/html/includes/new/invalid_uri.tt @@ -0,0 +1 @@ +[% uri %] is not a valid url. diff --git a/root/html/includes/new/mirror_exists.tt b/root/html/includes/new/mirror_exists.tt new file mode 100644 index 0000000..f891993 --- /dev/null +++ b/root/html/includes/new/mirror_exists.tt @@ -0,0 +1 @@ +<p>The url [% uri | html %] has same server and same protocol than [% exists_url.0.url %].</p> diff --git a/root/html/includes/new/overlap_hosts.tt b/root/html/includes/new/overlap_hosts.tt new file mode 100644 index 0000000..3d60603 --- /dev/null +++ b/root/html/includes/new/overlap_hosts.tt @@ -0,0 +1 @@ +This server seems to be the same than [% overlap_hosts.join(', ') | html %]. diff --git a/root/html/includes/new/success.tt b/root/html/includes/new/success.tt new file mode 100644 index 0000000..56d757d --- /dev/null +++ b/root/html/includes/new/success.tt @@ -0,0 +1,3 @@ +Host added + +[% INCLUDE 'new/url_form.tt' %] diff --git a/root/html/includes/new/unsupported_protocol.tt b/root/html/includes/new/unsupported_protocol.tt new file mode 100644 index 0000000..7552c82 --- /dev/null +++ b/root/html/includes/new/unsupported_protocol.tt @@ -0,0 +1 @@ +Unsuported protocol diff --git a/root/html/includes/new/url_form.tt b/root/html/includes/new/url_form.tt new file mode 100644 index 0000000..f8840b9 --- /dev/null +++ b/root/html/includes/new/url_form.tt @@ -0,0 +1,5 @@ +<form action="[% c.uri_for() %]" method="POST"> +Enter the url to the top level mirror tree:<br> +<input type="text" name="url" size=40 value="[% c.req.param('url') | html %]"> +<input type=submit> +</form> |