]> _ Git - cubedesigners-v7.git/commitdiff
Improve rendering of text templates
authorvincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Tue, 20 Jan 2015 19:13:44 +0000 (19:13 +0000)
committervincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Tue, 20 Jan 2015 19:13:44 +0000 (19:13 +0000)
Improve export of translations in Excel

framework/application/forms/CMS/Sub/Agence/Persons.php
framework/application/forms/CMS/Sub/Agence/Persons/Bloc.php
framework/application/forms/CMS/Sub/Agence/Persons/Blocs.php
framework/application/forms/CMS/Sub/CaseStudiesList.php
framework/application/forms/CMS/Sub/Casestudies/Content/Bloc.php
framework/application/forms/CMS/Sub/Casestudies/Content/Blocs.php
framework/application/forms/CMS/Sub/Casestudies/Studies.php
framework/application/views/scripts/templates/text.phtml
less/header.less
less/text.less [new file with mode: 0644]
less/twocols.less

index 8fd47fb1b06e451ec32d33f366d092d3c0eefcad..1820195eab9471d346486a41312e3685934f7ed0 100644 (file)
@@ -2,18 +2,16 @@
 
 class Cubedesigners_Form_CMS_Sub_Agence_Persons extends CubeIT_Form_SubForm {
 
-    public function init() {
-        parent::init();
+       public function init() {
+               parent::init();
 
-        $titre = new Zend_Form_Element_Text('titre');
-        $titre->setLabel('Titre');
-        $this->addElement($titre);
+               $titre = new Zend_Form_Element_Text('titre');
+               $titre->setLabel('Titre');
+               $this->addElement($titre);
 
-        $blocs = new Cubedesigners_Form_CMS_Sub_Agence_Persons_Blocs('blocs');
-        $blocs->setLegend('Personnes');
-        $this->addSubForm($blocs, 'blocs');
-    }
+               $blocs = new Cubedesigners_Form_CMS_Sub_Agence_Persons_Blocs('blocs');
+               $blocs->setLegend('Personnes');
+               $this->addSubForm($blocs, 'blocs');
+       }
 
 }
-
-?>
index e1cba8a04743a34268c69b6176e4541915abfc42..736d0525b613c3c89b23e11250216811ad5d17cf 100644 (file)
@@ -2,27 +2,25 @@
 
 class Cubedesigners_Form_CMS_Sub_Agence_Persons_Bloc extends CubeIT_Form_SubForm {
 
-    public function init() {
-        parent::init();
+       public function init() {
+               parent::init();
 
-        $titre = new Zend_Form_Element_Text('titre');
-        $titre->setLabel('Prénom et nom');
-        $this->addElement($titre);
+               $titre = new Zend_Form_Element_Text('titre');
+               $titre->setLabel('Prénom et nom');
+               $this->addElement($titre);
 
-        $poste = new Zend_Form_Element_Text('poste');
-        $poste->setLabel('Poste');
-        $this->addElement($poste);
+               $poste = new Zend_Form_Element_Text('poste');
+               $poste->setLabel('Poste');
+               $this->addElement($poste);
 
-        $texte = new CubeIT_Form_Element_Markitup_Basic('texte');
-        $texte->setLabel('Texte');
-        $this->addElement($texte);
+               $texte = new CubeIT_Form_Element_Markitup_Basic('texte');
+               $texte->setLabel('Texte');
+               $this->addElement($texte);
 
-        $photo = new CubeIT_Form_Element_File_Image('photo');
-        $photo->setLabel('Photo');
-        $photo->setMaxItems(1);
-        $this->addElement($photo);
-    }
+               $photo = new CubeIT_Form_Element_File_Image('photo');
+               $photo->setLabel('Photo');
+               $photo->setMaxItems(1);
+               $this->addElement($photo);
+       }
 
-}
-
-?>
+}
\ No newline at end of file
index 0c6fe369c52d28389ad54ab2ac79e6b3a0013c54..f2878b7a4a522692791bc003504bd3895a99f9c3 100644 (file)
@@ -2,15 +2,14 @@
 
 class Cubedesigners_Form_CMS_Sub_Agence_Persons_Blocs extends CubeIT_Form_Multi_SubForm {
 
-    public function init() {
-        parent::init();
+       public function init() {
+               parent::init();
 
-        $bloc = new Cubedesigners_Form_CMS_Sub_Agence_Persons_Bloc();
-        $this->setBaseSubForm($bloc);
-        $this->setBaseLegend('Edition de « $titre »');
-        $this->setNewLegend('Nouvelle personne');
-    }
+               $bloc = new Cubedesigners_Form_CMS_Sub_Agence_Persons_Bloc();
+               $this->setBaseSubForm($bloc);
+               $this->setBaseLegend('Edition de « $titre »');
+               $this->setNewLegend('Nouvelle personne');
+       }
 
 }
 
