hummingbird-me/kitsu-web

View on GitHub
app/templates/components/groups/group-neighbors.hbs

Summary

Maintainability
Test Coverage
<h6 class="panel-heading">{{t "groups.neighbors"}}</h6>
{{#if getNeighborsTask.isRunning}}
  <div class="w-100 text-xs-center m-t-1 m-b-1">
    {{loading-spinner size="large"}}
  </div>
{{else if getNeighborsTask.last.error}}
  <p>{{t "errors.load"}}</p>
{{else if filteredNeighbors}}
  {{#each filteredNeighbors as |neighbor|}}
    <div class="card group-neighbor-item">
      <div class="media">
        <a href={{href-to "groups.group.group-page.index" neighbor.destination.slug}}>
          {{lazy-image src=(image neighbor.destination.avatar "small") imgClass="avatar-image--small"}}
        </a>
        <div class="media-body">
          <h5>
            <a href={{href-to "groups.group.group-page.index" neighbor.destination.slug}}>
              {{neighbor.destination.name}}
            </a>
          </h5>
          {{neighbor.destination.tagline}}
          {{#if canRemove}}
            <div class="remove-action" {{action "onRemove" neighbor}}>
              {{svg-jar "close"}}
            </div>
          {{/if}}
        </div>
      </div>
    </div>
  {{/each}}
{{else}}
  <p>{{t "errors.contentEmpty"}}</p>
{{/if}}