Skip to content

Node.js based forum software built for the modern web

used ELSE in template

Baris Soner Usakli48835d8c44c3
diff --git a/public/templates/admin/topics.tpl b/public/templates/admin/topics.tpl
index f5cb638529..c5305c4d03 100644
--- a/public/templates/admin/topics.tpl
+++ b/public/templates/admin/topics.tpl
@@ -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 -->
+
+
diff --git a/src/routes/admin.js b/src/routes/admin.js
index 254d56503d..0c562ce7c8 100644
--- a/src/routes/admin.js
+++ b/src/routes/admin.js
@@ -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
});
});
});