hummingbird-me/hummingbird

View on GitHub
frontend/app/templates/story/media_story.hbs

Summary

Maintainability
Test Coverage
<div class="update-panel">
  <div class="series-thumb">
    <img class="responsive-image" src="{{unbound model.media.posterImage}}">
  </div>
  <div class="media-content">
    <h4 class="story-title">
      {{#link-to mediaRoute model.media.id}}{{unbound model.media.displayTitle}}{{/link-to}}
    </h4>
    <ul class="genre-list">
      {{#each model.media.genres as |genre|}}
        <li>{{unbound genre}}</li>
      {{/each}}
    </ul>
    <ul class="feed-events">
      {{#each displaySubstories as |substory|}}
        <li class="single-event">
          <div class="row">
            <div class="col-md-11">
              <div class="user-image hidden-sm hidden-xs">
                {{#link-to 'user' model.user}}
                  {{unbound avatar model.user "thumb_small"}}
                {{/link-to}}
              </div>
              <div class="event-info col-sm-12 col-md-11">
                <p>
                  {{#link-to 'user' model.user}}{{unbound model.user.username}}{{/link-to}}
                  {{{unbound substory.html}}}
                </p>
                <ul class="inline-list secondary">
                  {{#if model.canDeleteStory}}
                    <li>
                      <a class="remove-post" {{action "deleteSubstory" substory}}>remove</a>
                    </li>
                  {{/if}}
                  <li>{{time-ago time=substory.createdAt}}</li>
                </ul>
              </div>
            </div>
          </div>
        </li>
      {{/each}}
    </ul>
  </div>
</div>
{{#if moreThanTwoSubstories}}
  <div class="comment-replies">
    <div class="view-more">
      {{#if loadingAll}}
        <i class="fa fa-spin fa-spinner"></i>
      {{else}}
        <a {{action "toggleShowAll"}}>
          {{#if showAll}}
            Show Less
          {{else}}
            Show More
          {{/if}}
        </a>
      {{/if}}
    </div>
  </div>
{{/if}}