{{ header }} {{ column_left }}
<div id="content"> 
   <div class="page-header">
        <div class="container-fluid">

            {% if display_list_store == false %}   <!-- get back to store list -->
            <div class="pull-right">

                <a href="{{ list_stores_url }}" data-toggle="tooltip" class="btn btn-default" data-original-title="Return"><i class="fa fa-reply"></i></a>
            </div>
            {% endif %}

            <h1>{{ heading_title }}</h1>

            <ul class="breadcrumb">
                {% for breadcrumb in breadcrumbs %}
                <li>{{ breadcrumb['text'] }}</li>
                {% endfor %}
            </ul>

        </div>

    </div> <!-- class="page-header" -->

{% if display_list_store %}






    <div class="container-fluid">

        <div class="row">

            <div class="col-md-9 col-sm-12">

                <div class="panel panel-default">
                    <div class="panel-heading">
                        <h3 class="panel-title"><i class="fa fa-list"></i> {{ store_list }}</h3>
                    </div>
                    <div class="panel-body">
                        <div class="table-responsive">
                            <table class="table table-bordered table-hover">
                                <thead>
                                    <tr>
                                       <td class="text-left">
                                        {{ store_id }}
                                       </td>
                                       <td class="text-left">
                                        {{ store_name }}
                                       </td>
                                       <td class="text-left">
                                        {{ store_url }}
                                       </td>
                                        <td class="text-left">
                                        {{ store_action }}
                                       </td>
                                    </tr>
                                </thead>
                                <tbody>

                                {% for store in list_store %} 
                                    <tr>
                                        <td>
                                            {{ store.id }}
                                        </td>
                                        <td>
                                            {{ store.name }}
                                        </td>
                                        <td>
                                            {{ store.url }}
                                        </td>
                                        <td class="text-right"><a href="{{ admin_url ~ '&store_id=' ~ store.id }}" data-toggle="tooltip" title="" class="btn btn-primary" data-original-title="Edit"><i class="fa fa-pencil"></i></a>
                                        </td>
                                    </tr>
                                {% endfor %}
                                </tbody>
                            </table>
                        </div>
                    </div> <!-- class panel-body -->
                </div> <!-- class panel panel-default --> 

            </div> <!-- class col-md-9 col-md-pull-3 col-sm-12 -->

        </div> <!-- div row -->

    </div> <!-- div container-fluid -->
  



