summaryrefslogtreecommitdiff
path: root/app/helpers
diff options
context:
space:
mode:
authorDouglas Barbosa Alexandre <dbalexandre@gmail.com>2016-02-12 16:45:44 -0200
committerDouglas Barbosa Alexandre <dbalexandre@gmail.com>2016-02-20 12:10:26 -0200
commit7cafa2ce923df9c034ba0b64907b4b6eb6b3c1e2 (patch)
treee5c69ddd538f291e6271c4d25db6dde02c75cf0c /app/helpers
parent41d8f5649e3c8a1e37be4608fd03153005c3fa58 (diff)
downloadgitlab-ce-7cafa2ce923df9c034ba0b64907b4b6eb6b3c1e2.tar.gz
Add tasks queue list page
Diffstat (limited to 'app/helpers')
-rw-r--r--app/helpers/tasks_helper.rb17
1 files changed, 17 insertions, 0 deletions
diff --git a/app/helpers/tasks_helper.rb b/app/helpers/tasks_helper.rb
new file mode 100644
index 00000000000..4a87f8d4ca4
--- /dev/null
+++ b/app/helpers/tasks_helper.rb
@@ -0,0 +1,17 @@
+module TasksHelper
+ def link_to_author(task)
+ author = task.author
+
+ if author
+ link_to author.name, user_path(author.username)
+ else
+ task.author_name
+ end
+ end
+
+ def task_action_name(task)
+ target = task.target_type.titleize.downcase
+
+ [task.action_name, target].join(" ")
+ end
+end