<!-- filter bar -->
<div layout="row" class="wrap-top-gap">
    <div flex="90" layout="column">
        <filter-bar selected-rows-key="selectedRows" list-keys="listIds" list="lists" full-list="fullList" search-by="experiment_name" type-by="status" search-placeholder="Search experiments..."></filter-bar>
    </div>
    <div flex="10" layout="column" layout-align="center end" ng-if="dataLoadComplete == true">
        <flat-button-directive url='#/split-test-manager' title='Content' type='add'  ></flat-button-directive>
    </div>
</div>
<!-- filter bar -->

<div ng-init="getSplitTest();"  layout = "row" layout-align="center" md-whiteframe="3" layout-padding layout-margin  style="background: white">
    <md-content flex class="list-tab-wraper">
        <div layout = "row" layout-align="start center">
            <div flex="5" flex-md="5" class=""></div>
            <div flex="5" flex-md="5" class="right-padding-20 small-width-table text-align-right"><b>#</b></div>
            <div flex="25" class="right-padding-20"><b>Experiment</b></div>
            <div flex="15" class="right-padding-20"><b>Visitor Total</b></div>
            <div flex="15" class="right-padding-20"><b>Conversion Rate Total</b></div>
            <div flex="15" class="right-padding-20"><b>Variations</b></div>
            <div flex="20" class="right-padding-20"><b>Created</b></div>
            <div flex="5" class="text-right-align right-padding-10"></div>
            <div flex="5" class="text-right-align right-padding-10"></div>
        </div>
        <md-divider></md-divider>
        <div ng-click="editSplitTest(data.id)" layout = "row" layout-align="end center" ng-repeat-start="data in lists">
            <div flex="5" ng-click="$event.stopPropagation();" flex-md="10" class="right-padding-20 text-align-right small-width-table">
                <md-checkbox ng-checked="exists(data.id)" ng-click="toggle(data.id)" aria-label="Checkbox 1"></md-checkbox>
            </div>
            <div flex="5" flex-md="10" class="right-padding-20 text-align-right small-width-table">
                {{data.id}}
            </div>
            <div flex="25" class="right-padding-20">
                <span class="setting-link">
                    {{data.experiment_name}}
                </span>
            </div>
            <div flex="15" class="right-padding-20">
                <span ng-if="data.selectedSplitTestType != 'url-ab-testing'">
                    {{data.view_data.visitor_total}}
                </span>
                <span ng-if="data.selectedSplitTestType == 'url-ab-testing'">
                    NA
                </span>
            </div>
            <div flex="15" class="right-padding-20">
                <span ng-if="data.selectedSplitTestType != 'url-ab-testing'">
                    {{data.view_data.conversion_rate}} %
                </span>
                <span ng-if="data.selectedSplitTestType == 'url-ab-testing'">
                   NA
                </span>
            </div>
            <div flex="15" class="right-padding-20">{{data.view_data.variations}}</div>
            <div flex="20" class="right-padding-20">{{data.last_modified_formated}}</div>
            <div flex="5" class="right-padding-20" ng-click=" $event.stopPropagation();">
                <i ng-if="data.selectedSplitTestType != 'url-ab-testing'"  class="material-icons view-icon" ng-click="showQuickView(data);">remove_red_eye</i>
                <a></a>
            </div>
            <div flex="5" class="right-padding-20">
                <md-menu>
                    <md-button aria-label="Open demo menu" class="md-icon-button"
                               ng-click="$mdOpenMenu($event)">
                        <i class="material-icons">more_vert</i>
                    </md-button>
                    <md-menu-content>
                        <md-menu-item>
                            <md-button ng-click="editSplitTest(data.id)">
                                <span md-menu-align-target>Edit</span>
                            </md-button>
                        </md-menu-item>

                        <md-menu-item ng-repeat="action in filterActions">
                            <md-button ng-click="this[action.method](data.id)">
                                <span md-menu-align-target>{{action.val}}</span>
                            </md-button>
                        </md-menu-item>

                        <!--                        <md-menu-item>
                                                    <md-button ng-click="preview(data)">
                                                        <span md-menu-align-target>Preview</span>
                                                    </md-button>
                                                </md-menu-item>-->

                    </md-menu-content>
                </md-menu>
            </div>
        </div>
        <md-divider ng-repeat-end ng-show='{{$last ? false : true}}'></md-divider>
        <div layout = "row" layout-padding ng-show="!lists.length">
            <div flex layout="row" layout-align="center center"><no-data-text></no-data-text></div>
        </div>
    </md-content>
</div>