{% extends app['twig_theme'] ~ '/' ~ 'layout.twig' %}
{% import  app['twig_theme'] ~ '/macro/iptw_macro.twig' as main_macro %}

{% set title = ('Statistics'|trans ~ ': ' ~ 'Complaints statistics'|trans) %}


{% block footer_js %}
    
        {{ parent() }}
        {% include app.twig_theme ~ "/basic_templates/scripts-datatables.twig" %}

        <script src="{{app.request_context.baseUrl}}/plugins/datatables/extensions/FixedHeader/js/dataTables.fixedHeader.js"></script>
        <link  href="{{app.request_context.baseUrl}}/plugins/datatables/extensions/FixedHeader/css/fixedHeader.dataTables.css" rel="stylesheet">

{% endblock %}
{% block footer %}
    
        {{ parent() }}
        <script type="text/javascript" defer>
            {% include (app.twig_theme ~ "/Statistics/stat_claims/stat_claims.js.twig") %}
        </script>
        
{% endblock %}


{% block content %}
    <div id="iptv_list">
        <div class="row  filters-actions-pannel">
            <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
                {#
                <div class="dropdown filter black pull-right">
                    <a data-toggle="dropdown" class="dropdown-toggle btn-success no_context_menu" href="#">
                        <span>{{ 'Clean claims'|trans }}</span>
                        <i class="fa fa-caret-down"></i>
                    </a>
                    <ul class="dropdown-menu" style="">
                        <li>
                            <a class="main_ajax btn btn-success no_context_menu" data-media_type="vclub" href="{{app.request_context.baseUrl}}/{{app.controller_alias}}/stat-claims-clean">{{ 'Video club'|trans }}</a>
                        </li>
                        <li>
                            <a class="main_ajax btn btn-success no_context_menu" data-media_type="itv" href="{{app.request_context.baseUrl}}/{{app.controller_alias}}/stat-claims-clean">{{ 'TV'|trans }}</a>
                        </li>
                        <li>
                            <a class="main_ajax btn btn-success no_context_menu" data-media_type="karaoke" href="{{app.request_context.baseUrl}}/{{app.controller_alias}}/stat-claims-clean">{{ 'Karaoke'|trans }}</a>
                        </li>
                        <li>
                            <a class="main_ajax btn btn-success no_context_menu" data-media_type="epg" href="{{app.request_context.baseUrl}}/{{app.controller_alias}}/stat-claims-clean">{{ 'EPG'|trans }}</a>
                        </li>
                        <li>
                            <a class="main_ajax btn btn-success no_context_menu" data-media_type="all" href="{{app.request_context.baseUrl}}/{{app.controller_alias}}/stat-claims-clean">{{ 'All'|trans }}</a>
                        </li>
                    </ul>
                </div>
                #}
                <div class="btn-group pull-right">
                    <a href="#" class="dropdown-toggle btn btn-default" data-toggle="dropdown">                    
                        <span>{{ 'Clean claims'|trans }}</span>
                        <i class="fa fa-caret-down"></i>
                    </a>
                    <ul class="dropdown-menu pull-right text-center">
                        <li>
                            <a class="main_ajax no_context_menu" data-media_type="itv" href="{{app.request_context.baseUrl}}/{{app.controller_alias}}/stat-claims-clean">{{ 'TV'|trans }}</a>
                        </li>
                        <li>
                            <a class="main_ajax no_context_menu" data-media_type="vclub" href="{{app.request_context.baseUrl}}/{{app.controller_alias}}/stat-claims-clean">{{ 'Video club'|trans }}</a>
                        </li>
                        <li>
                            <a class="main_ajax no_context_menu" data-media_type="karaoke" href="{{app.request_context.baseUrl}}/{{app.controller_alias}}/stat-claims-clean">{{ 'Karaoke'|trans }}</a>
                        </li>
                        <li>
                            <a class="main_ajax no_context_menu" data-media_type="epg" href="{{app.request_context.baseUrl}}/{{app.controller_alias}}/stat-claims-clean">{{ 'EPG'|trans }}</a>
                        </li>
                        <li>
                            <a class="main_ajax no_context_menu" data-media_type="all" href="{{app.request_context.baseUrl}}/{{app.controller_alias}}/stat-claims-clean">{{ 'All'|trans }}</a>
                        </li>
                    </ul>
                </div>
                <a href="{{app.request_context.baseUrl}}/{{app.controller_alias}}/stat-claims-logs" title="{{ 'Go to Complaints Log page'|trans }}" class="btn btn-default pull-right" id="add_audio_years">{{ 'Complaints log'|trans }}</a>
                {{ main_macro.get_datepicker_double_input() }}
            </div>
        </div>
        
        <div class="row">
            <div class=" ">
                <div class="box">
                    {% if attribute(app, 'dropdownAttribute') is defined %}
                    {{ main_macro.get_dropdown_attribute(app['dropdownAttribute']) }}
                    {% endif %}
                    <div class="box-content">
                        <div class="box-content no-padding">
                            <div class="dataTables_processing"></div>
                            <table class="table  table-hover table-datatable" id="datatable-1">
                                {% if attribute(app, 'dropdownAttribute') is defined %}
                                    {{ main_macro.get_datatable_head(app['dropdownAttribute']) }}
                                {% endif %}
                                <tbody>

                                </tbody>
                            </table>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>

{% endblock %}