src/CustomBundle/Resources/views/Default/restaurant-search/list.html.php line 7

Open in your IDE?
  1. <!-- 最大10件 -->
  2. <?php if(!empty($cms__items)): ?>
  3. <div class="results_inner">
  4.     <?php foreach($cms__items as $item_index => $cms__item) : ?>
  5.         <?php
  6.             $main_images $cms__item->getMainImage();
  7.             $thumbnail_images $main_images->getChildren();
  8.             $this_month_recommendation $cms__item->isThisMonthRecommendation();
  9.             $link $cms__item->getDetailLink(LOCATION);
  10.         ?>
  11.         <!-- おすすめ店舗の場合はrecommendクラスを付与 -->
  12.         <section class="item<?php if($this_month_recommendation == true) echo ' recommend'?>">
  13.             <a href="<?php echo $link['url']; ?>">
  14.                 <?php if($this_month_recommendation == true) : ?>
  15.                 <!-- おすすめの場合は表示 -->
  16.                 <div class="ribbon">今月の<br>おすすめ</div>
  17.                 <?php endif; ?>
  18.                 <div class="box_data">
  19.                     <div class="data_inner">
  20.                         <div class="shop_name">
  21.                             <h3 class="st"><?php echo $cms__item->getTitle(); ?></h3>
  22.                             <?php
  23.                                 $genres $cms__item->getGenres();
  24.                             ?>
  25.                             <?php if(!empty($genres->toArray())) : ?>
  26.                                 <!-- ジャンル、表示要否チェック -->
  27.                                 <?php
  28.                                     $genre_show_flag_all false;
  29.                                     foreach($genres as $genre) {
  30.                                         $genre_show_flag $genre->isShowInList();
  31.                                         if($genre_show_flag == true) {
  32.                                             $genre_show_flag_all true;
  33.                                             break;
  34.                                         }
  35.                                     }
  36.                                 ?>
  37.                                 <?php if($genre_show_flag_all == true) : ?>
  38.                                 <div class="tmp_genre">
  39.                                     <?php foreach($genres as $genre) : ?>
  40.                                         <?php
  41.                                             $genre_show_text $genre->getTitleForList();
  42.                                             if($genre_show_text == '')
  43.                                             {
  44.                                                 $genre_show_text $genre->getTitle();
  45.                                             }
  46.                                             $genre_show_flag $genre->isShowInList();
  47.                                         ?>
  48.                                         <?php if($genre_show_flag == true) : ?>
  49.                                             <span><?php echo $genre_show_text?></span>
  50.                                         <?php endif; ?>
  51.                                     <?php endforeach; ?>
  52.                                 </div>
  53.                                 <?php endif; ?>
  54.                             <?php endif; ?>
  55.                         </div>
  56.                         <?php if($cms__item->getTimeByCars() != null) : ?>
  57.                         <div class="tmp_car">
  58.                             <span>ジブリパーク<br class="view_pc-tab">から車で<?php echo $cms__item->getTimeByCars(); ?>分圏内</span>
  59.                         </div>
  60.                         <?php endif; ?>
  61.                         <?php if((string)($cms__item->getDescription() != '')) : ?>
  62.                         <p class="txt">
  63.                             <?php echo nl2br($cms__item->getDescription()); ?>
  64.                         </p>
  65.                         <?php endif; ?>
  66.                         <?php
  67.                         $features $cms__item->getFeatures();
  68.                         ?>
  69.                         <?php if(!empty($features->toArray())) : ?>
  70.                             <!-- 特徴、表示要否チェック -->
  71.                             <?php
  72.                             $feature_show_flag_all false;
  73.                             foreach($features as $feature) {
  74.                                 $feature_show_flag $feature->isShowInList();
  75.                                 if($feature_show_flag == true) {
  76.                                     $feature_show_flag_all true;
  77.                                     break;
  78.                                 }
  79.                             }
  80.                             ?>
  81.                             <?php if($feature_show_flag_all == true) : ?>
  82.                                 <div class="rabel">
  83.                                     <?php foreach($features as $feature) : ?>
  84.                                         <?php
  85.                                         $feature_show_text $feature->getTitleForList();
  86.                                         if($feature_show_text == '')
  87.                                         {
  88.                                             $feature_show_text $feature->getTitle();
  89.                                         }
  90.                                         $feature_show_flag $feature->isShowInList();
  91.                                         $feature_bg_class " class='take'";
  92.                                         $feature_bg_flag $feature->isBackgroundColor();
  93.                                         if($feature_bg_flag == true)
  94.                                         {
  95.                                             $feature_bg_class " class='coupon'";
  96.                                         }
  97.                                         ?>
  98.                                         <?php if($feature_show_flag == true) : ?>
  99.                                             <span<?php echo $feature_bg_class?>><?php echo $feature_show_text?></span>
  100.                                         <?php endif; ?>
  101.                                     <?php endforeach; ?>
  102.                                 </div>
  103.                             <?php endif; ?>
  104.                         <?php endif; ?>
  105.                         <?php if((string)($cms__item->getBusinessHours()) != '' || (string)($cms__item->getHoliday()) != '') : ?>
  106.                         <div class="data">
  107.                             <?php if((string)($cms__item->getBusinessHours()) != '') : ?>
  108.                             <span class="time"><?php echo $cms__item->getBusinessHours(); ?></span>
  109.                             <?php endif; ?>
  110.                             <?php if((string)($cms__item->getHoliday()) != '') : ?>
  111.                             <span class="off"><?php echo $cms__item->getHoliday(); ?></span>
  112.                             <?php endif; ?>
  113.                         </div>
  114.                         <?php endif; ?>
  115.                     </div>
  116.                 </div>
  117.                 <div class="box_img">
  118.                     <?php if(count($thumbnail_images) == 0) : ?>
  119.                         <!-- もし画像ない場合はslider_innerにnoimgを付与 -->
  120.                         <div class="slider_inner noimg">
  121.                             <div class="img img_r">
  122.                             </div>
  123.                         </div>
  124.                     <?php elseif(count($thumbnail_images) < 2) : ?>
  125.                         <?php foreach($thumbnail_images as $image) : ?>
  126.                         <?php
  127.                             $imageUrl = ($image && $image->hasItem()) ? $view['image']->getMediaUrl($image390293'contain') : null;
  128.                         ?>
  129.                         <!-- 画像1枚のみの場合 -->
  130.                         <div class="slider_inner">
  131.                             <div class="img img_r">
  132.                                 <?php lazyImage('', ["390/293"], $imageUrl$image->getAlt()); ?>
  133.                             </div>
  134.                         </div>
  135.                         <?php endforeach; ?>
  136.                     <?php else : ?>
  137.                         <!-- 画像複数枚の場合 -->
  138.                         <div class="slider_inner js-main-img">
  139.                             <?php foreach($thumbnail_images as $image_index => $image) : ?>
  140.                                 <?php
  141.                                 $imageUrl = ($image && $image->hasItem()) ? $view['image']->getMediaUrl($image390293'contain') : null;
  142.                                 ?>
  143.                             <div class="slide block img img_r" data-id="show<?php echo $item_index 1?>-<?php echo $image_index 1?>">
  144.                                 <?php lazyImage('', ["390/293"], $imageUrl$image->getAlt()); ?>
  145.                             </div>
  146.                             <?php endforeach; ?>
  147.                         </div>
  148.                         <!-- 画像複数枚の場合のサムネイル -->
  149.                         <ul class="thum_list js-thum-list view_pc">
  150.                             <?php foreach($thumbnail_images as $image_index => $image) : ?>
  151.                                 <?php
  152.                                 $imageUrl = ($image && $image->hasItem()) ? $view['image']->getMediaUrl($image6549'contain') : null;
  153.                                 ?>
  154.                             <li date-target="show<?php echo $item_index 1?>-<?php echo $image_index 1?>">
  155.                                 <div><?php lazyImage('', ["65/49"], $imageUrl$image->getAlt()); ?></div>
  156.                             </li>
  157.                             <?php endforeach; ?>
  158.                         </ul>
  159.                     <?php endif; ?>
  160.                 </div>
  161.             </a>
  162.         </section>
  163.     <?php endforeach; ?>
  164. </div><!-- /.results_inner-->
  165. <?php endif; ?>