templates/areas/AccordionTablePerDraganddrop/view.html.twig line 1

Open in your IDE?
  1. {% if editmode %}
  2.     <div class="areablock-main">
  3.           <div class="areablock-title area-box-padding">
  4.               Tabellen-Object einbinden
  5.           </div>
  6.           <div class="areablock-body area-box-padding">
  7.               <p class="hl" style="display: inline-block;text-indent: 37px;">Title Accordion:</p>
  8.               <div class="schreiben">
  9.                   <span class="parentbox">
  10.                       {{ pimcore_input("Accordiontitle", {'width': 725}) }}
  11.                   </span>
  12.               </div>
  13.               <p class="hl" style="display: inline-block;text-indent: 37px;">Optionaler Text über Tabelle:</p>
  14.                 <div class="schreiben"><span class="parentbox" style="background-color:#fff">
  15.                         {{ pimcore_wysiwyg('text-wysiwyg-top', {
  16.                                 "height": 80,
  17.                                 "width": 735,
  18.                                 "customConfig": '/bundles/app/static/backend/js/ckeditor/documents/text-wysiwyg.js'
  19.                             })
  20.                         }}
  21.                     </span></div>
  22.               <br /><br /><br />
  23.               <p class="hl" style="display: inline-block;text-indent: 37px;">Bitte (einzel) Tabellen-Object zuweisen:</p>
  24.               <div class="dragdrop">
  25.                   <span class="parentboxhref">
  26.                       {{ pimcore_relation("TableObject",{
  27.                             "types": ["object"],
  28.                             "subtypes": {
  29.                                 "object": ["object"],
  30.                             },
  31.                             "classes": ["preistabellen"],
  32.                             "width": 735,
  33.                         }) }}
  34.                   </span>
  35.               </div>
  36.               <br /><br /><br />
  37.               <p class="hl" style="display: inline-block;text-indent: 37px;">Optionaler Text unter Tabelle:</p>
  38.                 <div class="schreiben"><span class="parentbox" style="background-color:#fff">
  39.                     {{ pimcore_wysiwyg('text-wysiwyg-bottom', {
  40.                                 "height": 80,
  41.                                 "width": 735,
  42.                                 "customConfig": '/bundles/app/static/backend/js/ckeditor/documents/text-wysiwyg.js'
  43.                             })
  44.                         }}
  45.                     </span></div>
  46.           </div>
  47.       </div>
  48. {% else %}
  49.     {% set triggerID = random() %}
  50.     {% if accordion == 1 %}
  51.         <div class="bellows-tab" data-bellow-trigger="{{ triggerID }}">
  52.             <figure class="bellows-sign">
  53.                 <img class="bellow-sign-open" src="/bundles/app/static/frontend/images/icons/accordion_auf.svg" alt=""/>
  54.                 <img class="bellow-sign-closed" src="/bundles/app/static/frontend/images/icons/accordion_zu.svg" alt=""/>
  55.             </figure>
  56.             <h5 class="font-bold">{{ pimcore_input("Accordiontitle") }}</h5>
  57.         </div>
  58.     <div class="bellows-content" data-bellow="{{ triggerID }}">
  59.     {% endif %}
  60.     {% if accordion == 0 %}
  61.     <div id="tablesaw-{{ triggerID }}" class="constrainer-inner edgepadding">
  62.     {% endif %}
  63.         {% if pimcore_wysiwyg("text-wysiwyg-top").isEmpty() == false %}
  64.         <div class="text-wysiwyg-top">
  65.              {{ pimcore_wysiwyg("text-wysiwyg-top") |raw }}
  66.         </div>
  67.         {% endif %}
  68.         {% set spalten_str = "" %}
  69.         {% if pimcore_relation("TableObject").isEmpty() == false %}
  70.             {% set lang = document.getProperty('language') %}
  71.             {% set tableObjId = pimcore_relation("TableObject").getId() %}
  72.             {% set tblObj = pimcore_object(tableObjId) %}
  73.             {% set spalten_str = attribute(tblObj, 'getSpalten_str') is defined ? tblObj.getSpalten_str()|trim : '' %}
  74.             {{ table_data(tableObjId, spalten_str, lang) |raw }}
  75.         {% endif %}
  76.        {# <?php
  77.             $objId  = (int)$this->href("TableObject")->getid();
  78.             $obj    \Pimcore\Model\DataObject::getById($objId);
  79.             $spalten_str '';
  80.             if( method_exists($obj,'getSpalten_str' ) )
  81.             {
  82.               $spalten_str trim($obj->getSpalten_str());
  83.             }
  84.             $zebraStripe = (empty($spalten_str)) ? true false;
  85.             if(is_numeric($objId) && ($objId != 0))
  86.             {
  87.                 $lg $this->document->getProperty('language');
  88.                 echo AppBundle\Services\Table::getTable($this$objId$lg$zebraStripe);
  89.             }
  90.         ?> #}
  91.         {% if pimcore_wysiwyg("text-wysiwyg-bottom").isEmpty() == false %}
  92.         <div class="text-wysiwyg-bottom">
  93.              {{ pimcore_wysiwyg("text-wysiwyg-bottom") |raw }}
  94.         </div>
  95.         {% endif %}
  96.     {% if accordion == 0 %}</div>{% endif %}
  97.     {% if accordion == 1 %}
  98.         <style>
  99.         {% set hiliteArray = spalten_str|split(',') %}
  100.         {% for value in hiliteArray %}
  101.             {{ '[data-hilite-index="' ~value~'"]{background-color:#e4e1de85;}' }}
  102.         {% endfor %}
  103.         </style>
  104.         <script type="text/javascript">
  105.             (function () {
  106.                 'use strict';
  107.                 var moduleName = 'tablesaw_{{ triggerID }}_module'; // naming convention XXX_module
  108.                 if (typeof selt === 'undefined') {
  109.                     selt = {
  110.                         modules: {}
  111.                     };
  112.                 } else if (!selt.modules) {
  113.                     selt.modules = {};
  114.                 }
  115.                 selt.modules[moduleName] = {
  116.                     name: moduleName,
  117.                     init: function () {
  118.                         $('[data-bellow="{{ triggerID }}"]').on('bellowsopen', function () {
  119.                             Tablesaw.init(this);
  120.                             $(this).off('bellowsopen');
  121.                         });
  122.                     }
  123.                 }
  124.             })();//EOS
  125.         </script>
  126.     {% endif %}
  127.     {% if accordion == 0 %}
  128.         <script type="text/javascript">
  129.             (function () {
  130.                 'use strict';
  131.                 var moduleName = 'tablesaw_{{ triggerID }}_module'; // naming convention XXX_module
  132.                 if (typeof selt === 'undefined') {
  133.                     selt = {
  134.                         modules: {}
  135.                     };
  136.                 } else if (!selt.modules) {
  137.                     selt.modules = {};
  138.                 }
  139.                 // limit only one tablesaw instance per page
  140.                 if (!selt.modules[moduleName]) {
  141.                     selt.modules[moduleName] = {
  142.                         name: moduleName,
  143.                         init: function () {
  144.                             Tablesaw.init( $('#tablesaw-{{ triggerID }}')[0] );
  145.                         }
  146.                     };
  147.                 }
  148.             })(typeof window !== "undefined" ? window : this);//EOS
  149.         </script>
  150.     {% endif %}
  151. {% endif %}