From: stephen@cubedesigners.com Date: Mon, 4 Feb 2019 13:27:23 +0000 (+0000) Subject: Deployment, bug fixes and other adjustments requested by the client. WIP #2340 @1.5 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=69f26428f8dc4a559a32d42f347864d3ee1bb310;p=ccgm.git Deployment, bug fixes and other adjustments requested by the client. WIP #2340 @1.5 --- diff --git a/framework/application/configs/application.ini b/framework/application/configs/application.ini index 534c751..4e6be9b 100644 --- a/framework/application/configs/application.ini +++ b/framework/application/configs/application.ini @@ -67,4 +67,18 @@ dev = true httpauth.username = ccgm httpauth.password = 20ccgm13 -seo.robots = false \ No newline at end of file +seo.robots = false + +[dev-local : base] + +dev = true +webhost = ccgm.test +session.domain = .ccgm.test + +minify.js = true +minify.css = true + +database.params.host = localhost +database.params.username = root +database.params.password = +database.params.dbname = ccgm diff --git a/framework/application/controllers/ResearchCategoriesController.php b/framework/application/controllers/ResearchCategoriesController.php deleted file mode 100644 index 3f10fb8..0000000 --- a/framework/application/controllers/ResearchCategoriesController.php +++ /dev/null @@ -1,42 +0,0 @@ -view->headScript()->addScriptAndStyle('research'); - - $parent = $this->view->currentPage->getParent(); - $parent_data = $this->getBootstrap()->getCMSDatasOfNavigationPage($parent); - $this->view->datas = $parent_data; - - $db = Zend_Db_Table::getDefaultAdapter(); - $select = $db->select()->from(['s' => 'research_studies']) - ->joinInner(['c' => 'research_categories'], 'c.id = s.category', ['c.name AS category_name']) - ->order('s.id DESC') - ->where('s.category = ?', $this->getRequest()->getParam('research_category_id')); - $query = $select->query(); - - //echo 'QUERY: '. (string) $select; - -// if (!$q->rowCount()) { -// $this->_404(); -// return; -// } - -// $r = CubeIT_Util_Cms::unserialize($q->fetch()); - $this->view->parent_title = $parent_data['shortTitle']; - $this->view->sidebar = $parent_data['sidebar']; - $this->view->studies = $query->fetchAll(); - - // Get specialities data - $specialities = []; - $query_specialities = $db->select()->from('research_specialities')->query(); - while ($speciality = $query_specialities->fetch()) { - $specialities[$speciality->id] = CubeIT_Util_Object::toArray($speciality); - } - - $this->view->specialities = $specialities; - } - -} diff --git a/framework/application/controllers/ResearchcategoriesController.php b/framework/application/controllers/ResearchcategoriesController.php new file mode 100644 index 0000000..44f59eb --- /dev/null +++ b/framework/application/controllers/ResearchcategoriesController.php @@ -0,0 +1,42 @@ +view->headScript()->addScriptAndStyle('research'); + + $parent = $this->view->currentPage->getParent(); + $parent_data = $this->getBootstrap()->getCMSDatasOfNavigationPage($parent); + $this->view->datas = $parent_data; + + $db = Zend_Db_Table::getDefaultAdapter(); + $select = $db->select()->from(['s' => 'research_studies']) + ->joinInner(['c' => 'research_categories'], 'c.id = s.category', ['c.name AS category_name']) + ->order('s.id DESC') + ->where('s.category = ?', $this->getRequest()->getParam('research_category_id')); + $query = $select->query(); + + //echo 'QUERY: '. (string) $select; + +// if (!$q->rowCount()) { +// $this->_404(); +// return; +// } + +// $r = CubeIT_Util_Cms::unserialize($q->fetch()); + $this->view->parent_title = $parent_data['shortTitle']; + $this->view->sidebar = $parent_data['sidebar']; + $this->view->studies = $query->fetchAll(); + + // Get specialities data + $specialities = []; + $query_specialities = $db->select()->from('research_specialities')->query(); + while ($speciality = $query_specialities->fetch()) { + $specialities[$speciality->id] = CubeIT_Util_Object::toArray($speciality); + } + + $this->view->specialities = $specialities; + } + +} diff --git a/framework/application/forms/CMS/ResearchStudies.php b/framework/application/forms/CMS/ResearchStudies.php index 622a53c..78e8989 100644 --- a/framework/application/forms/CMS/ResearchStudies.php +++ b/framework/application/forms/CMS/ResearchStudies.php @@ -24,6 +24,10 @@ class CCGM_Form_CMS_ResearchStudies extends CubeIT_Form_List_Model { $pathology->setLabel('Pathologie'); $this->addElement($pathology); + $promoter = new Zend_Form_Element_Text('promoter'); + $promoter->setLabel('Promoteur'); + $this->addElement($promoter); + $investigator = new Zend_Form_Element_Text('investigator'); $investigator->setLabel('Investigateur'); $this->addElement($investigator); diff --git a/framework/application/models/ResearchStudy.php b/framework/application/models/ResearchStudy.php index 4f01b0a..f4d02d6 100644 --- a/framework/application/models/ResearchStudy.php +++ b/framework/application/models/ResearchStudy.php @@ -7,6 +7,7 @@ class CCGM_Model_ResearchStudy extends CubeIT_Model_Data_Table { protected $description; protected $category; protected $pathology; + protected $promoter; protected $investigator; protected $specialities; @@ -16,6 +17,7 @@ class CCGM_Model_ResearchStudy extends CubeIT_Model_Data_Table { $table->addColumn('description', 'text'); $table->addColumn('category', 'integer'); $table->addColumn('pathology', 'text'); + $table->addColumn('promoter', 'text'); $table->addColumn('investigator', 'text'); $table->addColumn('specialities', 'text'); } diff --git a/framework/application/views/scripts/research-categories/index.phtml b/framework/application/views/scripts/research-categories/index.phtml index 28728ed..19c0a9c 100644 --- a/framework/application/views/scripts/research-categories/index.phtml +++ b/framework/application/views/scripts/research-categories/index.phtml @@ -17,19 +17,26 @@ $this->showsidebar = false;
title ?>
-
description) ?>
+
markupDotclear($study->description) ?>
- title}") ?>" class="study-contact">Nous contacter + title}") ?>" class="study-contact">Nous contacter
-

