Sfoglia il codice sorgente

materiau print page css

Bachir Soussi Chiadmi 10 anni fa
parent
commit
c90787212b

+ 25 - 0
sites/all/modules/features/materio_content_types/materio_content_types.features.field_base.inc

@@ -10,6 +10,27 @@
 function materio_content_types_field_default_field_bases() {
   $field_bases = array();
 
+  // Exported field_base: 'description_field'
+  $field_bases['description_field'] = array(
+    'active' => 1,
+    'cardinality' => 1,
+    'deleted' => 0,
+    'entity_types' => array(),
+    'field_name' => 'description_field',
+    'indexes' => array(
+      'format' => array(
+        0 => 'format',
+      ),
+    ),
+    'locked' => 0,
+    'module' => 'text',
+    'settings' => array(
+      'entity_translation_sync' => FALSE,
+    ),
+    'translatable' => 1,
+    'type' => 'text_with_summary',
+  );
+
   // Exported field_base: 'field_attachments'
   $field_bases['field_attachments'] = array(
     'active' => 1,
@@ -894,6 +915,9 @@ foreach ($states as $state) {
     'deleted' => 0,
     'entity_types' => array(),
     'field_name' => 'name_field',
+    'field_permissions' => array(
+      'type' => 0,
+    ),
     'indexes' => array(
       'format' => array(
         0 => 'format',
@@ -904,6 +928,7 @@ foreach ($states as $state) {
     'settings' => array(
       'entity_translation_sync' => FALSE,
       'max_length' => 255,
+      'profile2_private' => FALSE,
     ),
     'translatable' => 1,
     'type' => 'text',

+ 62 - 21
sites/all/modules/features/materio_content_types/materio_content_types.features.field_instance.inc

@@ -2186,7 +2186,7 @@ function materio_content_types_field_default_field_instances() {
         'label' => 'above',
         'settings' => array(),
         'type' => 'hidden',
-        'weight' => 17,
+        'weight' => 18,
       ),
       'teaser' => array(
         'label' => 'above',
@@ -2268,7 +2268,7 @@ function materio_content_types_field_default_field_instances() {
         'label' => 'above',
         'settings' => array(),
         'type' => 'hidden',
-        'weight' => 10,
+        'weight' => 12,
       ),
       'teaser' => array(
         'label' => 'above',
@@ -2358,7 +2358,7 @@ function materio_content_types_field_default_field_instances() {
           'viewmode' => 'print',
         ),
         'type' => 'tode',
-        'weight' => 5,
+        'weight' => 8,
       ),
       'teaser' => array(
         'label' => 'above',
@@ -2449,7 +2449,7 @@ function materio_content_types_field_default_field_instances() {
           'viewmode' => 'print',
         ),
         'type' => 'tode',
-        'weight' => 4,
+        'weight' => 7,
       ),
       'teaser' => array(
         'label' => 'above',
@@ -2532,7 +2532,7 @@ function materio_content_types_field_default_field_instances() {
         'module' => 'text',
         'settings' => array(),
         'type' => 'text_default',
-        'weight' => 2,
+        'weight' => 6,
       ),
       'teaser' => array(
         'label' => 'hidden',
@@ -2611,7 +2611,7 @@ function materio_content_types_field_default_field_instances() {
         'label' => 'above',
         'settings' => array(),
         'type' => 'hidden',
-        'weight' => 8,
+        'weight' => 10,
       ),
       'teaser' => array(
         'label' => 'above',
@@ -2686,7 +2686,7 @@ function materio_content_types_field_default_field_instances() {
         'label' => 'above',
         'settings' => array(),
         'type' => 'hidden',
-        'weight' => 9,
+        'weight' => 11,
       ),
       'teaser' => array(
         'label' => 'above',
@@ -2761,10 +2761,11 @@ function materio_content_types_field_default_field_instances() {
         'weight' => 14,
       ),
       'print' => array(
-        'label' => 'above',
+        'label' => 'hidden',
+        'module' => 'text',
         'settings' => array(),
-        'type' => 'hidden',
-        'weight' => 16,
+        'type' => 'text_plain',
+        'weight' => 5,
       ),
       'teaser' => array(
         'label' => 'above',
@@ -2867,7 +2868,7 @@ function materio_content_types_field_default_field_instances() {
           'image_style' => 'pdf',
         ),
         'type' => 'image',
-        'weight' => 3,
+        'weight' => 7,
       ),
       'teaser' => array(
         'label' => 'above',
@@ -2963,7 +2964,7 @@ function materio_content_types_field_default_field_instances() {
         'label' => 'above',
         'settings' => array(),
         'type' => 'hidden',
-        'weight' => 11,
+        'weight' => 13,
       ),
       'teaser' => array(
         'label' => 'above',
@@ -3040,7 +3041,7 @@ function materio_content_types_field_default_field_instances() {
         'label' => 'above',
         'settings' => array(),
         'type' => 'hidden',
-        'weight' => 15,
+        'weight' => 17,
       ),
       'teaser' => array(
         'label' => 'above',
@@ -3127,7 +3128,7 @@ function materio_content_types_field_default_field_instances() {
           'title_style' => '',
         ),
         'type' => 'title_linked',
-        'weight' => 1,
+        'weight' => 2,
       ),
       'teaser' => array(
         'label' => 'hidden',
@@ -3205,7 +3206,7 @@ function materio_content_types_field_default_field_instances() {
         'label' => 'above',
         'settings' => array(),
         'type' => 'hidden',
-        'weight' => 12,
+        'weight' => 14,
       ),
       'teaser' => array(
         'label' => 'above',
@@ -3293,9 +3294,10 @@ function materio_content_types_field_default_field_instances() {
       ),
       'print' => array(
         'label' => 'hidden',
+        'module' => 'computed_field',
         'settings' => array(),
-        'type' => 'hidden',
-        'weight' => 7,
+        'type' => 'computed_field_plain',
+        'weight' => 4,
       ),
       'teaser' => array(
         'label' => 'hidden',
@@ -3370,7 +3372,7 @@ function materio_content_types_field_default_field_instances() {
         'label' => 'above',
         'settings' => array(),
         'type' => 'hidden',
-        'weight' => 13,
+        'weight' => 15,
       ),
       'teaser' => array(
         'label' => 'above',
@@ -3448,7 +3450,7 @@ function materio_content_types_field_default_field_instances() {
         'label' => 'above',
         'settings' => array(),
         'type' => 'hidden',
-        'weight' => 14,
+        'weight' => 16,
       ),
       'teaser' => array(
         'label' => 'above',
@@ -3524,7 +3526,7 @@ function materio_content_types_field_default_field_instances() {
         'label' => 'above',
         'settings' => array(),
         'type' => 'hidden',
-        'weight' => 6,
+        'weight' => 9,
       ),
       'teaser' => array(
         'label' => 'hidden',
@@ -3608,7 +3610,7 @@ function materio_content_types_field_default_field_instances() {
         'module' => 'text',
         'settings' => array(),
         'type' => 'text_default',
-        'weight' => 0,
+        'weight' => 1,
       ),
       'teaser' => array(
         'label' => 'hidden',
@@ -4121,6 +4123,45 @@ function materio_content_types_field_default_field_instances() {
     ),
   );
 
+  // Exported field_instance: 'taxonomy_term-tag_libres-description_field'
+  $field_instances['taxonomy_term-tag_libres-description_field'] = array(
+    'bundle' => 'tag_libres',
+    'default_value' => NULL,
+    'deleted' => 0,
+    'description' => '',
+    'display' => array(
+      'default' => array(
+        'label' => 'above',
+        'settings' => array(),
+        'type' => 'hidden',
+        'weight' => 2,
+      ),
+    ),
+    'entity_type' => 'taxonomy_term',
+    'field_name' => 'description_field',
+    'label' => 'Description',
+    'required' => FALSE,
+    'settings' => array(
+      'display_summary' => 0,
+      'entity_translation_sync' => FALSE,
+      'hide_label' => array(
+        'entity' => FALSE,
+        'page' => FALSE,
+      ),
+      'text_processing' => 1,
+      'user_register_form' => FALSE,
+    ),
+    'widget' => array(
+      'module' => 'text',
+      'settings' => array(
+        'rows' => 20,
+        'summary_rows' => 5,
+      ),
+      'type' => 'text_textarea_with_summary',
+      'weight' => 1,
+    ),
+  );
+
   // Exported field_instance: 'taxonomy_term-tag_libres-name_field'
   $field_instances['taxonomy_term-tag_libres-name_field'] = array(
     'bundle' => 'tag_libres',

+ 99 - 0
sites/all/modules/features/materio_content_types/materio_content_types.field_group.inc

@@ -159,6 +159,39 @@ function materio_content_types_field_group_info() {
   );
   $export['group_fichiers|node|materiau|form'] = $field_group;
 
+  $field_group = new stdClass();
+  $field_group->disabled = FALSE; /* Edit this to true to make a default field_group disabled initially */
+  $field_group->api_version = 1;
+  $field_group->identifier = 'group_head_right|node|materiau|print';
+  $field_group->group_name = 'group_head_right';
+  $field_group->entity_type = 'node';
+  $field_group->bundle = 'materiau';
+  $field_group->mode = 'print';
+  $field_group->parent_name = '';
+  $field_group->data = array(
+    'label' => 'head right',
+    'weight' => '3',
+    'children' => array(
+      0 => 'field_localisation',
+      1 => 'field_reference_materio',
+    ),
+    'format_type' => 'div',
+    'format_settings' => array(
+      'label' => 'head right',
+      'instance_settings' => array(
+        'id' => '',
+        'classes' => 'group-head-right field-group-div',
+        'description' => '',
+        'show_label' => '0',
+        'label_element' => 'h3',
+        'effect' => 'none',
+        'speed' => 'fast',
+      ),
+      'formatter' => 'open',
+    ),
+  );
+  $export['group_head_right|node|materiau|print'] = $field_group;
+
   $field_group = new stdClass();
   $field_group->disabled = FALSE; /* Edit this to true to make a default field_group disabled initially */
   $field_group->api_version = 1;
@@ -1569,6 +1602,40 @@ function materio_content_types_field_group_info() {
   );
   $export['group_side_left|node|materiau|cardfull'] = $field_group;
 
+  $field_group = new stdClass();
+  $field_group->disabled = FALSE; /* Edit this to true to make a default field_group disabled initially */
+  $field_group->api_version = 1;
+  $field_group->identifier = 'group_side_left|node|materiau|print';
+  $field_group->group_name = 'group_side_left';
+  $field_group->entity_type = 'node';
+  $field_group->bundle = 'materiau';
+  $field_group->mode = 'print';
+  $field_group->parent_name = '';
+  $field_group->data = array(
+    'label' => 'side left',
+    'weight' => '6',
+    'children' => array(
+      0 => 'field_description',
+      1 => 'field_company_fab',
+      2 => 'field_company_distrib',
+    ),
+    'format_type' => 'div',
+    'format_settings' => array(
+      'label' => 'side left',
+      'instance_settings' => array(
+        'id' => '',
+        'classes' => 'side group-side-left field-group-div',
+        'description' => '',
+        'show_label' => '0',
+        'label_element' => 'h3',
+        'effect' => 'none',
+        'speed' => 'fast',
+      ),
+      'formatter' => 'open',
+    ),
+  );
+  $export['group_side_left|node|materiau|print'] = $field_group;
+
   $field_group = new stdClass();
   $field_group->disabled = FALSE; /* Edit this to true to make a default field_group disabled initially */
   $field_group->api_version = 1;
@@ -1641,6 +1708,38 @@ function materio_content_types_field_group_info() {
   );
   $export['group_side_right|node|materiau|cardfull'] = $field_group;
 
+  $field_group = new stdClass();
+  $field_group->disabled = FALSE; /* Edit this to true to make a default field_group disabled initially */
+  $field_group->api_version = 1;
+  $field_group->identifier = 'group_side_right|node|materiau|print';
+  $field_group->group_name = 'group_side_right';
+  $field_group->entity_type = 'node';
+  $field_group->bundle = 'materiau';
+  $field_group->mode = 'print';
+  $field_group->parent_name = '';
+  $field_group->data = array(
+    'label' => 'side right',
+    'weight' => '7',
+    'children' => array(
+      0 => 'field_materiau_image',
+    ),
+    'format_type' => 'div',
+    'format_settings' => array(
+      'label' => 'side right',
+      'instance_settings' => array(
+        'id' => '',
+        'classes' => 'side group-side-right field-group-div',
+        'description' => '',
+        'show_label' => '0',
+        'label_element' => 'h3',
+        'effect' => 'none',
+        'speed' => 'fast',
+      ),
+      'formatter' => 'open',
+    ),
+  );
+  $export['group_side_right|node|materiau|print'] = $field_group;
+
   $field_group = new stdClass();
   $field_group->disabled = FALSE; /* Edit this to true to make a default field_group disabled initially */
   $field_group->api_version = 1;

+ 5 - 0
sites/all/modules/features/materio_content_types/materio_content_types.info

@@ -38,6 +38,7 @@ features[ctools][] = field_group:field_group:1
 features[ctools][] = strongarm:strongarm:1
 features[ctools][] = views:views_default:3.0
 features[features_api][] = api:2
+features[field_base][] = description_field
 features[field_base][] = field_attachments
 features[field_base][] = field_authored_on
 features[field_base][] = field_breve_ref
@@ -73,6 +74,7 @@ features[field_group][] = group_base|node|breve|form
 features[field_group][] = group_base|node|materiau|form
 features[field_group][] = group_contact_ope|node|materiau|form
 features[field_group][] = group_fichiers|node|materiau|form
+features[field_group][] = group_head_right|node|materiau|print
 features[field_group][] = group_header|node|breve|bookmark
 features[field_group][] = group_header|node|breve|cardbig
 features[field_group][] = group_header|node|breve|cardfull
@@ -117,8 +119,10 @@ features[field_group][] = group_side_5|node|materiau|cardbig
 features[field_group][] = group_side_5|node|materiau|cardmedium
 features[field_group][] = group_side_left|node|breve|cardfull
 features[field_group][] = group_side_left|node|materiau|cardfull
+features[field_group][] = group_side_left|node|materiau|print
 features[field_group][] = group_side_right|node|breve|cardfull
 features[field_group][] = group_side_right|node|materiau|cardfull
+features[field_group][] = group_side_right|node|materiau|print
 features[field_group][] = group_upload|node|breve|form
 features[field_instance][] = node-breve-body
 features[field_instance][] = node-breve-field_authored_on
@@ -168,6 +172,7 @@ features[field_instance][] = taxonomy_term-company-synonyms_synonym
 features[field_instance][] = taxonomy_term-onthologie-field_used_on_advanced_search
 features[field_instance][] = taxonomy_term-onthologie-name_field
 features[field_instance][] = taxonomy_term-onthologie-synonyms_synonym
+features[field_instance][] = taxonomy_term-tag_libres-description_field
 features[field_instance][] = taxonomy_term-tag_libres-name_field
 features[field_instance][] = taxonomy_term-tag_libres-synonyms_synonym
 features[image][] = card-big

+ 10 - 2
sites/all/modules/features/materio_content_types/materio_content_types.strongarm.inc

@@ -265,6 +265,10 @@ function materio_content_types_strongarm() {
             'weight' => '-99',
             'visible' => FALSE,
           ),
+          'print' => array(
+            'weight' => '0',
+            'visible' => FALSE,
+          ),
         ),
         'workflow' => array(
           'cardmedium' => array(
@@ -287,6 +291,10 @@ function materio_content_types_strongarm() {
             'weight' => '99',
             'visible' => FALSE,
           ),
+          'print' => array(
+            'weight' => '8',
+            'visible' => FALSE,
+          ),
         ),
       ),
     ),
@@ -942,7 +950,7 @@ function materio_content_types_strongarm() {
   $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
   $strongarm->api_version = 1;
   $strongarm->name = 'print_newwindow';
-  $strongarm->value = '1';
+  $strongarm->value = '0';
   $export['print_newwindow'] = $strongarm;
 
   $strongarm = new stdClass();
@@ -1311,7 +1319,7 @@ function materio_content_types_strongarm() {
   $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
   $strongarm->api_version = 1;
   $strongarm->name = 'print_robots_noarchive';
-  $strongarm->value = 0;
+  $strongarm->value = 1;
   $export['print_robots_noarchive'] = $strongarm;
 
   $strongarm = new stdClass();

File diff suppressed because it is too large
+ 153 - 153
sites/all/themes/gui/materiobasetheme/css/styles.css


+ 11 - 3
sites/all/themes/gui/materiobasetheme/preprocess/print.pre.php

@@ -1,4 +1,4 @@
-<?php 
+<?php
 
 // print '<pre>';
 // print_r($vars);
@@ -11,6 +11,14 @@ $vars['print']['site_slogan'] = variable_get('site_slogan', '');
 $site_title = array();
 // $site_title[] = $vars['print']['title'];
 $site_title[] = $vars['print']['site_name'];
-$site_title[] = $vars['print']['site_slogan']; 
+$site_title[] = $vars['print']['site_slogan'];
 
-$vars['print']['site_title'] = implode(' | ', $site_title);
+$vars['print']['site_title'] = implode(' | ', $site_title);
+
+$footer_message_msg = variable_get('footer_message_msg', '');
+
+// print '<pre>';
+// print_r($footer_message_msg);
+// print '</pre>';
+
+$vars['site_footer'] = $footer_message_msg['value'];

+ 107 - 5
sites/all/themes/gui/materiobasetheme/scss/styles.scss

@@ -134,7 +134,6 @@
   border: 2px solid #ccc; background-color:#ccc; color:#4D4D4D; // blanc/bleu
   @include shadowTextBtnWhite();
   text-align: center; text-decoration: none;
-
 }
 
 @mixin bouton-bleu(){
@@ -166,11 +165,13 @@
     }
   }
 }
+
 @mixin bgcWhite(){
   background-color: rgba(255, 255, 255, 0.8);
   text-shadow:0 0 4px rgba(255, 255, 255, 0.4);
   @include transition-simply-prefix(background-color 0.2s ease-out); // text-shadow 0.2s ease-out); //change this
 }
+
 @mixin bgcBlack(){
   background-color: rgba(0, 0, 0, 0.7);
   text-shadow:0 0 4px rgba(0, 0, 0, 0.4);
@@ -985,14 +986,12 @@ $headerouterheight:$headerheight+$headerpaddingtop+$headerpaddingbottom;
       #edit-bundles-filter{display:none;}
     }
   }
-
 }
 
 #center{
   background-color: #e6e6e6; @include rounded(10px);
   .node-type-page &{ background-color:#fff; }
   .ie8 &{height:100%; margin-top:20px;}
-
 }
 
 #content{
@@ -1582,6 +1581,109 @@ article.node-materiau.vm-cardfull, article.node-breve.vm-cardfull{
   }
 }
 
+/*
+               _            _     _
+ ___ ___ ___ _| |   ___ ___|_|___| |_
+|  _| .'|  _| . |  | . |  _| |   |  _|
+|___|__,|_| |___|  |  _|_| |_|_|_|_|
+                   |_|
+*/
+body.print-node-materiau{
+  margin:2em;
+}
+
+.print-content .node-materiau{
+  @include card($cardfull_w, auto);
+  padding:1em; margin:0;
+
+  .field-name-title-field{@include fs500;@include fs36;}
+  // .field-name-field-reference-materio, .field-name-field-localisation, .field-name-field-authored-on{ @include inlineblock(); @include fs12; padding-right:15px;}
+
+  .field-name-field-nature-titre{
+    @include fs500;@include fs24; margin-bottom: 0.5em;
+  }
+
+  .group-head-right{
+    position:absolute;
+    top:0; right:0;
+    padding:1em;
+    text-align: right;
+  }
+
+  .side{@include inlineblock(); width:50%;
+    &.group-side-left{
+      // @include border-radius(5px, 0, 0, 5px);
+    }
+    &.group-side-right{
+      @include border-radius(5px, 5px, 5px, 5px);
+      .field-name-field-materiau-image{
+        // padding-left:1em;
+        float:right;
+      }
+      // , .field-items, .field-item{
+      //   @include inlineblock();
+
+      // }
+    }
+
+  }
+
+  .field-name-field-description,
+  .field-name-field-company-fab,
+  .field-name-field-reference-distrib
+  {
+    padding-bottom: 1em;
+  }
+
+
+}
+
+/*
+    ____  ____  _____   ________
+   / __ \/ __ \/  _/ | / /_  __/
+  / /_/ / /_/ // //  |/ / / /
+ / ____/ _, _// // /|  / / /
+/_/   /_/ |_/___/_/ |_/ /_/
+
+*/
+
+
+.print-site_name{
+  width:100%;
+  vertical-align: bottom;
+  margin-bottom:1em;
+  h1{
+    margin:0;
+    @include fs36;
+    @include inlineblock(); vertical-align: baseline; position:relative; line-height:1.25;
+    a{
+      color:inherit;
+      &:hover{text-decoration: none ;}
+    }
+  }
+  span.beta{
+    line-height:1; letter-spacing: 0.1em;
+    color:rgb(0,0,122);
+    @include fs12;
+    position:absolute; left:0; padding-left:0; margin-left:0;
+  }
+  span.slogan{
+    @include fs14;
+    margin-top:-3px;
+    margin-left:-0.5em;
+    @include fs900;
+    .ie8 &{position: absolute; margin-top:22px;}
+  }
+}
+
+.print-content{
+  margin-bottom: 1em;
+}
+
+.print-footer{
+  margin-bottom: 2em;
+}
+
 @import "misc.scss";
 
 
@@ -1604,7 +1706,6 @@ article.node-materiau.vm-cardfull, article.node-breve.vm-cardfull{
     &.selected{background-color: rgba(0,0,0,0.8);}
     div{padding:0.1em 5px;} @include fs12;
   }
-
 }
 
 /**
@@ -1791,10 +1892,12 @@ article.node-materiau.vm-cardfull, article.node-breve.vm-cardfull{
     @include rounded(3px);
   }
 }
+
 @mixin tabs-secondary(){
   @include fs10;
   padding: 0.5em 1em;
 }
+
 #tasks{
   ul.tabs{
     @include inlineblock();
@@ -1816,7 +1919,6 @@ article.node-materiau.vm-cardfull, article.node-breve.vm-cardfull{
   }
 }
 
-
 /*
    ______________  _____________________
   / ___/_  __/   |/_  __/  _/ ____/ ___/

+ 3 - 21
sites/all/themes/gui/materiobasetheme/templates/print--node--materiau.tpl.php

@@ -83,29 +83,11 @@
     <?php endif; ?>
     <?php print $css; ?>
   </head>
-  <body>
-    <?php if (!empty($message)): ?>
-      <div class="print-message"><?php print $message; ?></div><p />
-    <?php endif; ?>
-    <?php if ($print_logo): ?>
-      <div class="print-logo"><?php print $print_logo; ?></div>
-    <?php endif; ?>
-    <div class="print-site_name"><?php print theme('print_published'); ?></div>
-    <p />
-    <div class="print-breadcrumb"><?php print theme('print_breadcrumb', array('node' => $node)); ?></div>
-    <hr class="print-hr" />
+  <body class="print-node-materiau">
+    <div class="print-site_name"><?php print $site_title; ?></div>
     <?php if (!isset($node->type)): ?>
       <h2 class="print-title"><?php print $print_title; ?></h2>
     <?php endif; ?>
     <div class="print-content"><?php print $content; ?></div>
-    <div class="print-footer"><?php print theme('print_footer'); ?></div>
-    <hr class="print-hr" />
-    <?php if ($sourceurl_enabled): ?>
-      <div class="print-source_url">
-        <?php print theme('print_sourceurl', array('url' => $source_url, 'node' => $node, 'cid' => $cid)); ?>
-      </div>
-    <?php endif; ?>
-    <div class="print-links"><?php print theme('print_url_list'); ?></div>
-    <?php print $footer_scripts; ?>
-  </body>
+    <div class="print-footer"><?php print $site_footer; ?></div>
 </html>

Some files were not shown because too many files changed in this diff