Add alternative messages when there are 0 occurences or errors, warnings or notices

This commit is contained in:
perryharlock
2013-09-25 14:36:03 +01:00
parent 9a2ced573c
commit 2ed29319f8

View File

@@ -43,7 +43,7 @@
</div>
</div>
<div class="col-md-12">
<div class="col-md-12 hidden">
{{> results-table}}
</div>
{{/if}}
@@ -104,11 +104,13 @@
<div class="col-md-9">
{{#if results}}
{{#if lastResult.count.error}}
<div class="heading label-danger showing first" id="errors">
<span data-role="expander" class="pull-right expander"> - </span>
Errors ( {{lastResult.count.error}} )
</div>
<div class="task-danger tasks-list collapse clearfix in">
<ul class="list-unstyled">
{{#lastResult.errors}}
<li>
@@ -119,7 +121,11 @@
</ul>
<a class="pull-right" href="#top" data-role="top">Back to top</a>
</div>
{{else}}
<p class="heading label-danger">Well done! You have 0 errors. <span class="glyphicon glyphicon-ok pull-right"></span></p>
{{/if}}
{{#if lastResult.count.warning}}
<div class="heading label-warning" id="warnings">
<span data-role="expander" class="pull-right expander"> + </span>
Warnings ( {{lastResult.count.warning}} )
@@ -136,6 +142,11 @@
<a class="pull-right" href="#top" data-role="top">Back to top</a>
</div>
{{else}}
<p class="heading label-warning">Well done! You have 0 warnings. <span class="glyphicon glyphicon-ok pull-right"></span></p>
{{/if}}
{{#if lastResult.count.notice}}
<div class="heading label-info" id="notifications">
<span data-role="expander" class="pull-right expander"> + </span>
Notifications ( {{lastResult.count.notice}} )
@@ -151,6 +162,9 @@
</ul>
<a class="pull-right" href="#top" data-role="top">Back to top</a>
</div>
{{else}}
<p class="heading label-warning">Well done! You have 0 notices. <span class="glyphicon glyphicon-ok pull-right"></span></p>
{{/if}}
<div class="heading label-default">
<span data-role="expander" class="pull-right expander"> + </span>
@@ -166,6 +180,7 @@
</ul>
<a class="pull-right" href="#top" data-role="top">Back to top</a>
</div>
{{else}}
<div class="alert alert-info">
<h4>No results to show</h4>