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
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
c98301d7
Commit
c98301d7
authored
Nov 09, 2011
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #81 from ariejan/fix_for_dashboard_grit_commit
Show commits as 'Commit' instead of 'Grit::Commit'
parents
6e7e01c7
4454b6c5
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
app/helpers/dashboard_helper.rb
app/helpers/dashboard_helper.rb
+6
-3
No files found.
app/helpers/dashboard_helper.rb
View file @
c98301d7
...
@@ -19,12 +19,15 @@ module DashboardHelper
...
@@ -19,12 +19,15 @@ module DashboardHelper
end
end
def
dashboard_feed_title
(
object
)
def
dashboard_feed_title
(
object
)
title
=
case
object
.
class
.
name
.
to_s
klass
=
object
.
class
.
to_s
.
split
(
"::"
).
last
title
=
case
klass
when
"Note"
then
markdown
(
object
.
note
)
when
"Note"
then
markdown
(
object
.
note
)
when
"Issue"
then
object
.
title
when
"Issue"
then
object
.
title
when
"
Grit::
Commit"
then
object
.
safe_message
when
"Commit"
then
object
.
safe_message
else
""
else
""
end
end
"[
#{
object
.
class
.
name
}
]
#{
truncate
(
sanitize
(
title
,
:tags
=>
[]),
:length
=>
60
)
}
"
"[
#{
klass
}
]
#{
truncate
(
sanitize
(
title
,
:tags
=>
[]),
:length
=>
60
)
}
"
end
end
end
end
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