Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added no discussions message #405

Merged
merged 1 commit into from
Nov 6, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions controllers/issue.js
Original file line number Diff line number Diff line change
Expand Up @@ -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(); }
Expand Down
7 changes: 7 additions & 0 deletions views/includes/discussionList.html
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,13 @@
</td>
</tr>
{{/discussionList}}
{{^discussionList}}
<tr class="tr-link">
<td colspan="{{#multipleCategories}}7{{/multipleCategories}}{{^multipleCategories}}6{{/multipleCategories}}">
<em>{{discussionListIsEmptyMessage}}</em>
</td>
</tr>
{{/discussionList}}
</tbody>
</table>
</div>