]> _ Git - ccgm.git/commitdiff
(no commit message)
authorvincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Wed, 14 May 2014 18:06:36 +0000 (18:06 +0000)
committervincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Wed, 14 May 2014 18:06:36 +0000 (18:06 +0000)
framework/application/configs/application.ini
framework/application/forms/CMS/Sub/Home/Actualite.php
framework/application/views/helpers/Actualites.php
less/actualites.less

index c2f33052dbccc8c37a35926ea7273df39d99f6bb..e86d0d2dbbcfd1f9b17306ce7be10546f3c1104c 100644 (file)
@@ -48,8 +48,6 @@ mailjet.password = b4d51c4c1d0193f9b0963c2c374dd882
 locales.fr =
 
 [production : base]
-
-dev = true
 variant = 0
 
 webhost = www.ccgm.fr
@@ -57,8 +55,6 @@ webhost = www.ccgm.fr
 seo.universalAnalytics = UA-42799235-1
 
 [medecins : base]
-dev=true
-
 variant = 1
 webhost = medecins.ccgm.fr
 
index 88bb7f52993d53f9197eff96b6e66dd84c85830a..8c805ee6e6b8e02e319b854a30c2fca9e2e8aa9d 100644 (file)
@@ -10,6 +10,10 @@ class CCGM_Form_CMS_Sub_Home_Actualite extends CubeIT_Form_SubForm {
                $date->setPrecision(CubeIT_Date::DAY);\r
                $this->addElement($date);\r
 \r
+               $noshowdate = new Zend_Form_Element_Checkbox('noshowdate');\r
+               $noshowdate->setLabel('Masquer la date (la date indiquée plus haut sera utilisée pour déterminer l\'ordre des actualités');\r
+               $this->addElement($noshowdate);\r
+\r
                $news = new Zend_Form_Element_Textarea('news');\r
                $news->setLabel('Information');\r
                $news->setAttrib('rows', 2);\r
@@ -21,4 +25,4 @@ class CCGM_Form_CMS_Sub_Home_Actualite extends CubeIT_Form_SubForm {
                $this->addSubForm($lien, 'lien');\r
        }\r
 \r
-}
\ No newline at end of file
+}\r
index f84224214cb6c8ec627ecb28a03e0dc82d07512a..0248d755dcf05bd762fbd9bc45c6b30fd068630e 100644 (file)
@@ -29,10 +29,20 @@ class CCGM_View_Helper_Actualites extends Zend_View_Helper_Abstract {
        }\r
 \r
        protected function _actu($a) {\r
-               $res = '<div class="slide"><p>';\r
-               $res.=$this->view->dateTime($a['date'], Zend_Date::DAY . '/' . Zend_Date::MONTH . '/' . Zend_Date::YEAR, array('class' => 'date')) . ' ';\r
-               $res.=$a['news'];\r
-               $res.='</p></div>';\r
+               $nline = min(substr_count($a['news'], "\n") + 1, 2);\r
+\r
+               $attrs = array('data-lines' => $nline);\r
+\r
+               $res = '<div class="slide">';\r
+               $p = '';\r
+               if (!$a['noshowdate']) {\r
+                       $p.=$this->view->dateTime($a['date'], Zend_Date::DAY . '/' . Zend_Date::MONTH . '/' . Zend_Date::YEAR, array('class' => 'date')) . ' ';\r
+               } else {\r
+                       $attrs['class'] = 'nodate';\r
+               }\r
+               $p.=nl2br($a['news']);\r
+               $res.=$this->view->htmlElement($p, 'p', $attrs);\r
+               $res.='</div>';\r
                return $res;\r
        }\r
 \r
index a5fcfb6893df3806028695489f01891ed455e268..69e0318b0cd6c49498aa0fe324b597b33d70a874 100644 (file)
@@ -1,65 +1,92 @@
 .updates {
        background:#f4f1f1;
        position: relative;
-       font-weight:400;
-       font-style:italic;
-       font-size:14px;
-       line-height:31px;
+
+
+       .holder{
+               margin:0 auto;
+               width:981px;
+               position:relative;
+               padding: 19px 0 16px;
+               background-image:url(../images/news.svg);
+               background-position: 0 50%;
+               background-repeat: no-repeat;
+               height:30px;
+
+               .mask {
+                       position: relative;
+                       overflow: hidden;
+                       height:40px;
+                       width: 910px;
+
+                       .slideset {
+                               position: relative;
+                               overflow: hidden;
+                               width: 870px;
+                               height:40px;
+                               left:39px;
+
+                               .slide {
+                                       width: 870px;
+                                       display:none;
+                                       position:absolute;
+                                       top:0px;
+
+
+                                       p{
+                                               white-space: nowrap;
+                                               overflow: hidden;
+                                               text-overflow: ellipsis;
+                                               font-weight:400;
+                                               font-style:italic;
+                                               font-size:14px;
+                                               line-height:31px;
+
+                                               &[data-lines="2"]{
+                                                       line-height: 18px;
+                                                       margin-top: -4px;
+                                               }
+
+                                               .date{
+                                                       font-weight:500;
+                                                       margin: 0 5px 0 0;
+                                                       font-style:italic;
+                                               }
+                                       }
+                               }
+                       }
+               }
+
+               .btn-area{
+                       position:absolute;
+                       right:0;
+                       top:20px;
+
+
+                       .btn-prev,
+                       .btn-next {
+                               width: 30px;
+                               height: 31px;
+                               text-indent: -9999px;
+                               overflow: hidden;
+                               top:0px;
+                               right:35px;
+                               position:absolute;
+                               background-image: url(../images/arrow-news-left.svg);
+                               background-repeat: no-repeat;
+                               background-size: 30px 30px;
+                       }
+
+                       .btn-next {
+                               margin:0 0 0 5px;
+                               right:0px;
+                               background-image: url(../images/arrow-news-right.svg);
+                               background-repeat: no-repeat;
+                       }
+               }
+       }
+
+
+
+
 }
-.updates .holder{
-       margin:0 auto;
-       width:981px;
-       position:relative;
-       padding: 19px 0 16px;
-       background-image:url(../images/news.svg);
-       background-position: 0 50%;
-       background-repeat: no-repeat;
-}
-.updates .mask {
-       position: relative;
-       overflow: hidden;
-       width: 910px;
-}
-.updates .slideset {
-       position: relative;
-       overflow: hidden;
-       width: 870px;
-       height: 30px;
-       left:39px;
-}
-.updates .slide {
-       width: 870px;
-       display:none;
-       position:absolute;
-       top:0px;
-}
-.updates .btn-prev,
-.updates .btn-next {
-       width: 30px;
-       height: 31px;
-       text-indent: -9999px;
-       overflow: hidden;
-       top:0px;
-       right:35px;
-       position:absolute;
-       background-image: url(../images/arrow-news-left.svg);
-       background-repeat: no-repeat;
-       background-size: 30px 30px;
-}
-.updates .btn-next {
-       margin:0 0 0 5px;
-       right:0px;
-       background-image: url(../images/arrow-news-right.svg);
-       background-repeat: no-repeat;
-}
-.updates .btn-area{
-       position:absolute;
-       right:0;
-       top:20px;
-}
-.updates p{white-space: nowrap;overflow: hidden;text-overflow: ellipsis;}
-.updates .date{
-       font-weight:500;
-       margin: 0 5px 0 0;
-       font-style:italic;
-}
\ No newline at end of file