src/Rhyme/WMassArtsHub/Resources/contao/templates/profile/artshub_profile_reader_default.html5 line 31

Open in your IDE?
  1. <?php
  2. use Rhyme\WMassArtsHub\Helper\GeneralHelper;
  3. use Rhyme\WMassArtsHub\Helper\ProfileHelper;
  4. $arrImage $this->getReaderMainImage();
  5. $arrGallery $this->getReaderOtherImages();
  6. $arrDisciplines $this->item->getDisciplines(true);
  7. $arrActivities $this->item->getActivities();
  8. $arrLinks $this->item->getArrayContent('url_collections');
  9. $arrVideos =  $this->item->getVideos();
  10. $arrAwards $this->item->getArrayContent('awards');
  11. $arrEducation $this->item->getArrayContent('education');
  12. $arrAssociations $this->item->getArrayContent('professional_associations');
  13. $arrAdditionalContent $this->item->getAdditionalContent();
  14. $hasDescription strlen($this->item->description) > 0;
  15. $infoBoxClass ProfileHelper::infoBoxClass($arrEducation$arrAwards$arrAssociations$arrAdditionalContent);
  16. $hasLotsofImagesClass count($arrGallery) > ' manyImages' '';
  17. ?>
  18. <form action="<?php echo $this->action?>" id="<?= $this->formId?>" name="artshub_profile_item<?php echo rand(); ?>" method="post" enctype="<?php echo $this->enctype?>">
  19.     <div class="formbody">
  20.         <input type="hidden" name="FORM_SUBMIT" value="<?php echo $this->formSubmit?>">
  21.         <input type="hidden" name="REQUEST_TOKEN" value="{{request_token}}">
  22.         <input type="hidden" name="AJAX_ITEM" value="<?php echo $this->item_id?>">
  23.         <input type="hidden" name="AJAX_MODULE" value="<?php echo $this->module_id?>">
  24.         <div class="contentWrapper<?= $hasLotsofImagesClass ?>">
  25.             <div class="headerContent">
  26.                 <div class="nameAndType">
  27.                     <div class="inner">
  28.                         <h1 class="title"><?= $this->name?></h1>
  29.                         <p class="type"><?= $this->item->getInstitutionType()->name ?></p>
  30.                     </div>
  31.                     <div class="bottomLeftAngle">
  32.                         <svg id="Layer_1" style="enable-background:new 0 0 75 87.4;" height="100%" width="100%" viewBox="0 0 75 87.4" preserveAspectRatio="none">
  33.                             <polygon height="100%" width="100%" class="st0" points="0,87.4 75,0 75,87.4 ">
  34.                             </polygon></svg>
  35.                     </div>
  36.                 </div>
  37.             </div>
  38.             <div class="contactAndDescriptionContent">
  39.                 <div class="inner">
  40.                     <div class="contactWrapper">
  41.                         <h2>Details:</h2>
  42.                         <div class="infoWrapper">
  43.                             <div class="address-web-social">
  44.                                 <div class="links">
  45.                                     <?php if($this->website): ?><a href="<?= $this->website?>" target="_blank" title="Website for <?= $this->name?>"><i class="fas fa-globe-americas"></i><span>Website</span></a><?php endif; ?>
  46.                                     <?php if($this->facebook): ?><a href="<?= $this->facebook?>" target="_blank" title="Facebook Page for <?= $this->name?>"><i class="fab fa-facebook-square"></i><span>Facebook</span></a><?php endif; ?>
  47.                                     <?php if($this->twitter): ?><a href="<?= $this->twitter?>" target="_blank" title="Twitter for <?= $this->name?>"><i class="fab fa-twitter-square"></i><span>Twitter</span></a><?php endif; ?>
  48.                                     <?php if($this->instagram): ?><a href="<?= $this->instagram?>" target="_blank" title="Instagram for <?= $this->name?>"><i class="fab fa-instagram-square"></i><span>Instagram</span></a><?php endif; ?>
  49.                                 </div>
  50.                                 <div class="address">
  51.                                     <?php if($this->latitude && $this->longitude): ?>
  52.                                         <div class="map">
  53.                                             <h3>Location</h3>
  54.                                             <a href="<?= $this->item->getGoogleMapsLink(); ?>" target="_blank" title="Map for <?= $this->name?>">
  55.                                                 <i class="fas fa-map-marker-alt"></i><span><?= $this->item->getAddress(); ?></span>
  56.                                             </a>
  57.                                         </div>
  58.                                     <?php else: ?>
  59.                                         <?= $this->item->getAddress(); ?>
  60.                                     <?php endif; ?>
  61.                                 </div>
  62.                             </div>
  63.                             <div class="contact">
  64.                                 <h3>Contact/Mailing Info</h3>
  65.                                 <?= $this->item->getContactInfo(truetrue); ?>
  66.                             </div>
  67.                         </div>
  68.                     </div>
  69.                     <div class="all_disciplines">
  70.                         <?php if($this->item->getPrimaryDiscipline()): ?>
  71.                             <div class="disciplinesWrapper primary">
  72.                                 <div class="disciplines">
  73.                                     <h2>Primary Discipline</h2>
  74.                                     <div class="disciplines_container">
  75.                                         <div class="discipline"><span class="<?= $this->item->getPrimaryDiscipline()->alias ?>"><?= $this->item->getPrimaryDiscipline()->name ?></span></div>
  76.                                     </div>
  77.                                 </div>
  78.                             </div>
  79.                         <?php endif; ?>
  80.                         <?php if(!empty($arrDisciplines)): ?>
  81.                             <div class="disciplinesWrapper">
  82.                                 <div class="disciplines">
  83.                                     <h2>Additional Disciplines</h2>
  84.                                     <div class="disciplines_container">
  85.                                         <?php foreach($arrDisciplines as $discipline): ?>
  86.                                             <div class="discipline"><span class="<?= $discipline->alias ?>"><?= $discipline->name ?></span></div>
  87.                                         <?php endforeach; ?>
  88.                                     </div>
  89.                                 </div>
  90.                             </div>
  91.                         <?php endif; ?>
  92.                     </div>
  93.                     <?php if(!empty($arrActivities)): ?>
  94.                         <div class="activitiesWrapper">
  95.                             <div class="activities">
  96.                                 <h2>Activities</h2>
  97.                                 <div class="activities_container">
  98.                                     <?php foreach($arrActivities as $activity): ?>
  99.                                         <div class="activity"><span class="<?= $activity->alias ?>"><?= $activity->name ?></span></div>
  100.                                     <?php endforeach; ?>
  101.                                 </div>
  102.                             </div>
  103.                         </div>
  104.                     <?php endif; ?>
  105.                     <?php if($hasDescription): //Profiles without images will get the text description moved up higher ?>
  106.                         <div class="profileInfo">
  107.                             <div class="description">
  108.                                 <div class="readmore">
  109.                                     <div class="content"><?= $this->description ?></div>
  110.                                 </div>
  111.                             </div>
  112.                         </div>
  113.                     <?php endif; ?>
  114.                 </div>
  115.             </div>
  116.             <div class="images<?php if($arrImage['isPlaceholder']): echo ' noimages'; endif; if($arrImage['isTallImage']): echo ' tall_image'; endif; if(count($arrGallery) === 0): echo ' no_gallery'; else: echo ' mosaicEnabled'; endif; ?>">
  117.                 <?php //if (false): ?>
  118.                 <?php if($arrImage['isPlaceholder']) : ?>
  119.                     <div class="image_container is_placeholder">
  120.                         {{insert_node::17}}
  121.                     </div>
  122.                 <?php else: ?>
  123.                     <?php $objOriginal is_file(TL_ROOT.'/'.$arrImage['originalSrc']) ? new File($arrImage['originalSrc']) : null?>
  124.                     <div class="image_container main_image<?= $arrImage['additionalClasses'?>" data-aspect-ratio="<?= $objOriginal $objOriginal->width $objOriginal->height 1 ?>">
  125.                         <a href="<?= $arrImage['originalSrc'?>" class="photoswipe"<?= GeneralHelper::getPhotoswipeDataForImage($arrImage'lightbox-profile' $this->id?>>
  126.                             <?php $this->insert('picture_default'$arrImage['picture']); ?>
  127.                         </a>
  128.                     </div>
  129.                     <?php if(count($arrGallery) > 0): ?>
  130.                         <?php foreach($arrGallery as $arrImage): ?>
  131.                             <?php $objOriginal is_file(TL_ROOT.'/'.$arrImage['originalSrc']) ? new File($arrImage['originalSrc']) : null?>
  132.                             <div class="image_container gallery_image" data-aspect-ratio="<?= $objOriginal $objOriginal->width $objOriginal->height 1 ?>">
  133.                                 <a href="<?= $arrImage['originalSrc'?>" class="photoswipe"<?= GeneralHelper::getPhotoswipeDataForImage($arrImage'lightbox-profile' $this->id?>>
  134.                                     <?php $this->insert('picture_default'$arrImage['picture']); ?>
  135.                                 </a>
  136.                             </div>
  137.                         <?php endforeach; ?>
  138.                     <?php endif; ?>
  139.                 <?php endif; ?>
  140.                 <?php //endif; ?>
  141.             </div>
  142.             <?php if(!empty($arrVideos)): ?>
  143.                 <div class="videos">
  144.                     <div class="video_container">
  145.                         <h4>Videos:</h4>
  146.                         <div class="video_collection">
  147.                             <?php foreach($arrVideos as $video): ?>
  148.                                 <div class="video">
  149.                                     <a href="<?= $video['link'?>" target="_blank" rel="nofollow">
  150.                                         <img src="<?= str_ireplace('http://''//'$video['thumbnail']) ?>" width="320" height="180" alt="<?= $this->name?> Video">
  151.                                     </a>
  152.                                 </div>
  153.                             <?php endforeach; ?>
  154.                         </div>
  155.                     </div>
  156.                 </div>
  157.             <?php endif; ?>
  158.             <?php if($infoBoxClass !== 'none' || !empty($arrLinks)): ?>
  159.                 <div class="additional_info <?= $infoBoxClass ?>">
  160.                     <div class="inner">
  161.                         <?php if(!empty($arrLinks)): ?>
  162.                             <div class="info_container urls">
  163.                                 <h4>Additional Links:</h4>
  164.                                 <div class="url_collection">
  165.                                     <ul>
  166.                                         <?php foreach($arrLinks as $link): ?>
  167.                                             <li><a href="<?= $link['url'?>" target="_blank"><i class="fas fa-globe-americas"></i><span><?= $link['title'?></span></a></li>
  168.                                         <?php endforeach; ?>
  169.                                     </ul>
  170.                                 </div>
  171.                             </div>
  172.                         <?php endif; ?>
  173.                         <?php if(!empty($arrAwards)): ?>
  174.                             <div class="info_container awards">
  175.                                 <h4>Awards</h4>
  176.                                 <div class="content">
  177.                                     <ul>
  178.                                         <?php foreach($arrAwards as $award): ?>
  179.                                             <li class="award"><span><?= $award ?></span></li>
  180.                                         <?php endforeach; ?>
  181.                                     </ul>
  182.                                 </div>
  183.                             </div>
  184.                         <?php endif; ?>
  185.                         <?php if(!empty($arrEducation)): ?>
  186.                             <div class="info_container education">
  187.                                 <h4>Education</h4>
  188.                                 <div class="content">
  189.                                     <ul>
  190.                                         <?php foreach($arrEducation as $education): ?>
  191.                                             <li class="education"><span><?= $education ?></span></li>
  192.                                         <?php endforeach; ?>
  193.                                     </ul>
  194.                                 </div>
  195.                             </div>
  196.                         <?php endif; ?>
  197.                         <?php if(!empty($arrAssociations)): ?>
  198.                             <div class="info_container associations">
  199.                                 <h4>Professional Associations</h4>
  200.                                 <div class="content">
  201.                                     <ul>
  202.                                         <?php foreach($arrAssociations as $association): ?>
  203.                                             <li class="association"><span><?= $association ?></span></li>
  204.                                         <?php endforeach; ?>
  205.                                     </ul>
  206.                                 </div>
  207.                             </div>
  208.                         <?php endif; ?>
  209.                         <?php if(!empty($arrAdditionalContent)): ?>
  210.                             <div class="info_container addtnl_content">
  211.                                 <h4>Additional Information</h4>
  212.                                 <div class="content">
  213.                                     <ul>
  214.                                         <?php foreach($arrAdditionalContent as $content): ?>
  215.                                             <li class="content"><span><?= $content ?></span></li>
  216.                                         <?php endforeach; ?>
  217.                                     </ul>
  218.                                 </div>
  219.                             </div>
  220.                         <?php endif; ?>
  221.                     </div>
  222.                 </div>
  223.             <?php endif; ?>
  224.         </div>
  225.     </div>
  226. </form>
  227. <script>
  228.     (function($) {
  229.         jQuery(document).ready(function(){
  230.             !jQuery('#<?= $this->formId?> .mosaicEnabled').length || jQuery('#<?= $this->formId?> .mosaicEnabled').Mosaic({
  231.                 innerGap: 10,
  232.                 showTailWhenNotEnoughItemsForEvenOneRow: true
  233.             });
  234.             jQuery(window).trigger('resize');
  235.         });
  236.     })(jQuery);
  237. </script>
  238. <?php
  239. $GLOBALS['TL_BODY']['profilereader_'.$this->formId] = "
  240. <script>
  241. (function ($) {
  242.     jQuery(document).ready(function(){
  243.         let setReadMore = jQuery('#"$this->formId " .readmore').readmore({
  244.             speed: 250,
  245.             moreLink: '<div class=\"shadow closed\"><a href=\"#\">Read more</a></div>',
  246.             lessLink: '<div class=\"shadow open\"><a href=\"#\">Read less</a></div>'
  247.         });
  248.     });
  249. })(jQuery);
  250. </script>";
  251. ?>