-?>
index 268dae419f903a7fe753f9eb5b1d7f25bb84f50b..6cd87e0c3c32fc981f07a7d4bc98d938f0fed665 100644 (file)
@@ -13,7 +13,7 @@ class Cubedesigners_Form_CMS_Sub_CaseStudiesList extends CubeIT_Form_SubForm {
                $soustitre->setLabel('Sous-titre');
                $this->addElementLocalized($soustitre);
 
-               $lines = new Zend_Form_Element_Text('lines');
+               $lines = new CubeIT_Form_Element_Int('lines');
                $lines->setLabel('Nombre de lignes à afficher');
                $lines->setValue(2);
                $this->addElement($lines);
index 2807cf4ee29654cfddd209e8847a197119c86982..7e6ca7f836806de6fd9a4e55e9cbf99127a43f20 100644 (file)
@@ -11,7 +11,7 @@ class Cubedesigners_Form_CMS_Sub_Casestudies_Content_Bloc extends CubeIT_Form_Su
                $select->setAttrib('data-name', 'selected-type');
                $this->addElement($select);
 
-               $margin = new Zend_Form_Element_Text('margin');
+               $margin = new CubeIT_Form_Element_Int('margin');
                $margin->setLabel("Décalage vertical du bloc (en pixels)");
                $this->addElement($margin);
 
@@ -41,7 +41,7 @@ class Cubedesigners_Form_CMS_Sub_Casestudies_Content_Bloc extends CubeIT_Form_Su
                $visuel->setMaxItems(1);
                $this->addElementLocalized($visuel, $isCompactTrad);
 
-               $visuelpadding = new Zend_Form_Element_Text('visuelpadding');
+               $visuelpadding = new CubeIT_Form_Element_Int('visuelpadding');
                $visuelpadding->setLabel('Margin intérieur sous le visuel');
                $visuelpadding->setValue(50);
                $this->addElement($visuelpadding);
index 69c8243a4e65d8d5254cfaf12a0b951647fd18cb..9812c7cec0bf4a64a6ac0f11c40cca90e6607a20 100644 (file)
@@ -2,16 +2,13 @@
 
 class Cubedesigners_Form_CMS_Sub_Casestudies_Content_Blocs extends CubeIT_Form_Multi_SubForm {
 
-    public function init() {
-        parent::init();
+       public function init() {
+               parent::init();
 
-        $bloc = new Cubedesigners_Form_CMS_Sub_Casestudies_Content_Bloc();
-        $this->setBaseSubForm($bloc);
-        //$this->setBaseLegend('Edition du contenu « $titre »');
-        $this->setBaseLegend('Edition du contenu');
-        $this->setNewLegend('Nouveau contenu');
-    }
+               $bloc = new Cubedesigners_Form_CMS_Sub_Casestudies_Content_Bloc();
+               $this->setBaseSubForm($bloc);
+               $this->setBaseLegend('Edition du contenu');
+               $this->setNewLegend('Nouveau contenu');
+       }
 
-}
-
-?>
+}
\ No newline at end of file
index cf5c552cdd58a45be720d53f5a652db2ef9464fb..9d0f5d83b9b9a92c7527d82641cbba5ef7b86964 100644 (file)
@@ -14,10 +14,6 @@ class Cubedesigners_Form_CMS_Sub_Casestudies_Studies extends CubeIT_Form_List_Mo
                $online->setLabel('En ligne');
                $this->addElement($online);
 
