From a9ade04230fc99e5d12e7bd1af1e2dd31907d15a Mon Sep 17 00:00:00 2001 From: Olivier Thauvin Date: Sat, 2 Oct 2010 13:31:35 +0000 Subject: - handle distributions, protocol andothers things --- root/html/includes/header.tt | 3 ++ root/html/includes/host_information.tt | 50 ++++++++++++++++++++++++++++++ root/html/includes/mirrorslist.tt | 29 ++++++++++++++++- root/html/includes/new/confirm.tt | 2 ++ root/html/includes/new/host_information.tt | 19 ------------ root/html/includes/new/new_host.tt | 9 ++++++ root/html/includes/new/url_form.tt | 4 ++- root/html/pages/index.tt | 3 -- 8 files changed, 95 insertions(+), 24 deletions(-) create mode 100644 root/html/includes/host_information.tt delete mode 100644 root/html/includes/new/host_information.tt create mode 100644 root/html/includes/new/new_host.tt (limited to 'root/html') diff --git a/root/html/includes/header.tt b/root/html/includes/header.tt index 5319e52..7f8b1d5 100644 --- a/root/html/includes/header.tt +++ b/root/html/includes/header.tt @@ -8,3 +8,6 @@ +

Mageia mirrors database

+ +

Mirror not found ? register it

diff --git a/root/html/includes/host_information.tt b/root/html/includes/host_information.tt new file mode 100644 index 0000000..c0cb7cb --- /dev/null +++ b/root/html/includes/host_information.tt @@ -0,0 +1,50 @@ + +
+ + + + + + + + + + +[% FOREACH mirror = c.model('Mirrors').find_mirrors %] +[% IF loop.first %] + + + +[% END %] +[% END %] + + + +
Country + +
City + +
Synchronized from + +
Approximated bandwidth + +
+ +
diff --git a/root/html/includes/mirrorslist.tt b/root/html/includes/mirrorslist.tt index fd855f5..0986717 100644 --- a/root/html/includes/mirrorslist.tt +++ b/root/html/includes/mirrorslist.tt @@ -5,6 +5,13 @@ [% END %] + + @@ -16,7 +23,13 @@ [% FOREACH item = mirrorslist %] [% IF loop.first %] - + + + + + + + [% END %] [% urls = db.find_urls({ "hostname" => item.hostname }) %] @@ -29,8 +42,22 @@ [% END %] + + diff --git a/root/html/includes/new/confirm.tt b/root/html/includes/new/confirm.tt index b3eb3f3..e0bb7d4 100644 --- a/root/html/includes/new/confirm.tt +++ b/root/html/includes/new/confirm.tt @@ -1,4 +1,6 @@
+

Really adding [% c.session.new_uri | html %] ?

+ [% 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 deleted file mode 100644 index 78c04c2..0000000 --- a/root/html/includes/new/host_information.tt +++ /dev/null @@ -1,19 +0,0 @@ -Enter Info for [% uri.host %] - -
- - - -[% location.name %] / [% location.continent %]
- -Country: - - -City: - - diff --git a/root/html/includes/new/new_host.tt b/root/html/includes/new/new_host.tt new file mode 100644 index 0000000..a4296d2 --- /dev/null +++ b/root/html/includes/new/new_host.tt @@ -0,0 +1,9 @@ +Enter Info for [% uri.host %] + +
+ + + +[% location.name %] / [% location.continent %]
+ +[% INCLUDE 'host_information.tt' %] diff --git a/root/html/includes/new/url_form.tt b/root/html/includes/new/url_form.tt index f8840b9..169fe73 100644 --- a/root/html/includes/new/url_form.tt +++ b/root/html/includes/new/url_form.tt @@ -1,5 +1,7 @@ -Enter the url to the top level mirror tree:
+Enter the url to the top level mirror tree, supported protocol are +[% c.model('Mirrors').protocol_list.join(', ') | html %].
+ diff --git a/root/html/pages/index.tt b/root/html/pages/index.tt index f1f0251..9acd3cd 100644 --- a/root/html/pages/index.tt +++ b/root/html/pages/index.tt @@ -1,6 +1,3 @@ -

Mageia mirrors database

- -

Mirror not found ? register it

[% INCLUDE 'mirrorslist.tt' %] -- cgit v1.2.1
Server nameLocationUrls
Server nameLocationBandwidthSourceUrls
+[% c.model('Mirrors').bandwidth_name(item.bandwidth) | html %] + +[% item.syncfrom | html %] + +[% IF item.public %] [% FOREACH u = urls %] +[% IF u.valid %] [% u.protocol %] +[% ELSE %] +[% u.protocol %] +[% END %] +[% END %] +[% ELSE %] +Private access [% END %]