]> dev.renevier.net Git - syj.git/commitdiff
allow anonymous routes creation
authorarno <arno@renevier.net>
Sat, 7 Aug 2010 10:05:20 +0000 (12:05 +0200)
committerarno <arno@renevier.net>
Fri, 13 Aug 2010 11:55:04 +0000 (13:55 +0200)
28 files changed:
COPYING.TXT
application/controllers/GeomController.php
application/controllers/IdxController.php
application/controllers/LoginController.php
application/controllers/PathController.php
application/controllers/UserController.php
application/forms/Geom.php
application/forms/User.php
application/languages/lang_en.po
application/languages/lang_fr.po
application/models/Path.php
application/models/PathMapper.php
application/models/User.php
application/models/UserMapper.php
application/views/helpers/Anchor.php
application/views/scripts/idx/index.phtml
application/views/scripts/termsofuse/index.phtml
public/css/syj.css
public/icons/bullet_arrow_down.png [new file with mode: 0644]
public/icons/bullet_arrow_right.png [new file with mode: 0644]
public/js/account.js
public/js/contact.js
public/js/login.js
public/js/newpwd.js
public/js/syj.js
public/js/utils.js
scripts/data.postgres.sql
scripts/schema.postgres.sql

index 754dd922a0e3914c9a0d4f2446451607a3e04812..5106604cc429dc39671a46fac9ca3f753f938847 100644 (file)
@@ -2,8 +2,9 @@
   Version 3, and redistributed under the conditions of this license. A copy of
   modified AGPL license is included in this file.
 
-- delete.png comes form FamFamFam Silk Icons. Author is Mark James. It is
-  licensed under a Creative Commons Attribution 2.5 License. See
+- delete.png, bullet_arrow_down.png and bullet_arrow_right.png comes form
+  FamFamFam Silk Icons. Author is Mark James. They are licensed under a
+  Creative Commons Attribution 2.5 License. See
   http://www.famfamfam.com/lab/icons/silk/ for more informations.
 
 
index 38d5ce7361240ba9c9f395a76c788d67dcc8ecfc..70acf763e073aa8984d42561c83f0093175eb061 100644 (file)
@@ -24,8 +24,12 @@ class GeomController extends Zend_Controller_Action
             return;
         }
 
-        $api->setCheckIfNoneMatch(true)->setBody(json_encode(
-            array('owner' => (string)$path->owner->pseudo, 'geom' => (string)$path->geom)
-        ));
+        $data = array('geom' => (string)$path->geom,
+                  'title' => (string)$path->displayTitle);
+        if ($path->creator) {
+            $data['creator'] = (string)$path->creator->pseudo;
+        }
+
+        $api->setCheckIfNoneMatch(true)->setBody(json_encode($data));
     }
 }
index ac315581eafbc29eb300c65cbba1a7c9c908b835..caad6a1595bb51f09562d3e5698640973a013f69 100644 (file)
@@ -68,14 +68,12 @@ class IdxController extends Zend_Controller_Action
         }
 
         if (isset($path)) {
-            if ($user and $path->owner->id == $user->id) {
-                $loggedinfo->isowner = true;
-            } else {
-                $loggedinfo->isowner = false;
+            $loggedinfo->iscreator = $path->isCreator($user);
+            if ($path->creator) {
+                $loggedinfo->creatorname = $this->view->escape((string)$path->creator->pseudo);
             }
-            $loggedinfo->ownername = $this->view->escape((string)$path->owner->pseudo);
         } else {
-            $loggedinfo->isowner = true;
+            $loggedinfo->iscreator = true;
         }
 
         $this->view->headScript()->prependScript((string) $loggedinfo);
@@ -93,8 +91,6 @@ class IdxController extends Zend_Controller_Action
             'userEmptyWarn' => __("you must enter a login name"),
             'loginSuccess' => __("Login correct"),
             'loginFailure' => __("Wrong login/password"),
-            'loginNeeded' => __("You need to login before retrying to save"),
-            'cookiesNeeded' => __("You need to have cookies enabled to login to SYJ"),
             'passwordEmptyWarn' => __("you must enter a password"),
             'passwordNoMatchWarn' => __("Password do not match"),
             'acceptTermsofuseWarn' => __("You must accept terms of use"),
index dd07b1e07d833c9c700e6a55456638bf69c38f9a..495c27c408b38939ddc861047cd75be9ca0c5d3f 100644 (file)
@@ -63,13 +63,13 @@ class LoginController extends Zend_Controller_Action
                 if (!$pathMapper->find((int)$login_geom_id, $path)) {
                     throw new Syj_Exception_Request();
                 }
-                if ($path->owner->id === $userid) {
-                    $api->setBody("1"); // owner of displayed geometry
+                if ($path->creator->id === $userid) {
+                    $api->setBody("1"); // creator of displayed geometry
                 } else {
                     $api->setBody("0");
                 }
             } else {
-                $api->setBody("1"); // no geometry displayed: owner of the (future) geometry
+                $api->setBody("1"); // no geometry displayed: creator of the (future) geometry
             }
         } else {
             $this->redirect();
index 37394d02dbfd4bc3331a3771543f09d772365187..6ef95292baf813d54c7a3a41a0dff0f032148d29 100644 (file)
@@ -6,12 +6,6 @@ class PathController extends Zend_Controller_Action
 {
     public function indexAction() {
         $formData = $this->_helper->SyjPostData->getPostData('Syj_Form_Geom');
-
-        $user = $this->_helper->SyjSession->user();
-        if (!$user) {
-            throw new Syj_Exception_Forbidden();
-        }
-
         $decoder = new gisconverter\WKT();
 
         try {
@@ -32,16 +26,24 @@ class PathController extends Zend_Controller_Action
             }
         }
         $path->geom = $geom;
+
+        $user = $this->_helper->SyjSession->user();
+        if (!$user and !$formData["geom_accept"]) {
+            throw new Syj_Exception_Request();
+        }
+
         if ($path->getId()) {
-            if ($path->owner->id != $user->id) {
-                throw new Syj_Exception_Forbidden();
+            if (!$path->isCreator($user)) {
+                throw new Syj_Exception_Request();
             }
         } else {
-            $path->owner = $user;
+            $path->creator = $user;
         }
+
         if (isset($formData["geom_title"])) {
             $path->title = $formData["geom_title"];
         }
+        $path->creatorIp = $this->getRequest()->getClientIp(true);
         try {
             $pathMapper->save ($path);
         } catch(Zend_Db_Statement_Exception $e) {
index ed078ad9688f2442965301f61e06964249735daa..2bd41d3106b78bbecf9c7d03c6001e255ba853a8 100644 (file)
@@ -19,7 +19,6 @@ class UserController extends Zend_Controller_Action
         $user->pseudo = $formData["user_pseudo"];
         $user->password = sha1($formData["user_password"]);
         $user->email = $formData["user_email"];
-        $user->creationAddr = $this->getRequest()->getClientIp(true);
 
         if (Zend_Registry::isRegistered('Zend_Translate')) {
             $translator = Zend_Registry::get('Zend_Translate');
index 751d7982b08e164fad2d99476446dea58797ad9a..cad18a777b413a242715a113236abae2d3617770 100644 (file)
@@ -20,12 +20,23 @@ class Syj_Form_Geom extends Zend_Form
             'attribs' => array('maxlength' => '40', 'size' => '20'),
             'validators' => array(new Zend_Validate_StringLength(0, 40))
             ));
+
+        $translator = $this->getTranslator();
+        $anchor = $this->getView()->Anchor("termsofuse", $translator->translate("terms of use"), array('id' => 'geom_termsofuse_anchor'));
+        $text = $translator->translate("I've read and accepted %s");
+        $text = vsprintf($text, $anchor);
+        $touaccept = array('Checkbox', 'geom_accept', array("label" => $text,
+                            'decorators' => array(
+                                  'ViewHelper',
+                                  'label',
+                                  array('HtmlTag', array('tag' => 'div', 'id' => 'geom_accept_container')))));
+
         $submit = array('Submit', 'geom_submit', array('label' => __("save")));
 
-        $this->addElements(array($id, $data, $title, $submit));
+        $this->addElements(array($id, $data, $title, $touaccept, $submit));
 
-        // fieldset around title
-        //$this->addDisplayGroup(array('geom_title'), 'metadata', array('decorators' => array('FormElements', 'Fieldset')));
+        $decorator = $this->geom_accept->getDecorator('Zend_Form_Decorator_Label');
+        $decorator->setOption('escape', false);
 
         $this->geom_title->addDecorator('HtmlTag', array('tag' => 'br', 'openOnly' => true))->
             addDecorator('label');
index b74258abd41148369fad6a05306b50ba513a92b2..40bd5185a9764885cdc088bc5fb03b8d7ee513c0 100644 (file)
@@ -45,7 +45,7 @@ class Syj_Form_User extends Syj_Form_TableAbstract
                             'decorators' => array(
                                   'ViewHelper',
                                   'label',
-                                  array('HtmlTag', array('tag' => 'div'))),
+                                  array('HtmlTag', array('tag' => 'div', 'id' => 'user_accept_container'))),
                             'validators' => array(new Zend_Validate_Identical('1'))));
 
         $decorator = $this->user_accept->getDecorator('Zend_Form_Decorator_Label');
index fb6c771335f62d4b469a832b664a1ba377c5bee0..542754f2b38dea16f50375487dcd0195a6f408a9 100644 (file)
@@ -2,7 +2,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: syj\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2010-08-02 11:52+0200\n"
+"POT-Creation-Date: 2010-08-07 10:20+0200\n"
 "PO-Revision-Date: \n"
 "Last-Translator: arno <arno@renevier.net>\n"
 "Language-Team: arno <arno@renevier.net>\n"
@@ -37,8 +37,12 @@ msgstr "go to main page"
 
 #: application/views/scripts/contact/index.phtml:8
 #, php-format
-msgid "There was an unkwown message when sending the message. Please try again later, or send a mail directly to <a href=\"mailto:%s\">%s</a>"
-msgstr "There was an unkwown message when sending the message. Please try again later, or send a mail directly to <a href=\"mailto:%s\">%s</a>"
+msgid ""
+"There was an unkwown message when sending the message. Please try again "
+"later, or send a mail directly to <a href=\"mailto:%s\">%s</a>"
+msgstr ""
+"There was an unkwown message when sending the message. Please try again "
+"later, or send a mail directly to <a href=\"mailto:%s\">%s</a>"
 
 #: application/views/scripts/contact/success.phtml:4
 msgid "Email was send successfully"
@@ -53,8 +57,12 @@ msgid "Welcome on Syj."
 msgstr "Welcome on Syj."
 
 #: application/views/scripts/idx/index.phtml:17
-msgid "To create a journey, just click on the map to add points to your route. You can zoom and move map with controls upper left."
-msgstr "To create a journey, just click on the map to add points to your route. You can zoom and move map with controls upper left."
+msgid ""
+"To create a journey, just click on the map to add points to your route. You "
+"can zoom and move map with controls upper left."
+msgstr ""
+"To create a journey, just click on the map to add points to your route. You "
+"can zoom and move map with controls upper left."
 
 #: application/views/scripts/idx/index.phtml:19
 msgid "When you have finished a path, press \"save\", button."
@@ -66,42 +74,85 @@ msgstr "edit"
 
 #: application/views/scripts/idx/index.phtml:35
 #: application/controllers/LoginController.php:8
