{{!
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements.  See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership.  The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License.  You may obtain a copy of the License at
*
*     http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
}}

<div id="slider-apps-table">

  <table class="datatable table table-striped" id="slider-table">
    <thead>
    {{#view view.sortView classNames="label-row" contentBinding="view.filteredContent"}}
      {{view view.parentView.nameSort}}
      {{view view.parentView.statusSort}}
      {{view view.parentView.typeSort}}
      {{view view.parentView.userSort}}
      {{view view.parentView.startSort}}
      {{view view.parentView.endSort}}
    {{/view}}
    <tr id="filter-row">
      <th>{{view view.nameFilterView}}</th>
      <th>{{view view.statusFilterView}}</th>
      <th>{{view view.typeFilterView}}</th>
      <th>{{view view.userFilterView}}</th>
      <th>{{view view.startFilterView}}</th>
      <th></th>
    </tr>
    </thead>
    <tbody>
    {{#if view.pageContent}}
      {{#each slider in view.pageContent}}
        {{#view view.SliderView contentBinding="slider"}}

          <td>
            {{#link-to 'slider_app.summary' slider}}
              <span {{bs-bind-popover view.popover}}>{{slider.name}}</span>
            {{/link-to}}
          </td>

          <td>{{slider.displayStatus}}</td>

          <td>{{slider.appType.displayName}}</td>

          <td>{{slider.user}}</td>

          <td>{{slider.startedToLocalTime}}</td>

          <td>{{slider.endedToLocalTime}}</td>

        {{/view}}
      {{/each}}
    {{else}}
      <tr>
        <td colspan="6">
          {{t tableView.filters.noItems}}
        </td>
      </tr>
    {{/if}}
    </tbody>
  </table>
  <div class="page-bar">
    <div class="filtered-hosts-info span4">
      <label>{{view.filteredContentInfo}} - <a {{action clearFilters target="view"}}
          href="#" class="clearFiltersLink">{{t tableView.filters.clearAllFilters}}</a></label>
    </div>
    <div class="items-on-page">
      <label>{{t common.show}} {{view view.rowsPerPageSelectView selectionBinding="view.displayLength"}}</label>
    </div>
    <div class="info">{{view.paginationInfo}}</div>
    <div class="paging_two_button">
      {{view view.paginationLeft}}
      {{view view.paginationRight}}
    </div>
  </div>
</div>
{{outlet}}
