hummingbird-me/kitsu-web

View on GitHub
app/templates/anime/show/episodes/show.hbs

Summary

Maintainability
Test Coverage
<div class="col-sm-12 no-padding">
  <!-- <a href={{href-to (concat media.modelType ".show." model.modelType "s")}} class="episode-list">{{t "media.show.units.back" type=model.modelType}}</a> -->
  <div class="unit-summary">
    {{#if (has-feature "hulu_streaming")}}
      {{episodes/episode-video episode=model media=media}}
    {{/if}}

    <div class="col-sm row">
      <div class="summary-wrapper col-sm">
        <div class="unit-thumbnail col-sm-12 row">
          <div class="thumbnail-wrapper no-padding-right">
            {{#if (is-object-empty model.thumbnail)}}
              {{lazy-image src=(image media.posterImage "medium")}}
            {{else}}
              {{lazy-image src=(image model.thumbnail)}}
            {{/if}}
          </div>

          <div class="unit-meta col-sm">
            <div>
              <h6 class="unit-number">
                {{t "media.show.units.unit" type=model.modelType}}
                {{model.number}}
              </h6>
              {{#if (not (eq model.canonicalTitle (concat (capitalize model.modelType) " " model.number)))}}
                <div class="info-emphasis thumb-caption">{{model.canonicalTitle}}</div>
              {{/if}}
              <div class="unit-info small">
                {{#if humanizedLength}}
                  <div class="unit-length">
                    {{humanizedLength}}
                  </div>
                {{/if}}

                {{#if (or model.airdate model.published)}}
                  <div class="unit-date">
                    {{#if (eq model.modelType "episode")}}
                      {{t "media.show.units.date" type="episode" }}: {{moment-format model.airdate "MMM D, YYYY" timeZone="UTC"}}
                    {{else}}
                      {{t "media.show.units.date" type="chapter" }}: {{moment-format model.published "MMM D, YYYY" timeZone="UTC"}}
                    {{/if}}
                  </div>
                {{/if}}
              </div>
            </div>
          </div>
        </div>

        {{#if model.description}}
          <div class="unit-description">
            {{read-more model.description 280}}
          </div>
        {{/if}}
      </div>

      {{from-elsewhere name="streamer-plug"}}
    </div>
  </div>
</div>

<div class="col-sm-8 no-padding">
  <section class="unit-discussion">
    <h5>{{t "media.show.units.feed.header" type=model.modelType}}</h5>
    {{stream-feed/list
      subject=model.number
      streamType=(concat model.modelType "_aggr")
      streamId=model.id
      streamFilter="user"
      readOnly=(not (can "write post"))
      media=media
      unitNumber=model.number
      forceUnit=true
    }}
  </section>
</div>