-#: application/layouts/scripts/footer.phtml:54
-#: application/forms/Login.php:26
+#: application/layouts/scripts/footer.phtml:54 application/forms/Login.php:26
 msgid "login"
 msgstr "login"
 
-#: application/views/scripts/idx/index.phtml:36
-#: application/views/scripts/idx/index.phtml:65
+#: application/views/scripts/idx/index.phtml:37
+#: application/views/scripts/idx/index.phtml:68
 msgid "create an account"
 msgstr "create an account"
 
+#: application/views/scripts/idx/index.phtml:38
+msgid "Whith an account, you can manage and modify your routes"
+msgstr "Whith an account, you can manage and modify your routes"
+
 #: application/views/scripts/termsofuse/index.phtml:3
-msgid "Show Your Journey is a site whose goal is to allow anyone to publish routes, for example, hiking itinerary, bicycle trip, travel itinerary or whatever."
-msgstr "Show Your Journey is a site whose goal is to allow anyone to publish routes, for example, hiking itinerary, bicycle trip, travel itinerary or whatever."
+msgid ""
+"Show Your Journey is a site whose goal is to allow anyone to publish routes, "
+"for example, hiking itinerary, bicycle trip, travel itinerary or whatever."
+msgstr ""
+"Show Your Journey is a site whose goal is to allow anyone to publish routes, "
+"for example, hiking itinerary, bicycle trip, travel itinerary or whatever."
 
 #: application/views/scripts/termsofuse/index.phtml:7
-msgid "In order to publish a route, you must first create an account.  A valid email is asked for, and ip address of account creation is stored on the server. Those informations will not be divulged to anyone without the user explicit permission."
-msgstr "In order to publish a route, you must first create an account.  A valid email is asked for, and ip address of account creation is stored on the server. Those informations will not be divulged to anyone without the user explicit permission."
+msgid ""
+"In order to publish a route, you must first create an account. A valid email "
+"is asked for, and ip address of account creation is stored on the server. "
+"Those informations will not be divulged to anyone without the user explicit "
+"permission."
+msgstr ""
+"In order to publish a route, you must first create an account. A valid email "
+"is asked for, and ip address of account creation is stored on the server. "
+"Those informations will not be divulged to anyone without the user explicit "
+"permission."
 
 #: application/views/scripts/termsofuse/index.phtml:11
-msgid "When you create a route, you accept that it's available under a <a href=\"http://creativecommons.org/licenses/by/2.0/\">creative commons <strong>by</strong> license</a>. This means you accept that anyone can reproduce and republish your itinerary, or a modified version of it, under the condition that he specify the proper creator of this work. This also means you need to get appropriate permissions from the creator if you want to upload a route you didn't create yourself."
-msgstr "When you create a route, you accept that it's available under a <a href=\"http://creativecommons.org/licenses/by/2.0/\">creative commons <strong>by</strong> license</a>. This means you accept that anyone can reproduce and republish your itinerary, or a modified version of it, under the condition that he specify the proper creator of this work. This also means you need to get appropriate permissions from the creator if you want to upload a route you didn't create yourself."
+msgid ""
+"When you create a route, you accept that it's free for any use. This means "
+"you accept that anyone can reuse, reproduce, or republish your itinerary, or "
+"a modified version of it for any purpose. This also means you need to get "
+"appropriate permissions from the creator if you want to upload a route you "
+"didn't create yourself."
+msgstr ""
+"When you create a route, you accept that it's free for any use. This means "
+"you accept that anyone can reuse, reproduce, or republish your itinerary, or "
+"a modified version of it for any purpose. This also means you need to get "
+"appropriate permissions from the creator if you want to upload a route you "
+"didn't create yourself."
 
 #: application/views/scripts/termsofuse/index.phtml:15
-msgid "Show Your Journey is not responsible for the accuracy of the routes published.  It's the user responsibility to check that a route is accessible and safe."
-msgstr "Show Your Journey is not responsible for the accuracy of the routes published.  It's the user responsibility to check that a route is accessible and safe."
+msgid ""
+"Show Your Journey is not responsible for the accuracy of the routes "
+"published. It's the user responsibility to check that a route is accessible "
+"and safe."
+msgstr ""
+"Show Your Journey is not responsible for the accuracy of the routes "
+"published. It's the user responsibility to check that a route is accessible "
+"and safe."
 
 #: application/views/scripts/termsofuse/index.phtml:19
-msgid "Show Your Journey service is provided \"as is\" with no guarantee for accuracy or accessibility."
-msgstr "Show Your Journey service is provided \"as is\" with no guarantee for accuracy or accessibility."
+msgid ""
+"Show Your Journey service is provided \"as is\" with no guarantee for "
+"accuracy or accessibility."
+msgstr ""
+"Show Your Journey service is provided \"as is\" with no guarantee for "
+"accuracy or accessibility."
 
 #: application/views/scripts/termsofuse/index.phtml:23
-msgid "Sources of the software running the website are <a href=\"http://dev.renevier.net/?p=syj.git\">publicly available</a> under a agpl license. The map used to display the routes comes from <a href=\"http://www.openstreetmap.org/\">openstreetmap</a>."
-msgstr "Sources of the software running the website are <a href=\"http://dev.renevier.net/?p=syj.git\">publicly available</a> under a agpl license. The map used to display the routes comes from <a href=\"http://www.openstreetmap.org/\">openstreetmap</a>."
+msgid ""
+"Sources of the software running the website are <a href=\"http://dev."
+"renevier.net/?p=syj.git\">publicly available</a> under a agpl license. The "
+"map used to display the routes comes from <a href=\"http://www.openstreetmap."
+"org/\">openstreetmap</a>."
+msgstr ""
+"Sources of the software running the website are <a href=\"http://dev."
+"renevier.net/?p=syj.git\">publicly available</a> under a agpl license. The "
+"map used to display the routes comes from <a href=\"http://www.openstreetmap."
+"org/\">openstreetmap</a>."
 
 #: application/views/scripts/newpwd/success.phtml:4
-#: application/controllers/IdxController.php:106
+#: application/controllers/IdxController.php:102
 msgid "A link to reset your password has been emailed to you"
 msgstr "A link to reset your password has been emailed to you"
 
@@ -140,8 +191,14 @@ msgstr "log in"
 
 #: application/views/scripts/pending/password_validate.phtml:15
 #, php-format
-msgid "Your new password is now <strong>%s</strong>. You can %s with this new password. Don't forget to change it again to a personal password as soon as possible."
-msgstr "Your new password is now <strong>%s</strong>. You can %s with this new password. Don't forget to change it again to a personal password as soon as possible."
+msgid ""
+"Your new password is now <strong>%s</strong>. You can %s with this new "
+"password. Don't forget to change it again to a personal password as soon as "
+"possible."
+msgstr ""
+"Your new password is now <strong>%s</strong>. You can %s with this new "
+"password. Don't forget to change it again to a personal password as soon as "
+"possible."
 
 #: application/views/scripts/account/success.phtml:4
 msgid "Your account was modified successfully"
@@ -175,13 +232,15 @@ msgstr "[SYJ] Reset your password"
 msgid ""
 "Hi %user%,\n"
 "\n"
-"Someone, probably you, has asked to reset your password. If you want to reset\n"
+"Someone, probably you, has asked to reset your password. If you want to "
+"reset\n"
 "your password, please follow this link:\n"
 "%hashurl%\n"
 "\n"
 "If you do not not confirm within 2 days, your password will not be reset.\n"
 "\n"
-"Please do not reply this email. If you need to contact us, please use the form\n"
+"Please do not reply this email. If you need to contact us, please use the "
+"form\n"
 "contact at %contacturl%\n"
 "\n"
 "Thanks,\n"
@@ -190,13 +249,15 @@ msgid ""
 msgstr ""
 "Hi %user%,\n"
 "\n"
-"Someone, probably you, has asked to reset your password. If you want to reset\n"
+"Someone, probably you, has asked to reset your password. If you want to "
+"reset\n"
 "your password, please follow this link:\n"
 "%hashurl%\n"
 "\n"
 "If you do not not confirm within 2 days, your password will not be reset.\n"
 "\n"
-"Please do not reply this email. If you need to contact us, please use the form\n"
+"Please do not reply this email. If you need to contact us, please use the "
+"form\n"
 "contact at %contacturl%\n"
 "\n"
 "Thanks,\n"
@@ -211,14 +272,17 @@ msgstr "[SYJ] Validate your account"
 msgid ""
 "Hi %user%, and welcome on syj\n"
 "\n"
-"Your account is currently active, but you need to confirm your inscription by\n"
+"Your account is currently active, but you need to confirm your inscription "
+"by\n"
 "following this link:\n"
 "%hashurl%\n"
 "\n"
-"If you do not not confirm your inscription within 7 days, your account and all\n"
+"If you do not not confirm your inscription within 7 days, your account and "
+"all\n"
 "your items will be deleted.\n"
 "\n"
-"Please do not reply this email. If you need to contact us, please use the form\n"
+"Please do not reply this email. If you need to contact us, please use the "
+"form\n"
 "contact at %contacturl%\n"
 "\n"
 "Thanks,\n"
@@ -227,14 +291,17 @@ msgid ""
 msgstr ""
 "Hi %user%, and welcome on syj\n"
 "\n"
-"Your account is currently active, but you need to confirm your inscription by\n"
+"Your account is currently active, but you need to confirm your inscription "
+"by\n"
 "following this link:\n"
 "%hashurl%\n"
 "\n"
-"If you do not not confirm your inscription within 7 days, your account and all\n"
+"If you do not not confirm your inscription within 7 days, your account and "
+"all\n"
 "your items will be deleted.\n"
 "\n"
-"Please do not reply this email. If you need to contact us, please use the form\n"
+"Please do not reply this email. If you need to contact us, please use the "
+"form\n"
 "contact at %contacturl%\n"
 "\n"
 "Thanks,\n"
@@ -253,7 +320,8 @@ msgid ""
 "account will be deleted tomorrow. Please follow this link:\n"
 "%hashurl%\n"
 "\n"
-"Please do not reply this email. If you need to contact us, please use the form\n"
+"Please do not reply this email. If you need to contact us, please use the "
+"form\n"
 "contact at %contacturl%\n"
 "\n"
 "Thanks,\n"
@@ -266,7 +334,8 @@ msgstr ""
 "account will be deleted tomorrow. Please follow this link:\n"
 "%hashurl%\n"
 "\n"
-"Please do not reply this email. If you need to contact us, please use the form\n"
+"Please do not reply this email. If you need to contact us, please use the "
+"form\n"
 "contact at %contacturl%\n"
 "\n"
 "Thanks,\n"
@@ -281,11 +350,13 @@ msgstr "[SYJ] Account deactivated"
 msgid ""
 "Hi %user%,\n"
 "\n"
-"You have not validated your syj account on time. Therefore, your account and\n"
+"You have not validated your syj account on time. Therefore, your account "
+"and\n"
 "all your data have been deleted. Nevertheless, you can still create a new\n"
 "account.\n"
 "\n"
-"Please do not reply this email. If you need to contact us, please use the form\n"
+"Please do not reply this email. If you need to contact us, please use the "
+"form\n"
 "contact at %contacturl%\n"
 "\n"
 "Regards,\n"
@@ -294,11 +365,13 @@ msgid ""
 msgstr ""
 "Hi %user%,\n"
 "\n"
-"You have not validated your syj account on time. Therefore, your account and\n"
+"You have not validated your syj account on time. Therefore, your account "
+"and\n"
 "all your data have been deleted. Nevertheless, you can still create a new\n"
 "account.\n"
 "\n"
