app/template/default/Block/header.twig line 1

Open in your IDE?
  1. {#
  2. This file is part of EC-CUBE
  3. Copyright(c) EC-CUBE CO.,LTD. All Rights Reserved.
  4. http://www.ec-cube.co.jp/
  5. For the full copyright and license information, please view the LICENSE
  6. file that was distributed with this source code.
  7. #}
  8. <header>
  9. <div class="wrap">
  10. <div class="logo">
  11. <a href="{{ url('homepage') }}"><h1><img src="{{ asset('assets/images/ny_logo_w.svg', 'user_data') }}" alt="logo">Ny Paradisa</h1></a>
  12. </div>
  13. <nav>
  14. <input type="checkbox" id="chk">
  15. <ul>
  16. {% if is_granted('ROLE_USER') %}
  17. <li><a href="{{ url('mypage') }}" class="btn">マイページ</a></li>        
  18.         {% if BaseInfo.option_favorite_product %}
  19. <li><a href="{{ url('mypage_favorite') }}" class="btn">お気に入り</a></li>            
  20.         {% endif %}
  21. <li><a href="{{ url('logout') }}" class="btn">ログアウト</a></li>        
  22.     {% else %}
  23. <li><a href="{{ url('entry') }}" class="btn">新規会員登録</a></li>        
  24.         {% if BaseInfo.option_favorite_product %}
  25. <li><a href="{{ url('mypage_favorite') }}" class="btn">お気に入り</a></li>               
  26.         {% endif %}
  27. <li><a href="{{ url('mypage_login') }}" class="btn">ログイン</a></li>
  28.     {% endif %}
  29. {% if app.request.get('_route') != 'user_data' %}
  30. <li><label for="rekichk"><img src="{{ asset('assets/images/icon_reki.svg', 'user_data') }}" alt="閲覧履歴"></label></li>
  31. {% endif %}
  32. <li><label for="searchk"><img src="{{ asset('assets/images/icon-glass_h.svg', 'user_data') }}" alt="検索"></label></li>
  33. <li><a href="/contact"><img src="{{ asset('assets/images/icon_email_h.svg', 'user_data') }}" alt="email"></a></li>
  34. <li><a href="https://www.instagram.com/ny_paradisa/" target="_blank" rel="noopener noreferrer"><img src="{{ asset('assets/images/icons8-instagram_h.svg', 'user_data') }}" alt="instagram"></a></li>
  35. <li><a href="https://twitter.com/nyparadisa" target="_blank" rel="noopener noreferrer"><img src="{{ asset('assets/images/icons8-twitter_h.svg', 'user_data') }}" alt="twitter"></a></li>
  36. <li class="ec-headerRole__cart">{{ include('Block/cart.twig') }}</li>
  37. <li class="sp">
  38. <label for="chk">×</label>
  39. </li>
  40. </ul>
  41. <label for="chk" id="humbt">
  42.           <span></span>
  43.           <span></span>
  44.           <span></span>
  45. </label>
  46. </nav>
  47. </div>
  48. </header>
  49. <input type="checkbox" id="searchk">
  50. <div class="searchbox">
  51. <p class="txtR"><strong>■商品検索</strong><label for="searchk">×</label></p>
  52.             {{ render(path('block_search_product')) }}            
  53. </div>
  54. <input type="checkbox" id="rekichk">
  55. <div class="rirekibox">
  56. <p class="txtR"><strong>■商品閲覧履歴</strong><label for="rekichk">×</label></p>
  57. {% set Products = productHistory|krsort %}
  58. {% if Products|length > 0 %}
  59. <ul>
  60. {% for Product in Products %}
  61. <li>
  62. <a href="{{ url('product_detail', {'id':Product.id}) }}">
  63. <div class="pic">
  64. <img src="{{ asset(Product.getMainListImage, 'save_image') }}" alt="{{Product.name}}">
  65. </div>
  66. <p>{{Product.name}}:
  67.                     {% if Product.hasProductClass %}
  68.                         {% if Product.getPrice02Min == Product.getPrice02Max %}
  69.                             {{ Product.getPrice02IncTaxMin|price }}
  70.                         {% else %}
  71.                             {{ Product.getPrice02IncTaxMin|price }} ~ {{ Product.getPrice02IncTaxMax|price }}
  72.                         {% endif %}
  73.                     {% else %}
  74.                         {{ Product.getPrice02IncTaxMin|price }}
  75.                     {% endif %}
  76.                     </p>
  77. </a>
  78. </li>
  79. {% endfor %}
  80. </ul>
  81. {% else %}
  82. <p>まだ閲覧履歴はありません。</p>
  83. {% endif %}
  84. </div>