hummingbird-me/hummingbird

View on GitHub
frontend/app/templates/groups.hbs

Summary

Maintainability
Test Coverage
<div class="container">
  <!-- The users' groups -->
  {{#if currentUser.isSignedIn}}
    <div class="group-page-title">
      <h3>Your Groups</h3>
      <a href="#" class="btn btn-primary join-group" {{action "openModal" "create-group" group}}>Create a Group</a>
    </div>
    <div class="row">
      {{#if userGroups}}
        {{#each userGroups as |group|}}
          <div class="col-sm-4">
            {{group-box group=group}}
          </div>
        {{/each}}
      {{else}}
        <p class="text-center">You aren't a member of any groups yet :'(</p>
      {{/if}}
    </div>
  {{/if}}

  <!-- New/Recent Groups -->
  <div class="group-page-title">
    <h3>New Groups</h3>
  </div>
  <div class="row">
    {{#each recentGroups as |group|}}
      <div class="col-sm-4">
        {{group-box group=group}}
      </div>
    {{/each}}
  </div>

  <!-- Infinite scroll trending groups -->
  <div class="group-page-title">
    <h3>Trending Groups</h3>
  </div>
  <div class="row">
    {{#each model as |group|}}
      <div class="col-sm-4">
        {{group-box group=group}}
      </div>
    {{/each}}
  </div>

  {{#if canLoadMore}}
    {{load-more classNames="light" action="loadNextPage"}}
  {{/if}}
</div>