diff options
| author | Douglas Barbosa Alexandre <dbalexandre@gmail.com> | 2016-02-12 16:45:44 -0200 |
|---|---|---|
| committer | Douglas Barbosa Alexandre <dbalexandre@gmail.com> | 2016-02-20 12:10:26 -0200 |
| commit | 7cafa2ce923df9c034ba0b64907b4b6eb6b3c1e2 (patch) | |
| tree | e5c69ddd538f291e6271c4d25db6dde02c75cf0c /app/helpers | |
| parent | 41d8f5649e3c8a1e37be4608fd03153005c3fa58 (diff) | |
| download | gitlab-ce-7cafa2ce923df9c034ba0b64907b4b6eb6b3c1e2.tar.gz | |
Add tasks queue list page
Diffstat (limited to 'app/helpers')
| -rw-r--r-- | app/helpers/tasks_helper.rb | 17 |
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 |
