diff --git a/controllers/issue.js b/controllers/issue.js index fdcdfa4fd..68386ccb4 100644 --- a/controllers/issue.js +++ b/controllers/issue.js @@ -111,6 +111,21 @@ exports.list = function (aReq, aRes, aNext) { // Pagination options.paginationRendered = pagination.renderDefault(aReq); + + // Empty list + if (options.searchBarValue) { + if (open) { + options.discussionListIsEmptyMessage = 'We couldn\'t find any open discussions with this search value.'; + } else { + options.discussionListIsEmptyMessage = 'We couldn\'t find any closed discussions with this search value.'; + } + } else { + if (open) { + options.discussionListIsEmptyMessage = 'No open discussions.'; + } else { + options.discussionListIsEmptyMessage = 'No closed discussions.'; + } + } }; function render() { aRes.render('pages/scriptIssueListPage', options); } function asyncComplete() { preRender(); render(); } diff --git a/views/includes/discussionList.html b/views/includes/discussionList.html index 64b30f6f8..94a110e34 100644 --- a/views/includes/discussionList.html +++ b/views/includes/discussionList.html @@ -45,6 +45,13 @@ {{/discussionList}} + {{^discussionList}} + + + {{discussionListIsEmptyMessage}} + + + {{/discussionList}}