Refactoring TasksHelper

parent d80678c0
...@@ -24,9 +24,7 @@ module TasksHelper ...@@ -24,9 +24,7 @@ module TasksHelper
end end
def task_target_link_html(task) def task_target_link_html(task)
link_to task_target_path(task) do link_to "##{task.target_iid}", task_target_path(task)
"##{task.target_iid}"
end
end end
def task_target_path(task) def task_target_path(task)
...@@ -36,11 +34,6 @@ module TasksHelper ...@@ -36,11 +34,6 @@ module TasksHelper
task.project, task.target], anchor: anchor) task.project, task.target], anchor: anchor)
end end
def task_body(text, options = {})
text = first_line_in_markdown(text, 150, options)
sanitize(text, tags: %w(a img b pre code p span))
end
def task_actions_options def task_actions_options
actions = [ actions = [
OpenStruct.new(id: '', title: 'Any Action'), OpenStruct.new(id: '', title: 'Any Action'),
......
...@@ -18,4 +18,4 @@ ...@@ -18,4 +18,4 @@
.task-body .task-body
.task-note .task-note
.md .md
= task_body(task.body, project: task.project) = event_note(task.body, project: task.project)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment