From 850b6097a661c8ae9f4378bcb18fd118ca759d7e Mon Sep 17 00:00:00 2001 From: "bruno@cubedesigners.com" Date: Tue, 4 Mar 2014 10:42:26 +0000 Subject: [PATCH] --- framework/application/Bootstrap.php | 395 ++++++++++-------- .../controllers/AjaxController.php | 54 ++- .../CMS/Sub/Casestudies/Content/Bloc.php | 100 ++--- .../forms/CMS/Sub/Casestudies/Studies.php | 108 +++-- .../CMS/Sub/Realisations/Realisations.php | 100 +++-- framework/application/forms/Categories.php | 26 ++ framework/application/forms/Domaines.php | 26 ++ .../application/forms/Element/Categories.php | 10 + .../application/forms/Element/ContentType.php | 10 +- .../application/forms/Element/Domaines.php | 11 + framework/application/forms/Element/Tags.php | 8 +- .../forms/Element/Technologies.php | 11 + framework/application/forms/Tags.php | 70 +--- framework/application/forms/Technologies.php | 26 ++ .../views/helpers/CasestudiesList.php | 81 ++-- .../views/helpers/CategoriesList.php | 49 +++ .../views/helpers/RealisationsList.php | 29 +- .../views/scripts/templates/casestudies.phtml | 14 +- .../scripts/templates/realisations.phtml | 12 +- js/casestudies.js | 41 +- js/realisations.js | 44 +- less/admin.less | 5 + less/realisations.less | 21 + 23 files changed, 739 insertions(+), 512 deletions(-) create mode 100644 framework/application/forms/Categories.php create mode 100644 framework/application/forms/Domaines.php create mode 100644 framework/application/forms/Element/Categories.php create mode 100644 framework/application/forms/Element/Domaines.php create mode 100644 framework/application/forms/Element/Technologies.php create mode 100644 framework/application/forms/Technologies.php create mode 100644 framework/application/views/helpers/CategoriesList.php diff --git a/framework/application/Bootstrap.php b/framework/application/Bootstrap.php index 3d5cd78..9ad468d 100644 --- a/framework/application/Bootstrap.php +++ b/framework/application/Bootstrap.php @@ -2,188 +2,217 @@ class Bootstrap extends CubeIT_Bootstrap { - protected function _initMinimum() { - parent::_initMinimum(); - // If a project with html display (don't activate by default for web services apps - $this->bootstrap('doctype'); - $this->bootstrap('scripts'); - } - - protected function _initScripts() { - parent::_initScripts(); - $this->getView()->headLink()->appendStylesheet('/css/fonts/fonts.css'); - $this->getView()->headScript()->addTagHandler(); - } - - protected function _initRouter($initCms = true) { - $router = parent::_initRouter($initCms); - return $router; - } - - /** - * - * @param \Doctrine\DBAL\Schema\Schema $schema - * @param array $options - */ - protected function _defineSchema(&$schema, $options) { - parent::_defineSchema($schema, $options); - - $user = $schema->createTable('user'); - $user->addColumn('id', 'integer', array('unsigned' => true, 'autoincrement' => true)); - $user->setPrimaryKey(array('id')); - $user->addColumn('username', 'string', array('length' => 64)); - $user->addUniqueIndex(array('username')); - $user->addColumn('password', 'string', array('length' => 255)); - $user->addColumn('role', 'string', array('length' => 32)); - - $tags = $schema->createTable('tags'); - $tags->addColumn('id', 'integer', array('unsigned' => true, 'autoincrement' => true)); - $tags->setPrimaryKey(array('id')); - $tags->addColumn('name', 'string', array('length' => 64)); - - $casestudies = $schema->createTable('casestudies'); - $casestudies->addColumn('id', 'integer', array('unsigned' => true, 'autoincrement' => true)); - $casestudies->setPrimaryKey(array('id')); - $casestudies->addColumn('online', 'boolean'); - $casestudies->addColumn('titre', 'text'); - $casestudies->addColumn('description', 'text'); - $casestudies->addColumn('url', 'text'); - $casestudies->addColumn('visuel', 'string', array('length' => 128)); - $casestudies->addColumn('visuel_detail', 'string', array('length' => 128)); - $casestudies->addColumn('legende', 'text'); - $casestudies->addColumn('couleur', 'text'); - $casestudies->addColumn('blocs', 'text'); - $casestudies->addColumn('tags', 'text'); - - - $realisations = $schema->createTable('realisations'); - $realisations->addColumn('id', 'integer', array('unsigned' => true, 'autoincrement' => true)); - $realisations->setPrimaryKey(array('id')); - $realisations->addColumn('online', 'boolean'); - $realisations->addColumn('titre', 'text'); - $realisations->addColumn('legende', 'text'); - $realisations->addColumn('agence', 'text'); - $realisations->addColumn('description', 'text'); - $realisations->addColumn('url', 'text'); - $realisations->addColumn('visuel', 'string', array('length' => 128)); - $realisations->addColumn('visuel_detail', 'text'); - $realisations->addColumn('tags', 'text'); - } - - protected function _initAcl() { - $acl = parent::_initAcl(); - return $acl; - } - - protected function _makeNavigationOnePage(&$navigation, $r, $t, $isAdmin, $locale = false) { - $page = parent::_makeNavigationOnePage($navigation, $r, $t, $isAdmin, $locale); - - if (!$page) { - return; - } - - if ($page->getTemplate() == 'casestudies') { - $this->addStudiesPages($page, $locale); - } - - if ($page->getTemplate() == 'realisations') { - $this->addRealisationsPages($page, $locale); - } - } - - /** - * - * @param CubeIT_Navigation_Page_Locale $page - */ - protected function addRealisationsPages($page, $locale) { - - $datas = $this->getCMSDatasOfNavigationPage($page); - $db = Zend_Db_Table::getDefaultAdapter(); - $s = $db->select()->from('realisations') - ->order('id ASC'); - $q = $s->query(); - - while ($r = $q->fetch()) { - $r = CubeIT_Util_Cms::unserialize($r, $locale); - if ($r->titre == '') { - continue; - } - $p = new CubeIT_Navigation_Page_Locale(); - $p->setController('Realisations'); - $p->setId($page->getId() . '/' . $r->id); - $p->setAutoUri($r, $datas['seourl_rea'], $page->getLocale()); - $p->setSitemap(true); - $p->setEditable(false); - - if ($r->online != 1) - $p->setOnline(false); - - $p->setDomain($page->getDomain()); - $p->setLabel($r->titre); - $p->setParams(array('realisation_id' => $r->id)); - $page->addPage($p); - } - } - - /** - * - * @param CubeIT_Navigation_Page_Locale $page - */ - protected function addStudiesPages($page, $locale) { - $datas = $this->getCMSDatasOfNavigationPage($page); - $db = Zend_Db_Table::getDefaultAdapter(); - $s = $db->select()->from('casestudies') - ->order('id ASC'); - $q = $s->query(); - - while ($r = $q->fetch()) { - $r = CubeIT_Util_Cms::unserialize($r, $locale); - if ($r->titre == '') { - continue; - } - $p = new CubeIT_Navigation_Page_Locale(); - $p->setController('Studies'); - $p->setId($page->getId() . '/' . $r->id); - $p->setAutoUri($r, $datas['seourl_stu'], $page->getLocale()); - $p->setSitemap(true); - $p->setEditable(false); - $p->setParams(array('casestudy_id' => $r->id)); - - if ($r->online != 1) - $p->setOnline(false); - - $p->setDomain($page->getDomain()); - $p->setLabel($r->titre); - $page->addPage($p); - } - } - - /** - * - * @return array - */ - public function getCMSTemplates() { - - $templates = parent::getCMSTemplates(); - - $templates['Agence'] = array("agence" => "L'agence"); - $templates['Realisations'] = array('realisations' => 'Réalisations'); - $templates['Casestudies'] = array('casestudies' => 'Case-Studies'); - $templates['CasestudiesDetail'] = array('casestudies_detail' => 'Case-Studies (détail)'); - $templates['Expertises'] = array('expertises' => 'Expertises'); - $templates['Contact'] = array('contact' => 'Contact'); - $templates['Mentions'] = array('mentions' => 'Mentions légales'); - - return $templates; - } - - public function run() { - // run have to be the last call of bootstrap - parent::run(); - } - - function __destroy() { - endProfile(); - } + protected function _initMinimum() { + parent::_initMinimum(); + // If a project with html display (don't activate by default for web services apps + $this->bootstrap('doctype'); + $this->bootstrap('scripts'); + } + + protected function _initScripts() { + parent::_initScripts(); + $this->getView()->headLink()->appendStylesheet('/css/fonts/fonts.css'); + $this->getView()->headScript()->addTagHandler(); + } + + protected function _initRouter($initCms = true) { + $router = parent::_initRouter($initCms); + return $router; + } + + /** + * + * @param \Doctrine\DBAL\Schema\Schema $schema + * @param array $options + */ + protected function _defineSchema(&$schema, $options) { + parent::_defineSchema($schema, $options); + + // Users + $user = $schema->createTable('user'); + $user->addColumn('id', 'integer', array('unsigned' => true, 'autoincrement' => true)); + $user->setPrimaryKey(array('id')); + $user->addColumn('username', 'string', array('length' => 64)); + $user->addUniqueIndex(array('username')); + $user->addColumn('password', 'string', array('length' => 255)); + $user->addColumn('role', 'string', array('length' => 32)); + + // Categories + $categories = $schema->createTable('categories'); + $categories->addColumn('id', 'integer', array('unsigned' => true, 'autoincrement' => true)); + $categories->setPrimaryKey(array('id')); + $categories->addColumn('name', 'string', array('length' => 64)); + + // Domaines + $tags = $schema->createTable('domaines'); + $tags->addColumn('id', 'integer', array('unsigned' => true, 'autoincrement' => true)); + $tags->setPrimaryKey(array('id')); + $tags->addColumn('name', 'string', array('length' => 64)); + + // Technologies + $tags = $schema->createTable('technologies'); + $tags->addColumn('id', 'integer', array('unsigned' => true, 'autoincrement' => true)); + $tags->setPrimaryKey(array('id')); + $tags->addColumn('name', 'string', array('length' => 64)); + + // Tags + $tags = $schema->createTable('tags'); + $tags->addColumn('id', 'integer', array('unsigned' => true, 'autoincrement' => true)); + $tags->setPrimaryKey(array('id')); + $tags->addColumn('name', 'string', array('length' => 64)); + + // Casestudies + $casestudies = $schema->createTable('casestudies'); + $casestudies->addColumn('id', 'integer', array('unsigned' => true, 'autoincrement' => true)); + $casestudies->setPrimaryKey(array('id')); + $casestudies->addColumn('titre', 'text'); + $casestudies->addColumn('description', 'text'); + $casestudies->addColumn('url', 'text'); + $casestudies->addColumn('visuel', 'string', array('length' => 128)); + $casestudies->addColumn('visuel_detail', 'string', array('length' => 128)); + $casestudies->addColumn('legende', 'text'); + $casestudies->addColumn('couleur', 'text'); + $casestudies->addColumn('blocs', 'text'); + $casestudies->addColumn('categories', 'text'); + $casestudies->addColumn('domaines', 'text'); + $casestudies->addColumn('technologies', 'text'); + $casestudies->addColumn('tags_secondaires', 'text'); + $casestudies->addColumn('online', 'boolean'); + $casestudies->addColumn('annee', 'text'); + + // Réalisations + $realisations = $schema->createTable('realisations'); + $realisations->addColumn('id', 'integer', array('unsigned' => true, 'autoincrement' => true)); + $realisations->setPrimaryKey(array('id')); + $realisations->addColumn('titre', 'text'); + $realisations->addColumn('legende', 'text'); + $realisations->addColumn('agence', 'text'); + $realisations->addColumn('description', 'text'); + $realisations->addColumn('url', 'text'); + $realisations->addColumn('visuel', 'string', array('length' => 128)); + $realisations->addColumn('visuel_detail', 'text'); + $realisations->addColumn('categories', 'text'); + $realisations->addColumn('domaines', 'text'); + $realisations->addColumn('technologies', 'text'); + $realisations->addColumn('tags_secondaires', 'text'); + $realisations->addColumn('online', 'boolean'); + $realisations->addColumn('annee', 'text'); + } + + protected function _initAcl() { + $acl = parent::_initAcl(); + return $acl; + } + + protected function _makeNavigationOnePage(&$navigation, $r, $t, $isAdmin, $locale = false) { + $page = parent::_makeNavigationOnePage($navigation, $r, $t, $isAdmin, $locale); + + if (!$page) { + return; + } + + if ($page->getTemplate() == 'casestudies') { + $this->addStudiesPages($page, $locale); + } + + if ($page->getTemplate() == 'realisations') { + $this->addRealisationsPages($page, $locale); + } + } + + /** + * + * @param CubeIT_Navigation_Page_Locale $page + */ + protected function addRealisationsPages($page, $locale) { + + $datas = $this->getCMSDatasOfNavigationPage($page); + $db = Zend_Db_Table::getDefaultAdapter(); + $s = $db->select()->from('realisations') + ->order('id ASC'); + $q = $s->query(); + + while ($r = $q->fetch()) { + $r = CubeIT_Util_Cms::unserialize($r, $locale); + if ($r->titre == '') { + continue; + } + $p = new CubeIT_Navigation_Page_Locale(); + $p->setController('Realisations'); + $p->setId($page->getId() . '/' . $r->id); + $p->setAutoUri($r, $datas['seourl_rea'], $page->getLocale()); + $p->setSitemap(true); + $p->setEditable(false); + + if ($r->online != 1) + $p->setOnline(false); + + $p->setDomain($page->getDomain()); + $p->setLabel($r->titre); + $p->setParams(array('realisation_id' => $r->id)); + $page->addPage($p); + } + } + + /** + * + * @param CubeIT_Navigation_Page_Locale $page + */ + protected function addStudiesPages($page, $locale) { + $datas = $this->getCMSDatasOfNavigationPage($page); + $db = Zend_Db_Table::getDefaultAdapter(); + $s = $db->select()->from('casestudies') + ->order('id ASC'); + $q = $s->query(); + + while ($r = $q->fetch()) { + $r = CubeIT_Util_Cms::unserialize($r, $locale); + if ($r->titre == '') { + continue; + } + $p = new CubeIT_Navigation_Page_Locale(); + $p->setController('Studies'); + $p->setId($page->getId() . '/' . $r->id); + $p->setAutoUri($r, $datas['seourl_stu'], $page->getLocale()); + $p->setSitemap(true); + $p->setEditable(false); + $p->setParams(array('casestudy_id' => $r->id)); + + if ($r->online != 1) + $p->setOnline(false); + + $p->setDomain($page->getDomain()); + $p->setLabel($r->titre); + $page->addPage($p); + } + } + + /** + * + * @return array + */ + public function getCMSTemplates() { + + $templates = parent::getCMSTemplates(); + + $templates['Agence'] = array("agence" => "L'agence"); + $templates['Realisations'] = array('realisations' => 'Réalisations'); + $templates['Casestudies'] = array('casestudies' => 'Case-Studies'); + $templates['CasestudiesDetail'] = array('casestudies_detail' => 'Case-Studies (détail)'); + $templates['Expertises'] = array('expertises' => 'Expertises'); + $templates['Contact'] = array('contact' => 'Contact'); + $templates['Mentions'] = array('mentions' => 'Mentions légales'); + + return $templates; + } + + public function run() { + // run have to be the last call of bootstrap + parent::run(); + } + + function __destroy() { + endProfile(); + } } diff --git a/framework/application/controllers/AjaxController.php b/framework/application/controllers/AjaxController.php index e6f5254..cbd5636 100644 --- a/framework/application/controllers/AjaxController.php +++ b/framework/application/controllers/AjaxController.php @@ -2,35 +2,45 @@ class AjaxController extends CubeIT_Controller_AjaxController { - public function displayCaseStudies() { - $studies = $_GET['studies']; - //fb($studies, 'displayCaseStudies'); - //$this->view->CasestudiesList($this->studies); - } + public function displayCaseStudies() { + $studies = $_GET['studies']; + } - public function displayRealisation() { - $rea_id = $_GET['realisation_id']; - //fb($rea_id, 'Realisation id '); + public function displayRealisation() { + $rea_id = $_GET['realisation_id']; - $db = $this->getDb(); - $s = $db->select()->from('realisations') - ->order('id ASC'); - $s->where('id = ?', $rea_id); + $db = $this->getDb(); + $s = $db->select()->from('realisations') + ->order('id ASC'); + $s->where('id = ?', $rea_id); - $q = $s->query(); - $r = $q->fetch(); + $q = $s->query(); + $r = $q->fetch(); - $r = CubeIT_Util_Cms::unserialize($r); + $r = CubeIT_Util_Cms::unserialize($r); - for ($i = 0; $i < count($r->visuel_detail); $i++) { - $image_url = $this->view->imageProcess()->imageProcessGetUrl($r->visuel_detail[$i], '', null, 440); - $r->visuel_detail[$i] = $image_url; - } + for ($i = 0; $i < count($r->visuel_detail); $i++) { + $image_url = $this->view->imageProcess()->imageProcessGetUrl($r->visuel_detail[$i], '', null, 440); + $r->visuel_detail[$i] = $image_url; + } - $r->description = $this->view->markupDotclear($r->description); + $db = Zend_Db_Table::getDefaultAdapter(); + $s_tags = $db->select()->from('tags') + ->order('name ASC'); + $q_tags = $s_tags->query(); - $this->_datas->addVariable("rea", $r); - } + $litteralTags = array(); + while ($r_tags = $q_tags->fetch()) { + if (in_array($r_tags->id, $r->tags_secondaires)) { + array_push($litteralTags, $r_tags->name); + } + } + $r->tags_secondaires = $litteralTags; + + $r->description = $this->view->markupDotclear($r->description); + + $this->_datas->addVariable("rea", $r); + } } diff --git a/framework/application/forms/CMS/Sub/Casestudies/Content/Bloc.php b/framework/application/forms/CMS/Sub/Casestudies/Content/Bloc.php index dfa2fab..a73f077 100644 --- a/framework/application/forms/CMS/Sub/Casestudies/Content/Bloc.php +++ b/framework/application/forms/CMS/Sub/Casestudies/Content/Bloc.php @@ -2,55 +2,59 @@ class Cubedesigners_Form_CMS_Sub_Casestudies_Content_Bloc extends CubeIT_Form_SubForm { - public function init() { - parent::init(); - - $isCompactTrad = false; - - $select = new Cubedesigners_Form_Element_ContentType("selected-type"); - $select->setAttrib('data-name', 'selected-type'); - $this->addElement($select); - - $margin = new Zend_Form_Element_Text('margin'); - $margin->setLabel("Décalage vertical du bloc (en pixels)"); - $this->addElement($margin); - - $zindex = new Zend_Form_Element_Select('zindex'); - $options = array('default' => 'Par défaut'); - for ($i = 1; $i <= 10; $i++) { - $options[$i] = $i; + public function init() { + parent::init(); + + $isCompactTrad = false; + + $select = new Cubedesigners_Form_Element_ContentType("selected-type"); + $select->setAttrib('data-name', 'selected-type'); + $this->addElement($select); + + $margin = new Zend_Form_Element_Text('margin'); + $margin->setLabel("Décalage vertical du bloc (en pixels)"); + $this->addElement($margin); + + $zindex = new Zend_Form_Element_Select('zindex'); + $options = array('default' => 'Par défaut'); + for ($i = 1; $i <= 10; $i++) { + $options[$i] = $i; + } + $zindex->setMultiOptions($options); + $zindex->setLabel('z-index du bloc'); + $this->addElement($zindex); + + $annee = new Zend_Form_Element_Text('annee'); + $annee->setLabel('Année'); + $this->addElement($annee); + + $titre = new Zend_Form_Element_Text('titre'); + $titre->setLabel('Titre'); + $this->addElementLocalized($titre, $isCompactTrad); + + $texte = new CubeIT_Form_Element_Markitup_Basic('texte'); + $texte->setLabel('Texte'); + $this->addElementLocalized($texte, $isCompactTrad); + + $visuel = new CubeIT_Form_Element_File_Image('visuel'); + $visuel->setLabel('Visuel'); + $visuel->setMaxItems(1); + $this->addElementLocalized($visuel, $isCompactTrad); + + $video = new CubeIT_Form_Element_WebVideo('video'); + $video->setLabel('URL de la vidéo'); + $this->addElementLocalized($video, $isCompactTrad); + + $video_background = new CubeIT_Form_Element_File_Image('video_background'); + $video_background->setLabel('Fond de la vidéo'); + $video_background->setMaxItems(1); + $this->addElement($video_background); + + $type = new Zend_Form_Element_Hidden('form-type'); + $type->setAttrib('data-name', 'form-type'); + $type->setValue('test'); + $this->addElement($type); } - $zindex->setMultiOptions($options); - $zindex->setLabel('z-index du bloc'); - $this->addElement($zindex); - - $titre = new Zend_Form_Element_Text('titre'); - $titre->setLabel('Titre'); - $this->addElementLocalized($titre, $isCompactTrad); - - $texte = new CubeIT_Form_Element_Markitup_Basic('texte'); - $texte->setLabel('Texte'); - $this->addElementLocalized($texte, $isCompactTrad); - - $visuel = new CubeIT_Form_Element_File_Image('visuel'); - $visuel->setLabel('Visuel'); - $visuel->setMaxItems(1); - $this->addElementLocalized($visuel, $isCompactTrad); - - $video = new CubeIT_Form_Element_WebVideo('video'); - $video->setLabel('URL de la vidéo'); - $this->addElementLocalized($video, $isCompactTrad); - - $video_background = new CubeIT_Form_Element_File_Image('video_background'); - $video_background->setLabel('Fond de la vidéo'); - $video_background->setMaxItems(1); - $this->addElement($video_background); - - $type = new Zend_Form_Element_Hidden('form-type'); - $type->setAttrib('data-name', 'form-type'); - $type->setValue('test'); - $this->addElement($type); - } } diff --git a/framework/application/forms/CMS/Sub/Casestudies/Studies.php b/framework/application/forms/CMS/Sub/Casestudies/Studies.php index cd86907..028e2a7 100644 --- a/framework/application/forms/CMS/Sub/Casestudies/Studies.php +++ b/framework/application/forms/CMS/Sub/Casestudies/Studies.php @@ -2,67 +2,83 @@ class Cubedesigners_Form_CMS_Sub_Casestudies_Studies extends CubeIT_Form_List { - public function init() { - parent::init(); + public function init() { + parent::init(); - $isCompactTrad = false; + $isCompactTrad = false; - $id = new CubeIT_Form_Element_Id(); - $this->addElement($id); + $id = new CubeIT_Form_Element_Id(); + $this->addElement($id); - $online = new Zend_Form_Element_Checkbox('online'); - $online->setLabel('En ligne'); - $this->addElement($online); + $online = new Zend_Form_Element_Checkbox('online'); + $online->setLabel('En ligne'); + $this->addElement($online); - $titre = new Zend_Form_Element_Text('titre'); - $titre->setLabel('Titre'); - $this->addElementLocalized($titre, $isCompactTrad); + $annee = new Zend_Form_Element_Text('annee'); + $annee->setLabel('Année'); + $this->addElement($annee); - $description = new Zend_Form_Element_Text('description'); - $description->setLabel('Description'); - $this->addElementLocalized($description, $isCompactTrad); + $titre = new Zend_Form_Element_Text('titre'); + $titre->setLabel('Titre'); + $this->addElementLocalized($titre, $isCompactTrad); - $url = new CubeIT_Form_Element_Url('url'); - $url->setLabel('URL du site'); - $this->addElementLocalized($url, $isCompactTrad); + $description = new Zend_Form_Element_Text('description'); + $description->setLabel('Description'); + $this->addElementLocalized($description, $isCompactTrad); - $visuel = new CubeIT_Form_Element_File_Image('visuel'); - $visuel->setLabel('Visuel de la page Case Studies'); - $visuel->setMaxItems(1); - $this->addElementLocalized($visuel, $isCompactTrad); + $url = new CubeIT_Form_Element_Url('url'); + $url->setLabel('URL du site'); + $this->addElementLocalized($url, $isCompactTrad); - $visuel_detail = new CubeIT_Form_Element_File_Image('visuel_detail'); - $visuel_detail->setLabel('Visuel de la page de détail'); - $visuel_detail->setMaxItems(1); - $this->addElementLocalized($visuel_detail, $isCompactTrad); + $visuel = new CubeIT_Form_Element_File_Image('visuel'); + $visuel->setLabel('Visuel de la page Case Studies'); + $visuel->setMaxItems(1); + $this->addElementLocalized($visuel, $isCompactTrad); - $legende = new Zend_Form_Element_Text('legende'); - $legende->setLabel('Legende du visuel'); - $this->addElementLocalized($legende, $isCompactTrad); + $visuel_detail = new CubeIT_Form_Element_File_Image('visuel_detail'); + $visuel_detail->setLabel('Visuel de la page de détail'); + $visuel_detail->setMaxItems(1); + $this->addElementLocalized($visuel_detail, $isCompactTrad); - $color = new Zend_Form_Element_Text('couleur'); - $color->setLabel('Code couleur de la zone de contenu'); - $this->addElement($color); + $legende = new Zend_Form_Element_Text('legende'); + $legende->setLabel('Legende du visuel'); + $this->addElementLocalized($legende, $isCompactTrad); - $blocs = new Cubedesigners_Form_CMS_Sub_Casestudies_Content_Blocs('blocs'); - $blocs->setLegend('Contenu'); - $this->addSubForm($blocs, 'blocs'); + $color = new Zend_Form_Element_Text('couleur'); + $color->setLabel('Code couleur de la zone de contenu'); + $this->addElement($color); - $tags = new Cubedesigners_Form_Element_Tags('tags'); - $tags->setLabel('Tags'); - $this->addElement($tags); + $blocs = new Cubedesigners_Form_CMS_Sub_Casestudies_Content_Blocs('blocs'); + $blocs->setLegend('Contenu'); + $this->addSubForm($blocs, 'blocs'); + $categories = new Cubedesigners_Form_Element_Categories('categories'); + $categories->setLabel('Catégories'); + $this->addElement($categories); - $bootstrap = Bootstrap::getInstance(); - $view = $bootstrap->getView(); + $tags = new Cubedesigners_Form_Element_Tags('tags_secondaires'); + $tags->setLabel('Tags secondaires'); + $this->addElement($tags); - $this->setListTitle('Etudes de cas') - ->setNewTitle('Créer une étude de cas') - ->setEditTitle('Edition de l\'étude de cas « $titre »') - ->setBaseTable('casestudies') - ->setIdColumn('id') - ->setTitleColumn('titre'); - } + $domaine = new Cubedesigners_Form_Element_Domaines('domaines'); + $domaine->setLabel("Domaine d'activité"); + $this->addElement($domaine); + + $technologies = new Cubedesigners_Form_Element_Technologies('technologies'); + $technologies->setLabel('Technologies'); + $this->addElement($technologies); + + + $bootstrap = Bootstrap::getInstance(); + $view = $bootstrap->getView(); + + $this->setListTitle('Etudes de cas') + ->setNewTitle('Créer une étude de cas') + ->setEditTitle('Edition de l\'étude de cas « $titre »') + ->setBaseTable('casestudies') + ->setIdColumn('id') + ->setTitleColumn('titre'); + } } diff --git a/framework/application/forms/CMS/Sub/Realisations/Realisations.php b/framework/application/forms/CMS/Sub/Realisations/Realisations.php index 134b6e8..8862a72 100644 --- a/framework/application/forms/CMS/Sub/Realisations/Realisations.php +++ b/framework/application/forms/CMS/Sub/Realisations/Realisations.php @@ -2,61 +2,77 @@ class Cubedesigners_Form_CMS_Sub_Realisations_Realisations extends CubeIT_Form_List { - public function init() { - parent::init(); + public function init() { + parent::init(); - $isCompactTrad = false; + $isCompactTrad = false; - $id = new CubeIT_Form_Element_Id(); - $this->addElement($id); + $id = new CubeIT_Form_Element_Id(); + $this->addElement($id); - $online = new Zend_Form_Element_Checkbox('online'); - $online->setLabel('En ligne'); - $this->addElement($online); + $online = new Zend_Form_Element_Checkbox('online'); + $online->setLabel('En ligne'); + $this->addElement($online); - $titre = new Zend_Form_Element_Text('titre'); - $titre->setLabel('Titre'); - $this->addElementLocalized($titre, $isCompactTrad); + $annee = new Zend_Form_Element_Text('annee'); + $annee->setLabel('Année'); + $this->addElement($annee); - $legende = new Zend_Form_Element_Text('legende'); - $legende->setLabel('Legende'); - $this->addElementLocalized($legende, $isCompactTrad); + $titre = new Zend_Form_Element_Text('titre'); + $titre->setLabel('Titre'); + $this->addElementLocalized($titre, $isCompactTrad); - $agence = new Zend_Form_Element_Text('agence'); - $agence->setLabel('Agence'); - $this->addElementLocalized($agence, $isCompactTrad); + $legende = new Zend_Form_Element_Text('legende'); + $legende->setLabel('Legende'); + $this->addElementLocalized($legende, $isCompactTrad); - $description = new CubeIT_Form_Element_Markitup_Basic('description'); - $description->setLabel('Description'); - $this->addElementLocalized($description, $isCompactTrad); + $agence = new Zend_Form_Element_Text('agence'); + $agence->setLabel('Agence'); + $this->addElementLocalized($agence, $isCompactTrad); - $url = new CubeIT_Form_Element_Url('url'); - $url->setLabel('URL du site'); - $this->addElementLocalized($url, $isCompactTrad); + $description = new CubeIT_Form_Element_Markitup_Basic('description'); + $description->setLabel('Description'); + $this->addElementLocalized($description, $isCompactTrad); - $visuel = new CubeIT_Form_Element_File_Image('visuel'); - $visuel->setLabel('Visuel principal'); - $visuel->setMaxItems(1); - $this->addElementLocalized($visuel, $isCompactTrad); + $url = new CubeIT_Form_Element_Url('url'); + $url->setLabel('URL du site'); + $this->addElementLocalized($url, $isCompactTrad); - $visuel_detail = new CubeIT_Form_Element_File_Image('visuel_detail'); - $visuel_detail->setLabel('Visuels du détail'); - $this->addElementLocalized($visuel_detail, $isCompactTrad); + $visuel = new CubeIT_Form_Element_File_Image('visuel'); + $visuel->setLabel('Visuel principal'); + $visuel->setMaxItems(1); + $this->addElementLocalized($visuel, $isCompactTrad); - $tags = new Cubedesigners_Form_Element_Tags('tags'); - $tags->setLabel('Tags'); - $this->addElement($tags); + $visuel_detail = new CubeIT_Form_Element_File_Image('visuel_detail'); + $visuel_detail->setLabel('Visuels du détail'); + $this->addElementLocalized($visuel_detail, $isCompactTrad); - $bootstrap = Bootstrap::getInstance(); - $view = $bootstrap->getView(); + $categories = new Cubedesigners_Form_Element_Categories('categories'); + $categories->setLabel('Catégories'); + $this->addElement($categories); - $this->setListTitle('Réalisations') - ->setNewTitle('Créer une réalisation') - ->setEditTitle('Edition de la réalisation « $titre »') - ->setBaseTable('realisations') - ->setIdColumn('id') - ->setTitleColumn('titre'); - } + $tags = new Cubedesigners_Form_Element_Tags('tags_secondaires'); + $tags->setLabel('Tags secondaires'); + $this->addElement($tags); + + $domaine = new Cubedesigners_Form_Element_Domaines('domaines'); + $domaine->setLabel("Domaine d'activité"); + $this->addElement($domaine); + + $technologies = new Cubedesigners_Form_Element_Technologies('technologies'); + $technologies->setLabel('Technologies'); + $this->addElement($technologies); + + $bootstrap = Bootstrap::getInstance(); + $view = $bootstrap->getView(); + + $this->setListTitle('Réalisations') + ->setNewTitle('Créer une réalisation') + ->setEditTitle('Edition de la réalisation « $titre »') + ->setBaseTable('realisations') + ->setIdColumn('id') + ->setTitleColumn('titre'); + } } diff --git a/framework/application/forms/Categories.php b/framework/application/forms/Categories.php new file mode 100644 index 0000000..6c95605 --- /dev/null +++ b/framework/application/forms/Categories.php @@ -0,0 +1,26 @@ +setLabel('#'); + $this->addElement($id); + + $name = new Zend_Form_Element_Text('name'); + $name->setLabel(__('Nom')); + $this->addElement($name); + + $this->setListTitle(__('Categories')) + ->setNewTitle(__('Créer une catégorie')) + ->setEditTitle(sprintf(__("Edition de la catégorie « %s »"), '$name')) + ->setBaseTable('categories') + ->setIdColumn('id') + ->setTitleColumn('name'); + } + +} + +?> diff --git a/framework/application/forms/Domaines.php b/framework/application/forms/Domaines.php new file mode 100644 index 0000000..24ccfdb --- /dev/null +++ b/framework/application/forms/Domaines.php @@ -0,0 +1,26 @@ +setLabel('#'); + $this->addElement($id); + + $name = new Zend_Form_Element_Text('name'); + $name->setLabel(__('Nom')); + $this->addElement($name); + + $this->setListTitle(__("Domaines d'activité")) + ->setNewTitle(__('Créer un domaine')) + ->setEditTitle(sprintf(__("Edition du domaine « %s »"), '$name')) + ->setBaseTable('domaines') + ->setIdColumn('id') + ->setTitleColumn('name'); + } + +} + +?> diff --git a/framework/application/forms/Element/Categories.php b/framework/application/forms/Element/Categories.php new file mode 100644 index 0000000..cb640a8 --- /dev/null +++ b/framework/application/forms/Element/Categories.php @@ -0,0 +1,10 @@ +setBaseForm('Cubedesigners_Form_Categories'); + } + +} +?> diff --git a/framework/application/forms/Element/ContentType.php b/framework/application/forms/Element/ContentType.php index 9925b3c..1fe097d 100644 --- a/framework/application/forms/Element/ContentType.php +++ b/framework/application/forms/Element/ContentType.php @@ -2,12 +2,12 @@ class Cubedesigners_Form_Element_ContentType extends Zend_Form_Element_Select { - //public $helper = 'formContentType'; + //public $helper = 'formContentType'; - public function init() { - parent::init(); - $this->setMultiOptions(array('text' => 'Texte', 'visuel' => 'Visuel', 'video' => 'Vidéo')); - } + public function init() { + parent::init(); + $this->setMultiOptions(array('text' => 'Texte', 'visuel' => 'Visuel', 'video' => 'Vidéo')); + } } diff --git a/framework/application/forms/Element/Domaines.php b/framework/application/forms/Element/Domaines.php new file mode 100644 index 0000000..acecc73 --- /dev/null +++ b/framework/application/forms/Element/Domaines.php @@ -0,0 +1,11 @@ +setBaseForm('Cubedesigners_Form_Domaines'); + } + +} + +?> diff --git a/framework/application/forms/Element/Tags.php b/framework/application/forms/Element/Tags.php index db73104..69d506e 100644 --- a/framework/application/forms/Element/Tags.php +++ b/framework/application/forms/Element/Tags.php @@ -1,10 +1,10 @@ setBaseForm('Cubedesigners_Form_Tags'); - } + public function init() { + $this->setBaseForm('Cubedesigners_Form_Tags'); + } } diff --git a/framework/application/forms/Element/Technologies.php b/framework/application/forms/Element/Technologies.php new file mode 100644 index 0000000..139080d --- /dev/null +++ b/framework/application/forms/Element/Technologies.php @@ -0,0 +1,11 @@ +setBaseForm('Cubedesigners_Form_Technologies'); + } + +} + +?> diff --git a/framework/application/forms/Tags.php b/framework/application/forms/Tags.php index b4c0087..4909a27 100644 --- a/framework/application/forms/Tags.php +++ b/framework/application/forms/Tags.php @@ -2,58 +2,24 @@ class Cubedesigners_Form_Tags extends CubeIT_Form_List { - public function init() { - parent::init(); - - $id = new Zend_Form_Element_Hidden('id'); - $id->setLabel('#'); - $this->addElement($id); - - $name = new Zend_Form_Element_Text('name'); - $name->setLabel(__('Nom')); - $this->addElement($name); - - $this->setListTitle(__('Tags')) - ->setNewTitle(__('Créer un tag')) - ->setEditTitle(sprintf(__("Edition du tag « %s »"), '$name')) - ->setBaseTable('tags') - ->setIdColumn('id') - ->setTitleColumn('name'); - } - - public function saveInDatabase() { - $id = parent::saveInDatabase(); - /* - $db = Bootstrap::getInstance()->getDb(); - $us = $this->getElement('users'); - if (!is_null($us)) { - $e = explode(',', $us->getValue()); - // Delete all settings of this user - $db->delete('cubeit_group_content', $db->quoteInto('group_id = ?', $id)); - $binds = array(); - foreach ($e as $user) { - $binds[] = array('group_id' => $id, 'user_id' => $user); - } - - $db->insertMultiple('cubeit_group_content', $binds); - } */ - return $id; - } - - public function setValuesWithId($id) { - parent::setValuesWithId($id); - /* $db = Bootstrap::getInstance()->getDb(); - $all = $db->select() - ->from('cubeit_group_content') - ->where('group_id = ?', $id) - ->query() - ->fetchAll(Zend_Db::FETCH_ASSOC); - $users = array(); - foreach ($all as $r) { - $users[] = $r['user_id']; - } - $this->setDefault('users', implode(',', $users)); */ - } + public function init() { + parent::init(); + + $id = new Zend_Form_Element_Hidden('id'); + $id->setLabel('#'); + $this->addElement($id); + + $name = new Zend_Form_Element_Text('name'); + $name->setLabel(__('Nom')); + $this->addElement($name); + + $this->setListTitle(__('Tags')) + ->setNewTitle(__('Créer un tag')) + ->setEditTitle(sprintf(__("Edition du tag « %s »"), '$name')) + ->setBaseTable('tags') + ->setIdColumn('id') + ->setTitleColumn('name'); + } } diff --git a/framework/application/forms/Technologies.php b/framework/application/forms/Technologies.php new file mode 100644 index 0000000..f163f35 --- /dev/null +++ b/framework/application/forms/Technologies.php @@ -0,0 +1,26 @@ +setLabel('#'); + $this->addElement($id); + + $name = new Zend_Form_Element_Text('name'); + $name->setLabel(__('Nom')); + $this->addElement($name); + + $this->setListTitle(__('Technologies')) + ->setNewTitle(__('Créer une technologie')) + ->setEditTitle(sprintf(__("Edition de la technologie « %s »"), '$name')) + ->setBaseTable('technologies') + ->setIdColumn('id') + ->setTitleColumn('name'); + } + +} + +?> diff --git a/framework/application/views/helpers/CasestudiesList.php b/framework/application/views/helpers/CasestudiesList.php index 2c80a85..f62b603 100644 --- a/framework/application/views/helpers/CasestudiesList.php +++ b/framework/application/views/helpers/CasestudiesList.php @@ -2,65 +2,58 @@ class Cubedesigners_View_Helper_CasestudiesList extends Zend_View_Helper_Abstract { - public function CasestudiesList($datas) { + public function CasestudiesList($datas) { - $acl = Bootstrap::getInstance()->isAllowed("edition"); + $acl = Bootstrap::getInstance()->isAllowed("edition"); + $db = Zend_Db_Table::getDefaultAdapter(); + $s = $db->select()->from('casestudies') + ->order('id ASC'); - $db = Zend_Db_Table::getDefaultAdapter(); - $s = $db->select()->from('casestudies') - ->order('id ASC'); + if (!$acl) { + $s->where('online = ?', 1); + } - if (!$acl) { - $s->where('online = ?', 1); - } + $q = $s->query(); - $q = $s->query(); + $count = 1; - $count = 1; + $res = ''; + while ($r = $q->fetch()) { - $res = ''; + $r = CubeIT_Util_Cms::unserialize($r); - while ($r = $q->fetch()) { + $addSpacer = false; - $r = CubeIT_Util_Cms::unserialize($r); + if ($count == 3) { + $count = 1; + $addClass = ''; + } else { + $addClass = ' blocmargin'; + $count++; + } - $addSpacer = false; + $addOffline = ''; + if ($acl && $r->online == 0) { + $addOffline = 'data-offline="1"'; + } - if ($count == 3) { - $count = 1; - $addClass = ''; - // $addSpacer = true; - } else { - $addClass = ' blocmargin'; - $count++; - } + $image = $this->view->imageProcess($r->visuel, $r->titre, 300, 225); + $url = CubeIT_Navigation_Page::generateAutoUri($r, $datas['seourl_stu']); + $res .= ''; + $res .= '
'; + $res .= '
' . $image . '
'; + $res .= '
' . $r->titre . '
'; + $res .= '
' . $r->description . '
'; + $res .= '
'; + $res .= '
'; + } - $addOffline = ''; - if ($acl && $r->online == 0) { - $addOffline = 'data-offline="1"'; - } - - $image = $this->view->imageProcess($r->visuel, $r->titre, 300, 225); - $url = CubeIT_Navigation_Page::generateAutoUri($r, $datas['seourl_stu']); - $res .= ''; - $res .= '
'; - $res .= '
' . $image . '
'; - $res .= '
' . $r->titre . '
'; - $res .= '
' . $r->description . '
'; - $res .= '
'; - $res .= '
'; - - // if ($addSpacer) { - // $res .= '
'; - // } - } - - return $res; - } + return $res; + } } diff --git a/framework/application/views/helpers/CategoriesList.php b/framework/application/views/helpers/CategoriesList.php new file mode 100644 index 0000000..7b2bd09 --- /dev/null +++ b/framework/application/views/helpers/CategoriesList.php @@ -0,0 +1,49 @@ +isAllowed("edition"); + + $categorieslist = Array(); + + $db0 = Zend_Db_Table::getDefaultAdapter(); + $s0 = $db0->select()->from($rubrique) + ->order('id ASC'); + + if (!$acl) { + $s0->where('online = ?', 1); + } + + $q0 = $s0->query(); + + while ($r0 = $q0->fetch()) { + + if (!in_array($r0->categories, $categorieslist)) { + array_push($categorieslist, $r0->categories); + } + } + + $db = Zend_Db_Table::getDefaultAdapter(); + $s = $db->select()->from('categories') + ->order('name ASC'); + $q = $s->query(); + + $res = ''; + return $res; + } + +} + +?> diff --git a/framework/application/views/helpers/RealisationsList.php b/framework/application/views/helpers/RealisationsList.php index d8fe433..42e9fad 100644 --- a/framework/application/views/helpers/RealisationsList.php +++ b/framework/application/views/helpers/RealisationsList.php @@ -26,15 +26,6 @@ class Cubedesigners_View_Helper_RealisationsList extends Zend_View_Helper_Abstra $addSpacer = false; - /* if ($count == 4) { - $count = 1; - $addClass = ''; - //$addSpacer = true; - } else { - $addClass = ' blocmargin'; - $count++; - } */ - $addClass = ' blocmargin'; @@ -43,36 +34,18 @@ class Cubedesigners_View_Helper_RealisationsList extends Zend_View_Helper_Abstra $addOffline = 'data-offline="1"'; } - //$res .= ''; $visuel = $this->view->imageProcess($r->visuel_detail, '', null, 440); - fb($r); - $image = $this->view->imageProcess($r->visuel, $r->titre, 230, 230); $url = CubeIT_Navigation_Page::generateAutoUri($r, $datas['seourl_rea']); $res .= ''; - /* $res .= '
'; - $res .= ''; - - $res .= '
' . $visuel . '
'; - $res .= '
'; */ - $res .= '
'; + $res .= '
'; $res .= '
' . $image . '
'; - //$res .= '
' . $r->titre . '
'; $res .= '
'; $res .= ''; - // if ($addSpacer) { - // $res .= '
'; - // } $test++; $count++; diff --git a/framework/application/views/scripts/templates/casestudies.phtml b/framework/application/views/scripts/templates/casestudies.phtml index b978e02..7726010 100644 --- a/framework/application/views/scripts/templates/casestudies.phtml +++ b/framework/application/views/scripts/templates/casestudies.phtml @@ -5,14 +5,14 @@ $this->headScript()->addScriptAndStyle('casestudies');
markupDotclear($this->titre); ?>
- CasestudiesTagsList($this->studies); - ?> + CategoriesList('casestudies'); + ?>
- getCMSDatasOfPage($this->id); - echo $this->CasestudiesList($datas); - ?> + getCMSDatasOfPage($this->id); + echo $this->CasestudiesList($datas); + ?>
\ No newline at end of file diff --git a/framework/application/views/scripts/templates/realisations.phtml b/framework/application/views/scripts/templates/realisations.phtml index 50778aa..da5ca4f 100644 --- a/framework/application/views/scripts/templates/realisations.phtml +++ b/framework/application/views/scripts/templates/realisations.phtml @@ -7,13 +7,15 @@ $this->headScript()->addScriptAndStyle('realisations');
markupDotclear($this->titre); ?>
- CasestudiesTagsList($this->studies); ?> + CategoriesList("realisations"); + ?>
- getCMSDatasOfPage($this->id); - echo $this->RealisationsList($datas); - ?> + getCMSDatasOfPage($this->id); + echo $this->RealisationsList($datas); + ?>
diff --git a/js/casestudies.js b/js/casestudies.js index 600ac49..e269a2a 100644 --- a/js/casestudies.js +++ b/js/casestudies.js @@ -11,10 +11,16 @@ function initTagsLink() { $(".tag").click(function() { + $(this).toggleClass('active'); if( $(this).hasClass('active') ) { - showIds.push( $(this).attr("data-id") ); + if( $(this).attr("data-id") != 0) { + showIds.push( $(this).attr("data-id") ); + }else{ + showIds = new Array(); + $(".tag").removeClass('active'); + } } else { var index = $.inArray( $(this).attr("data-id"), showIds ); showIds.splice(index, 1); @@ -27,35 +33,24 @@ function initTagsLink() { } displayStudies(); - - //alert(showIds); }); } function displayStudies() { - if( showIds.length == 0 ) { - //$(".tag:first").toggleClass('active'); + if( showIds.length ) { + $('#casestudies-list .bloc').each(function(){ + var categories = $(this).attr("data-categories"); + if( $.inArray( categories, showIds ) == -1 ) { + $(this).fadeOut( 500, function() {}); + }else{ + $(this).fadeIn( 500, function() {}); + } + }); + }else{ + $( '#casestudies-list .bloc' ).fadeIn( 500, function() {}); } - /*$.ajax({ - url : '/ajax/displaycasestudies', - type : 'GET', - data: 'studies=' + showIds, - success: function(){ - - } - });*/ - - $('#casestudies-list .bloc').each(function(){ - //alert($(this).attr("data-tags")); - - var tags = $(this).attr("data-tags").split(','); - //fb(tags, "Tags a afficher"); - - - }); - } diff --git a/js/realisations.js b/js/realisations.js index b0fcb78..e88ea9b 100644 --- a/js/realisations.js +++ b/js/realisations.js @@ -9,9 +9,10 @@ var currentSlide = 1; var autoSlide = false; var totalWidth; var lastWidth; +var showIds = new Array(); function load_realisations() { - //initTagsLink(); + initTagsLink(); $(".bloc").click( function () { @@ -67,6 +68,17 @@ function load_realisations() { detail += '
Agence : '+rea.agence+'
'; } + + detail += ''; + + detail += '
'+rea.description+'
'; detail += 'Voir le site'; detail += '
'; @@ -174,25 +186,50 @@ function initTagsLink() { $(".tag").click(function() { + $(".close").click(); + $(this).toggleClass('active'); if( $(this).hasClass('active') ) { - showIds.push( $(this).attr("data-id") ); + if( $(this).attr("data-id") != 0) { + showIds.push( $(this).attr("data-id") ); + }else{ + showIds = new Array(); + $(".tag").removeClass('active'); + } } else { var index = $.inArray( $(this).attr("data-id"), showIds ); showIds.splice(index, 1); } - + if( showIds.length > 0 ) { $(".tag:first").removeClass('active'); }else{ $(".tag:first").addClass('active'); } + displayRealisations(); }); } +function displayRealisations() { + + if( showIds.length ) { + $('#realisations-list .bloc').each(function(){ + var categories = $(this).attr("data-categories"); + if( $.inArray( categories, showIds ) == -1 ) { + $(this).parent().fadeOut( 500, function() {}); + }else{ + $(this).parent().fadeIn( 500, function() {}); + } + }); + }else{ + $( '#realisations-list .bloc' ).parent().fadeIn( 500, function() {}); + } + +} + function initSlideShow() { var mouse_move=false; @@ -230,6 +267,7 @@ function initSlideShow() { $(le_div + " ul").animate({marginLeft:"+=2px"},0); } } + },5); $(le_div).mouseout(function(){ diff --git a/less/admin.less b/less/admin.less index 56dd021..1f930d1 100644 --- a/less/admin.less +++ b/less/admin.less @@ -38,3 +38,8 @@ #adminBar a.right{ float:right; } + +#tags_secondaires-element select, +#technologies-element select { + height: 200px; +} diff --git a/less/realisations.less b/less/realisations.less index c1a8648..1ba97a2 100644 --- a/less/realisations.less +++ b/less/realisations.less @@ -150,6 +150,27 @@ color: #545454; } + ul { + margin-top:20px; + list-style: none; + } + + li { + font-size: 14px; + color: #6f6f6f; + padding: 3px 6px; + border-radius: 2px; + background-color: #ededed; + margin:0 6px 6px 0; + display: inline-block; + } + + li:hover, li:active { + cursor:default; + color: #fff; + background-color: #84ae1e; + } + .description { font-size: 14px; color: #545454; -- 2.39.5