-               $propulse = new Zend_Form_Element_Checkbox('propulse');
-               $propulse->setLabel('Propulsée');
-               $this->addElement($propulse);
-
                $annee = new CubeIT_Form_Element_Date('annee');
                $annee->setPrecision(Zend_Date::DAY);
                $annee->setLabel('Année');
@@ -49,7 +45,7 @@ class Cubedesigners_Form_CMS_Sub_Casestudies_Studies extends CubeIT_Form_List_Mo
                $legende->setLabel('Legende du visuel');
                $this->addElementLocalized($legende, $isCompactTrad);
 
-               $color = new Zend_Form_Element_Text('couleur');
+               $color = new CubeIT_Form_Element_Color('couleur');
                $color->setLabel('Code couleur de la zone de contenu');
                $this->addElement($color);
 
index 98d08cf4233f0d51a96d603e3ef001857cfed8c7..64878e5d86944104397cd67a21314478ac85c074 100644 (file)
@@ -1,3 +1,4 @@
 <?php
 
 echo $this->twocols();
+$this->headScript()->addScriptAndStyle('text');
index 252ff4c227736a67b3b08046d17557218b0e16dd..8b0fc57e7a1ee6fa9748b145c7c320796be6a109 100644 (file)
@@ -1,46 +1,46 @@
 #header {
-    height:130px;
+       height: 130px;
 
