Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gitlab-ce
Commits
a7dee0ab
Commit
a7dee0ab
authored
Feb 20, 2016
by
Douglas Barbosa Alexandre
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refactoring TasksHelper
parent
d80678c0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
9 deletions
+2
-9
app/helpers/tasks_helper.rb
app/helpers/tasks_helper.rb
+1
-8
app/views/dashboard/tasks/_task.html.haml
app/views/dashboard/tasks/_task.html.haml
+1
-1
No files found.
app/helpers/tasks_helper.rb
View file @
a7dee0ab
...
@@ -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'
),
...
...
app/views/dashboard/tasks/_task.html.haml
View file @
a7dee0ab
...
@@ -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
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment