hummingbird-me/hummingbird

View on GitHub
frontend/app/templates/filter-anime.hbs

Summary

Maintainability
Test Coverage
<div class="series-header clearfix">
  <div class="row filter-page-filter">
    <div class="col-md-2">
      <h2 class="grey-title">Timespan</h2>
      {{#each filterTimes}}
        <div {{bind-attr class=":filter-page-option selected:active"}} {{action 'selectItem' this}}>
          {{fval}}
        </div>
      {{/each}}
    </div>
    <div class="col-md-10">
      <h2 class="grey-title">Genre</h2>
      <div class="row">
        {{#each filterGenres}}
          <div class="col-md-2 col-sm-4">
            <div {{bind-attr class=":filter-page-option selected:active"}} {{action 'selectItem' this}}>
              {{model.name}}
            </div>
          </div>
        {{/each}}
      </div>
    </div>
  </div>
  <div class="row filter-page-filter">
    <button class="top-button pull-right" {{action 'applyFilter'}}>
      {{#if isLoading}}<i class="fa fa-spinner"></i>{{/if}}
      Apply Filter
    </button>

    {{view "select" class="pull-right form-control filter-page-sort"
       value=selectedSort
       content=filterSorts
       optionValuePath="content.value"
       optionLabelPath="content.name"}}
  </div>
</div>

<div class="container filter-page">
  <div class="filter-page">
    <div class="row">
      {{#if loading}}
        {{loading-indicator}}
      {{else}}
        {{#each filterResults}}
          {{#link-to 'anime' this}}
            <div class="col-md-2 col-sm-3">
              <div class="filter-page-card">
                <img class="filter-page-poster" {{bind-attr src=posterImage}} />
                <span class="filter-page-name">
                  {{canonicalTitle}}
                </span>
              </div>
            </div>
          {{/link-to}}
        {{/each}}
      {{/if}}
    </div>
  </div>
</div>

<div class="container filter-page text-center">
  <button class="btn status-button" {{action 'switchPage' -1}}>
    <i class="fa fa-angle-left"></i>
  </button>
  <button class="btn btn-default">{{showPage}}</button>
  <button class="btn status-button" {{action 'switchPage' 1}}>
    <i class="fa fa-angle-right"></i>
  </button>
</div>