hummingbird-me/hummingbird

View on GitHub
frontend/app/templates/anime/_franchise.hbs

Summary

Maintainability
Test Coverage
{{#if model.franchises.isFulfilled}}
  {{#with model.franchises controller='franchises' as |franchise|}}
    {{#each franchise.franchiseAnime as |anime|}}
      <div class="franchise-show">
        <div class="franchise-poster">
          <img class="series-poster" {{bind-attr src=anime.posterImage}} />
        </div>
        <div class="franchise-info">
          <h4 class="series-title">
            {{#link-to 'anime' anime.id}}{{anime.displayTitle}}{{/link-to}}
          </h4>
          {{#with anime as |model|}}
            {{partial "anime/infobar"}}
          {{/with}}
          <div>{{truncate-text text=anime.synopsis length=200}}</div>
        </div>
      </div>
    {{/each}}

    {{#unless franchise.showAll}}
      <div class="view-more">
        <a {{action "toggleShowAll" target=franchise}}>View More in Franchise</a>
      </div>
    {{/unless}}
  {{/with}}
{{else}}
  {{loading-indicator}}
{{/if}}