<script type="text/template" id="template-paginator">
    <div class="paginator" data-current-page="{{data.currentPage}}">

        {% if (0 == data.currentPage) { %}
            <span class="page-less arrow-left"></span>
        {% } else { %}
            <a href='#' class="page-less arrow-left"></a>
        {% } %}

        {% for(var i = 0; i < data.pages; i++) { %}
            {% if (i == data.currentPage) { %}
                <span class="page-link" data-page="{{i}}">{{i + 1}}</span>
            {% } else { %}
                <a href='#' class="page-link" data-page="{{i}}">{{i + 1}}</a>
            {% } %}
        {% } %}

        {% if (data.currentPage == data.pages - 1) { %}
            <span class="page-less arrow-right"></span>
        {% } else { %}
            <a href='#' class="page-more arrow-right"></a>
        {% } %}
    </div>
</script>
