
<script type="text/javascript" charset="utf-8">


    $(document).ready(function () {
        $('#example').dataTable({
            "bPaginate": false,
            "bStateSave": true,
            "sDom": 'TCR<"clear">lfrtip',
            "oTableTools": {
                "aButtons": [
                    "copy",
                    "print",
                    {
                        "sExtends": "collection",
                        "sButtonText": "حفظ",
                        "aButtons": ["csv", "xls"]
                    }
                ]
            }
        });
    });

</script>
<div class="row">
    <div class="container">
        <ol class="breadcrumb">
            <li><a href="#">{$smarty.const.PRODUCTS}</a></li>
            <li><a href="searchFiltersController.php?do=show">{$smarty.const.SEARCH_FILTERS}</a></li>
            <li class="active">{$smarty.const.SHOW_SEARCH_FILTERS}</li>
        </ol>
        <div class="panel panel-default panel-m">
            <!-- Default panel contents -->
            <div class="panel-heading" style="padding:5px 15px 15px">
                <h3 class="panel-title" style="display: inline-block;">{$smarty.const.SHOW_SEARCH_FILTERS}</h3>
                <a href="{$youtubes[47]->url}" target="_blank" class="hidden-print"><img src="../views/default/assets/img/youtube.png" class="pull-left" alt="Youtube" style="width: 2%;"></a>
                <a href="searchFiltersController.php" class="hidden-print"><input type="button"  id="submit" style="margin-left: 12px" class="btn btn-primary pull-left " value="{$smarty.const.FILTER_ADD_NEW}"/></a>
            </div>
            <div class="panel-body">
                <div id="outputString" class="alert alert-block alert-success fade in" style="display:none">
                    <button type="button" class="close pull-left" data-dismiss="alert" aria-hidden="true">&times;</button>
                    <p id="outputStringValue">{$outputString}</p>
                    <div class="clearfix"></div>
                </div>
            </div>
            <hr/>
            <form class="form-inline  hidden-print" method="post" action="searchFiltersController.php?do=show">
                <div class="form-group">
                    <label class="sr-only">{$smarty.const.FILTER_NAME}</label>
                    <select data-placeholder="{$smarty.const.CHOOSE_FILTER}"  class="select2 wdt100"  name="catId" id="catId" onChange="this.form.submit();">
                        <option value="-1">{$smarty.const.CHOOSE_FILTER}</option>





                        {foreach $allData as $cat}





                        <option value="{$cat.id}">{$cat.name}</option>





                        {/foreach}





                    </select>
                </div>
                <button type="submit" class="btn btn-primary">{$smarty.const.FILTER_SEARCH}</button>
            </form>
            <!-- Table -->
            {literal}
            <form method="post" action="searchFiltersController.php?do=executeOperation" onsubmit="if (Spry.Widget.Form.validate(this)) {
                        return countChoosenProducts('searchFiltersController');
                    } else {
                        return false;
                    }">
                {/literal}
                <table class="display table-black" id="example">
                    <thead>
                        <tr>
                            <th  class="hidden-print">
                                <input type="checkbox" name="checkAll" id="checkAll"/>
                            </th>
                            <th>{$smarty.const.FILTER_NAME}</th>
                            <th class="hidden-print">{$smarty.const.FILTER_STOP}</th>
                            <th class="hidden-print">{$smarty.const.FILTER_EDIT}</th>

                            {if {$Programsettingdata->allowfinsldelete} eq 0}
                            <th class="hidden-print">{$smarty.const.FILTER_DELETE} </th>
                            {/if}
                        </tr>
                    </thead>
                    <tbody>

                        {foreach $searchFiltersData as $data}
                        {if {$data.conditions} eq 1}
                        <tr class="danger" style="background-color:#eed3d7;"> {elseif {$data.conditions} eq 0}

                        <tr> {/if}
                            <td class="hidden-print">
                                <input type="checkbox" name="choosedItem[]" id="checked{$i}" class="choosenItem" value="{$data.id}" />
                            </td>
                            <td>{$data.name}{if $data.parentName !=""} / {$data.parentName}{/if}</td>
                            <td class="hidden-print"> {if {$data.conditions} eq 0} <a href="searchFiltersController.php?do=tempdelete&id={$data.id}" type="button" class="btn btn-default btn-lg removeicon"></a> {elseif {$data.conditions} eq 1 } <a href="searchFiltersController.php?do=returndelete&id={$data.id}" type="button" class="btn btn-default btn-lg correcticon"></a> {/if} </td>
                            <td class="hidden-print"> <a href="searchFiltersController.php?do=edit&id={$data.id}&parentid={$data.parentid}" class="btn btn-default btn-lg editicon"></a> </td>

                            {if {$Programsettingdata->allowfinsldelete} eq 0}
                            <td class="hidden-print"><a href="#" name="dd" type="button" class="btn btn-default btn-lg deleteicon conformdel1" data-position="searchFiltersController.php?do=deleteFinaly&id={$data.id}" ></a></td>
                            {/if}
                        </tr>
                        {/foreach}

                    </tbody>

                </table>
                <div class="clearfix"></div>

                <!-- Modal -->
                <div class="hidden-print">
                    <div class="modal fade " id="myModal1" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
                        <div class="modal-dialog">
                            <div class="modal-content">
                                <div class="modal-header">
                                    <button type="button" class="close pull-left" data-dismiss="modal" aria-hidden="true">&times;</button>
                                    <h4 class="modal-title">{$smarty.const.FILTER_CONFIRM_DELETION}</h4>
                                </div>
                                <div class="modal-body"> {$smarty.const.FILTER_WANT_DELETE_FILTER} </div>
                                <div class="modal-footer">
                                    <button type="button" class="btn btn-default" data-dismiss="modal">{$smarty.const.FILTER_NO}</button>
                                    <button type="button" class="btn btn-primary savemodel1">{$smarty.const.FILTER_YES}</button>
                                </div>
                            </div>
                            <!-- /.modal-content -->
                        </div>
                        <!-- /.modal-dialog -->
                    </div>
                </div>
                <!-- /.modal -->

                <hr />
                <div  class="hidden-print">
                    <div class="col-lg-12">
                        <div class="well well-sm">
                            <div class="form-group">
                                <div class="col-lg-4">
                                    <label for="operation"></label>
                                    <span id="spryselect1">
                                        <select name="operation" id="operation"  data-placeholder="{$smarty.const.FILTER_CHOOSE_PROCESS}" class="select2 wdt100">
                                            <option value="-1">{$smarty.const.FILTER_CHOOSE_PROCESS}</option>
                                            <option value="1">{$smarty.const.FILTER_STOP}</option>
                                            <option value="2"> {$smarty.const.FILTER_START}</option>
                                        </select>
                                        <span class="selectInvalidMsg">*</span></span></div>
                            </div>
                            <div class="form-group">
                                <div class="col-lg-4">
                                    <input name=""  class="hidden-print btn btn-primary" type="submit" value="{$smarty.const.FILTER_EXECUTION}"/>
                                </div>
                            </div>
                            <div class="clearfix"></div>
                            <div id="noElementsError" class="alert alert-danger fade in" style="display:none;">
                                <button type="button" class="close pull-left" data-dismiss="alert" aria-hidden="true">×</button>
                                <p>{$smarty.const.FILTER_ITEMS_SELECTED_FIRST}</p>
                                <div class="clearfix"></div>
                            </div>
                            <div class="clearfix"></div>
                        </div>
                        <div class="form-group">
                            <div class="col-lg-4">
                                <button type="button" onclick="print_Custom('mycustomheader');" class="btn btn-success pull-right">{$smarty.const.FILTER_PRINT}</button>
                            </div>
                        </div>
                    </div>
                    <div class="clearfix"></div>
                </div>
                <div class="clearfix"></div>




            </form>
        </div>

    </div>
</div>
{literal}
<script type="text/javascript">
    var spryselect1 = new Spry.Widget.ValidationSelect("spryselect1", {isRequired: false, invalidValue: "-1"});
</script>
{/literal}