-"Please do not reply this email. If you need to contact us, please use the form\n"
+"Please do not reply this email. If you need to contact us, please use the "
+"form\n"
 "contact at %contacturl%\n"
 "\n"
 "Regards,\n"
@@ -306,7 +379,7 @@ msgstr ""
 "Syj team"
 
 #: application/controllers/LoginController.php:101
-#: application/controllers/IdxController.php:92
+#: application/controllers/IdxController.php:90
 msgid "you must enter a login name"
 msgstr "you must enter a login name"
 
@@ -350,8 +423,7 @@ msgid "Value is required and can't be empty"
 msgstr "Value is required and can't be empty"
 
 #: application/controllers/ContactController.php:123
-#: application/forms/Contact.php:32
-#: application/validate/EmailAddress.php:13
+#: application/forms/Contact.php:32 application/validate/EmailAddress.php:13
 msgid "Invalid email"
 msgstr "Invalid email"
 
@@ -360,8 +432,7 @@ msgid "Oups, something went wrong"
 msgstr "Oups, something went wrong"
 
 #: application/controllers/TermsofuseController.php:12
-#: application/layouts/scripts/footer.phtml:67
-#: application/forms/User.php:41
+#: application/layouts/scripts/footer.phtml:67 application/forms/User.php:41
 msgid "terms of use"
 msgstr "terms of use"
 
@@ -375,19 +446,18 @@ msgid "Wrong password"
 msgstr "Wrong password"
 
 #: application/controllers/AccountController.php:56
-#: application/controllers/IdxController.php:104
+#: application/controllers/IdxController.php:100
 msgid "an user is already registered with this email"
 msgstr "an user is already registered with this email"
 
 #: application/controllers/AccountController.php:84
-#: application/controllers/IdxController.php:98
+#: application/controllers/IdxController.php:94
 #: application/forms/Account.php:40
 msgid "Password do not match"
 msgstr "Password do not match"
 
 #: application/controllers/AccountController.php:85
-#: application/forms/Account.php:33
-#: application/forms/User.php:18
+#: application/forms/Account.php:33 application/forms/User.php:18
 #, php-format
 msgid "At least %d characters"
 msgstr "At least %d characters"
@@ -396,87 +466,85 @@ msgstr "At least %d characters"
 msgid "You have made no change"
 msgstr "You have made no change"
 
-#: application/controllers/IdxController.php:85
+#: application/controllers/IdxController.php:83
 msgid "save took place successfully"
 msgstr "save took place successfully"
 
-#: application/controllers/IdxController.php:86
-msgid "server did not understood request. That's probably caused by a bug in SYJ"
-msgstr "server did not understood request. That's probably caused by a bug in SYJ"
+#: application/controllers/IdxController.php:84
+msgid ""
+"server did not understood request. That's probably caused by a bug in SYJ"
+msgstr ""
+"server did not understood request. That's probably caused by a bug in SYJ"
 
-#: application/controllers/IdxController.php:87
+#: application/controllers/IdxController.php:85
 msgid "path did not exist in the server. May be it has been already deleted"
 msgstr "path did not exist in the server. May be it has been already deleted"
 
-#: application/controllers/IdxController.php:88
-msgid "similar path seems to already exist. Please do not create two exactly identical paths"
-msgstr "similar path seems to already exist. Please do not create two exactly identical paths"
+#: application/controllers/IdxController.php:86
+msgid ""
+"similar path seems to already exist. Please do not create two exactly "
+"identical paths"
+msgstr ""
+"similar path seems to already exist. Please do not create two exactly "
+"identical paths"
 
-#: application/controllers/IdxController.php:89
+#: application/controllers/IdxController.php:87
 msgid "server could not be reached"
 msgstr "server could not be reached"
 
-#: application/controllers/IdxController.php:90
+#: application/controllers/IdxController.php:88
 msgid "there was a server error"
 msgstr "there was a server error"
 
-#: application/controllers/IdxController.php:91
+#: application/controllers/IdxController.php:89
 msgid "there was an unknown error"
 msgstr "there was an unknown error"
 
-#: application/controllers/IdxController.php:93
+#: application/controllers/IdxController.php:91
 msgid "Login correct"
 msgstr "Login correct"
 
-#: application/controllers/IdxController.php:94
+#: application/controllers/IdxController.php:92
 msgid "Wrong login/password"
 msgstr "Wrong login/password"
 
-#: application/controllers/IdxController.php:95
-msgid "You need to login before retrying to save"
-msgstr "You need to login before retrying to save"
-
-#: application/controllers/IdxController.php:96
-msgid "You need to have cookies enabled to login to SYJ"
-msgstr "You need to have cookies enabled to login to SYJ"
-
-#: application/controllers/IdxController.php:97
+#: application/controllers/IdxController.php:93
 msgid "you must enter a password"
 msgstr "you must enter a password"
 
-#: application/controllers/IdxController.php:99
+#: application/controllers/IdxController.php:95
 msgid "You must accept terms of use"
 msgstr "You must accept terms of use"
 
-#: application/controllers/IdxController.php:100
+#: application/controllers/IdxController.php:96
 msgid "you must enter an email"
 msgstr "you must enter an email"
 
-#: application/controllers/IdxController.php:101
+#: application/controllers/IdxController.php:97
 msgid "invalid email"
 msgstr "invalid email"
 
-#: application/controllers/IdxController.php:102
+#: application/controllers/IdxController.php:98
 msgid "pseudo must only contain letters, digits, dots or underscores"
 msgstr "pseudo must only contain letters, digits, dots or underscores"
 
-#: application/controllers/IdxController.php:103
+#: application/controllers/IdxController.php:99
 msgid "unavailable pseudo"
 msgstr "unavailable pseudo"
 
-#: application/controllers/IdxController.php:105
+#: application/controllers/IdxController.php:101
 msgid "Account created"
 msgstr "Account created"
 
-#: application/controllers/IdxController.php:107
+#: application/controllers/IdxController.php:103
 msgid "Now, you can retry to save"
 msgstr "Now, you can retry to save"
 
-#: application/controllers/IdxController.php:108
+#: application/controllers/IdxController.php:104
 msgid "route by"
 msgstr "route by"
 
-#: application/controllers/IdxController.php:109
+#: application/controllers/IdxController.php:105
 msgid "Map by <a href='http://openstreetmap.org/'>OpenStreetMap</a>"
 msgstr "Map by <a href='http://openstreetmap.org/'>OpenStreetMap</a>"
 
@@ -492,8 +560,7 @@ msgstr "contact"
 msgid "user"
 msgstr "user"
 
-#: application/forms/Login.php:10
-#: application/forms/Account.php:35
+#: application/forms/Login.php:10 application/forms/Account.php:35
 #: application/forms/User.php:21
 msgid "password"
 msgstr "password"
@@ -535,14 +602,12 @@ msgstr "optional title for this journey"
 msgid "save"
 msgstr "save"
 
-#: application/forms/Account.php:27
-#: application/forms/User.php:34
+#: application/forms/Account.php:27 application/forms/User.php:34
 #: application/forms/Newpwd.php:28
 msgid "email"
 msgstr "email"
 
-#: application/forms/Account.php:42
-#: application/forms/User.php:28
+#: application/forms/Account.php:42 application/forms/User.php:28
 msgid "confirm password"
 msgstr "confirm password"
 
@@ -559,8 +624,14 @@ msgid "user name"
 msgstr "user name"
 
 #: application/forms/User.php:35
-msgid "After creating your account, you will receive a confirmation email. You have 7 days to confirm otherwise, your account and your routes will all be deleted."
-msgstr "After creating your account, you will receive a confirmation email. You have 7 days to confirm otherwise, your account and your routes will all be deleted."
+msgid ""
+"After creating your account, you will receive a confirmation email. You have "
+"7 days to confirm otherwise, your account and your routes will all be "
+"deleted."
+msgstr ""
+"After creating your account, you will receive a confirmation email. You have "
+"7 days to confirm otherwise, your account and your routes will all be "
+"deleted."
 
 #: application/forms/User.php:42
 #, php-format
@@ -573,8 +644,12 @@ msgstr "create account"
 
 #: application/forms/Pending/ResetPassword.php:11
 #, php-format
-msgid "Hi %s. Someone, probably you, has asked to reset password for your account. To get a new password, validate with following button."
-msgstr "Hi %s. Someone, probably you, has asked to reset password for your account. To get a new password, validate with following button."
+msgid ""
+"Hi %s. Someone, probably you, has asked to reset password for your account. "
+"To get a new password, validate with following button."
+msgstr ""
+"Hi %s. Someone, probably you, has asked to reset password for your account. "
+"To get a new password, validate with following button."
 
 #: application/forms/Pending/ResetPassword.php:16
 #: application/forms/Newpwd.php:33
@@ -586,24 +661,42 @@ msgid "cancel request"
 msgstr "cancel request"
 
 #: application/forms/Pending/ResetPassword.php:24
-msgid "To cancel this request, press following button. Your password will not change."
-msgstr "To cancel this request, press following button. Your password will not change."
+msgid ""
+"To cancel this request, press following button. Your password will not "
+"change."
+msgstr ""
+"To cancel this request, press following button. Your password will not "
+"change."
 
 #: application/forms/Pending/ValidateCreation.php:11
 #, php-format
-msgid "Someone, probably you, has registered an account %s with email address %s on syj. To confirm this account creation, validate with following button."
-msgstr "Someone, probably you, has registered an account %s with email address %s on syj. To confirm this account creation, validate with following button."
+msgid ""
+"Someone, probably you, has registered an account %s with email address %s on "
+"syj. To confirm this account creation, validate with following button."
+msgstr ""
+"Someone, probably you, has registered an account %s with email address %s on "
+"syj. To confirm this account creation, validate with following button."
 
 #: application/forms/Pending/ValidateCreation.php:23
 msgid "delete"
 msgstr "delete"
 
 #: application/forms/Pending/ValidateCreation.php:24
-msgid "To cancel account creation, press following button. The account and all its data will be deleted."
-msgstr "To cancel account creation, press following button. The account and all its data will be deleted."
+msgid ""
+"To cancel account creation, press following button. The account and all its "
+"data will be deleted."
+msgstr ""
+"To cancel account creation, press following button. The account and all its "
+"data will be deleted."
+
+#~ msgid "You need to login before retrying to save"
+#~ msgstr "You need to login before retrying to save"
+
+#~ msgid "You need to have cookies enabled to login to SYJ"
+#~ msgstr "You need to have cookies enabled to login to SYJ"
 
 #~ msgid "main page"
 #~ msgstr "main page"
+
 #~ msgid "reset password"
 #~ msgstr "reset password"
-
index 49da3b5b5b53914c192f2508515ae925f0db8fa2..8951ba14e609135d682ed9fb1ec10fa88189a0b6 100644 (file)
@@ -2,11 +2,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: syj\n"
 "Report-Msgid-Bugs-To: \n"
-<<<<<<< HEAD
-"POT-Creation-Date: 2010-08-02 11:52+0200\n"
-=======
-"POT-Creation-Date: 2010-08-07 09:23+0200\n"
->>>>>>> d6dc392... terms of use about service availibity
+"POT-Creation-Date: 2010-08-07 10:20+0200\n"
 "PO-Revision-Date: \n"
 "Last-Translator: arno <arno@renevier.net>\n"
 "Language-Team: arno <arno@renevier.net>\n"
@@ -41,8 +37,12 @@ msgstr "aller à la page d'accueil"
 
 #: application/views/scripts/contact/index.phtml:8
 #, php-format