Pathologie : pathology ?>

-

Investigateur : investigator ?>

+

Pathologie(s) : pathology ?>

+

Promoteur : promoter ?>

+

Investigateur principal : investigator ?>

+ + specialities); + if (!empty($specialities)): + ?>

Spécialité(s) : - specialities) as $specialityID): ?> +

+
diff --git a/index.php b/index.php index 7277588..44a1dab 100644 --- a/index.php +++ b/index.php @@ -8,6 +8,8 @@ if ($_SERVER['HTTP_HOST'] == 'www.ccgm.fr') { define('APPLICATION_ENV', 'production'); } else if ($_SERVER['HTTP_HOST'] == 'medecins.ccgm.fr') { define('APPLICATION_ENV', 'medecins'); +} else if ($_SERVER['HTTP_HOST'] == 'ccgm.test') { + define('APPLICATION_ENV', 'dev-local'); } include dirname(__FILE__) . '/CubeIT/common.php'; diff --git a/js/research.js b/js/research.js index 6a55159..6b38887 100644 --- a/js/research.js +++ b/js/research.js @@ -3,7 +3,7 @@ TO_LOAD_ONCE[TO_LOAD_ONCE.length] = 'load_research();'; function load_research() { var maxHeight = 100, // 20px line height so 100 is 5 lines - more = 'En savoir plus', + more = 'Lire la suite', less = 'Réduire'; $('.study-description').each(function() { diff --git a/less/actualites.less b/less/actualites.less index fbbe51f..4529c84 100644 --- a/less/actualites.less +++ b/less/actualites.less @@ -10,7 +10,7 @@ width:981px; position:relative; padding: 19px 0 16px; - background-image:url("/images/news.svg"); + background-image:url("../images/news.svg"); background-position: 0 50%; background-repeat: no-repeat; height:30px; @@ -73,7 +73,7 @@ top:0px; right:185px; position:absolute; - background-image: url("/images/arrow-news-left.svg"); + background-image: url("../images/arrow-news-left.svg"); background-repeat: no-repeat; background-size: 30px 30px; } @@ -81,7 +81,7 @@ .btn-next { margin:0 0 0 5px; right:150px; - background-image: url("/images/arrow-news-right.svg"); + background-image: url("../images/arrow-news-right.svg"); background-repeat: no-repeat; } diff --git a/less/carrousel.less b/less/carrousel.less index 2eb2c8c..95cfecf 100644 --- a/less/carrousel.less +++ b/less/carrousel.less @@ -40,7 +40,7 @@ margin: 0 0 0 9px; } .slideshow .pagination li a { - background-image:url("/images/elements.png"); + background-image:url("../images/elements.png"); background-position:-15px 0; width: 15px; height: 16px; @@ -81,4 +81,4 @@ .slideshow .caption em{ font-style:italic; font-size:21px; -} \ No newline at end of file +} diff --git a/less/common.less b/less/common.less index 6b2e9e9..89ec04b 100644 --- a/less/common.less +++ b/less/common.less @@ -92,7 +92,7 @@ q:after { } .logo { - background-image: url("/images/logo.svg"); + background-image: url("../images/logo.svg"); width: 392px; height: 91px; overflow: hidden; @@ -143,31 +143,31 @@ q:after { } #nav li a[data-name="centre"] { - background-image: url("/images/centre.svg?css"); + background-image: url("../images/centre.svg?css"); background-position: 50% 0; background-repeat: no-repeat; } #nav li a[data-name="parcours"] { - background-image: url("/images/parcours.svg?css"); + background-image: url("../images/parcours.svg?css"); background-position: 50% 0; background-repeat: no-repeat; } #nav li a[data-name="pathologies"] { - background-image: url("/images/pathologies.svg?css"); + background-image: url("../images/pathologies.svg?css"); background-position: 50% 0; background-repeat: no-repeat; } #nav li a[data-name="recherche"] { - background-image: url("/images/recherche.svg"); + background-image: url("../images/recherche.svg"); background-position: 50% 0; background-repeat: no-repeat; } #nav li a[data-name="pratique"] { - background-image: url("/images/pratique.svg"); + background-image: url("../images/pratique.svg"); background-position: 50% 0; background-repeat: no-repeat; } @@ -196,7 +196,7 @@ q:after { } .add-nav li:last-child a { - background-image: url("/images/arrow-header.svg"); + background-image: url("../images/arrow-header.svg"); background-repeat: no-repeat; background-position: 100% 2px; padding: 0 19px 0 0; @@ -257,7 +257,7 @@ q:after { .nav li a { padding: 0 0 1px 24px; display: block; - background-image: url("/images/arrow-grey-right.svg"); + background-image: url("../images/arrow-grey-right.svg"); background-position: 0 1px; } @@ -268,13 +268,13 @@ q:after { } .info-area .box { - background-image: url("/images/telephone.svg"); + background-image: url("../images/telephone.svg"); padding: 2px 0 30px 38px; overflow: hidden; } .info-area .box.information { - background-image: url("/images/exclamation.svg"); + background-image: url("../images/exclamation.svg"); margin-left: 53px; } @@ -384,7 +384,7 @@ q:after { } #content ul li { - background-image: url("/images/arrow-li.svg"); + background-image: url("../images/arrow-li.svg"); background-position: 0 2px; padding: 0 0 3px 30px; } @@ -413,7 +413,7 @@ q:after { } #content blockquote > ul > li { - background-image: url("/images/bullet.svg"); + background-image: url("../images/bullet.svg"); background-position: 2px 8px; padding: 0 0 3px 9px; font-style: italic; @@ -428,7 +428,7 @@ q:after { } #footer .timing .note { - background-image: url("/images/horaires.svg"); + background-image: url("../images/horaires.svg"); margin: 0 0 28px 53px; padding: 0 0 0 37px; line-height: 26px; @@ -499,11 +499,11 @@ q:after { text-transform: none; padding: 14px 20px; margin: 3px 0 0 0; - background-image: url("/images/arrow-accordion-bottom.svg"); + background-image: url("../images/arrow-accordion-bottom.svg"); background-position: 100% 50%; &.open { - background-image: url("/images/arrow-accordion-top.svg"); + background-image: url("../images/arrow-accordion-top.svg"); } } } diff --git a/less/intranetident.less b/less/intranetident.less index a55e915..d1dda66 100644 --- a/less/intranetident.less +++ b/less/intranetident.less @@ -15,7 +15,7 @@ position: relative; left:-30px; padding:0 0 0 30px; - background-image: url("/images/arrow-li.svg"); + background-image: url("../images/arrow-li.svg"); background-position: 0 5px; } @@ -69,7 +69,7 @@ width:38px; border-radius: 3px; background-color:#0ea6db; - background-image: url("/images/arrow-nav-1.svg"); + background-image: url("../images/arrow-nav-1.svg"); background-position: 50% 50%; padding:0; } @@ -84,4 +84,4 @@ } } } -} \ No newline at end of file +} diff --git a/less/news.less b/less/news.less index 992142e..ac81477 100644 --- a/less/news.less +++ b/less/news.less @@ -82,7 +82,7 @@ height: 15px; position: relative; top: 3px; - background-image: url("/images/arrow-li.svg"); + background-image: url("../images/arrow-li.svg"); background-size: 100% 100%; transform: rotate(90deg); } @@ -96,4 +96,4 @@ } } } -} \ No newline at end of file +} diff --git a/less/parcours.less b/less/parcours.less index 8d1ce3e..1aa7c57 100644 --- a/less/parcours.less +++ b/less/parcours.less @@ -3,17 +3,17 @@ #etapes{ &[data-nb="6"]{ - background-image: url("/images/etapes6.png"); + background-image: url("../images/etapes6.png"); width:721px; height:477px; } &[data-nb="7"]{ - background-image: url("/images/etapes7.png"); + background-image: url("../images/etapes7.png"); width:709px; height:477px; } &.etoile{ - background-image: url("/images/etoile.png"); + background-image: url("../images/etoile.png"); width:420px; height:420px; margin: 240px 0px 200px 100px; @@ -87,4 +87,4 @@ font-size: 14px; } } -} \ No newline at end of file +} diff --git a/less/rendezvous.less b/less/rendezvous.less index fef79dd..cfa0b65 100644 --- a/less/rendezvous.less +++ b/less/rendezvous.less @@ -35,7 +35,7 @@ position:absolute; right:5px; top:5px; - background-image:url("/images/closeconf.png"); + background-image:url("../images/closeconf.png"); width:13px; height:13px; display: block; @@ -131,4 +131,4 @@ float: none; text-decoration: none; } -} \ No newline at end of file +} diff --git a/less/sidebar.less b/less/sidebar.less index 67218b9..b53b1a7 100644 --- a/less/sidebar.less +++ b/less/sidebar.less @@ -28,7 +28,7 @@ padding: 8px 5px 8 39px; &:hover, &.active { - background-image: url("/images/arrow-nav-2.svg"); + background-image: url("../images/arrow-nav-2.svg"); background-position: 22px 14px; background-color: #c5e9f6; } @@ -46,7 +46,7 @@ > ul { > li:hover, > li.active { - background-image: url("/images/arrow-nav-1.svg"); + background-image: url("../images/arrow-nav-1.svg"); background-position: 9px 7px; background-color: #57c1e6; }