<div ng-show="$location.path().indexOf('/search')">
  <div ng-controller="SearchCtrl">
    <form class="navbar-form navbar-right" ng-submit="search()" role="search">
      <div class="form-group nav-bar-search">
        <input
          {% if AUTOCOMPLETE_SEARCH %}
            ng-model="query.autocompleteSearchTerm"
            data-html="1"
            data-template="search/search_results.html"
            data-watch-options=true
            uib-typeahead="i as i.display for i in results | filter:$viewValue | limitTo:8"
          {% else %}
            ng-model="query.searchTerm"
          {% endif %}
          slash-key-focus="!state || state==='normal'"
          ng-blur="enableShortcuts()"
          ng-focus="disableShortcuts()"
          type="text"
          class="form-control"
          placeholder="Search"
        />
      </div>
    </form>
  </div>
</div>

<script type="text/ng-template" id="searchSuggestTemplate.html">
  <h4 class="inline orange">
    [[ match.label.first_name ]] [[ match.label.surname ]]
  </h4>
    <span ng-show="match.value.dateOfBirth">
    ([[ match.label.dateOfBirth | shortDate ]])
    </span>
    <div>
    [[ match.label.hospitalNumber ]]
    - [[ match.label.count ]] Episode<span ng-show="match.label.count > 1">s</span> ([[ match.label.categories|title ]]) [[ match.label.years ]]
    </div>
</script>

<div ng-show="$location.path().indexOf('/search')">
  <div ng-controller="SearchCtrl">
    <form class="navbar-form navbar-right" ng-submit="search()" role="search">
      <div class="form-group nav-bar-search">
        <input
          {% if AUTOCOMPLETE_SEARCH %}
          ng-model="query.autocompleteSearchTerm"
          typeahead-template-url="searchSuggestTemplate.html"
          uib-typeahead="i for i in results | limitTo:8"
          {% else %}
            ng-model="query.searchTerm"
          {% endif %}
          slash-key-focus="!state || state==='normal'"
          ng-blur="enableShortcuts()"
          ng-focus="disableShortcuts()"
          type="text"
          class="form-control"
          placeholder="Search"
        />
      </div>
    </form>
  </div>
</div>

Update the typeahead syntax to work with the updated UIBootstrap library.
Update the typeahead syntax to work with the updated UIBootstrap library.

This WIP commit gets us most of the way - we're still not highlighting the active entry, or going to the detail page on click/enter, but at least displaying the summary.