-msgid "There was an unkwown message when sending the message. Please try again later, or send a mail directly to <a href=\"mailto:%s\">%s</a>"
-msgstr "Il s'est produit une erreur inconnue lors de l'envoi du message. Merci de réessayer plus tard, ou d'écrire directement à <a href=\"mailto:%s\">%s</a>"
+msgid ""
+"There was an unkwown message when sending the message. Please try again "
+"later, or send a mail directly to <a href=\"mailto:%s\">%s</a>"
+msgstr ""
+"Il s'est produit une erreur inconnue lors de l'envoi du message. Merci de "
+"réessayer plus tard, ou d'écrire directement à <a href=\"mailto:%s\">%s</a>"
 
 #: application/views/scripts/contact/success.phtml:4
 msgid "Email was send successfully"
@@ -50,15 +50,22 @@ msgstr "L'email a été envoyé avec succès"
 
 #: application/views/scripts/idx/index.phtml:8
 msgid "SYJ needs javascript. Please activate scripts in your browser."
-msgstr "SYJ a besoin de javascript pour fonctionner. Veuillez activer les scripts dans votre navigateur."
+msgstr ""
+"SYJ a besoin de javascript pour fonctionner. Veuillez activer les scripts "
+"dans votre navigateur."
 
 #: application/views/scripts/idx/index.phtml:15
 msgid "Welcome on Syj."
 msgstr "Bienvenue sur Syj."
 
 #: application/views/scripts/idx/index.phtml:17
-msgid "To create a journey, just click on the map to add points to your route. You can zoom and move map with controls upper left."
-msgstr "Pour créer un trajet, cliquez simplement sur la carte pour ajouter des points à votre tracé. Vous pouvez zoomer et bouger la carte avec les boutons en haut à gauche."
+msgid ""
+"To create a journey, just click on the map to add points to your route. You "
+"can zoom and move map with controls upper left."
+msgstr ""
+"Pour créer un trajet, cliquez simplement sur la carte pour ajouter des "
+"points à votre tracé. Vous pouvez zoomer et bouger la carte avec les boutons "
+"en haut à gauche."
 
 #: application/views/scripts/idx/index.phtml:19
 msgid "When you have finished a path, press \"save\", button."
@@ -70,44 +77,90 @@ msgstr "modifier"
 
 #: application/views/scripts/idx/index.phtml:35
 #: application/controllers/LoginController.php:8
-#: application/layouts/scripts/footer.phtml:54
-#: application/forms/Login.php:26
+#: application/layouts/scripts/footer.phtml:54 application/forms/Login.php:26
 msgid "login"
 msgstr "connexion"
 
-#: application/views/scripts/idx/index.phtml:36
-#: application/views/scripts/idx/index.phtml:65
+#: application/views/scripts/idx/index.phtml:37
+#: application/views/scripts/idx/index.phtml:68
 msgid "create an account"
 msgstr "créer un compte"
 
+#: application/views/scripts/idx/index.phtml:38
+msgid "Whith an account, you can manage and modify your routes"
+msgstr "Avec un compte, vous pourrez gérer et modifier vos itinéraires"
+
 #: application/views/scripts/termsofuse/index.phtml:3
-msgid "Show Your Journey is a site whose goal is to allow anyone to publish routes, for example, hiking itinerary, bicycle trip, travel itinerary or whatever."
-msgstr "Show Your Journey est un site dont le but est de permettre à quiconque de publier des itinéraires, par exemples, des itinéraires de randonnées, des trajets cyclistes, des itinéraires de voyages, ou n'importe quoi d'autre."
+msgid ""
+"Show Your Journey is a site whose goal is to allow anyone to publish routes, "
+"for example, hiking itinerary, bicycle trip, travel itinerary or whatever."
+msgstr ""
+"Show Your Journey est un site dont le but est de permettre à quiconque de "
+"publier des itinéraires, par exemples, des itinéraires de randonnées, des "
+"trajets cyclistes, des itinéraires de voyages, ou n'importe quoi d'autre."
 
 #: application/views/scripts/termsofuse/index.phtml:7
-msgid "In order to publish a route, you must first create an account.  A valid email is asked for, and ip address of account creation is stored on the server. Those informations will not be divulged to anyone without the user explicit permission."
-msgstr "Pour publier un itinéraire, vous devez tout d'abord créer un compte. Un email valide est demandé, et l'adresse ip de création du compte est enregistrée sur le serveur. Ces informations ne seront divulguées à personne sans la permission explicite de l'utilisateur."
+msgid ""
+"In order to publish a route, you must first create an account. A valid email "
+"is asked for, and ip address of account creation is stored on the server. "
+"Those informations will not be divulged to anyone without the user explicit "
+"permission."
+msgstr ""
+"Pour publier un itinéraire, vous devez tout d'abord créer un compte. Un "
+"email valide est demandé, et l'adresse ip de création du compte est "
+"enregistrée sur le serveur. Ces informations ne seront divulguées à personne "
+"sans la permission explicite de l'utilisateur."
 
 #: application/views/scripts/termsofuse/index.phtml:11
-msgid "When you create a route, you accept that it's available under a <a href=\"http://creativecommons.org/licenses/by/2.0/\">creative commons <strong>by</strong> license</a>. This means you accept that anyone can reproduce and republish your itinerary, or a modified version of it, under the condition that he specify the proper creator of this work. This also means you need to get appropriate permissions from the creator if you want to upload a route you didn't create yourself."
-msgstr "Lorsque vous créez un itinéraire, vous acceptez qu'il soit disponible sous <a href=\"http://creativecommons.org/licenses/by/2.0/\">licence creative commons <strong>by</strong></a>. Cela veut dire que n'importe qui peut reproduire et redistribuer votre itinéraire, ou une version modifiée de celui-ci, à la condition qu'il indique correctement l'auteur de l'œuvre.  Cela veut également dire que vous devez obtenir les autorisations nécessaires si vous voulez publier un itinéraire dont vous n'êtes pas l'auteur."
+msgid ""
+"When you create a route, you accept that it's free for any use. This means "
+"you accept that anyone can reuse, reproduce, or republish your itinerary, or "
+"a modified version of it for any purpose. This also means you need to get "
+"appropriate permissions from the creator if you want to upload a route you "
+"didn't create yourself."
+msgstr ""
+"Lorsque vous créez un itinéraire, vous acceptez qu'il soit utilisable sans "
+"restriction. Cela veut dire que n'importe qui peut réutiliser, reproduire ou "
+"redistribuer votre itinéraire, ou une version modifiée de celui-ci, et pour "
+"n'importe quel usage. Cela veut également dire que vous devez obtenir les "
+"autorisations nécessaires si vous voulez publier un itinéraire dont vous "
+"n'êtes pas l'auteur."
 
 #: application/views/scripts/termsofuse/index.phtml:15
-msgid "Show Your Journey is not responsible for the accuracy of the routes published.  It's the user responsibility to check that a route is accessible and safe."
-msgstr "Show Your Journey n'est pas responsable de l'exactitude des itinéraires publiés. Il appartient à l'utilisateur de vérifier qu'un chemin est praticable et sécurisé."
+msgid ""
+"Show Your Journey is not responsible for the accuracy of the routes "
+"published. It's the user responsibility to check that a route is accessible "
+"and safe."
+msgstr ""
+"Show Your Journey n'est pas responsable de l'exactitude des itinéraires "
+"publiés. Il appartient à l'utilisateur de vérifier qu'un chemin est "
+"praticable et sécurisé."
 
 #: application/views/scripts/termsofuse/index.phtml:19
-msgid "Show Your Journey service is provided \"as is\" with no guarantee for accuracy or accessibility."
-msgstr "Show Your Journey est proposé sans garantie de fiabilité ou de disponibilité."
+msgid ""
+"Show Your Journey service is provided \"as is\" with no guarantee for "
+"accuracy or accessibility."
+msgstr ""
+"Show Your Journey est proposé sans garantie de fiabilité ou de disponibilité."
 
 #: application/views/scripts/termsofuse/index.phtml:23
-msgid "Sources of the software running the website are <a href=\"http://dev.renevier.net/?p=syj.git\">publicly available</a> under a agpl license. The map used to display the routes comes from <a href=\"http://www.openstreetmap.org/\">openstreetmap</a>."
-msgstr "Les sources du logiciel qui fait tourner le site web sont <a href=\"http://dev.renevier.net/?p=syj.git\">disponibles publiquement</a> sous une licence agpl. La carte utilisée pour l'affichage des itinéraires vient d'<a href=\"http://www.openstreetmap.org/\">openstreetmap</a>."
+msgid ""
+"Sources of the software running the website are <a href=\"http://dev."
+"renevier.net/?p=syj.git\">publicly available</a> under a agpl license. The "
+"map used to display the routes comes from <a href=\"http://www.openstreetmap."
+"org/\">openstreetmap</a>."
+msgstr ""
+"Les sources du logiciel qui fait tourner le site web sont <a href=\"http://"
+"dev.renevier.net/?p=syj.git\">disponibles publiquement</a> sous une licence "
+"agpl. La carte utilisée pour l'affichage des itinéraires vient d'<a href="
+"\"http://www.openstreetmap.org/\">openstreetmap</a>."
 
 #: application/views/scripts/newpwd/success.phtml:4
-#: application/controllers/IdxController.php:106
+#: application/controllers/IdxController.php:102
 msgid "A link to reset your password has been emailed to you"
-msgstr "Un email contenant un lien pour réinitialiser votre mot de passe vous a été envoyé"
+msgstr ""
+"Un email contenant un lien pour réinitialiser votre mot de passe vous a été "
+"envoyé"
 
 #: application/views/scripts/pending/password_cancel.phtml:12
 msgid "You have canceled the request."
@@ -144,8 +197,14 @@ msgstr "vous connecter"
 
 #: application/views/scripts/pending/password_validate.phtml:15
 #, php-format
-msgid "Your new password is now <strong>%s</strong>. You can %s with this new password. Don't forget to change it again to a personal password as soon as possible."
-msgstr "Votre nouveau mot de passe est <strong>%s</strong>. Vous pouvez %s avec le nouveau mot de passe. N'oubliez pas de le rechanger le plus tôt possible pour utiliser un mot de passe personnel."
+msgid ""
+"Your new password is now <strong>%s</strong>. You can %s with this new "
+"password. Don't forget to change it again to a personal password as soon as "
+"possible."
+msgstr ""
+"Votre nouveau mot de passe est <strong>%s</strong>. Vous pouvez %s avec le "
+"nouveau mot de passe. N'oubliez pas de le rechanger le plus tôt possible "
+"pour utiliser un mot de passe personnel."
 
 #: application/views/scripts/account/success.phtml:4
 msgid "Your account was modified successfully"
@@ -178,13 +237,15 @@ msgstr "[SYJ] Réinitialisation de votre mot de passe"
 msgid ""
 "Hi %user%,\n"
 "\n"
-"Someone, probably you, has asked to reset your password. If you want to reset\n"
+"Someone, probably you, has asked to reset your password. If you want to "
+"reset\n"
 "your password, please follow this link:\n"
 "%hashurl%\n"
 "\n"
 "If you do not not confirm within 2 days, your password will not be reset.\n"
 "\n"
-"Please do not reply this email. If you need to contact us, please use the form\n"
+"Please do not reply this email. If you need to contact us, please use the "
+"form\n"
 "contact at %contacturl%\n"
 "\n"
 "Thanks,\n"
