templates/Recommendations/_profile_recommendations.partial.html.twig line 1

Open in your IDE?
  1. {% extends 'grid.html.twig' %}
  2. {#<div id="recommendationsDebug">
  3. #}{#<div id="queryData" style="display: none;"></div><a href="javascript:void(0);" id="showQueryBtn">Показать запрос</a>#}{#
  4. <div id="profileViewsData">
  5.     <h6 style="color: #1ea471">Просмотры анкет на сайте</h6>
  6.     {% set profile_debug_data = profile_recommendations_debug_views() %}
  7.     {% include "Recommendations/_profile_recommendations_debug_profile_data_table.html.twig" %}
  8. </div>
  9. <div id="favouritesData">
  10.     <h6 style="color: #0d5aa7">Избранные</h6>
  11.     {% set profile_debug_data = profile_recommendations_debug_favourites() %}
  12.     {% include "Recommendations/_profile_recommendations_debug_profile_data_table.html.twig" %}
  13. </div>
  14. {% include "Recommendations/_profile_recommendations_debug_coeffs_data_table.html.twig" %}
  15. <h6 style="color: #bd2130">Коэффициенты</h6>
  16. <div id="coeffsData"></div>
  17. {% include "Recommendations/_profile_recommendations_debug_viewed_profiles_data_table.html.twig" %}
  18. <h6 style="color: #856404">Просмотренные рекомендации</h6>
  19. <div id="viewedRecommendationsData"></div>
  20. </div>#}
  21. {% block mainContainer %}
  22.     <h4>Рекоммендуемые</h4>
  23.     <div id="profileRecommendationsContainer"></div>
  24.     <ul>
  25.         {% for profile in profiles %}
  26.             <li>{{ profile.id }} {{ profile.name }}</li>
  27.         {% endfor %}
  28.     </ul>
  29.     {#    <div id="profileRecommendationTemplate" style="display: none;">
  30.         <p><a href="" class="name-link"></a></p>
  31.         <img class="img" src="" width="100"/>
  32.     </div>#}
  33.     <a href="javascript:void(0);" id="profileRecommendationsShowMore">Показать еще</a>
  34.     <script src="{{ asset('ajax.js', 'js_script') }}"></script>
  35.     <script type="text/javascript">
  36.         document.addEventListener('DOMContentLoaded', function() {
  37.             var showMorePressCount = 0;
  38.             var btnShowMore = document.querySelector('#profileRecommendationsShowMore');
  39.             btnShowMore.addEventListener('click', function() {
  40.                 if(showMorePressCount < 5)
  41.                     loadRecommendations();
  42.                 if(++showMorePressCount >= 5)
  43.                     btnShowMore.style.display = 'none';
  44.             });
  45.         });
  46.     </script>
  47. {% endblock mainContainer %}