{% else %}      <!-- if display_list_store --> <!-- **** DISPLAY A SPECIFIC STORE ************* -->

    <div class="container-fluid"> <!--start-->

        <div class="panel panel-default">

            <div class="panel-heading">

                <h3 class="panel-title"><i class="fa fa-pencil"></i>{{ title_conf }}</h3>

            </div>

            <div class="panel-body">

                {% if response_conf is not empty %}


                    <div class="alert alert-success" role="alert">

                        {{ response_conf }}

                    </div>

                {% endif %}

                <form class="conf_form form-horizontal" name="av_form_conf" method="post" action="{{ admin_url ~ current_store }}">

                        <div class="alert alert-info" role="alert">{{ text_data }}</div>

                <!-- *********** NO MULTILANGUE ************************** --> 
                <div class="row {% if is_multilangue is not null and is_multilangue == '1' %} hidden {% endif %} justify-content-center" id="av_configuration"> 
                    {% for language in languages %}  

                    {% if language.id_lang == default_lang %}
                    <div class="language col-lg-6 col-sm-12 col-xs-12 netreviews_configuration_values">
                            <div class="form-group col-lg-12 col-sm-12 col-xs-12"> 
                                <div class="col-lg-1 col-sm-1 col-xs-1">
                                        <img src="/catalog/language/{{ language.code }}/{{ language.code }}.png" alt="{{ language.name }}" title="{{ language.name }}">
                                </div>
                                <label class="control-label col-lg-1 col-sm-1 col-xs-1">{{ language.name }}</label>
                            </div>
                            <div class="form-group col-lg-12 col-sm-12 col-xs-12">
                                <label class="control-label col-lg-3 col-sm-4 col-xs-12" for="s_key">{{ secret_key }}</label>

                                <div class="col-lg-9 col-sm-8 col-xs-12">

                                <input id="s_key" class="av_input form-control netreviews_secret_key" type="text" size="36" name="key[{{ language.id_lang }}]" value="{% if key[language.id_lang] is not null%}{{ key[language.id_lang] }}{% endif %}" />
                                </div>

                            </div>
                            <div class="form-group col-lg-12 col-sm-12 col-xs-12">
                                <label  class="control-label col-lg-3 col-sm-4 col-xs-12" for="id_web" >{{ id_website }}</label>
                                <div class="col-lg-9 col-sm-8 col-xs-12">
                                    <input id="id_web" class="av_input  form-control netreviews_id_website" type="text" size="36" name="id_web[{{ language.id_lang }}]" value="{% if id_web[language.id_lang] is not null%}{{ id_web[language.id_lang] }}{% endif %}" />
                                </div>
                            </div>
                            <div class="form-group col-lg-12 col-sm-12 col-xs-12">
                                <label  class="control-label col-lg-3 col-sm-4 col-xs-12" for="id_web" >{{ platforme }}</label>
                                <div class="col-lg-9 col-sm-8 col-xs-12">
                                    <select name="platform[{{ language.id_lang }}]" id="input-status" class="form-control netreviews_platforme">
                                        <option value=""></option>
                                        {% for platformKey in platformTagjs|keys %}
                                        <option value="{{ platformKey }}" {% if platform[language.id_lang] is not null and platform[language.id_lang] == platformKey %} selected {% endif %}>{{ platformTagjs[platformKey] }}</option>
                                        {% endfor %}          
                                    </select>
                                </div>
                            </div>
                        </div>
                    {% endif %} <!-- Endif language.code -->

                {% endfor %} <!-- END language in languages -->
                </div>
              <!-- ******************** END NO MULTILANGUE ************************ -->


              <!-- ****************************************************************** -->
              <!-- ******************* YES MULTILANGUE **************************** -->
                        <div class="row {% if is_multilangue is null or is_multilangue == '0' %} hidden {% endif %} configuration_labels justify-content-center" id="av_multilanguage_configuration" value="{{ is_multilangue }}">
                        {% for language in languages %}
                        <div class="language col-lg-6 col-sm-12 col-xs-12 netreviews_configuration_values">
                            <div class="form-group col-lg-12 col-sm-12 col-xs-12"> 
                                <div class="col-lg-1 col-sm-1 col-xs-1">
                                        <img src="/catalog/language/{{ language.code }}/{{ language.code }}.png" alt="{{ language.name }}" title="{{ language.name }}">
                                </div>
                                <label class="control-label col-lg-1 col-sm-1 col-xs-1">{{ language.name }}</label>
                            </div>
                            <div class="form-group col-lg-12 col-sm-12 col-xs-12">
                                <label class="control-label col-lg-3 col-sm-4 col-xs-12" for="s_key">{{ secret_key }}</label>

                                <div class="col-lg-9 col-sm-8 col-xs-12">
                                <input id="s_key" class="av_input form-control netreviews_secret_key" type="text" size="36" name="multi_key[{{ language.id_lang }}]" value="{% if multi_key[language.id_lang] is not null%}{{ multi_key[language.id_lang] }}{% endif %}" />
                                </div>

                            </div>
                            <div class="form-group col-lg-12 col-sm-12 col-xs-12">
                                <label  class="control-label col-lg-3 col-sm-4 col-xs-12" for="id_web" >{{ id_website }}</label>
                                <div class="col-lg-9 col-sm-8 col-xs-12">
                                    <input id="id_web" class="av_input  form-control netreviews_id_website" type="text" size="36" name="multi_id_web[{{ language.id_lang }}]" value="{% if multi_id_web[language.id_lang] is not null%}{{ multi_id_web[language.id_lang] }}{% endif %}" />
                                </div>
                            </div>
                            <div class="form-group col-lg-12 col-sm-12 col-xs-12">
                                <label  class="control-label col-lg-3 col-sm-4 col-xs-12" for="id_web" >{{ platforme }}</label>
                                <div class="col-lg-9 col-sm-8 col-xs-12">
                                    <select name="multi_platform[{{ language.id_lang }}]" id="input-status" class="form-control netreviews_platforme">
                                        <option value=""></option>
                                        {% for platformKey in platformTagjs|keys %}
                                        <option value="{{ platformKey }}" {% if multi_platform[language.id_lang] is not null and multi_platform[language.id_lang] == platformKey %} selected {% endif %}>{{ platformTagjs[platformKey] }}</option>
                                        {% endfor %}           
                                    </select>
                                </div>
                            </div>
                        </div>
                        {% endfor %} <!-- End language in languages -->
                    </div> <!-- ******************* End YES MULTILANGUE ******************************* -->
                        <br />
                        <!-- *************** Multilanguage Button ************************************* -->
                        <div class="row">
                            <div class="form-group">

                                <label class="col-lg-3 col-sm-4 col-xs-12 control-label">
                                <span class="label-tooltip" data-toggle="tooltip" data-html="true" title="{{ multilangue_info }}" data-original-title=""><b> {{ multilangue_enable }}</b></span></label>                               
                                <div class="switch col-lg-9 col-sm-8 col-xs-12 avisverifies_multilingue">

                                	<div class="btn-group" data-toggle="buttons">
                                    	<label class="btn btn-success text-primary" id="multilangueActivateYes" {% if is_multilangue is null or is_multilangue == '0' %} style="background-color: rgb(128, 128, 128);border-color:rgb(128, 128, 128);" {% endif %}>
                                            <input type="radio" name="av_multilangue" value="1" autocomplete="off" aria-pressed="false" {% if is_multilangue is not null and is_multilangue == '1' %} checked {% endif %}>
                                            On
                                    	</label>
                                    	<label class="btn btn-danger text-primary active" id="multilangueActivateNo" {% if is_multilangue is not null and is_multilangue == '1' %} style="background-color: rgb(128, 128, 128);border-color:rgb(128, 128, 128);" {% endif %}>
                                            <input type="radio" name="av_multilangue" value="0" autocomplete="off" data-toggle="toggle" {% if is_multilangue is null or is_multilangue == '0' %}checked{% endif %} aria-pressed="true">
                                            Off
                                    	</label>
                                	</div>
                               </div>
                            </div>
                        </div><!-- multilanguage Button END-->

                        <div class="row send clearfix form-horizontal">
                        <input type="text" hidden value=""></input>
                        <input  class="btn btn-info form-group" id="submit_configuration" name="submit_configuration" type="submit" value="{{ save }}" />
                        </div>



                </form> <!--  <form class="conf_form form-horizontal" name="av_form_conf" method="post"> -->   





                <!-- ******************************************************************** -->
                <!-- *************** Start Advanced Configuration *************************** -->
            <form name="form-horizontal netreviews_advanced_config conf_form" method="post" action="{{ admin_url ~ current_store }}">
                <div class="row panel-info netreviews_order_flags">


                    <div class="panel-heading">

                        <h3 class="panel-title">{{ advanced }}</h3>

                    </div>

                    <div class="panel-body col-lg-6 col-sm-12 col-xs-12">

                    <div class="delay form-group netreviews_advanced_id">
                    <label for="netreviews_advanced_language" >{{ choose_language }}</label> 
                    <select id="netreviews_advanced_language" class="form-control" type="text" name="netreviews_advanced_language">
                        <option value=""></option>
                        {% for language in languages %}
                            {%  if language.id_lang in config_languages|keys  %}
                            <option value="{{ language.id_lang }}"> {{ language.name }}</option>
                            {% endif %}
                        {% endfor %}
                    </select>  
                    </div> 

                     <br />
                    <!-- Option to set Category Stars -->
                    {% for language in languages %}
                        {%  if language.id_lang in config_languages|keys  %}
                        <div class="row">
                            <div class="hidden col-lg-6 delay form-group netreviews_star_category" id="netreviews_star_category_{{ language.id_lang }}">
                                <label for="netreviews_star_category" >{{ stars_category_text }}</label> 
                                <select id="netreviews_star_category_{{language.id_lang}}" class="form-control" type="text" name="netreviews_star_category_{{language.id_lang}}" {% if category_stars[language.id_lang] is defined and category_stars[language.id_lang] == '1' %} style="background-color:white;font-weight:1000;color:rgb(76, 182, 76);" {% endif %}>
                                        <option value="0" {% if category_stars[language.id_lang] is defined and category_stars[language.id_lang] == '0' %} selected {% endif %}> {{ disabled }}</option>
                                        <option value="1" {% if category_stars[language.id_lang] is defined and category_stars[language.id_lang] == '1' %} selected {% endif %}> {{ enabled }}</option>
                                </select>  
                            </div>
                        </div>
                        {% endif %}
                    {% endfor %} 

                    <br />

                     {% for config_lang_code in config_languages|keys %}

                     <table class="delay form-group table table-hover table-bordered table_netreviews_order hidden" id="table_netreviews_order_{{ config_lang_code }}">

                      <thead>

                            <tr class="info">

                              <th><label>{{ text_counts }}</label></th>

                              <th> <div class="title">{{ text_status }}</div></th>

                          </tr>

                      </thead>
                      <tbody>

		                    <tr>

		                        <td> <label for="flag1_num">{{ text_flag~'1' }}</label></td>

		                        <td> <span class="num" id="flag1_num" >{{ config_languages[config_lang_code]['flag_1'] }}</span></td>

		                    </tr>
		                    <tr>

		                        <td><label for="flag0_num">{{ text_flag~'0' }}</label></td>

		                        <td>  <span class="num" id="flag0_num" >{{ config_languages[config_lang_code]['flag_0'] }}</span> </td>

		                    </tr>

                    </tbody>

                    </table>

                    {% endfor %}


                    <div class="row send clearfix form-horizontal">
                        <input  class="btn btn-info form-group" id="netreviews_advanced_config" name="netreviews_advanced_config" type="submit" value="{{ save }}" />
                    </div> 

                </div>  <!-- <div class="panel-body"> -->

                </div>  <!-- <div class="panel panel-info netreviews_order_flags"> -->  
            </form> <!-- End <form name="form-horizontal netreviews_advanced_config conf_form" -->            
                <!-- *************** End Advanced Configuration *************************** -->



                <!-- ****************************************************************** -->
                <!-- *************** Export Configuration ***************************** -->
                    <div class="row panel-info">

                        <div class="panel-heading">

                        <h3 class="panel-title">{{ title_export }}</h3>

                        </div>

                        <div class="panel-body col-lg-6 col-sm-12 col-xs-12">

                            {% if response is defined %}

                                {% if response == 1 %}
                                    <div  class="alert alert-success">
                                        <p>{{ text_final }}</p>
                                    </div>

                                {% else %}

                                    <div  class="alert alert-warning">
                                    <p>{{ no_orders }}</p>
                                    </div>
                                {% endif %}


                            {% endif %}


                            <div class="delay form-group netreviews_order_id">
                            <label for="netreviews_export_language" >{{ choose_language }}</label> 
                            <select id="netreviews_export_language" class="form-control" type="text" name="netreviews_export_language">
                                <option value=""></option>
                                {% for language in languages %}
                                    {%  if language.id_lang in config_languages|keys  %}
                                    <option value="{{ language.id_lang }}"> {{ language.name }}</option>
                                    {% endif %}
                                {% endfor %}
                            </select>  
                            </div> 

                            <!-- ************************************************************************* -->
                            <!-- ****************** Section Export *************************************** -->
                            <form name="form-horizontal av_form_export conf_form" method="post" action="{{ admin_url ~ current_store }}">
                                <div class="">{{ text_export }}</div>

                                <div class="delay form-group hidden" id="netreviews_delay_time">
                                    <label for="date_delay" >{{ delay }}</label>

                                    <select id="date_delay" type="text" name="delay_value" class="form-control">

                                        <option value="1w"> 1 {{ week }} </option>

                                        <option value="2w"> 2 {{ week }} </option>

                                        <option value="1m"> {{ month }} </option>

                                        <option value="2m"> 2 {{ months }} </option>

                                        <option value="3m"> 3 {{ months }} </option>

                                        <option value="4m"> 4 {{ months }} </option>

                                        <option value="5m"> 5 {{ months }} </option>

                                        <option value="6m"> 6 {{ months }} </option>

                                        <option value="7m"> 7 {{ months }} </option>

                                        <option value="8m"> 8 {{ months }} </option>

                                        <option value="9m"> 9 {{ months }} </option>

                                        <option value="10m"> 10 {{ months }} </option>

                                        <option value="11m"> 11 {{ months }} </option>

                                        <option value="1y"> 1 {{ year }} </option>

                                    </select><br />
                                </div>

                                <div class="info_prod form-group hidden" id="netreviews_collect_prods">

                                    <label for="get_prod" >{{ text_product }}</label>

                                    <select id="get_prod" class="form-control" type="text" name="info_prod">

                                    <option value="yes" {% if form_export['info_prod'] is defined and form_export['info_prod'] == 'yes' %} selected {% endif %} > {{ yes }} </option>

                                    <option value="no" {% if form_export['info_prod'] is defined and form_export['info_prod'] == 'no' %} selected {% endif %} > {{ no }} </option>

                                    </select>
                                </div>
                                <div class="hidden" id="netreviews_product_info">
                                {{ text_without }}
                                    <br />
                                {{ text_with }}</div>
                                <br />
                                <br />


                                {% for language_code in config_languages|keys %}
                                <!-- List the status for the language of the store -->
                                <div class="netreviews_order_status clearfix hidden" id="netreviews_list_status_{{ language_code }}">

                                        <label for="first" >{{ text_status }}</label>
                                        <!-- Used for display purposes - only need language code to get list of states -->
                                        {% for order_state in config_languages[language_code]['full_order_states'] %}
                                                <div class="input-group"> 
                                                <span class="input-group-addon">
                                                <input type="checkbox" name="order_list_status[]" value="{{ order_state['name'] }}"/></span>
                                                <span class="form-control" >{{ order_state['name'] }}</span>
                                                </div>
                                        {% endfor %}
                                </div>
                                {% endfor %}
                                <div class="row send clearfix form-horizontal">
                                    <input type="text" hidden value="" id="netreviews_lang_code" name="netreviews_lang_code"/>
                                    <input  class="btn btn-info form-group" name="netreviews_order_states" type="submit" value="{{ action_export }}" />

                                </div>        


                            </form> <!-- <form name="av_form_export" method="post"> -->
                            <!-- End section export -->

                        </div> <!-- class="panel-body" end inner-->


                </div> <!-- class="panel panel-info" -->
                <!-- End Export Configuration -->










            </div> <!-- class="panel-body" end outer --> 

        </div> <!-- class="panel panel-default" -->


    </div> <!-- class="container-fluid" -->  
{% endif %} <!-- if display_list_store -->
</div>  <!-- id="content" -->
    