From ad54079c0cf9873f59ce9e78f559a654229b1ef7 Mon Sep 17 00:00:00 2001 From: Tyler Renelle Date: Mon, 6 May 2013 20:51:25 +0100 Subject: [PATCH] tags: simply display by just showing an icon with a tooltip listing tags --- src/app/helpers.coffee | 11 +++++++++++ views/app/filters.html | 13 ++++++++----- views/app/tasks.html | 2 +- 3 files changed, 20 insertions(+), 6 deletions(-) diff --git a/src/app/helpers.coffee b/src/app/helpers.coffee index de549f7c35..db566b23e7 100644 --- a/src/app/helpers.coffee +++ b/src/app/helpers.coffee @@ -174,4 +174,15 @@ viewHelpers = (view) -> view.fn 'relativeDate', relative + view.fn 'noTags', (tags) -> + _.isEmpty(tags) or _.isEmpty(_.filter( tags, (t) -> t ) ) + + view.fn 'appliedTags', (userTags, taskTags) -> + arr = [] + _.each userTags, (t) -> + arr.push(t.name) if taskTags?[t.id] + arr.join(', ') + + + module.exports = { viewHelpers, removeWhitespace, randomVal, daysBetween, dayMapping, username } \ No newline at end of file diff --git a/views/app/filters.html b/views/app/filters.html index 824a9622a3..0638126beb 100644 --- a/views/app/filters.html +++ b/views/app/filters.html @@ -33,15 +33,18 @@ + + + -   +
diff --git a/views/app/tasks.html b/views/app/tasks.html index 14f37559aa..667b9cbb00 100644 --- a/views/app/tasks.html +++ b/views/app/tasks.html @@ -111,6 +111,7 @@ {:task.streak} + @@ -152,7 +153,6 @@

{:task.text} -