Skip to content

Commit

Permalink
Update search_form.js
Browse files Browse the repository at this point in the history
  • Loading branch information
qwqtw committed Nov 18, 2023
1 parent 0f671dc commit 732de87
Showing 1 changed file with 25 additions and 25 deletions.
50 changes: 25 additions & 25 deletions lms/static/js/discovery/views/search_form.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,32 +42,32 @@
this.$loadingIndicator.addClass('hidden');
},

showFoundMessage: function(count) {
var msg;
if (count > 0) {
msg = ngettext(
'Found %s course for "%s"',
'Found %s courses for "%s"',
count
);
} else {
msg = ngettext(
'Viewing %s course',
'Viewing %s courses',
count
);
}
this.$message.html(interpolate(msg, [count, _.escape(term)]));
},
// showFoundMessage: function(count) {
// var msg;
// if (count > 0) {
// msg = ngettext(
// 'Found %s course for "%s"',
// 'Found %s courses for "%s"',
// count
// );
// } else {
// msg = ngettext(
// 'Viewing %s course',
// 'Viewing %s courses',
// count
// );
// }
// this.$message.html(interpolate(msg, [count, _.escape(term)]));
// },

showNotFoundMessage: function(term) {
var msg = interpolate(
gettext('We couldn\'t find results for "%s".'),
[_.escape(term)]
);
this.$message.html(msg);
this.clearSearch();
},
// showNotFoundMessage: function(term) {
// var msg = interpolate(
// gettext('We couldn\'t find any results for "%s".'),
// [_.escape(term)]
// );
// this.$message.html(msg);
// this.clearSearch();
// },

showErrorMessage: function(error) {
this.$message.text(gettext(error || 'There was an error, try searching again.'));
Expand Down

0 comments on commit 732de87

Please sign in to comment.