@@ -200,7 +261,8 @@ msgstr ""
 "Si vous n'avez pas confirmé d'ici 2 jours, votre mot de passe ne sera pas\n"
 "réinitialisé.\n"
 "\n"
-"Veuillez ne pas répondre à cet email. Si vous avez besoin de nous contacter,\n"
+"Veuillez ne pas répondre à cet email. Si vous avez besoin de nous "
+"contacter,\n"
 "merci d'utiliser le formulaire à l'adresse suivante:\n"
 "%contacturl%\n"
 "\n"
@@ -216,14 +278,17 @@ msgstr "[SYJ] Validation de la création du compte"
 msgid ""
 "Hi %user%, and welcome on syj\n"
 "\n"
-"Your account is currently active, but you need to confirm your inscription by\n"
+"Your account is currently active, but you need to confirm your inscription "
+"by\n"
 "following this link:\n"
 "%hashurl%\n"
 "\n"
-"If you do not not confirm your inscription within 7 days, your account and all\n"
+"If you do not not confirm your inscription within 7 days, your account and "
+"all\n"
 "your items will be deleted.\n"
 "\n"
-"Please do not reply this email. If you need to contact us, please use the form\n"
+"Please do not reply this email. If you need to contact us, please use the "
+"form\n"
 "contact at %contacturl%\n"
 "\n"
 "Thanks,\n"
@@ -236,10 +301,12 @@ msgstr ""
 "suivant ce lien:\n"
 "%hashurl%\n"
 "\n"
-"Si vous ne confirmez pas votre inscription d'ici 7 jours, votre compte ainsi que\n"
+"Si vous ne confirmez pas votre inscription d'ici 7 jours, votre compte ainsi "
+"que\n"
 "toutes vos modifications seront supprimés.\n"
 "\n"
-"Veuillez ne pas répondre à cet email. Si vous avez besoin de nous contacter,\n"
+"Veuillez ne pas répondre à cet email. Si vous avez besoin de nous "
+"contacter,\n"
 "merci d'utiliser le formulaire à l'adresse suivante:\n"
 "%contacturl%\n"
 "\n"
@@ -259,7 +326,8 @@ msgid ""
 "account will be deleted tomorrow. Please follow this link:\n"
 "%hashurl%\n"
 "\n"
-"Please do not reply this email. If you need to contact us, please use the form\n"
+"Please do not reply this email. If you need to contact us, please use the "
+"form\n"
 "contact at %contacturl%\n"
 "\n"
 "Thanks,\n"
@@ -272,7 +340,8 @@ msgstr ""
 "validez pas, il sera supprimé demain. Merci de suivre ce lien:\n"
 "%hashurl%\n"
 "\n"
-"VVeuillez ne pas répondre à cet email. Si vous avez besoin de nous contacter,\n"
+"VVeuillez ne pas répondre à cet email. Si vous avez besoin de nous "
+"contacter,\n"
 "merci d'utiliser le formulaire à l'adresse suivante:\n"
 "%contacturl%\n"
 "\n"
@@ -288,11 +357,13 @@ msgstr "[SYJ] Compte désactivé"
 msgid ""
 "Hi %user%,\n"
 "\n"
-"You have not validated your syj account on time. Therefore, your account and\n"
+"You have not validated your syj account on time. Therefore, your account "
+"and\n"
 "all your data have been deleted. Nevertheless, you can still create a new\n"
 "account.\n"
 "\n"
-"Please do not reply this email. If you need to contact us, please use the form\n"
+"Please do not reply this email. If you need to contact us, please use the "
+"form\n"
 "contact at %contacturl%\n"
 "\n"
 "Regards,\n"
@@ -305,14 +376,15 @@ msgstr ""
 "vous données ont donc été supprimés. Vous pouvez toujours recréer\n"
 "un nouveau compte.\n"
 "\n"
-"Veuillez ne pas répondre à cet email. Si vous avez besoin de nous contacter,\n"
+"Veuillez ne pas répondre à cet email. Si vous avez besoin de nous "
+"contacter,\n"
 "merci d'utiliser le formulaire à l'adresse suivante:\n"
 "%contacturl%\n"
 "\n"
 "L'équipe de Syj"
 
 #: application/controllers/LoginController.php:101
-#: application/controllers/IdxController.php:92
+#: application/controllers/IdxController.php:90
 msgid "you must enter a login name"
 msgstr "vous devez entrer un nom d'utilisateur"
 
@@ -356,8 +428,7 @@ msgid "Value is required and can't be empty"
 msgstr "Le champ est requis, et ne doit pas être vide"
 
 #: application/controllers/ContactController.php:123
-#: application/forms/Contact.php:32
-#: application/validate/EmailAddress.php:13
+#: application/forms/Contact.php:32 application/validate/EmailAddress.php:13
 msgid "Invalid email"
 msgstr "Email invalide"
 
@@ -366,8 +437,7 @@ msgid "Oups, something went wrong"
 msgstr "Oups, il y a eu un souci"
 
 #: application/controllers/TermsofuseController.php:12
-#: application/layouts/scripts/footer.phtml:67
-#: application/forms/User.php:41
+#: application/layouts/scripts/footer.phtml:67 application/forms/User.php:41
 msgid "terms of use"
 msgstr "conditions d'utilisation"
 
@@ -381,19 +451,18 @@ msgid "Wrong password"
 msgstr "Mauvais mot de passe"
 
 #: application/controllers/AccountController.php:56
-#: application/controllers/IdxController.php:104
+#: application/controllers/IdxController.php:100
 msgid "an user is already registered with this email"
 msgstr "il y'a déjà un utilisateur enregistré avec cet email"
 
 #: application/controllers/AccountController.php:84
-#: application/controllers/IdxController.php:98
+#: application/controllers/IdxController.php:94
 #: application/forms/Account.php:40
 msgid "Password do not match"
 msgstr "Les mots de passe ne correspondent pas"
 
 #: application/controllers/AccountController.php:85
-#: application/forms/Account.php:33
-#: application/forms/User.php:18
+#: application/forms/Account.php:33 application/forms/User.php:18
 #, php-format
 msgid "At least %d characters"
 msgstr "Au moins %d caractères"
@@ -402,87 +471,88 @@ msgstr "Au moins %d caractères"
 msgid "You have made no change"
 msgstr "Vous n'avez fait aucun changement"
 
-#: application/controllers/IdxController.php:85
+#: application/controllers/IdxController.php:83
 msgid "save took place successfully"
 msgstr "La sauvegarde s'est déroulée correctement"
 
-#: application/controllers/IdxController.php:86
-msgid "server did not understood request. That's probably caused by a bug in SYJ"
-msgstr "Le serveur n'a pas compris la requête. Il s'agit probablement d'un bug dans SYJ"
+#: application/controllers/IdxController.php:84
+msgid ""
+"server did not understood request. That's probably caused by a bug in SYJ"
+msgstr ""
+"Le serveur n'a pas compris la requête. Il s'agit probablement d'un bug dans "
+"SYJ"
 
-#: application/controllers/IdxController.php:87
+#: application/controllers/IdxController.php:85
 msgid "path did not exist in the server. May be it has been already deleted"
 msgstr "Le chemin n'existait pas sur le serveur. Il a peut-être supprimé"
 
-#: application/controllers/IdxController.php:88
-msgid "similar path seems to already exist. Please do not create two exactly identical paths"
-msgstr "Il semble qu'il y ait déjà un chemin similaire. Veuillez ne pas créer deux chemins exactement identiques"
+#: application/controllers/IdxController.php:86
+msgid ""
+"similar path seems to already exist. Please do not create two exactly "
+"identical paths"
+msgstr ""
+"Il semble qu'il y ait déjà un chemin similaire. Veuillez ne pas créer deux "
+"chemins exactement identiques"
 
-#: application/controllers/IdxController.php:89
+#: application/controllers/IdxController.php:87
 msgid "server could not be reached"
 msgstr "serveur inaccessible"
 
-#: application/controllers/IdxController.php:90
+#: application/controllers/IdxController.php:88
 msgid "there was a server error"
 msgstr "Il s'est produit une erreur serveur"
 
-#: application/controllers/IdxController.php:91
+#: application/controllers/IdxController.php:89
 msgid "there was an unknown error"
 msgstr "Il s'est produit une erreur inconnue"
 
-#: application/controllers/IdxController.php:93
+#: application/controllers/IdxController.php:91
 msgid "Login correct"
 msgstr "Vous êtes connectés"
 
-#: application/controllers/IdxController.php:94
+#: application/controllers/IdxController.php:92
 msgid "Wrong login/password"
 msgstr "Mauvais nom d'utilisateur ou mot de passe"
 
-#: application/controllers/IdxController.php:95
-msgid "You need to login before retrying to save"
-msgstr "Vous devez vous connecter avant de réesayer de sauvegarder"
-
-#: application/controllers/IdxController.php:96
-msgid "You need to have cookies enabled to login to SYJ"
-msgstr "Vous devez activer les cookies pour pouvoir vous connecter à SYJ"
-
-#: application/controllers/IdxController.php:97
+#: application/controllers/IdxController.php:93
 msgid "you must enter a password"
 msgstr "vous devez entrer un mot de passe"
 
-#: application/controllers/IdxController.php:99
+#: application/controllers/IdxController.php:95
 msgid "You must accept terms of use"
 msgstr "Vous devez accepter les conditions d'utilisation"
 
-#: application/controllers/IdxController.php:100
+#: application/controllers/IdxController.php:96
 msgid "you must enter an email"
 msgstr "vous devez entrer un email"
 
-#: application/controllers/IdxController.php:101
+#: application/controllers/IdxController.php:97
 msgid "invalid email"
 msgstr "email invalide"
 
-#: application/controllers/IdxController.php:102
+#: application/controllers/IdxController.php:98
 msgid "pseudo must only contain letters, digits, dots or underscores"
-msgstr "le pseudo ne peut contenir que des lettres, des chiffres, des points ou des soulignés"
+msgstr ""
+"le pseudo ne peut contenir que des lettres, des chiffres, des points ou des "
+"soulignés"
 
-#: application/controllers/IdxController.php:103
+#: application/controllers/IdxController.php:99
 msgid "unavailable pseudo"
 msgstr "pseudo non disponible"
 
-#: application/controllers/IdxController.php:105
+#: application/controllers/IdxController.php:101
 msgid "Account created"
 msgstr "Compte créé"
 
-#: application/controllers/IdxController.php:107
+#: application/controllers/IdxController.php:103
 msgid "Now, you can retry to save"
 msgstr "Maintenant, vous pouvez réessayer de sauvegarder"
 
-#: application/controllers/IdxController.php:108
+#: application/controllers/IdxController.php:104
 msgid "route by"
 msgstr "tracé par"
 
-#: application/controllers/IdxController.php:109
+#: application/controllers/IdxController.php:105
 msgid "Map by <a href='http://openstreetmap.org/'>OpenStreetMap</a>"
 msgstr "Carte par <a href='http://openstreetmap.org/'>OpenStreetMap</a>"
 
@@ -498,8 +568,7 @@ msgstr "contact"
 msgid "user"
 msgstr "utilisateur"
 
-#: application/forms/Login.php:10
-#: application/forms/Account.php:35
+#: application/forms/Login.php:10 application/forms/Account.php:35
 #: application/forms/User.php:21
 msgid "password"
 msgstr "mot de passe"
@@ -541,14 +610,12 @@ msgstr "titre facultatif pour ce trajet"
 msgid "save"
 msgstr "enregistrer"
 
