diff options
author | Olivier Thauvin <nanardon@mageia.org> | 2010-10-03 15:36:00 +0000 |
---|---|---|
committer | Olivier Thauvin <nanardon@mageia.org> | 2010-10-03 15:36:00 +0000 |
commit | ddcf19029c7b58b2ea236bd14e6c1456949f0fc0 (patch) | |
tree | 725f066cac991b43163f1e08a5954b6071634f3d /root/html/pages/new | |
parent | 114b46067622cc0c68d007711cf58f74e25411b8 (diff) | |
download | mgamirrors-ddcf19029c7b58b2ea236bd14e6c1456949f0fc0.tar mgamirrors-ddcf19029c7b58b2ea236bd14e6c1456949f0fc0.tar.gz mgamirrors-ddcf19029c7b58b2ea236bd14e6c1456949f0fc0.tar.bz2 mgamirrors-ddcf19029c7b58b2ea236bd14e6c1456949f0fc0.tar.xz mgamirrors-ddcf19029c7b58b2ea236bd14e6c1456949f0fc0.zip |
- use google maps for location, improve messages
Diffstat (limited to 'root/html/pages/new')
-rw-r--r-- | root/html/pages/new/confirm.tt | 24 | ||||
-rw-r--r-- | root/html/pages/new/index.tt | 13 | ||||
-rw-r--r-- | root/html/pages/new/new_host.tt | 14 |
3 files changed, 50 insertions, 1 deletions
diff --git a/root/html/pages/new/confirm.tt b/root/html/pages/new/confirm.tt new file mode 100644 index 0000000..2dde830 --- /dev/null +++ b/root/html/pages/new/confirm.tt @@ -0,0 +1,24 @@ +<div id="foo"> +<h2>Confirmation</h2> + +<p>The URL [% c.session.new_uri | html %] has been succefully validated.</p> + +<p>Please confirm the addition into the database.</p> + +[% IF c.session.hostinfo %] +<p>This URL refer to new mirror [% new_uri.host %] +[% IF c.session.hostinfo.country %] +[% cinfo = c.model('Mirrors').country_info(c.session.hostinfo.country) %] +located in [% cinfo.name | html %] ([% cinfo.continent | html %]) +[%- END -%].</p> +[% ELSE %] +[% END %] + +[% IF exists_url %] +<p>This url will replace the currently invalid url [% exists_url.url | html %].</p> +[% END %] + +[% c.prototype.form_remote_tag({ url => c.uri_for('confirm'), update => 'foo' } ) %] +<input type="submit" name="confirm" value="Yes, add it"> +</form> +</div> diff --git a/root/html/pages/new/index.tt b/root/html/pages/new/index.tt index 0ef4cfd..c20344c 100644 --- a/root/html/pages/new/index.tt +++ b/root/html/pages/new/index.tt @@ -1,5 +1,16 @@ -[% INCLUDE 'new/url_form.tt' %] [% IF subtemplate %] [% INCLUDE $subtemplate %] +[% ELSE %] +<p>Enter the url to the top level mirror tree. The URL must be in form +<pre>PROTOCOL://SERVER/PATH</pre></p> +<p>Supported protocol are +[%- FOREACH proto = c.model('Mirrors').protocol_list -%] +[%- IF NOT loop.first -%] +[%- IF loop.last %] or [% ELSE %], [% END %] +[%- END -%] +[%- proto | html -%] +[%- END -%].</p> [% END %] + +[% INCLUDE 'new/url_form.tt' %] diff --git a/root/html/pages/new/new_host.tt b/root/html/pages/new/new_host.tt new file mode 100644 index 0000000..d73600c --- /dev/null +++ b/root/html/pages/new/new_host.tt @@ -0,0 +1,14 @@ +<h2>Unknown mirror [% uri.host %]</h2> + +<p>This server is still unknown in our database, please complete information about this mirror.</p> + +[% IF location %] +<p>According the IP address this host is located in +[% location.name | html %] ([% location.continent | html %]).</p> +[% END %] + +<form action="[% c.uri_for() %]" method="POST"> +<input type="hidden" name="url" value="[% uri | html %]"> +<input type="hidden" name="hostinfo" value="1"> + +[% INCLUDE 'host_information.tt' %] |