From 7c16f1d36bd584c36f187bd0401fb39e94771765 Mon Sep 17 00:00:00 2001 From: Olivier Thauvin Date: Mon, 27 Sep 2010 10:51:18 +0000 Subject: - code base --- root/html/includes/footer.tt | 3 ++ root/html/includes/header.tt | 10 +++++++ root/html/includes/mirrorslist.tt | 40 ++++++++++++++++++++++++++ root/html/includes/new/checkurl.tt | 1 + root/html/includes/new/confirm.tt | 6 ++++ root/html/includes/new/host_information.tt | 19 ++++++++++++ root/html/includes/new/invalid_mirror.tt | 1 + root/html/includes/new/invalid_uri.tt | 1 + root/html/includes/new/mirror_exists.tt | 1 + root/html/includes/new/overlap_hosts.tt | 1 + root/html/includes/new/success.tt | 3 ++ root/html/includes/new/unsupported_protocol.tt | 1 + root/html/includes/new/url_form.tt | 5 ++++ root/html/pages/index.tt | 6 ++++ root/html/pages/new/index.tt | 5 ++++ root/static/style.css | 1 + 16 files changed, 104 insertions(+) create mode 100644 root/html/includes/footer.tt create mode 100644 root/html/includes/header.tt create mode 100644 root/html/includes/mirrorslist.tt create mode 100644 root/html/includes/new/checkurl.tt create mode 100644 root/html/includes/new/confirm.tt create mode 100644 root/html/includes/new/host_information.tt create mode 100644 root/html/includes/new/invalid_mirror.tt create mode 100644 root/html/includes/new/invalid_uri.tt create mode 100644 root/html/includes/new/mirror_exists.tt create mode 100644 root/html/includes/new/overlap_hosts.tt create mode 100644 root/html/includes/new/success.tt create mode 100644 root/html/includes/new/unsupported_protocol.tt create mode 100644 root/html/includes/new/url_form.tt create mode 100644 root/html/pages/index.tt create mode 100644 root/html/pages/new/index.tt create mode 100644 root/static/style.css (limited to 'root') 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 @@ + + + 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 @@ + + + + + + +[% c.prototype.define_javascript_functions %] + + + 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 @@ +
+ + +
+ +[% db = c.model('Mirrors') %] +[% mirrorslist = db.find_mirrors({ + 'protocol' => c.req.param('protocol'), + 'country' => c.req.param('country'), +}) %] +[% FOREACH item = mirrorslist %] +[% IF loop.first %] + + +[% END %] + +[% urls = db.find_urls({ "hostname" => item.hostname }) %] + + + + +[% IF loop.last %] +
Server nameLocationUrls
+[% item.hostname | html %] + +[% IF item.name %] +[% item.continent | html %], [% item.name | html %] +[% END %] + +[% FOREACH u = urls %] +[% u.protocol %] +[% END %] +
+[% 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 @@ +
+[% c.prototype.form_remote_tag({ url => c.uri_for('confirm'), update => 'foo' } ) %] + + + +
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 %] + +
+ + + +[% location.name %] / [% location.continent %]
+ +Country: + + +City: + +
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 @@ +

The url [% uri | html %] has same server and same protocol than [% exists_url.0.url %].

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 @@ +
+Enter the url to the top level mirror tree:
+ + +
diff --git a/root/html/pages/index.tt b/root/html/pages/index.tt new file mode 100644 index 0000000..f1f0251 --- /dev/null +++ b/root/html/pages/index.tt @@ -0,0 +1,6 @@ + +

Mageia mirrors database

+ +

Mirror not found ? register it

+ +[% INCLUDE 'mirrorslist.tt' %] diff --git a/root/html/pages/new/index.tt b/root/html/pages/new/index.tt new file mode 100644 index 0000000..0ef4cfd --- /dev/null +++ b/root/html/pages/new/index.tt @@ -0,0 +1,5 @@ +[% INCLUDE 'new/url_form.tt' %] + +[% IF subtemplate %] +[% INCLUDE $subtemplate %] +[% END %] diff --git a/root/static/style.css b/root/static/style.css new file mode 100644 index 0000000..cfa1da3 --- /dev/null +++ b/root/static/style.css @@ -0,0 +1 @@ +// $Id$ -- cgit v1.2.1