From 22b1e485361df124e90167ce6c3f4a7905efec1a Mon Sep 17 00:00:00 2001 From: "bruno@cubedesigners.com" Date: Mon, 20 Jan 2014 16:33:08 +0000 Subject: [PATCH] --- framework/application/forms/CMS/Home.php | 7 +- .../application/forms/CMS/Sub/Contact.php | 19 ++++ .../forms/CMS/Sub/Contact/Office.php | 27 +++++ .../forms/CMS/Sub/Contact/Offices.php | 16 +++ .../application/forms/CMS/Sub/Followus.php | 15 +++ .../forms/CMS/Sub/Followus/SocialNetwork.php | 24 +++++ .../CMS/Sub/Followus/SocialsNetworks.php | 16 +++ .../application/forms/CMS/Sub/Home/Agence.php | 19 ++++ framework/application/forms/CMS/Sub/News.php | 15 +++ .../application/forms/CMS/Sub/News/New.php | 19 ++++ .../application/forms/CMS/Sub/News/News.php | 16 +++ framework/application/forms/Settings.php | 15 +++ .../views/helpers/FooterActualites.php | 22 ++++ .../views/helpers/FooterContact.php | 41 +++++++ .../views/helpers/FooterSocials.php | 23 ++++ .../application/views/helpers/HomeAgence.php | 48 +++++++++ .../views/scripts/common/footer.phtml | 29 ++++- .../views/scripts/common/header.phtml | 2 +- .../views/scripts/templates/home.phtml | 17 ++- images/logo-mobile.png | Bin 0 -> 4396 bytes images/picto_footer_mail.png | Bin 0 -> 964 bytes less/common.less | 15 +++ less/footer.less | 100 +++++++++++++++++- less/header.less | 25 ++++- less/home.less | 66 ++++++++++++ 25 files changed, 586 insertions(+), 10 deletions(-) create mode 100644 framework/application/forms/CMS/Sub/Contact.php create mode 100644 framework/application/forms/CMS/Sub/Contact/Office.php create mode 100644 framework/application/forms/CMS/Sub/Contact/Offices.php create mode 100644 framework/application/forms/CMS/Sub/Followus.php create mode 100644 framework/application/forms/CMS/Sub/Followus/SocialNetwork.php create mode 100644 framework/application/forms/CMS/Sub/Followus/SocialsNetworks.php create mode 100644 framework/application/forms/CMS/Sub/Home/Agence.php create mode 100644 framework/application/forms/CMS/Sub/News.php create mode 100644 framework/application/forms/CMS/Sub/News/New.php create mode 100644 framework/application/forms/CMS/Sub/News/News.php create mode 100644 framework/application/views/helpers/FooterActualites.php create mode 100644 framework/application/views/helpers/FooterContact.php create mode 100644 framework/application/views/helpers/FooterSocials.php create mode 100644 framework/application/views/helpers/HomeAgence.php create mode 100644 images/logo-mobile.png create mode 100644 images/picto_footer_mail.png diff --git a/framework/application/forms/CMS/Home.php b/framework/application/forms/CMS/Home.php index 9093f06..7e117b5 100644 --- a/framework/application/forms/CMS/Home.php +++ b/framework/application/forms/CMS/Home.php @@ -5,10 +5,15 @@ class Cubedesigners_Form_CMS_Home extends Cubedesigners_Form_CMS { public function init() { parent::init(); - $titre = new Zend_Form_Element_Text('titre'); + $titre = new CubeIT_Form_Element_Markitup('titre'); $titre->setLabel('Titre'); $this->addElement($titre); + + $agence = new Cubedesigners_Form_CMS_Sub_Home_Agence(); + $agence->setLabel('Bloc L\'agence'); + $this->addSubForm($agence, 'agence'); } } + ?> \ No newline at end of file diff --git a/framework/application/forms/CMS/Sub/Contact.php b/framework/application/forms/CMS/Sub/Contact.php new file mode 100644 index 0000000..8cafaa1 --- /dev/null +++ b/framework/application/forms/CMS/Sub/Contact.php @@ -0,0 +1,19 @@ +setLabel('Bloc "Nous Contacter"'); + $this->addElement($bloc); + + $bureau = new Cubedesigners_Form_CMS_Sub_Contact_Offices('bureaux'); + $bureau->setLegend('Bureaux'); + $this->addSubForm($bureau, 'bureau'); + } + +} + +?> diff --git a/framework/application/forms/CMS/Sub/Contact/Office.php b/framework/application/forms/CMS/Sub/Contact/Office.php new file mode 100644 index 0000000..6b01466 --- /dev/null +++ b/framework/application/forms/CMS/Sub/Contact/Office.php @@ -0,0 +1,27 @@ +setLabel('Titre du bureau'); + $this->addElement($titre); + + $telephone = new CubeIT_Form_Element_Phone('telephone'); + $telephone->setLabel('Téléphone'); + $this->addElement($telephone); + + $fax = new CubeIT_Form_Element_Phone('fax'); + $fax->setLabel('Fax'); + $this->addElement($fax); + + $adresse = new CubeIT_Form_Adresse('adresse'); + $adresse->setLabel('Adresse'); + $this->addSubForm($adresse, 'adresse'); + } + +} + +?> diff --git a/framework/application/forms/CMS/Sub/Contact/Offices.php b/framework/application/forms/CMS/Sub/Contact/Offices.php new file mode 100644 index 0000000..f98d637 --- /dev/null +++ b/framework/application/forms/CMS/Sub/Contact/Offices.php @@ -0,0 +1,16 @@ +setBaseSubForm($office); + $this->setBaseLegend('Edition du bureau « $titre »'); + $this->setNewLegend('Nouveau bureau'); + } + +} + +?> diff --git a/framework/application/forms/CMS/Sub/Followus.php b/framework/application/forms/CMS/Sub/Followus.php new file mode 100644 index 0000000..45748d2 --- /dev/null +++ b/framework/application/forms/CMS/Sub/Followus.php @@ -0,0 +1,15 @@ +setLegend('Réseaux Sociaux'); + $this->addSubForm($reseaux, 'reseauxsociaux'); + } + +} + +?> diff --git a/framework/application/forms/CMS/Sub/Followus/SocialNetwork.php b/framework/application/forms/CMS/Sub/Followus/SocialNetwork.php new file mode 100644 index 0000000..e6b85a8 --- /dev/null +++ b/framework/application/forms/CMS/Sub/Followus/SocialNetwork.php @@ -0,0 +1,24 @@ +setLabel('Titre du réseau social'); + $this->addElement($titre); + + $url = new CubeIT_Form_Element_Url('url'); + $url->setLabel('Url'); + $this->addElement($url); + + $picto = new CubeIT_Form_Element_File_Image('picto'); + $picto->setLabel('Pictogramme'); + $picto->setMaxItems(1); + $this->addElement($picto); + } + +} + +?> diff --git a/framework/application/forms/CMS/Sub/Followus/SocialsNetworks.php b/framework/application/forms/CMS/Sub/Followus/SocialsNetworks.php new file mode 100644 index 0000000..c0b832c --- /dev/null +++ b/framework/application/forms/CMS/Sub/Followus/SocialsNetworks.php @@ -0,0 +1,16 @@ +setBaseSubForm($reseau); + $this->setBaseLegend('Edition du réseau social « $titre »'); + $this->setNewLegend('Nouveau réseau social'); + } + +} + +?> diff --git a/framework/application/forms/CMS/Sub/Home/Agence.php b/framework/application/forms/CMS/Sub/Home/Agence.php new file mode 100644 index 0000000..29ae597 --- /dev/null +++ b/framework/application/forms/CMS/Sub/Home/Agence.php @@ -0,0 +1,19 @@ +setLabel('Titre'); + $this->addElement($titre); + + $blocs = new Cubedesigners_Form_CMS_Sub_Home_Agence_Blocs('blocs'); + $blocs->setLegend('Sous-blocs'); + $this->addSubForm($blocs, 'blocs'); + } + +} + +?> diff --git a/framework/application/forms/CMS/Sub/News.php b/framework/application/forms/CMS/Sub/News.php new file mode 100644 index 0000000..ac5280b --- /dev/null +++ b/framework/application/forms/CMS/Sub/News.php @@ -0,0 +1,15 @@ +setLegend('Actualités'); + $this->addSubForm($actus, 'actualites'); + } + +} + +?> diff --git a/framework/application/forms/CMS/Sub/News/New.php b/framework/application/forms/CMS/Sub/News/New.php new file mode 100644 index 0000000..fa5ed06 --- /dev/null +++ b/framework/application/forms/CMS/Sub/News/New.php @@ -0,0 +1,19 @@ +setLabel('Date'); + $this->addElement($date); + + $texte = new CubeIT_Form_Element_Markitup_Basic('texte'); + $texte->setLabel('Texte'); + $this->addElement($texte); + } + +} + +?> diff --git a/framework/application/forms/CMS/Sub/News/News.php b/framework/application/forms/CMS/Sub/News/News.php new file mode 100644 index 0000000..29366c1 --- /dev/null +++ b/framework/application/forms/CMS/Sub/News/News.php @@ -0,0 +1,16 @@ +setBaseSubForm($actu); + $this->setBaseLegend('Edition de l\'actualité du « $date »'); + $this->setNewLegend('Nouvelle actualité'); + } + +} + +?> diff --git a/framework/application/forms/Settings.php b/framework/application/forms/Settings.php index fbf11d0..0b4fb74 100644 --- a/framework/application/forms/Settings.php +++ b/framework/application/forms/Settings.php @@ -15,6 +15,21 @@ class Cubedesigners_Form_Settings extends CubeIT_Form_Settings { $description->setLabel('Description de la page par défaut'); $this->addElementLocalized($description); + /* BLOC CONTACT */ + $contact = new Cubedesigners_Form_CMS_Sub_Contact(); + $contact->setLabel('Informations de contact'); + $this->addSubFormLocalized($contact, 'contact'); + + /* BLOC ACTUALITES */ + $actus = new Cubedesigners_Form_CMS_Sub_News(); + $actus->setLabel('Bloc Actualités'); + $this->addSubFormLocalized($actus, 'actus'); + + /* BLOC SUIVEZ-NOUS */ + $followus = new Cubedesigners_Form_CMS_Sub_Followus(); + $followus->setLabel('Bloc Suivez-nous'); + $this->addSubFormLocalized($followus, 'followus'); + /* COPYRIGHT */ $copyright = new Zend_Form_Element_Text('copyright'); $copyright->setLabel('Copyright du bas de page'); diff --git a/framework/application/views/helpers/FooterActualites.php b/framework/application/views/helpers/FooterActualites.php new file mode 100644 index 0000000..448d943 --- /dev/null +++ b/framework/application/views/helpers/FooterActualites.php @@ -0,0 +1,22 @@ +'; + foreach ($actus as $id => $actu) { + $res.='

' . $actu['date'] . '

' . $this->view->markupDotclear($actu['texte']) . '

'; + } + $res.= ''; + + return $res; + } + +} + +?> diff --git a/framework/application/views/helpers/FooterContact.php b/framework/application/views/helpers/FooterContact.php new file mode 100644 index 0000000..2b01eda --- /dev/null +++ b/framework/application/views/helpers/FooterContact.php @@ -0,0 +1,41 @@ +' . $this->view->markupDotclear($contact['bloc']) . ''; + + $bureaux = $contact['bureau']; + + foreach ($bureaux as $id => $bureau) { + + $res.='
'; + + $res.='

' . $bureau['titre'] . '

'; + + $res.='

'; + $res.='

' . __('Tel') . ' ' . $bureau['telephone'] . '

'; + $res.='

' . __('Fax') . ' ' . $bureau['fax'] . '

'; + $res.='
'; + + $res.='
'; + $res.='

' . __('Cubedesigners') . '

'; + $res.='

' . $bureau['adresse']['adresse'] . '

'; + $res.='

' . $bureau['adresse']['code_postal'] . ' ' . $bureau['adresse']['ville'] . '

'; + $res.='

' . Zend_Locale::getTranslation($bureau['adresse']['pays'], 'territory') . '

'; + $res.='

'; + + $res.='
'; + $res.=$this->view->linkGeo(__('Plan d\'accès'), $bureau['adresse']['adresse'] . ',' . $bureau['adresse']['ville'] . ',' . Zend_Locale::getTranslation($bureau['adresse']['pays'], 'territory')); + $res.='
'; + + $res.='
'; + } + + return $res; + } + +} + +?> diff --git a/framework/application/views/helpers/FooterSocials.php b/framework/application/views/helpers/FooterSocials.php new file mode 100644 index 0000000..50d68fd --- /dev/null +++ b/framework/application/views/helpers/FooterSocials.php @@ -0,0 +1,23 @@ +'; + foreach ($socials as $id => $social) { + $image = $this->view->imageProcess($social['picto'], $social['titre'], 45, 45); + $res.='
' . $image . '
'; + } + $res.= ''; + + return $res; + } + +} + +?> diff --git a/framework/application/views/helpers/HomeAgence.php b/framework/application/views/helpers/HomeAgence.php new file mode 100644 index 0000000..a0bcd47 --- /dev/null +++ b/framework/application/views/helpers/HomeAgence.php @@ -0,0 +1,48 @@ +'; + foreach ($blocs as $id => $bloc) { + + /* $res.='
'; + + $res.='

' . $bureau['titre'] . '

'; + + $res.='

'; + $res.='

' . __('Tel') . ' ' . $bureau['telephone'] . '

'; + $res.='

' . __('Fax') . ' ' . $bureau['fax'] . '

'; + $res.='
'; + + $res.='
'; + $res.='

' . __('Cubedesigners') . '

'; + $res.='

' . $bureau['adresse']['adresse'] . '

'; + $res.='

' . $bureau['adresse']['code_postal'] . ' ' . $bureau['adresse']['ville'] . '

'; + $res.='

' . Zend_Locale::getTranslation($bureau['adresse']['pays'], 'territory') . '

'; + $res.='

'; + + $res.='
'; + $res.=$this->view->linkGeo(__('Plan d\'accès'), $bureau['adresse']['adresse'] . ',' . $bureau['adresse']['ville'] . ',' . Zend_Locale::getTranslation($bureau['adresse']['pays'], 'territory')); + $res.='
'; + + $res.='
'; */ + $image = $this->view->imageProcess($bloc['picto'], $bloc['titre'], 120, 120); + + $res.='
'; + $res.= $image; + $res.= '

' . $this->view->markupDotclear($bloc['titre']) . '

'; + $res.= '

' . $this->view->markupDotclear($bloc['texte']) . '

'; + $res.='
'; + } + + $res .= ''; + return $res; + } + +} + +?> diff --git a/framework/application/views/scripts/common/footer.phtml b/framework/application/views/scripts/common/footer.phtml index 3656131..d483aa8 100644 --- a/framework/application/views/scripts/common/footer.phtml +++ b/framework/application/views/scripts/common/footer.phtml @@ -10,7 +10,34 @@ if (!is_null($mentions_page)) { ?>