Refactoring TasksHelper
This commit is contained in:
parent
d80678c0da
commit
a7dee0ab01
2 changed files with 2 additions and 9 deletions
|
@ -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
|
||||||
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 @@
|
||||||
.task-body
|
.task-body
|
||||||
.task-note
|
.task-note
|
||||||
.md
|
.md
|
||||||
= task_body(task.body, project: task.project)
|
= event_note(task.body, project: task.project)
|
||||||
|
|
Loading…
Reference in a new issue