-#: application/forms/Account.php:27
-#: application/forms/User.php:34
+#: application/forms/Account.php:27 application/forms/User.php:34
 #: application/forms/Newpwd.php:28
 msgid "email"
 msgstr "email"
 
-#: application/forms/Account.php:42
-#: application/forms/User.php:28
+#: application/forms/Account.php:42 application/forms/User.php:28
 msgid "confirm password"
 msgstr "confirmation du mot de passe"
 
@@ -565,8 +632,14 @@ msgid "user name"
 msgstr "nom d'utilisateur"
 
 #: application/forms/User.php:35
-msgid "After creating your account, you will receive a confirmation email. You have 7 days to confirm otherwise, your account and your routes will all be deleted."
-msgstr "Après la création de votre compte, vous recevrez un mail de confirmation. Vous avez 7 jours pour confirmer sinon, votre compte et tous vos tracés seront supprimés."
+msgid ""
+"After creating your account, you will receive a confirmation email. You have "
+"7 days to confirm otherwise, your account and your routes will all be "
+"deleted."
+msgstr ""
+"Après la création de votre compte, vous recevrez un mail de confirmation. "
+"Vous avez 7 jours pour confirmer sinon, votre compte et tous vos tracés "
+"seront supprimés."
 
 #: application/forms/User.php:42
 #, php-format
@@ -579,8 +652,13 @@ msgstr "créer le compte"
 
 #: application/forms/Pending/ResetPassword.php:11
 #, php-format
-msgid "Hi %s. Someone, probably you, has asked to reset password for your account. To get a new password, validate with following button."
-msgstr "Bonjour %s. Quelqu'un, probablement vous, a demandé de réinitialiser le mot de passe de votre compte. Pour avoir un nouveau mot de passe, validez avec le bouton suivant."
+msgid ""
+"Hi %s. Someone, probably you, has asked to reset password for your account. "
+"To get a new password, validate with following button."
+msgstr ""
+"Bonjour %s. Quelqu'un, probablement vous, a demandé de réinitialiser le mot "
+"de passe de votre compte. Pour avoir un nouveau mot de passe, validez avec "
+"le bouton suivant."
 
 #: application/forms/Pending/ResetPassword.php:16
 #: application/forms/Newpwd.php:33
@@ -592,21 +670,40 @@ msgid "cancel request"
 msgstr "annuler la requête"
 
 #: application/forms/Pending/ResetPassword.php:24
-msgid "To cancel this request, press following button. Your password will not change."
-msgstr "Pour annuler la requête, pressez le bouton suivant. Votre mot de passe ne sera pas changé."
+msgid ""
+"To cancel this request, press following button. Your password will not "
+"change."
+msgstr ""
+"Pour annuler la requête, pressez le bouton suivant. Votre mot de passe ne "
+"sera pas changé."
 
 #: application/forms/Pending/ValidateCreation.php:11
 #, php-format
-msgid "Someone, probably you, has registered an account %s with email address %s on syj. To confirm this account creation, validate with following button."
-msgstr "Quelqu'un, probablement vous, a enregistré un compte %s avec l'adresse email %s sur syj. Pour confirmer la création du compte, validez avec le bouton suivant."
+msgid ""
+"Someone, probably you, has registered an account %s with email address %s on "
+"syj. To confirm this account creation, validate with following button."
+msgstr ""
+"Quelqu'un, probablement vous, a enregistré un compte %s avec l'adresse email "
+"%s sur syj. Pour confirmer la création du compte, validez avec le bouton "
+"suivant."
 
 #: application/forms/Pending/ValidateCreation.php:23
 msgid "delete"
 msgstr "supprimer"
 
 #: application/forms/Pending/ValidateCreation.php:24
-msgid "To cancel account creation, press following button. The account and all its data will be deleted."
-msgstr "Pour annuler la création du compte, pressez le bouton suivant. Le compte ainsi que toutes ses données seront supprimés."
+msgid ""
+"To cancel account creation, press following button. The account and all its "
+"data will be deleted."
+msgstr ""
+"Pour annuler la création du compte, pressez le bouton suivant. Le compte "
+"ainsi que toutes ses données seront supprimés."
+
+#~ msgid "You need to login before retrying to save"
+#~ msgstr "Vous devez vous connecter avant de réesayer de sauvegarder"
+
+#~ msgid "You need to have cookies enabled to login to SYJ"
+#~ msgstr "Vous devez activer les cookies pour pouvoir vous connecter à SYJ"
 
 #~ msgid "main page"
 #~ msgstr "page d'accueil"
@@ -614,4 +711,3 @@ msgstr "Pour annuler la création du compte, pressez le bouton suivant. Le compt
 #, fuzzy
 #~ msgid "reset password"
 #~ msgstr "Réinitialiser mon mot de passe"
