From 2ed29319f829bb85b9b2389a3c399793cba8e53c Mon Sep 17 00:00:00 2001 From: perryharlock Date: Wed, 25 Sep 2013 14:36:03 +0100 Subject: [PATCH] Add alternative messages when there are 0 occurences or errors, warnings or notices --- view/task/index.html | 107 ++++++++++++++++++++++++------------------- 1 file changed, 61 insertions(+), 46 deletions(-) diff --git a/view/task/index.html b/view/task/index.html index 23c40e5..78bff99 100644 --- a/view/task/index.html +++ b/view/task/index.html @@ -43,7 +43,7 @@ -
+ {{/if}} @@ -104,53 +104,67 @@
{{#if results}} -
- - - Errors ( {{lastResult.count.error}} ) -
-
-
    - {{#lastResult.errors}} -
  • -

    {{type}} : {{code}} {{count}}

    -

    {{message}}

    -
  • - {{/lastResult.errors}} -
- Back to top -
+ {{#if lastResult.count.error}} +
+ - + Errors ( {{lastResult.count.error}} ) +
+
+ +
    + {{#lastResult.errors}} +
  • +

    {{type}} : {{code}} {{count}}

    +

    {{message}}

    +
  • + {{/lastResult.errors}} +
+ Back to top +
+ {{else}} +

Well done! You have 0 errors.

+ {{/if}} -
- + - Warnings ( {{lastResult.count.warning}} ) -
-
-
    - {{#lastResult.warnings}} -
  • -

    {{type}} : {{code}} {{count}}

    -

    {{message}}

    -
  • - {{/lastResult.warnings}} -
- Back to top -
+ {{#if lastResult.count.warning}} +
+ + + Warnings ( {{lastResult.count.warning}} ) +
+
+
    + {{#lastResult.warnings}} +
  • +

    {{type}} : {{code}} {{count}}

    +

    {{message}}

    +
  • + {{/lastResult.warnings}} +
+ Back to top +
-
- + - Notifications ( {{lastResult.count.notice}} ) -
-
-
    - {{#lastResult.notices}} -
  • -

    {{type}} : {{code}} {{count}}

    -

    {{message}}

    -
  • - {{/lastResult.notices}} -
- Back to top -
+ {{else}} +

Well done! You have 0 warnings.

+ {{/if}} + + {{#if lastResult.count.notice}} +
+ + + Notifications ( {{lastResult.count.notice}} ) +
+
+
    + {{#lastResult.notices}} +
  • +

    {{type}} : {{code}} {{count}}

    +

    {{message}}

    +
  • + {{/lastResult.notices}} +
+ Back to top +
+ {{else}} +

Well done! You have 0 notices.

+ {{/if}}
+ @@ -166,6 +180,7 @@ Back to top
+ {{else}}

No results to show