search.html
1.29 KB
<form ng-submit="ctrl.search()">
<label for="query" ng-bind-html="'search.results.query.label' | translate"></label>
<h3 id="query" class="search-box-title">{{ctrl.query}}</h3>
</form>
<div class="search-results">
<div class="summary">
{{"search.results.summary" | translate:{results: ctrl.totalResults}:"messageformat"}}
</div>
<div ng-repeat="article in ctrl.articles | orderBy: 'created_at':true" class="result">
<a class="title" ui-sref="main.profile.page({profile: article.profile.identifier, page: article.path})">
<h4 ng-bind="article.title"></h4>
</a>
<div class="info">
<a class="profile" ui-sref="main.profile.home({profile: article.profile.identifier})">
{{article.profile.name}}
</a>
<span class="bullet-separator">•</span>
<span class="time">
<span am-time-ago="article.created_at | dateFormat"></span>
</span>
</div>
<div class="post-lead" ng-bind-html="article.body | stripTags | truncate: 250: '...': true"></div>
</div>
<uib-pagination ng-model="ctrl.currentPage" total-items="ctrl.totalResults" class="pagination-sm center-block"
boundary-links="true" items-per-page="ctrl.perPage" ng-change="ctrl.loadPage()"
first-text="«" last-text="»" previous-text="‹" next-text="›">
</uib-pagination>
</div>