-    ul{
+       ul {
                text-transform: uppercase;
-               font-size:15px;
-               color:#3885e0;
+               font-size: 15px;
+               color: #3885e0;
                list-style: none;
 
-               li{
-                       float:left;
+               li {
+                       float: left;
 
-                       a{
-                               color:#282828;
+                       a {
+                               color: #282828;
                                padding: 10px;
 
-                               &:hover{
+                               &:hover {
                                        border-radius: 2px;
                                        background-color: #84ae1e;
-                                       color:#fff !important;
+                                       color: #fff !important;
                                }
                        }
 
-                       &.active a{
-                               color:#3885e0;
+                       &.active a {
+                               color: #3885e0;
                        }
                }
 
-    }
+       }
 
        .logo {
-               width:318px;
-               height:132px;
-               position:absolute;
+               width: 318px;
+               height: 132px;
+               position: absolute;
                top: 0;
                left: 0;
 
-               &:hover{
-                       .svg{
-                               cursor:pointer;
-                               svg{
-                                       #Background{
-                                               fill:#ff0000 !important;
+               &:hover {
+                       .svg {
+                               cursor: pointer;
+                               svg {
+                                       #Background {
+                                               fill: #ff0000 !important;
                                        }
                                }
                        }
        }
 
        .sublogo {
-               display:none;
+               display: none;
        }
 
-       .navigation{
+       .navigation {
                margin: 50px 0;
-               float:right;
+               float: right;
        }
 
-       .navigation li{
-               margin:0 20px 0 0;
-               &:last-child{
+       .navigation li {
+               margin: 0 20px 0 0;
+               &:last-child {
                        margin-right: 0;
                }
        }
 ////////////////////////
 // @TODO tidy this up... and remove old .menu-link classes
 
-
 .nav-icon {
-  display: none;
+       display: none;
 }
 
-
 ///////
 
 //a.menu-link {
 //}
 
 .js nav[role=navigation] {
-  max-height: none;
+       max-height: none;
 }
 
 @media screen and (max-width: 890px) {
 
-  // Nav-icon from: http://w3bits.com/animated-menu-icon-css/
-  .nav-icon {
-    //margin: 1em;
-    width: 34px;
-    position: absolute;
-    top: 3px;
-    right: 0;
-    padding: 2em 34px; // 34px is to push it away from the right margin and keep aligned with right edge
-    box-sizing: content-box;
-    display: inline-block;
-
-    &:hover {
-      cursor: pointer;
-    }
-  }
-
-  .nav-icon:after,
-  .nav-icon:before,
-  .nav-icon div {
-    background-color: #3885e0;
-    border-radius: 3px;
-    content: '';
-    display: block;
-    height: 4px;
-    margin: 6px 0;
-    transition: all .3s ease-in-out;
-  }
-
-  .nav-icon.active:after,
-  .nav-icon.active:before,
-  .nav-icon.active div {
-    background-color: #fff;
-  }
-  .nav-icon.active {
-    opacity: 0.7;
-  }
-
-
-  // Nav icon animation
-  .nav-icon.active:before {
-    transform: translateY(10px) rotate(135deg);
-  }
-
-  .nav-icon.active:after {
-    transform: translateY(-10px) rotate(-135deg);
-  }
-
-  .nav-icon.active div {
-    transform: scale(0);
-    transition: all .15s ease-in-out;
-  }
-
-
-
-////////
-
-  #header.content {
-    padding: 0;
-  }
-
-  #header {
-    height: auto;
-    min-height: 130px;
-  }
-
-  nav[role=navigation] {
-    background-color: #202020;
-    //margin: 0 -20px; // To offset the 20px margin from .content
-  }
-
-//  a.menu-link {
-//    position: absolute;
-//    top: 0;
-//    right: 0;
-//    padding: 0.5em 34px 0.5em 0.5em; // 34px is to push it away from the right margin and keep aligned with right edge
-////    background: #3885e0;
-////    border-radius: 2px;
-//    font: bold 36px sans-serif;
-//    color: #3885e0;
-//    text-transform: uppercase;
-//    display: inline-block;
-//  }
-  nav[role=navigation] {
-    clear: both;
-    transition: all 0.3s ease-out;
-  }
-  .js nav[role=navigation] {
-    overflow: hidden;
-    max-height: 0;
-  }
-  nav[role=navigation].active {
-    max-height: 16em;
-    padding: 135px 0 20px 0;
-    box-sizing: content-box;
-  }
-  #header .navigation {
-    margin: 0;
-    padding: 0;
-    float: none;
-    text-align: center;
-
-    li {
-      float: none;
-      margin: 0;
-    }
-
-    a {
-      color: #fff !important;
-      display: block;
-    }
-  }
+       // Nav-icon from: http://w3bits.com/animated-menu-icon-css/
+       .nav-icon {
+               //margin: 1em;
+               width: 34px;
+               position: absolute;
+               top: 3px;
+               right: 0;
+               padding: 2em 34px; // 34px is to push it away from the right margin and keep aligned with right edge
+               box-sizing: content-box;
+               display: inline-block;
+
+               &:hover {
+                       cursor: pointer;
+               }
+       }
+
+       .nav-icon:after,
+       .nav-icon:before,
+       .nav-icon div {
+               background-color: #3885e0;
+               border-radius: 3px;
+               content: '';
+               display: block;
+               height: 4px;
+               margin: 6px 0;
+               transition: all .3s ease-in-out;
+       }
+
+       .nav-icon.active:after,
+       .nav-icon.active:before,
+       .nav-icon.active div {
+               background-color: #fff;
+       }
+
+       .nav-icon.active {
+               opacity: 0.7;
+       }
+
+       // Nav icon animation
+       .nav-icon.active:before {
+               transform: translateY(10px) rotate(135deg);
+       }
+
+       .nav-icon.active:after {
+               transform: translateY(-10px) rotate(-135deg);
+       }
+
+       .nav-icon.active div {
+               transform: scale(0);
+               transition: all .15s ease-in-out;
+       }
+
+       ////////
+       #header.content {
+               padding: 0;
+       }
+
+       #header {
+               height: auto;
+               min-height: 130px;
+       }
+
+       nav[role=navigation] {
+               background-color: #202020;
+               //margin: 0 -20px; // To offset the 20px margin from .content
+       }
+
+       //  a.menu-link {
+       //    position: absolute;
+       //    top: 0;
+       //    right: 0;
+       //    padding: 0.5em 34px 0.5em 0.5em; // 34px is to push it away from the right margin and keep aligned with right edge
+       ////    background: #3885e0;
+       ////    border-radius: 2px;
+       //    font: bold 36px sans-serif;
+       //    color: #3885e0;
+       //    text-transform: uppercase;
+       //    display: inline-block;
+       //  }
+       nav[role=navigation] {
+               clear: both;
+               transition: all 0.3s ease-out;
+       }
+
+       .js nav[role=navigation] {
+               overflow: hidden;
+               max-height: 0;
+       }
+
+       nav[role=navigation].active {
+               max-height: 16em;
+               padding: 135px 0 20px 0;
+               box-sizing: content-box;
+       }
+
+       #header .navigation {
+               margin: 0;
+               padding: 0;
+               float: none;
+               text-align: center;
+
+               li {
+                       float: none;
+                       margin: 0;
+               }
+
+               a {
+                       color: #fff !important;
+                       display: block;
+                       &:hover {
+                               border-radius: 0;
+                       }
+               }
+       }
 
 }
diff --git a/less/text.less b/less/text.less
new file mode 100644 (file)
index 0000000..861a8d6
--- /dev/null
@@ -0,0 +1,15 @@
+.twocols .dotclear {\r
+\r
+       p {\r
+               margin: 20px 0 20px 0;\r
+       }\r
+\r
+       ul {\r
+               margin: 10px 0 20px 0;\r
+       }\r
+\r
+       h2 {\r
+               margin-top: 40px;\r
+       }\r
+\r
+}
\ No newline at end of file
index 28d9f9a097f95a81c542f9a86f13ca401f5eceb8..5e97774970195dcd3a796c2b20a11b0fa7c26224 100644 (file)
@@ -1,54 +1,54 @@
-.twocols{
-
-  max-width: 980px;
-  margin: 0 auto;
-
-  .dotclear{
-      p{
-          margin:30px 0 30px 0;
-        }
-
-      ul{
-          margin:15px 0 30px 0;
-          list-style: none;
-          li{
-              &:before{
-                  content:"- ";
-                }
-            }
-        }
-    }
+.twocols {
+
+       max-width: 980px;
+       margin: 0 auto;
+
+       .dotclear {
+               p {
+                       margin: 30px 0 30px 0;
+               }
+
+               ul {
+                       margin: 15px 0 30px 0;
+                       list-style: none;
+                       li {
+                               &:before {
+                                       content: "- ";
+                               }
+                       }
+               }
+       }
 
        .cols {
-        padding-bottom: 50px;
-               white-space:nowrap;
+               padding-bottom: 50px;
+               white-space: nowrap;
 
                .col {
                        white-space: normal;
-                       display:inline-block;
+                       display: inline-block;
                        width: 50%;
                        padding-right: 20px;
                        vertical-align: top;
-            
-                       &:last-child{
-                               padding-right:0;
-                padding-left: 20px;
+
+                       &:last-child {
+                               padding-right: 0;
+                               padding-left: 20px;
                        }
                }
 
-        @media screen and (max-width: 790px) {
+               @media screen and (max-width: 790px) {
 
-          padding-bottom: 10px;
+                       padding-bottom: 10px;
 
-          .col {
-            width: 100%;
-            padding: 0;
-            display: block;
+                       .col {
+                               width: 100%;
+                               padding: 0;
+                               display: block;
 
-            &:last-child {
-              padding: 0;
-            }
-          }
-        }
+                               &:last-child {
+                                       padding: 0;
+                               }
+                       }
+               }
        }
 }
\ No newline at end of file