-
index 41706e4f58d3bc736c6efc663bc5071a9d8743af..1041a7f597ef90c22aba793847eeb1f692db07c5 100644 (file)
@@ -6,9 +6,10 @@ class Syj_Model_Path extends Syj_Model_Generic
 {
     protected $_id;
     protected $_geom;
-    protected $_owner;
+    protected $_creator;
     protected $_title;
     protected $_urlcomp;
+    protected $_creator_ip;
 
     public function setId($id) {
         $this->_id = (int) $id;
@@ -28,13 +29,20 @@ class Syj_Model_Path extends Syj_Model_Generic
         return $this->_geom;
     }
 
-    public function setOwner(Syj_Model_User $owner) {
-        $this->_owner = $owner;
+    public function setCreator(Syj_Model_User $creator = null) {
+        $this->_creator = $creator;
         return $this;
     }
 
-    public function getOwner() {
-        return $this->_owner;
+    public function getCreator() {
+        return $this->_creator;
+    }
+
+    public function isCreator(Syj_Model_User $creator = null) {
+        if (!$creator or !$this->creator) {
+            return false;
+        }
+        return ($creator->id == $this->creator->id);
     }
 
     public function setTitle($title) {
@@ -65,4 +73,13 @@ class Syj_Model_Path extends Syj_Model_Generic
         return $this->_urlcomp;
     }
 
+    public function setCreatorIp($_creator_ip) {
+        $this->_creator_ip = (string) $_creator_ip;
+        return $this;
+    }
+
+    public function getCreatorIp() {
+        return $this->_creator_ip;
+    }
+
 }
index 01e2818f567bb42524f66309fc61eeac2f45f35d..c89936455905e9c060110665e9d194b864d6adb2 100644 (file)
@@ -58,8 +58,9 @@ class Syj_Model_PathMapper
     public function save (Syj_Model_Path $path) {
         $data = array(
             'geom'=> (string)$path->geom,
-            'owner'=> $path->owner->id,
-            'title'=> $path->title
+            'creator'=> $path->creator->id,
+            'title'=> $path->title,
+            'creator_ip'=> $path->creatorIp
         );
         if (null === ($id = $path->getId())) {
             $path->id = $this->getDbTable()->insert($data);
@@ -75,13 +76,14 @@ class Syj_Model_PathMapper
         $item->setId($row->id)->
             setGeom($geom)->
             setTitle($row->title)->
-            setUrlComp($row->urlcomp);
+            setUrlComp($row->urlcomp)->
+            setCreatorIp($row->creator_ip);
 
-        if (!$item->getOwner()) {
+        if (!$item->getCreator()) {
             $user = new Syj_Model_User();
             $userMapper = new Syj_Model_UserMapper();
-            if ($userMapper->find($row->owner, $user)) {
-                $item->setOwner($user);
+            if ($userMapper->find($row->creator, $user)) {
+                $item->setCreator($user);
             }
         }
         return $item;
@@ -99,7 +101,7 @@ class Syj_Model_PathMapper
     protected function _select() {
         $table = $this->getDbTable();
         $select = $table->select();
-        $select->from($table, array('id', 'ST_AsText(geom) AS wkt', 'owner', 'title', 'urlcomp'));
+        $select->from($table, array('id', 'ST_AsText(geom) AS wkt', 'creator', 'title', 'urlcomp', 'creator_ip'));
         return $select;
     }
 
index 14d1588524c419bcbefae5744e8e7ef2b863b683..f541af3e7a8ef0dc464cf97cfe1f6a4d66000d02 100644 (file)
@@ -9,7 +9,6 @@ class Syj_Model_User extends Syj_Model_Generic
     protected $_password;
     protected $_email;
     protected $_lang;
-    protected $_creation_addr;
 
     public function setId($id) {
         $this->_id = (int) $id;
@@ -56,15 +55,6 @@ class Syj_Model_User extends Syj_Model_Generic
         return $this->_lang;
     }
 
-    public function setCreationAddr($creation_addr) {
-        $this->_creation_addr = (string) $creation_addr;
-        return $this;
-    }
-
-    public function getCreationAddr() {
-        return $this->_creation_addr;
-    }
-
     public function notifyPendings() {
         $pendingMapper = new Syj_Model_PendingMapper();
         $pendings = $pendingMapper->fetchForUser($this);
index a4364a0106b5d59d2ef7d35be7c4514579360d08..67faea8e20a69f64c303258c8385c0d3de3b6604 100644 (file)
@@ -51,8 +51,7 @@ class Syj_Model_UserMapper
             ->setPassword($row->password)
             ->setPseudo($row->pseudo)
             ->setEmail($row->email)
-            ->setLang($row->lang)
-            ->setCreationAddr($row->creation_addr);
+            ->setLang($row->lang);
     }
 
     public function save (Syj_Model_User $user) {
@@ -60,8 +59,7 @@ class Syj_Model_UserMapper
             'pseudo'=> (string) $user->pseudo,
             'password'=> (string)$user->password,
             'email'=> (string) $user->email,
-            'lang'=> (string) $user->lang,
-            'creation_addr'=> (string) $user->creationAddr
+            'lang'=> (string) $user->lang
         );
         if (null === ($id = $user->getId())) {
             $user->id = $this->getDbTable()->insert($data);
index ddfe74479cf29f266c20b876ec2c53ee8e1cc404..55cae33cd7c8b2c877c2355074cb993ef078de67 100644 (file)
@@ -4,7 +4,7 @@
 
 class Syj_View_Helper_Anchor extends Zend_View_Helper_HtmlElement
 {
-    public function Anchor($href, $text = null, array $attribs=array()) {
+    public function Anchor($href, $text = null, array $attribs=array(), $escape = true) {
         $lang = Zend_Controller_Front::getInstance()->getRequest()->getQuery('lang');
         if ($lang) {
             $translator = Zend_Registry::get('Zend_Translate');
@@ -18,7 +18,8 @@ class Syj_View_Helper_Anchor extends Zend_View_Helper_HtmlElement
         if (!isset($text)) {
             $text = $href;
         }
-        $html = '<a' . $this->_htmlAttribs($attribs) . '>' . $this->view->escape($text) . '</a>';
+        $content = $escape ? $this->view->escape($text) : $text;
+        $html = '<a' . $this->_htmlAttribs($attribs) . '>' . $content . '</a>';
         return $html;
     }
 }
index ce8b6f72a24672673f513b4a4821f98df834b30c..7d0fe87fddc5c1064194ce970b664b819432c947 100644 (file)
         <div>
             <?php
                 echo $this->anchor('login', $this->translate('login'), array('id' => 'login_control_anchor', 'class' => 'login-anchor'));
-                echo $this->anchor('', $this->translate('create an account'), array('id' => 'user_control_anchor', 'class' => 'login-anchor'));
+                $anchortext = sprintf("%s<img id=\"account-info-bullet\" src=\"icons/bullet_arrow_right.png\"><span id=\"account-info\"><br>%s</span>",
+                                      $this->translate('create an account'),
+                                      $this->translate('Whith an account, you can manage and modify your routes'));
+                echo $this->anchor('', $anchortext, array('id' => 'user_control_anchor', 'class' => 'login-anchor'), false);
             ?>
         </div>
         <div>
index c8ed6f9f4198897e30e553ad030d8cb8400c3be7..f6ef416ecf35ef58dd0d3c14ec20cab303b5b32d 100644 (file)
@@ -4,15 +4,15 @@ echo $this->translate('Show Your Journey is a site whose goal is to allow anyone
 ?></p>
 
 <p><?php
-echo $this->translate('In order to publish a route, you must first create an account.  A valid email is asked for, and ip address of account creation is stored on the server. Those informations will not be divulged to anyone without the user explicit permission.');
+echo $this->translate('In order to publish a route, you must first create an account. A valid email is asked for, and ip address of account creation is stored on the server. Those informations will not be divulged to anyone without the user explicit permission.');
 ?></p>
 
 <p><?php
-echo $this->translate('When you create a route, you accept that it\'s available under a <a href="http://creativecommons.org/licenses/by/2.0/">creative commons <strong>by</strong> license</a>. This means you accept that anyone can reproduce and republish your itinerary, or a modified version of it, under the condition that he specify the proper creator of this work. This also means you need to get appropriate permissions from the creator if you want to upload a route you didn\'t create yourself.');
+echo $this->translate('When you create a route, you accept that it\'s free for any use. This means you accept that anyone can reuse, reproduce, or republish your itinerary, or a modified version of it for any purpose. This also means you need to get appropriate permissions from the creator if you want to upload a route you didn\'t create yourself.');
 ?></p>
 
 <p><?php
-echo $this->translate('Show Your Journey is not responsible for the accuracy of the routes published.  It\'s the user responsibility to check that a route is accessible and safe.');
+echo $this->translate('Show Your Journey is not responsible for the accuracy of the routes published. It\'s the user responsibility to check that a route is accessible and safe.');
 ?></p>
 
 <p><?php
index a0db8fded387ec5f11cc0e9bd4aca7d51a66e449..69a689e20d37f82e8ee121e0e7158b19ec979a9a 100644 (file)
@@ -89,6 +89,12 @@ body, html {
     background-color: #BBBBFF;
 }
 
+#account-info-bullet {
+    /* in firefox, in image inside an anchor has a border */
+    border: none;
+    vertical-align: middle;
+}
+
 /*
  * login rules
  */
diff --git a/public/icons/bullet_arrow_down.png b/public/icons/bullet_arrow_down.png
new file mode 100644 (file)
index 0000000..9b23c06
Binary files /dev/null and b/public/icons/bullet_arrow_down.png differ
diff --git a/public/icons/bullet_arrow_right.png b/public/icons/bullet_arrow_right.png
new file mode 100644 (file)
index 0000000..1ba2519
Binary files /dev/null and b/public/icons/bullet_arrow_right.png differ
index c19d30ee9abd763a444452884884e49f337f60e7..d479e559b749ae0d2918d58373af3354842604d7 100644 (file)
@@ -44,8 +44,7 @@ document.observe("dom:loaded", function() {
          * if there are errors, cancel submission
          */
         if (errorElements.length) {
-            errorElements[0].highlight('#F08080').focus();
-            errorElements[0].select();
+            errorElements[0].highlight('#F08080').activate();
             evt.stop();
         }
     });
index e41734110f7ca7426ef60a72459c6ef2048c1147..416d7457f4c9fb54b6c5e494410b7e853739b985 100644 (file)
@@ -25,8 +25,7 @@ document.observe("dom:loaded", function() {
          * if there are errors, cancel submission
          */
         if (errorElements.length) {
-            errorElements[0].highlight('#F08080').focus();
-            errorElements[0].select();
+            errorElements[0].highlight('#F08080').activate();
             evt.stop();
         }
     });
index 2721840d638d3a17177744ad7300db42c1f37c67..ee9dd9ca6f0043d4fd9993f2661f38a2caa093f2 100644 (file)
@@ -10,8 +10,7 @@ document.observe("dom:loaded", function() {
         $$('.error').invoke('remove');
 
         if (!loginput.check(function() { return !this.value.strip().empty(); }, SyjStrings.userEmptyWarn)) {
-            loginput.highlight('#F08080').focus();
-            loginput.select();
+            loginput.highlight('#F08080').activate();
             evt.stop();
             return;
         }
index 02f402385bf0f3c4ad3b03f4513f4f453474f208..388ee08c69495060573952dfcb337467a4889eb6 100644 (file)
@@ -16,16 +16,14 @@ document.observe("dom:loaded", function() {
         tofocus = $$('form input:not([readonly],[disabled])')[0];
     }
     if (tofocus) {
-        tofocus.focus();
-        tofocus.select();
+        tofocus.activate();
     }
 
     $("newpwdform").observe('submit', function(evt) {
         $$('.error').invoke('remove');
         if ($('newpwd_email').value.strip().empty()) {
             insertErrorBefore($('newpwdform').select('table')[0], SyjStrings.notEmptyField);
-            $('newpwd_email').highlight('#F08080').focus();
-            $('newpwd_email').select();
+            $('newpwd_email').highlight('#F08080').activate();
             evt.stop();
         }
     });
index db4259e497c33389df77c19349749c79deb29650..65f6897fbd40f9d6d38f0ef922a1cfdd7029d71c 100644 (file)
@@ -4,7 +4,7 @@ Element.addMethods('input', {
     observe : Element.Methods.observe.wrap(function(proceed, element, eventName, handler) {
         if (eventName === "contentchange") {
             proceed(element, 'keyup', function(evt) {
-                if (evt.keyCode == 13) {
+                if (evt.keyCode === 13) {
                     return;
                 }
                 handler.apply(null, arguments);
@@ -47,8 +47,7 @@ var SyjSaveUI = {
         }
         this.enableSubmit();
         $("geom_title").disabled = false;
-        $("geom_title").focus();
-        $("geom_title").select();
+        $("geom_title").activate();
         $("geomform").removeClassName("disabled");
         this.status = "enabled";
         return this;
@@ -253,8 +252,8 @@ var SYJView = {
         layerOptions = {format:     OpenLayers.Format.WKT,
                         projection: WGS84,
                         styleMap:   styleMap.view};
-        if (gLoggedInfo.ownername) {
-            layerOptions.attribution = SyjStrings.routeBy + ' ' + '<strong>' + gLoggedInfo.ownername + '</strong>';
+        if (gLoggedInfo.creatorname) {
+            layerOptions.attribution = SyjStrings.routeBy + ' ' + '<strong>' + gLoggedInfo.creatorname + '</strong>';
         }
 
         this.viewLayer = new OpenLayers.Layer.Vector("View Layer", layerOptions);
@@ -308,6 +307,13 @@ var SYJView = {
     },
 
     prepareForm: function(form) {
+        if (!loginMgr.logged && !$("geom_accept").checked) {
+            this.messenger.setMessage(SyjStrings.acceptTermsofuseWarn, "warn");
+            $("geom_accept_container").highlight('#F08080');
+            $("geom_accept").activate();
+            return false;
+        }
+
         var line, realPoints, idx, handler;
 
         line = new OpenLayers.Geometry.LineString();
@@ -328,6 +334,7 @@ var SYJView = {
         this.needsFormResubmit = false;
         SyjSaveUI.disable.bind(SyjSaveUI).defer();
         this.messenger.hide();
+        return true;
     },
 
     editMode: function() {
@@ -434,16 +441,6 @@ var SYJView = {
                     }
                 }
             break;
-            case 403:
-                message = "";
-                this.needsFormResubmit = true;
-                if (loginMgr.hasAlreadyConnected()) {
-                    SYJLogin.messenger.setMessage(SyjStrings.cookiesNeeded, "warn");
-                } else {
-                    SYJLogin.messenger.setMessage(SyjStrings.loginNeeded, "warn");
-                }
-                SYJLogin.modalbox.show();
-            break;
             case 500:
                 message = SyjStrings.serverError;
                 this.needsFormResubmit = true;
@@ -492,7 +489,7 @@ var SYJModalClass = Class.create({
     checkNotEmpty: function(input, message) {
         if ($(input).value.strip().empty()) {
             this.messenger.setMessage(message, "warn");
-            $(input).highlight('#F08080').focus();
+            $(input).highlight('#F08080').activate();
             return false;
         }
         return true;
@@ -506,8 +503,7 @@ var SYJModalClass = Class.create({
             if (simplebox === this.modalbox) {
                 input = this.area.select('input[type="text"]')[0];
                 (function () {
-                    input.focus();
-                    input.select();
+                    input.activate();
                 }).defer();
             } else {
                 this.modalbox.hide();
@@ -544,8 +540,7 @@ var SYJModalClass = Class.create({
 
         this.messenger.setMessage(message, "error");
         input = this.area.select('input[type="text"]')[0];
-        input.highlight('#F08080').focus();
-        input.select();
+        input.highlight('#F08080').activate();
     },
 
     reset: function() {
@@ -562,7 +557,7 @@ var SYJUserClass = Class.create(SYJModalClass, {
         $super();
         $("termsofusearea").hide();
 
-        $("user_termsofuse_anchor").observe("click", function(evt) {
+        $$("#user_termsofuse_anchor, #geom_termsofuse_anchor").invoke('observe', "click", function(evt) {
             if (!this.toubox) {
                 $("termsofusearea").show();
                 $("termsofuseiframe").setAttribute("src", evt.target.href);
@@ -587,6 +582,19 @@ var SYJUserClass = Class.create(SYJModalClass, {
                 $("user_password-desc").setMessageStatus("success");
             }
         }.bindAsEventListener(this));
+
+        $("account-info").hide();
+        $("account-info-bullet").observe('click', function(evt) {
+            var elt = $("account-info");
+            if (elt.visible()) {
+                evt.target.src = "icons/bullet_arrow_right.png";
+                elt.hide();
+            } else {
+                evt.target.src = "icons/bullet_arrow_down.png";
+                elt.show();
+            }
+            evt.stop();
+        });
     },
 
     presubmit: function() {
@@ -596,8 +604,7 @@ var SYJUserClass = Class.create(SYJModalClass, {
 
         if (!($("user_pseudo").value.match(/^[a-zA-Z0-9_.]+$/))) {
             this.messenger.setMessage(SyjStrings.invalidPseudo, "warn");
-            $("user_pseudo").highlight('#F08080').focus();
-            $("user_pseudo").select();
+            $("user_pseudo").highlight('#F08080').activate();
             return false;
         }
 
@@ -607,15 +614,13 @@ var SYJUserClass = Class.create(SYJModalClass, {
 
         if ($("user_password").value.length < 6) {
             $("user_password-desc").setMessageStatus("warn");
-            $("user_password").highlight('#F08080').focus();
-            $("user_password").select();
+            $("user_password").highlight('#F08080').activate();
             return false;
         }
 
         if ($("user_password").value !== $("user_password_confirm").value) {
             this.messenger.setMessage(SyjStrings.passwordNoMatchWarn, "warn");
-            $("user_password").highlight('#F08080').focus();
-            $("user_password").select();
+            $("user_password").highlight('#F08080').activate();
             return false;
         }
 
@@ -625,7 +630,8 @@ var SYJUserClass = Class.create(SYJModalClass, {
 
         if (!$("user_accept").checked) {
             this.messenger.setMessage(SyjStrings.acceptTermsofuseWarn, "warn");
-            $("user_accept").highlight('#F08080').focus();
+            $("user_accept_container").highlight('#F08080');
+            $("user_accept").activate();
             return false;
         }
 
@@ -639,7 +645,7 @@ var SYJUserClass = Class.create(SYJModalClass, {
         this.modalbox.hide();
         if (SYJView.needsFormResubmit) {
             SYJView.messenger.addMessage(SyjStrings.canResubmit);
-            $("geom_submit").focus();
+            $("geom_submit").activate();
         }
     },
 
@@ -677,8 +683,7 @@ var SYJUserClass = Class.create(SYJModalClass, {
         if (message) {
             this.messenger.setMessage(message, "error");
             if (focusInput) {
-                focusInput.highlight('#F08080').focus();
-                focusInput.select();
+                focusInput.highlight('#F08080').activate();
             }
             return;
         }
@@ -714,7 +719,7 @@ var SYJLoginClass = Class.create(SYJModalClass, {
         this.modalbox.hide();
         if (SYJView.needsFormResubmit) {
             SYJView.messenger.addMessage(SyjStrings.canResubmit);
-            $("geom_submit").focus();
+            $("geom_submit").activate();
         }
     },
 
@@ -738,8 +743,7 @@ var SYJLoginClass = Class.create(SYJModalClass, {
         if (message) {
             this.messenger.setMessage(message, "error");
             if (focusInput) {
-                focusInput.highlight('#F08080').focus();
-                focusInput.select();
+                focusInput.highlight('#F08080').activate();
             }
             return;
         }
@@ -776,30 +780,25 @@ var loginMgr = Object.extend(gLoggedInfo, {
         }
         if (this.logged) {
             this.controlsdeck.setIndex(1);
+            $("geom_accept_container").hide();
         } else {
             this.controlsdeck.setIndex(0);
+            $("geom_accept_container").show();
         }
 
-        if (this.isowner) {
+        if (this.iscreator) {
             $("data_controls").show();
         } else {
             $("data_controls").hide();
         }
     },
 
-    login: function(aIsOwner) {
-        if (typeof aIsOwner === "boolean") {
-            this.isowner = aIsOwner;
+    login: function(aIsCreator) {
+        if (typeof aIsCreator === "boolean") {
+            this.iscreator = aIsCreator;
         }
         this.logged = true;
-        this.connections++;
         this.updateUI();
-    },
-
-    // needed in case of 403 errors: if user has already connected successfully
-    // before, it probably means he has cookies disabled
-    hasAlreadyConnected: function() {
-        return (this.connections >= 1);
     }
 });
 
index d8696a0ceb611585f3edad6de827c3d9f331c663..3e10f5cc0bcca87c3d784319f64caebb5f9439df 100644 (file)
@@ -143,8 +143,7 @@ Element.addMethods('form', {
             if (error && (typeof tofocus.highlight === "function")) {
                 tofocus.highlight('#F08080');
             }
-            tofocus.focus();
-            tofocus.select();
+            tofocus.activate();
         }
     },
 
index 0d478078d00f110e530a3d5165bd51632b492c77..d4b21ef8c9d761bd15c42232302ed4206f0fe053 100644 (file)
@@ -1,23 +1,23 @@
 BEGIN;
 
-INSERT INTO users (password, pseudo, email, creation_addr, lang) VALUES
+INSERT INTO users (password, pseudo, email, lang) VALUES
     ('0b9c2625dc21ef05f6ad4ddf47c5f203837aa32c', -- sha1 of "toto"
-    'arno', 'arno@renevier.net', '127.0.0.1', 'fr');
+    'arno', 'arno@renevier.net', 'fr');
 
-INSERT INTO users (password, pseudo, email, creation_addr, lang) VALUES
+INSERT INTO users (password, pseudo, email, lang) VALUES
     ('0b9c2625dc21ef05f6ad4ddf47c5f203837aa32c', -- sha1 of "toto"
-    'user', 'user@renevier.net', '127.0.0.1', 'en');
+    'user', 'user@renevier.net', 'en');
 
-INSERT INTO paths (geom, owner, title) VALUES
+INSERT INTO paths (geom, creator, title, creator_ip) VALUES
     (ST_GeographyFromText ('SRID=4326;LINESTRING(2.437892 48.638297, 2.431111 48.643628, 2.436218 48.648108, 2.415104 48.660355)'),
-    1, 'ris-orangis');
+    1, 'ris-orangis', '127.0.0.1');
 
-INSERT INTO paths (geom, owner, title) VALUES
+INSERT INTO paths (geom, creator, title, creator_ip) VALUES
     (ST_GeographyFromText ('SRID=4326;LINESTRING(2.466474 48.649242, 2.459993 48.651766, 2.478619 48.656160, 2.462826 48.672883, 2.468061 48.690564)'),
-    1, 'Forêt de Sénart');
+    1, 'Forêt de Sénart', '127.0.0.1');
 
-INSERT INTO paths (geom, owner, title, urlcomp) VALUES
+INSERT INTO paths (geom, creator, title, urlcomp, creator_ip) VALUES
     (ST_GeographyFromText ('SRID=4326; LINESTRING(2.452204 48.634880, 2.453599 48.635745, 2.449908 48.637744, 2.448149 48.638595, 2.442999 48.642593, 2.440360 48.645500, 2.438471 48.646847, 2.436712 48.647938, 2.433729 48.650036, 2.423387 48.655877, 2.415297 48.660384, 2.417142 48.661659, 2.417700 48.662297, 2.417700 48.662921, 2.416434 48.663941, 2.415361 48.665018, 2.411671 48.671211, 2.410340 48.672585, 2.408237 48.674272, 2.407122 48.675717, 2.405341 48.677403, 2.403431 48.678933, 2.402251 48.680619, 2.401006 48.680605, 2.399504 48.680662, 2.397702 48.684189, 2.397294 48.684203, 2.395213 48.683849, 2.391522 48.684359, 2.392466 48.688057, 2.389891 48.688467, 2.386994 48.689402, 2.386029 48.689742, 2.386351 48.690280, 2.387445 48.690040, 2.389269 48.692589, 2.396221 48.699034, 2.399182 48.702206, 2.400384 48.703934, 2.401328 48.705718, 2.403173 48.710589, 2.404118 48.712288, 2.406478 48.714440, 2.408667 48.715459, 2.412915 48.718234, 2.417250 48.720527, 2.423215 48.722962, 2.428107 48.724123, 2.433043 48.724463, 2.440381 48.726246, 2.442688 48.727386, 2.441475 48.727754, 2.440048 48.727563, 2.441733 48.728518, 2.443042 48.728256, 2.445359 48.727860, 2.445037 48.727265, 2.444565 48.727449, 2.445724 48.729558, 2.445853 48.732163, 2.445917 48.735630, 2.444522 48.738460, 2.444673 48.738574, 2.443085 48.740229, 2.440810 48.741842, 2.437935 48.744984, 2.435575 48.748493, 2.428579 48.754774, 2.421241 48.760546, 2.414289 48.766628, 2.413559 48.769117, 2.413731 48.771521, 2.415104 48.773473, 2.415919 48.775481, 2.415962 48.776640, 2.422957 48.787160, 2.424116 48.789619, 2.423773 48.792418, 2.421498 48.796857, 2.420340 48.798270, 2.423601 48.798949, 2.428966 48.800164, 2.427936 48.800673, 2.427163 48.801521, 2.427721 48.802426, 2.428579 48.802765, 2.425833 48.806977, 2.422442 48.812064, 2.420254 48.815342, 2.419739 48.817037, 2.419953 48.824186, 2.422957 48.824130, 2.423429 48.824610, 2.426906 48.828622, 2.429094 48.831984, 2.430382 48.834696, 2.431326 48.835176, 2.432270 48.839921, 2.433043 48.841136, 2.434416 48.844921, 2.415361 48.846700, 2.414589 48.846982, 2.413816 48.846898, 2.396865 48.848423, 2.396007 48.848959, 2.395191 48.848592, 2.384119 48.850258, 2.380342 48.850286, 2.374763 48.851642, 2.369356 48.853223, 2.365150 48.853873, 2.360902 48.855172, 2.347941 48.858588, 2.340817 48.860960, 2.335238 48.862682, 2.335539 48.863247, 2.332363 48.870587, 2.323651 48.869203, 2.321806 48.866747, 2.321334 48.866296, 2.320261 48.864771, 2.313738 48.864912, 2.313437 48.862767, 2.310390 48.862597, 2.309961 48.857148, 2.303181 48.852800)'),
-        2, 'Convergence 2010 départ d''Évry', 'convergence_2010');
+        2, 'Convergence 2010 départ d''Évry', 'convergence_2010', '127.0.0.1');
 
 COMMIT;
index 5877f8c21f705f51db5c82ec0801d8cd913b4ee2..4c257b3861acb89457cc16067bd3917f540cbc5a 100644 (file)
@@ -10,8 +10,7 @@ CREATE TABLE users (
     pseudo VARCHAR(20) UNIQUE NOT NULL CHECK (pseudo ~ '^[a-zA-Z0-9_.]+$'),
     email VARCHAR(320) UNIQUE NOT NULL,
     lang VARCHAR(3),
-    creation_time TIMESTAMP NOT NULL DEFAULT NOW(),
-    creation_addr INET NOT NULL
+    creation_time TIMESTAMP NOT NULL DEFAULT NOW()
 );
 
 ---
@@ -101,21 +100,25 @@ DROP TABLE IF EXISTS paths CASCADE;
 CREATE TABLE paths (
     id INTEGER PRIMARY KEY DEFAULT nextval('paths_id_seq'),
     geom GEOGRAPHY (LINESTRING, 4326) NOT NULL,
-    owner INTEGER NOT NULL REFERENCES users ON DELETE CASCADE,
+    creator INTEGER REFERENCES users ON DELETE CASCADE,
+    creator_ip INET NOT NULL,
     title VARCHAR(40),
+    last_update TIMESTAMP NOT NULL DEFAULT NOW(),
     urlcomp VARCHAR(20) UNIQUE CHECK (urlcomp ~ '^[a-z][a-zA-Z0-9_]*$') -- ~: matches regular expression; case sensitive
 );
 
--- unique (geom, owner) constraint will not work: first because of postgis
--- #541; then because equality is checked by comparing bbox instead of real
--- geometries. So, we implement that constraint in a trigger
 CREATE OR REPLACE FUNCTION tg_paths_bu() RETURNS TRIGGER AS $$
 DECLARE res INTEGER;
 BEGIN
-    SELECT INTO res COUNT(*) FROM paths WHERE ST_AsBinary(geom) = ST_AsBinary(NEW.geom) AND owner = NEW.owner AND id != NEW.id;
+    SELECT INTO res COUNT(*) FROM paths WHERE ST_AsBinary(geom) = ST_AsBinary(NEW.geom) AND creator = NEW.creator AND id != NEW.id;
+    -- unique (geom, creator) constraint will not work: first because of postgis
+    -- #541; then because equality is checked by comparing bbox instead of real
+    -- geometries. So, we implement that constraint in a trigger
     IF res >= 1 THEN
         RAISE 'duplicate key paths_geom_key' using ERRCODE = 'unique_violation';
     ELSE
+        -- update last_update TIMESTAMP
+        NEW.last_update = NOW();
         RETURN NEW;
     END IF;
 END;