]> dev.renevier.net Git - syj.git/commitdiff
raw mode for termsofuse
authorarno <arno@renevier.net>
Sun, 15 Aug 2010 13:16:23 +0000 (15:16 +0200)
committerarno <arno@renevier.net>
Sun, 15 Aug 2010 13:16:23 +0000 (15:16 +0200)
application/controllers/TermsofuseController.php
application/forms/Geom.php
application/forms/User.php
application/views/scripts/termsofuse/index.phtml
public/js/termsofuse.js [deleted file]

index e1b8838b33332ddcd7d766b6c7ded1ccab3d1d81..928966ed5af11d71b5584072a4a3f796ded973fa 100644 (file)
@@ -7,8 +7,7 @@ class TermsofuseController extends Zend_Controller_Action
     public function indexAction() {
         $this->view->headLink()->appendStylesheet('css/generic.css');
         $this->view->headLink()->appendStylesheet('css/termsofuse.css');
-        $this->view->headScript()->appendFile('js/prototype.js');
-        $this->view->headScript()->appendFile('js/termsofuse.js');
         $this->view->headTitle($this->view->translate("terms of use"));
+        $this->view->rawmode = ($this->getRequest()->getQuery('format') == 'raw');
     }
 }
index b52e0719c3e6f98c7e57c0904124e06ec05840c2..61dde0ca1fb8af572470e0dce31ee20849eb2730 100644 (file)
@@ -21,7 +21,9 @@ class Syj_Form_Geom extends Zend_Form
             ));
 
         $translator = $this->getTranslator();
-        $anchor = $this->getView()->Anchor("termsofuse", $translator->translate("terms of use"), array('id' => 'geom_termsofuse_anchor'));
+        $anchor = $this->getView()->Anchor("termsofuse?format=raw",
+                                           $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,
index 34a5608701348a72385aba9821a65d4de0753fff..ca3a91b617887447f4f27eef93cfd2bbd8a47a61 100644 (file)
@@ -40,7 +40,9 @@ class Syj_Form_User extends Syj_Form_TableAbstract
 
         $this->setMainElements(array($name, $pass, $pass_confirm, $email));
 
-        $anchor = $this->getView()->Anchor("termsofuse", $translator->translate("terms of use"), array('id' => 'user_termsofuse_anchor'));
+        $anchor = $this->getView()->Anchor("termsofuse?format=raw",
+                                           $translator->translate("terms of use"),
+                                           array('id' => 'user_termsofuse_anchor'));
         $text = $translator->translate("I've read and accepted %s");
         $text = vsprintf($text, $anchor);
         $this->addElement('Checkbox', 'user_accept', array("label" => $text,
index f6ef416ecf35ef58dd0d3c14ec20cab303b5b32d..b558f230bcb8a4ab1196592c03ea8dcd2d1abf93 100644 (file)
@@ -1,4 +1,6 @@
-<?php echo $this->localeSwitcher(); ?>
+<?php if (!$this->rawmode) {
+    echo $this->localeSwitcher();
+}?>
 <p><?php
 echo $this->translate('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.');
 ?></p>
diff --git a/public/js/termsofuse.js b/public/js/termsofuse.js
deleted file mode 100644 (file)
index e67ee76..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-/*  This file is part of Syj, Copyright (c) 2010 Arnaud Renevier,
-    and is published under the AGPL license. */
-document.observe("dom:loaded", function() {
-    if (window.top !== window) {
-        $("other-language").hide();
-        $("footer").hide();
-    }
-});