<script id="eln-product-ratings-filter-template" type="text/x-magento-template">
    <div class="eln-filter-item filter-options-item" attribute-code="rating" data-role="eln-product-ratings-filter-content">
        <div data-role="title" class="filter-options-title"><?php echo __("Rating"); ?></div>
        <div class="eln-filter-content filter-options-content">
            <div class="swatch-attribute-options clearfix">
                <div class="swatch-attribute hide-more">
                    <div class="container">
                    <% _.each(ratings, function(data) { %>
                        <% data.rating = (''+data.rating).replace('-','_'); %>
                        <% if (generateUrl) { %>
                        <a href="<% if (!_.has(selected, data.rating)) { %><%= _.createFilterUrl('rating',data.rating) %><% } else { %><%= _.createFilterUrlMinus('rating',data.rating) %><% } %>"
                           <% } else { %>
                            <span
                            <% } %>
                           class="eln-filter-option filter-option rating <% if (!data.count) { %>disabled<% } %>"
                           style="display:block" attribute-code="rating" option-id="<%= data.rating %>" option-label="<%= data.rating %>">
                            <input type="checkbox" <% if (_.has(selected, data.rating)) { %>checked="checked"<% } %>/>
                            <% if (data.rating == '_1') { %>
                            <span title="<?= __('No rating') ?><% if (showResultsCount == 1  && data.count > 0) { %> (<%= data.count %>)<% } %>" id="rating-filter--1" class="label title <% if (_.has(selected, '_1')) { %> selected <% } %>"><?= __("No rating") ?></span><% if (showResultsCount == 1  && data.count > 0) { %><span class="count"><%= data.count %></span><% } %>
                            <% } else { %>
                                <span id="rating-filter-<%= data.rating %>" class="title <% if (_.has(selected, data.rating)) { %> selected <% } %>">
                                    <div title="<%= data.rating %>%<% if (showResultsCount == 1  && data.count > 0) { %> (<%= data.count %>)<% } %>" style="float: none;max-width: 100%;width: 100%; display:inline">
                                        <div class="product-reviews-summary short" style="display:inline-block">
                                            <div class="rating-summary">
                                                <span class="label"><span><?= __("Rating:") ?></span></span>
                                                <div class="rating-result" title="<%= data.rating %>%<% if (showResultsCount == 1  && data.count > 0) { %> (<%= data.count %>)<% } %>">
                                                    <span style="width:<%= data.rating %>%"><span><%= data.rating %>%</span></span>
                                                </div>
                                            </div>
                                            <?php // echo __("& up"); ?>
                                        </div>
                                    </div>
                                </span>
                              <% if (showResultsCount == 1 && data.count > 0) { %><span class="count"><%= data.count %></span><% } %>
                            <% } %>
                        <% if (generateUrl) { %>
                        </a>
                        <% } else { %>
                        </span>
                        <% } %>
                    <% }) %>
                    </div>
                </div>
            </div>
        </div>
    </div>
</script>
