<table class="object-list-view ui unstackable celled {{if readonly 'readonly'}} {{tableClass}} table">
  {{#if singleColumnHeaderTitle}}
    <thead>
      <tr>
        {{#if showHelperColumn}}
          <th class="object-list-view-operations collapsing" data-olv-header-property-name="OlvRowToolbar"></th>
        {{/if}}
        <th class="dt-head-left me class" data-olv-header-property-name="OlvHeader">{{singleColumnHeaderTitle}}</th>
        {{#if showMenuColumn}}
          <th class="object-list-view-menu collapsing" data-olv-header-property-name="OlvRowMenu"></th>
        {{/if}}
      </tr>
    </thead>
  {{/if}}
  <tbody>
    {{#if showFilters}}
      <tr class="object-list-view-filters" onkeydown={{action "applyFiltersByEnter"}}>
        {{#if showHelperColumn}}
          <td class="object-list-view-helper-column {{unless showHelperColumn 'hidden'}}">
            <div class="object-list-view-helper-column-cell"></div>
          </td>
        {{/if}}
        <td class="overflowed-cell">
          {{#each columns as |column|}}
            <div class="inline fields filter">
              <label>{{if column.keyLocale (t column.keyLocale) column.header}}:</label>
              {{#if column.filter.conditions}}
                <div class="filter-operation">
                  {{flexberry-dropdown
                    value=column.filter.condition
                    items=column.filter.conditions
                    displayCaptions=(not (is-array column.filter.conditions))
                    class="compact fluid"
                    placeholder=(t "components.object-list-view.filter-condition")
                    needChecksOnValue=false
                    onChange=(action "filterConditionChanged" column.filter)
                  }}
                </div>
              {{/if}}
              {{#if column.filter.component.name}}
                <div class="fluid action input ui filter-value">
                  {{component column.filter.component.name
                    value=column.filter.pattern
                    readonly=(or
                      (eq column.filter.condition "empty")
                      (eq column.filter.condition "nempty")
                    )
                    dynamicProperties=column.filter.component.properties
                  }}
                  <button
                    type="button"
                    class="ui clear-filter button"
                    title={{t "components.object-list-view.clear-filter-in-column"}}
                    {{action "clearFilterForColumn" column.filter}}
                  >
                    <i class="remove icon"></i>
                  </button>
                </div>
              {{/if}}
            </div>
          {{/each}}
        </td>
        {{#if showMenuColumn}}
          <td class="object-list-view-menu"></td>
        {{/if}}
      </tr>
    {{/if}}
    {{#unless content}}
      <tr>
        <td colspan="{{colspan}}" style="text-align:center;">
            {{placeholder}}
        </td>
      </tr>
    {{else}}
      {{#each contentWithKeys key="key" as |record|}}
        {{object-list-view-row
          record=record
          columns=columns
          readonly=readonly
          required=required
          showMenuColumn=showMenuColumn
          showHelperColumn=showHelperColumn
          defaultRowConfig=defaultRowConfig
          showValidationMessages=showValidationMessagesInRow
          showDeleteMenuItemInRow=showDeleteMenuItemInRow
          showEditMenuItemInRow=showEditMenuItemInRow
          showAsteriskInRow=showAsteriskInRow
          showCheckBoxInRow=showCheckBoxInRow
          showDeleteButtonInRow=showDeleteButtonInRow
          showEditButtonInRow=showEditButtonInRow
          showPrototypeButtonInRow=showPrototypeButtonInRow
          isParentRecordPropertyName=isParentRecordPropertyName
          inExpandMode=(unbound inExpandMode)
          hierarchicalIndent=hierarchicalIndent
          inHierarchicalMode=inHierarchicalMode
          singleColumnCellComponent=singleColumnCellComponent
          loadRecords=loadRecords
          doRenderData=record.doRenderData
          rowClick=(action "rowClick")
          selectRow=(action "selectRow")
          deleteRow=(action "deleteRow")
          createNewByPrototype=createNewByPrototype
          hierarchyPaging=hierarchyPaging
          fixedHeader=fixedHeader
          configurateRow=configurateRow
          allSelect=allSelect
        }}
      {{/each}}
      {{#if rowByRowLoadingProgress}}
        <tr>
          <td colspan="{{colspan}}" style="text-align:center;">
            <div class="ui active centered inline loader"></div>
            {{t "components.object-list-view.loading-text"}}
          </td>
        </tr>
      {{/if}}
    {{/unless}}
  </tbody>
</table>

{{#if (and _selectedMobileMenu showCheckBoxInRow)}}
  <div class="check-rows-container">
    {{#if (not-eq class "groupedit-container")}}
      {{flexberry-menu
        _skipDropdownInit=true
        onlyClickHandler=true
        items=_checkRowsSettingsItems
        settings=(hash direction="upward")
        onItemClick=(action "onCheckRowMenuItemClick")
      }}
    {{else}}
      <button
        type="button"
        class="ui check-all-at-page-button icon {{buttonClass}} {{if readonly "disabled"}} button"
        title={{t "components.olv-toolbar.check-all-at-page-button-text"}}
        {{action "checkAllAtPage"}}>
          <i class="check-square-o icon"></i>
      </button>
    {{/if}}

    <label class="count-selected-rows">{{_selectedCountMobileMenu}}</label>

    <button
      type="button"
      class="ui delete-button {{buttonClass}} {{if readonly "disabled"}} button"
      title={{t "components.olv-toolbar.delete-button-text"}}
      disabled={{readonly}}
      {{action "deleteSelectedRow"}}>
        {{t "components.olv-toolbar.delete-button-text"}}
        <i class="delete icon"></i>
    </button>

    <button
      type="button"
      class="ui clear-select-button {{buttonClass}} circular icon button"
      title={{t "components.olv-toolbar.clear-select-button-text"}}
      {{action "clearSelectedRecords"}}>
      <i class="remove icon"></i>
    </button>
  </div>
{{/if}}
