Commit 86f7def2 authored by Curtis Adam's avatar Curtis Adam
Browse files

Display the number of unresolved errors per card if the error filter is active

parent 64c64136
......@@ -38,13 +38,14 @@
<td class="{{getCardsetBackground this.difficulty this.cardType}}"
data-id="{{this._id}}" data-card-type="{{this.cardType}}">
<div class="cardListNumber {{#if hasCardUnresolvedErrors this._id}}errorReport{{/if}}" data-id="{{this._id}}">
{{getPriority @index}}
{{#if isErrorReportingFilterActive}}
({{getErrorCountFromCard this._id}})
{{else}}
{{getPriority @index}}
{{/if}}
</div>
<div class="col-xs-11 listCard" data-id="{{this._id}}"
data-card-type="{{this.cardType}}">
{{#if hasCardUnresolvedErrors this._id}}
({{getErrorCountFromCard this._id}})
{{/if}}
{{#if gotNoSideContent this.cardType}}
{{cleanContent getQuestion}}
{{else}}
......
......@@ -208,6 +208,9 @@ Template.cardsetList.helpers({
},
isErrorReportingCardView: function (card_id) {
return !Session.get('showOnlyErrorReports') || (Session.get('showOnlyErrorReports') && ErrorReporting.hasCardUnresolvedErrors(card_id));
},
isErrorReportingFilterActive: function () {
return Session.get('showOnlyErrorReports');
}
});
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment