]> _ Git - ccgm.git/commitdiff
(no commit message)
authorvincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Thu, 5 Dec 2013 10:52:05 +0000 (10:52 +0000)
committervincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Thu, 5 Dec 2013 10:52:05 +0000 (10:52 +0000)
framework/application/Bootstrap.php
framework/application/configs/application.ini
framework/application/views/helpers/Essais.php
framework/application/views/scripts/templates/listing.phtml
less/listing.less [new file with mode: 0644]

index 36f8f6beadd77362d2a811685f3414bc26229cc9..104a21c627e2fde271b8823e694fdec3044b96ec 100644 (file)
@@ -33,6 +33,21 @@ class Bootstrap extends CubeIT_Bootstrap {
 
        protected function _initAcl() {
                $acl = parent::_initAcl();
+               $acl->addRole('medecin');
+               $acl->addRole('personnel');
+
+               $acl->addResource('medecin');
+               $acl->addResource('personnel');
+
+               $acl->addResource('administration/users/medecin');
+               $acl->addResource('administration/users/personnel');
+
+               $acl->allow('medecin', 'medecin');
+               $acl->allow('personnel', 'personnel');
+
+               $acl->allow('admin', 'administration/users/medecin');
+               $acl->allow('admin', 'administration/users/personnel');
+
                return $acl;
        }
 
@@ -44,7 +59,7 @@ class Bootstrap extends CubeIT_Bootstrap {
                $templates = array();
                $templates['Génériques'] = array('text' => 'Page de texte', 'liens' => 'Liens', 'faq' => 'Questions / Réponses', 'temoignages' => 'Témoignages');
                $templates['Accueil'] = array('home' => 'Page d\'accueil');
-               $templates['Le centre'] = array('equipes' => 'L\'équipe','reunion'=>'Réunion de concertation');
+               $templates['Le centre'] = array('equipes' => 'L\'équipe', 'reunion' => 'Réunion de concertation');
                $templates['Recherche clinique'] = array('listing' => 'Listing');
                $templates['Parcours patient'] = array('parcours' => 'Parcours', 'soins' => 'Soins support');
                $templates['Traitements'] = array('traitement' => 'Traitement (Texte avec accordéon)');
index 4f051eb3950aeacd4bc2adfd4589b4ca85863f44..1ab33925de9487aaaaad2a8258bad30c91ed461a 100644 (file)
@@ -39,6 +39,8 @@ navigation.containers[]=-3;
 acl.perpage = false
 acl.roles[] = superadmin
 acl.roles[] = admin
+acl.roles[] = medecin
+acl.roles[] = personnel
 
 mail.test = APPLICATION_PATH "/../data/email/test"
 
@@ -50,7 +52,7 @@ locales.fr =
 variant = 0
 
 [medecins : base]
-dev=false
+dev=true
 
 variant = 1
 webhost = medecins.ccgm.fr
index 6a50fa5685268361f3633ea7df868abaafdbaabd..e12ef81a76693c8a7678ebe4ea99a5aa283a657b 100644 (file)
@@ -13,14 +13,22 @@ class CCGM_View_Helper_Essais extends Zend_View_Helper_Abstract {
 \r
        protected function _liste($liste) {\r
                $res = '<section>';\r
-               $res.='<h3>' . $liste->titre . '</h3>';\r
-               $res.=$this->_table($liste->essais);\r
+               $res.='<h3>' . $liste['titre'] . '</h3>';\r
+               $res.=$this->_table($liste['essais']);\r
                $res.='</section>';\r
                return $res;\r
        }\r
 \r
        protected function _table($essais) {\r
-               \r
+               $classes = array(array('class' => 'titre'), array('class' => 'code'), array('class' => 'localisation'), array('class' => 'phase'), array('class' => 'promoteur'));\r
+               $head = array(array('Titre de l\'essai', 'Code de l\'essai', 'Localisation', 'Phase', 'Promoteur'));\r
+               $datas = array();\r
+               foreach ($essais as $e) {\r
+                       $row = array($e['titre'], $e['code'], $e['localisation'], $e['phase'], $e['promoteur']);\r
+                       $datas[] = $row;\r
+               }\r
+\r
+               return $this->view->table($head, $datas, array(), array(), $classes);\r
        }\r
 \r
 }\r
index bc3df1f603c5970a66f5b5940fc1597df62e4cd4..de6c064eceefabcfa2818101aa6f24bc8d731c8e 100644 (file)
@@ -1,3 +1,4 @@
+<?php $this->headScript()->addScriptAndStyle('listing') ?>\r
 <section id="content">\r
        <div id="c">\r
                <?php\r
diff --git a/less/listing.less b/less/listing.less
new file mode 100644 (file)
index 0000000..9016859
--- /dev/null
@@ -0,0 +1,55 @@
+#content .essais{
+       section{
+               margin:45px 0;
+
+               h3{
+                       font-size:24px;
+                       color:#e71a92;
+                       text-transform: uppercase;
+                       text-indent: 18px;
+                       font-weight: 300;
+               }
+
+               table{
+                       border-collapse: collapse;
+                       table-layout: fixed;
+                       font-size:16px;
+
+                       td,th{
+                               padding:20px;
+                               border:1px solid #c7c7c7;
+                               box-sizing: border-box;
+                       }
+                       th{
+                               white-space: nowrap;
+                               text-align: left;
+                               font-weight: 500;
+                       }
+                       td{
+                               background-color:#f0eff0;
+                               vertical-align:middle;
+                               &.titre{
+                                       width:380px;
+                                       vertical-align: top;
+                               }
+                               &.code{
+                                       width:160px;
+                               }
+                               &.localisation{
+                                       width:172px;
+                               }
+                               &.phase{
+                                       width:82px;
+                                       text-align: center;
+                               }
+                               &.promoteur{
+                                       width:186px;
+                               }
+                       }
+
+                       .odd td{
+                               background-color:#fff;
+                       }
+               }
+       }
+}
\ No newline at end of file