<label for='choose-topic-title'>{{i18n 'choose_topic.title.search'}}</label>

{{text-field value=view.topicTitle placeholderKey="choose_topic.title.placeholder" id="choose-topic-title"}}

{{#if view.loading}}
  <p>{{i18n 'loading'}}</p>
{{else}}
  {{#if view.noResults}}
    <p>{{i18n 'choose_topic.none_found'}}</p>
  {{else}}
    {{#each t in view.topics}}
      <div class='controls'>
        <label class='radio'>
        <input type='radio' id="choose-topic-{{unbound t.id}}" name='choose_topic_id' {{action "chooseTopic" t target="view"}}>{{t.title}}
        {{#if t.category.parentCategory}}
          {{bound-category-link t.category.parentCategory}}
        {{/if}}
        {{bound-category-link t.category}}
        </label>
      </div>
    {{/each}}
  {{/if}}
{{/if}}
