Don't show search result type brackets if there is no type

pull/54/merge
Candid Dauth 2016-11-21 10:13:05 +03:00
rodzic 786be8475c
commit a171483671
2 zmienionych plików z 3 dodań i 3 usunięć

Wyświetl plik

@ -1,7 +1,7 @@
<div class="content container-fluid">
<h2>{{result.short_name}}</h2>
<p ng-if="result.display_name != result.short_name">{{result.display_name}} ({{result.type}})</p>
<p ng-if="result.display_name == result.short_name">{{result.type}}</p>
<p ng-if="result.display_name != result.short_name">{{result.display_name}}<span ng-if="result.type"> ({{result.type}})</span></p>
<p ng-if="result.display_name == result.short_name && result.type">{{result.type}}</p>
<dl class="dl-horizontal">
<dt class="pos" ng-if="result.type != 'coordinates' && result.lat != null && result.lon != null">Coordinates</dt>
<dd class="pos" ng-if="result.type != 'coordinates' && result.lat != null && result.lon != null">{{result.lat | fmRound:5}}, {{result.lon | fmRound:5}}</dd>

Wyświetl plik

@ -20,7 +20,7 @@
<ul class="list-group" ng-if="searchResults.length > 0">
<li ng-repeat="result in searchResults" class="list-group-item" ng-class="{active: activeResult === result}">
<a href="javascript:" ng-click="showResult(result)">{{result.display_name}}</a>
<span class="result-type">({{result.type}})</span>
<span class="result-type" ng-if="result.type">({{result.type}})</span>
</li>
</ul>
</div>