<div class='contents'>

  <table id='topic-list' class='categories'>
    <thead>
    <tr>
      <th class='category'>{{i18n categories.category}}</th>
      <th class='num topics'>{{i18n categories.topics}}</th>
      <th class='num posts'>{{i18n categories.posts}}</th>
      <th class='latest'>{{i18n categories.latest}}</th>
    </tr>
    </thead>
    <tbody>
      {{#each model.categories}}
      <tr>
        <td class='category'>{{categoryLink this}}
          {{#if unreadTopics}}
            <a href={{unbound url}} class='badge new-posts badge-notification' title='{{i18n topic.unread_topics count="unreadTopics"}}'>{{unbound unreadTopics}}</a>
          {{/if}}
          {{#if newTopics}}
            <a href={{unbound url}} class='badge new-posts badge-notification' title='{{i18n topic.new_topics count="newTopics"}}'>{{unbound newTopics}} <i class='icon icon-asterisk'></i></a>
          {{/if}}
          <div class='featured-users'>
            {{#each featured_users}}
              <a href="/users/{{unbound username_lower}}">{{avatar this imageSize="small"}}</a>
            {{/each}}
          </div>
          {{#if description_excerpt}}
            <div class="category-description">
              {{{description_excerpt}}}
            </div>
          {{/if}}
        </td>
        <td class='num'>{{number topic_count}}</td>
        <td class='num'>{{number post_count}}</td>
        {{#with latestTopic}}
          <td {{bindAttr class="archived :latest"}}>
            {{topicStatus topic=this}}
            <a class='title' href="{{unbound lastUnreadUrl}}">{{{unbound fancy_title}}}</a>
            {{#if unread}}
              <a href="{{unbound lastUnreadUrl}}" class='badge unread badge-notification' title='{{i18n topic.unread_posts count="unread"}}'>{{unbound unread}}</a>
            {{/if}}
            {{#if new_posts}}
              <a href="{{unbound lastUnreadUrl}}" class='badge new-posts badge-notification' title='{{i18n topic.new_posts count="new_posts"}}'>{{unbound new_posts}}</a>
            {{/if}}
            {{#if unseen}}
              <a href="{{unbound lastUnreadUrl}}" class='badge new-posts badge-notification' title='{{i18n topic.new}}'><i class='icon icon-asterisk'></i></a>
            {{/if}}
            <div class='last-user-info'>
              {{i18n categories.latest_by}} <a href="{{{unbound lastPosterUrl}}}">{{unbound last_poster.username}}</a>
              <a href="{{unbound lastPostUrl}}">{{unboundAge last_posted_at}}</a>
            </div>
          </td>
        {{/with}}
      </tr>
      {{/each}}
    </tbody>

  </table>
</div>

<footer id='topic-list-bottom'>
</footer>

