mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-05-07 15:45:54 +02:00
used ELSE in template
This commit is contained in:
@@ -1,11 +1,6 @@
|
||||
<h1>Topics</h1>
|
||||
<hr />
|
||||
|
||||
<!-- IF notopics -->
|
||||
<div class="alert alert-warning" id="category-no-topics">
|
||||
<strong>There are no topics.</strong>
|
||||
</div>
|
||||
<!-- ENDIF notopics -->
|
||||
|
||||
<ul class="topics">
|
||||
<!-- BEGIN topics -->
|
||||
@@ -25,8 +20,14 @@
|
||||
<!-- END topics -->
|
||||
</ul>
|
||||
|
||||
<!-- IF showLoadMore -->
|
||||
<!-- IF notopics -->
|
||||
<div class="alert alert-warning" id="category-no-topics">
|
||||
<strong>There are no topics.</strong>
|
||||
</div>
|
||||
<!-- ELSE -->
|
||||
<div class="text-center">
|
||||
<button id="topics_loadmore" class="btn btn-primary btn-lg">Load More Topics</button>
|
||||
</div>
|
||||
<!-- ENDIF showLoadMore -->
|
||||
<!-- ENDIF notopics -->
|
||||
|
||||
|
||||
|
||||
@@ -247,8 +247,7 @@ var user = require('./../user.js'),
|
||||
topics.getAllTopics(10, null, function (topics) {
|
||||
res.json({
|
||||
topics: topics,
|
||||
notopics: topics.length === 0,
|
||||
showLoadMore: topics.length > 0
|
||||
notopics: topics.length === 0
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user