From: arno Date: Sun, 15 Aug 2010 13:16:23 +0000 (+0200) Subject: raw mode for termsofuse X-Git-Tag: v0.2~49 X-Git-Url: https://dev.renevier.net/?p=syj.git;a=commitdiff_plain;h=57031d71f1af8fbca504b7f09352a3fb1455d602 raw mode for termsofuse --- diff --git a/application/controllers/TermsofuseController.php b/application/controllers/TermsofuseController.php index e1b8838..928966e 100644 --- a/application/controllers/TermsofuseController.php +++ b/application/controllers/TermsofuseController.php @@ -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'); } } diff --git a/application/forms/Geom.php b/application/forms/Geom.php index b52e071..61dde0c 100644 --- a/application/forms/Geom.php +++ b/application/forms/Geom.php @@ -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, diff --git a/application/forms/User.php b/application/forms/User.php index 34a5608..ca3a91b 100644 --- a/application/forms/User.php +++ b/application/forms/User.php @@ -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, diff --git a/application/views/scripts/termsofuse/index.phtml b/application/views/scripts/termsofuse/index.phtml index f6ef416..b558f23 100644 --- a/application/views/scripts/termsofuse/index.phtml +++ b/application/views/scripts/termsofuse/index.phtml @@ -1,4 +1,6 @@ -localeSwitcher(); ?> +rawmode) { + echo $this->localeSwitcher(); +}?>

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.'); ?>

diff --git a/public/js/termsofuse.js b/public/js/termsofuse.js deleted file mode 100644 index e67ee76..0000000 --- a/public/js/termsofuse.js +++ /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(); - } -});