{% extends 'grid.html.twig' %}
{#<div id="recommendationsDebug">
#}{#<div id="queryData" style="display: none;"></div><a href="javascript:void(0);" id="showQueryBtn">Показать запрос</a>#}{#
<div id="profileViewsData">
<h6 style="color: #1ea471">Просмотры анкет на сайте</h6>
{% set profile_debug_data = profile_recommendations_debug_views() %}
{% include "Recommendations/_profile_recommendations_debug_profile_data_table.html.twig" %}
</div>
<div id="favouritesData">
<h6 style="color: #0d5aa7">Избранные</h6>
{% set profile_debug_data = profile_recommendations_debug_favourites() %}
{% include "Recommendations/_profile_recommendations_debug_profile_data_table.html.twig" %}
</div>
{% include "Recommendations/_profile_recommendations_debug_coeffs_data_table.html.twig" %}
<h6 style="color: #bd2130">Коэффициенты</h6>
<div id="coeffsData"></div>
{% include "Recommendations/_profile_recommendations_debug_viewed_profiles_data_table.html.twig" %}
<h6 style="color: #856404">Просмотренные рекомендации</h6>
<div id="viewedRecommendationsData"></div>
</div>#}
{% block mainContainer %}
<h4>Рекоммендуемые</h4>
<div id="profileRecommendationsContainer"></div>
<ul>
{% for profile in profiles %}
<li>{{ profile.id }} {{ profile.name }}</li>
{% endfor %}
</ul>
{# <div id="profileRecommendationTemplate" style="display: none;">
<p><a href="" class="name-link"></a></p>
<img class="img" src="" width="100"/>
</div>#}
<a href="javascript:void(0);" id="profileRecommendationsShowMore">Показать еще</a>
<script src="{{ asset('ajax.js', 'js_script') }}"></script>
<script type="text/javascript">
document.addEventListener('DOMContentLoaded', function() {
var showMorePressCount = 0;
var btnShowMore = document.querySelector('#profileRecommendationsShowMore');
btnShowMore.addEventListener('click', function() {
if(showMorePressCount < 5)
loadRecommendations();
if(++showMorePressCount >= 5)
btnShowMore.style.display = 'none';
});
});
</script>
{% endblock mainContainer %}