unepwcmc/SAPI

View on GitHub
app/assets/javascripts/species/templates/taxon_concepts.handlebars

Summary

Maintainability
Test Coverage
{{partial 'species/tabs'}}
{{outlet search}}

<div class="container">

  <div class="heading"></div>

  <div class="result-block">

    {{#each taxonConceptsByHigherTaxon}}
      <ul class="result-list">
        {{#each ancestors_path}}
          <li>
            <a {{action 'openSearchPage' this}} class="hover-pointer" title="Go to {{this}}">
              {{this}}
            </a>
          </li>
        {{/each}}
      </ul>
      {{#each taxonConcept in taxon_concepts}}
        <h2>
          {{#link-to 'taxonConcept.legal' taxonConcept queryParams=false}}
            {{#highlight taxonConcept.fullName query=controllers.search.taxonConceptQueryForDisplay}}
              {{unbound this}}
            {{/highlight}}
            <span class="author-year">{{unbound taxonConcept.authorYear}}</span>
            <span class="synonyms">
            {{#highlight taxonConcept.matchingNamesForDisplay query=controllers.search.taxonConceptQueryForDisplay}}
              {{unbound this}}
            {{/highlight}}
            </span>
          {{/link-to}}
        </h2>
      {{/each}}
    {{else}}
      <div class="no-results">
        <p class="no-results-title">Your search for <u>{{unbound controllers.search.taxonConceptQueryForDisplay}}</u> returned no results.</p>
        <p class="no-results-subtitle"> Try refining your search or selecting a taxa from the drop-down menu.</p>
        <p>Please note that this database contains species that are listed in the Appendices to CITES and CMS, as well as the Annexes to the EU Wildlife Trade Regulations; it is not a comprehensive source of all species.</p>
      </div>
    {{/each}}
  </div>

  <div class="paging">
  {{#if controller.showPageControls }}
    <ul>
      {{# if controller.showPrevPage }}
        <li><a class="btn-prev" href="#" {{action "prevPage" on="click"}}>&#9664;</a>  </li>
      {{/if}}

      <li>Page {{controller.page}} of {{controller.pages}}</li>

      {{# if controller.showNextPage }}
        <li><a class="btn-next" href="#" {{action "nextPage" on="click"}}>&#9654;</a>  </li>
      {{/if}}
    </ul>
  {{/if}}
  </div>

</div>