v1.18.x
Baris Soner Usakli 11 years ago
parent 9d88b9eed3
commit 27a01f6c61

@ -15,41 +15,54 @@
<div class="category search">
<div class="{show_results}">
<ul id="topics-container" data-search-query="{search_query}">
<h3>[[topic:topics]]</h3>
<!-- IF topic_matches -->
<small>{topic_matches} result(s) matching "{search_query}"</small>
<!-- ENDIF topic_matches -->
<div class="alert alert-info {show_no_topics}">[[topic:no_topics_found]]</div>
<!-- BEGIN topics -->
<a href="../../topic/{topics.slug}" id="tid-{topics.tid}">
<ul id="topics-container" data-search-query="{search_query}">
<!-- BEGIN topics -->
<li class="category-item">
<div>
<div class="col-md-12 img-thumbnail">
<div class="search-result-post">
<img src="{topics.teaser_userpicture}" />
<strong>{topics.teaser_username}</strong>: <span class="search-result-text">{topics.title}</span>
</div>
<a href="../../topic/{topics.slug}" id="tid-{topics.tid}">
<div>
<div class="col-md-12 img-thumbnail">
<div class="search-result-post">
<img src="{topics.teaser_userpicture}" />
<strong>{topics.teaser_username}</strong>: <span class="search-result-text">{topics.title}</span>
</div>
</div>
</div>
</div>
</a>
</li>
</a>
<!-- END topics -->
<!-- END topics -->
</ul>
<h3>Posts</h3>
<!-- IF post_matches -->
<small>{post_matches} result(s) matching "{search_query}"</small>
<!-- ENDIF post_matches -->
<div class="alert alert-info {show_no_posts}">No posts found!</div>
<!-- BEGIN posts -->
<a href="../../topic/{posts.topicSlug}#{posts.pid}" id="tid-{posts.tid}">
<ul id="topics-container" data-search-query="{search_query}">
<!-- BEGIN posts -->
<li class="category-item">
<div>
<div class="col-md-12 img-thumbnail">
<div class="search-result-post">
<img src="{posts.picture}" />
<strong>{posts.username}</strong>: <span class="search-result-text">{posts.content}</span>
</div>
<a href="../../topic/{posts.topicSlug}#{posts.pid}" id="tid-{posts.tid}">
<div>
<div class="col-md-12 img-thumbnail">
<div class="search-result-post">
<img src="{posts.picture}" />
<strong>{posts.username}</strong>: <span class="search-result-text">{posts.content}</span>
</div>
</div>
</div>
</div>
</a>
</li>
</a>
<!-- END posts -->
<!-- END posts -->
</ul>
</div>
</div>

@ -270,7 +270,9 @@ var path = require('path'),
show_results: '',
search_query: req.params.term,
posts: results[0],
topics: results[1]
topics: results[1],
post_matches : results[0].length,
topic_matches : results[1].length
});
});
} else {

Loading…
Cancel
Save