]> _ Git - fluidbook-v3.git/commitdiff
#4
authorvincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Mon, 20 Jun 2016 16:44:30 +0000 (16:44 +0000)
committervincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Mon, 20 Jun 2016 16:44:30 +0000 (16:44 +0000)
framework/application/configs/application.ini
framework/application/forms/Contactdetails.php [new file with mode: 0644]
framework/application/forms/Settings.php
framework/application/views/scripts/common/content.phtml [new file with mode: 0644]
framework/application/views/scripts/common/footer.phtml [new file with mode: 0644]
framework/application/views/scripts/common/header.phtml [new file with mode: 0644]

index 7c1371e90e06f48b9c48a975585deaf248ce9b87..a4e59af791ff2f478a68c5085013d221a6598c41 100644 (file)
@@ -65,7 +65,7 @@ seo.universalAnalytics =
 
 httpauth.username = fluidbook
 httpauth.password = fb2016
-httpauth.ip_whitelist[] = 81.57.231.18
+httpauth.ip_whitelist[] = 88.190.245.49
 httpauth.ip_whitelist[] = 82.216.164.184
 
 robots = false
diff --git a/framework/application/forms/Contactdetails.php b/framework/application/forms/Contactdetails.php
new file mode 100644 (file)
index 0000000..d489b49
--- /dev/null
@@ -0,0 +1,33 @@
+<?php\r
+\r
+/**\r
+ * Created by IntelliJ IDEA.\r
+ * User: Vincent\r
+ * Date: 23/01/2016\r
+ * Time: 20:00\r
+ */\r
+class Fluidbook_Form_Contactdetails extends CubeIT_Form_Adresse {\r
+       public function init() {\r
+               parent::init();\r
+               $company = new Zend_Form_Element_Text('company');\r
+               $company->setLabel('Nom');\r
+               $company->setOrder(5);\r
+               $this->addElement($company);\r
+\r
+               $phone = new CubeIT_Form_Element_Phone('phone');\r
+               $phone->setLabel('Téléphone');\r
+               $phone->setOrder(50);\r
+               $this->addElement($phone);\r
+\r
+               $email = new CubeIT_Form_Element_Email('email');\r
+               $email->setLabel('Email');\r
+               $email->setOrder(60);\r
+               $this->addElement($email);\r
+\r
+               $website = new CubeIT_Form_Element_Url('website');\r
+               $website->setLabel('Site internet');\r
+               $website->setOrder(70);\r
+               $this->addElement($website);\r
+       }\r
+\r
+}
\ No newline at end of file
index 397b567e4a60782aea3a70c92f028f769e47dc7f..1718b545299356f07ba2e53d7a4f5e9b3d830736 100644 (file)
@@ -15,10 +15,20 @@ class Fluidbook_Form_Settings extends CubeIT_Form_Settings {
                $description->setLabel('Description de la page par défaut');
                $this->addElementLocalized($description);
 
-               $footer=new CubeIT_Form_Element_Markitup('footer');
+               $adresse = new Fluidbook_Form_Contactdetails('address');
+               $adresse->setLabel('Adresse');
+               $this->addSubFormLocalized($adresse, 'address');
+
+               $footer = new CubeIT_Form_Element_Markitup('footer');
                $footer->setLabel('Footer');
-               $footer->setAttrib('rows',6);
+               $footer->setAttrib('rows', 6);
                $this->addElementLocalized($footer);
+
+               $workshop = new CubeIT_Form_Element_Link('workshop');
+               $workshop->setLabel('Lien Workshop');
+               $workshop->fileEnabled(false);
+               $workshop->pageEnabled(false);
+               $this->addSubFormLocalized($workshop, 'workshop');
        }
 
 }
\ No newline at end of file
diff --git a/framework/application/views/scripts/common/content.phtml b/framework/application/views/scripts/common/content.phtml
new file mode 100644 (file)
index 0000000..d6b5ab2
--- /dev/null
@@ -0,0 +1,6 @@
+<?php\r
+\r
+$content = $this->layout()->content . "\n";\r
+echo $this->render('common/header.phtml');\r
+echo $content;\r
+echo $this->render('common/footer.phtml');\r
diff --git a/framework/application/views/scripts/common/footer.phtml b/framework/application/views/scripts/common/footer.phtml
new file mode 100644 (file)
index 0000000..a85fdda
--- /dev/null
@@ -0,0 +1,5 @@
+<?php\r
+$res = '<footer>';\r
+\r
+$res .= '</footer>';\r
+echo $res;
\ No newline at end of file
diff --git a/framework/application/views/scripts/common/header.phtml b/framework/application/views/scripts/common/header.phtml
new file mode 100644 (file)
index 0000000..f75068b
--- /dev/null
@@ -0,0 +1,35 @@
+<?php\r
+$this->headScript()\r
+       ->addScriptAndStyle('header')\r
+       ->addGSAP();\r
+\r
+$homepage = $this->navigation()->getContainer()->findOneById($this->localeDefault() . '/1');\r
+$home = '/';\r
+if (!is_null($homepage)) {\r
+       $home = $homepage->getHref();\r
+}\r
+?>\r
+<header>\r
+       <div id="header" class="content">\r
+               <?php\r
+               /* LOGO */\r
+\r
+               $logos = $this->image('/images/logo/Cube.svg', "Cubedesigners Logo", -1, -1, array('class' => 'cube'));\r
+               $logos .= $this->image('/images/logo/Typo.svg', 'Cubedesigners', -1, -1, array('class' => 'typo'));\r
+\r
+               echo $this->link($logos, $home, array('class' => 'logo'));\r
+               if ($this->currentPage && $this->currentPage->getTemplate() == 'home') {\r
+                       echo '<div class="sublogo"><h1>' . $this->cmsValue('logoTitle') . '</h1><h2>' . $this->cmsValue('baseline') . '</h2></div>';\r
+               } else {\r
+                       echo '<div class="sublogo"><h2>' . $this->cmsValue('logoTitle') . '</h2><h3>' . $this->cmsValue('baseline') . '</h3></div>';\r
+               }\r
+               /* NAVIGATION */\r
+               $mainMenu = $this->navigation()->findOneById($this->localeDefault() . '/' . CubeIT_Navigation::MAIN);\r
+               //              echo '<a href="#menu" class="menu-link">&#9776;</a>';\r
+               echo '<div class="nav-icon"><div></div></div>';\r
+               echo '<nav id="menu" role="navigation">';\r
+               echo $this->navigation()->menu()->renderMenu($mainMenu, array('maxDepth' => 0)) . "\n";\r
+               echo '</nav>';\r
+               ?>\r
+       </div>\r
+</header>
\ No newline at end of file