<nav class='buttons'>
  {{#if summaryCollapsed}}
    <button class='btn collapsed' {{action toggleSummary}} title="{{i18n topic.toggle_information}}">
      <i class='icon icon-chevron-down'></i>
    </button>
    {{else}}
    <button class='btn' {{action toggleSummary}} title="{{i18n topic.toggle_information}}">
      <i class='icon icon-chevron-up'></i>
    </button>
  {{/if}}
</nav>

{{#if summaryCollapsed}}
  <section class='summary collapsed'>
    <ul class="clearfix">
      <li>
        <a {{bindAttr href="url"}}>
        <h4>{{i18n created}}</h4>
        {{avatar details.created_by imageSize="tiny"}}
        {{date created_at}}
        </a>
      </li>
      <li>
        <a {{bindAttr href="lastPostUrl"}}>
        <h4>{{i18n last_post}}</h4>
        {{avatar details.last_poster imageSize="tiny"}}
        {{date last_posted_at}}
        </a>
      </li>
      <li>
        <h4>{{i18n posts}}</h4>
        {{number posts_count}}
      </li>
      <li>
        <h4>{{i18n views}}</h4>
        {{number views}}
      </li>
      <li>
        <h4>{{i18n links}}</h4>
        {{number details.links.length}}
      </li>
      {{#if details.fewParticipants}}
      <li class='avatars'>
        {{#groupedEach details.fewParticipants}}{{participant participant=this}}{{/groupedEach}}
      </li>
      {{/if}}
    </ul>
  </section>
{{else}}

  <section class='summary'>
    <ul class="clearfix">
      <li>
        <h4>{{i18n created}}</h4>
        {{avatar details.created_by imageSize="tiny"}}
        <a {{bindAttr href="url"}}>{{date created_at}}</a>
      </li>
      <li>
        <h4>{{i18n last_post}}</h4>
        {{avatar details.last_poster imageSize="tiny"}}
        <a {{bindAttr href="lastPostUrl"}}>{{date last_posted_at}}</a>
      </li>
      <li>
        <h4>{{i18n posts}}</h4>
        {{number posts_count}}
      </li>
      <li>
        <h4>{{i18n views}}</h4>
        {{number views}}
      </li>
    </ul>
  </section>

  {{#if details.participants}}
    <section class='avatars clearfix'>
      {{#groupedEach details.participants}}{{participant participant=this}}{{/groupedEach}}
    </section>
  {{/if}}

  {{#if view.parentView.infoLinks}}
    <section class='links'>
        <ul class='topic-links'>
          {{#groupedEach view.parentView.infoLinks}}
            <li>
              <span class='badge badge-notification clicks' title='{{i18n topic_summary.clicks}}'>{{clicks}}</span>
              <a href="{{unbound url}}" target="_blank" class='topic-link track-link' data-user-id="{{unbound user_id}}" data-ignore-post-id="true" title="{{unbound url}}">
                {{#if title}}{{shorten title}}{{else}}{{shortenUrl url}}{{/if}}
                {{#if internal}}<i class='icon-arrow-right' title='{{i18n topic_summary.topic_link}}'></i>{{/if}}
              </a>
            </li>
          {{/groupedEach}}
        </ul>

        {{#if view.parentView.showAllLinksControls}}
          <div class='link-summary'>
            <a href='#' {{action showAllLinks target="view.parentView"}}>{{i18n topic_summary.links_shown totalLinks="details.links.length"}}</a>
          </div>
        {{/if}}

    </section>
  {{/if}}



{{/if}}