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
3e17d156
Commit
3e17d156
authored
Jan 18, 2015
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve edited ago helpers
parent
77adf81e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
4 deletions
+8
-4
app/helpers/issues_helper.rb
app/helpers/issues_helper.rb
+4
-2
app/helpers/notes_helper.rb
app/helpers/notes_helper.rb
+4
-2
No files found.
app/helpers/issues_helper.rb
View file @
3e17d156
...
@@ -67,8 +67,10 @@ module IssuesHelper
...
@@ -67,8 +67,10 @@ module IssuesHelper
ts
=
"
#{
time_ago_with_tooltip
(
issue
.
created_at
,
'bottom'
,
'note_created_ago'
)
}
"
ts
=
"
#{
time_ago_with_tooltip
(
issue
.
created_at
,
'bottom'
,
'note_created_ago'
)
}
"
if
issue
.
updated_at
!=
issue
.
created_at
if
issue
.
updated_at
!=
issue
.
created_at
ts
<<
capture_haml
do
ts
<<
capture_haml
do
haml_tag
:small
do
haml_tag
:span
do
haml_concat
" (Edited
#{
time_ago_with_tooltip
(
issue
.
updated_at
,
'bottom'
,
'issue_edited_ago'
)
}
)"
haml_concat
'·'
haml_concat
'<i class="fa fa-edit" title="edited"></i> '
haml_concat
time_ago_with_tooltip
(
issue
.
updated_at
,
'bottom'
,
'issue_edited_ago'
)
end
end
end
end
end
end
...
...
app/helpers/notes_helper.rb
View file @
3e17d156
...
@@ -20,8 +20,10 @@ module NotesHelper
...
@@ -20,8 +20,10 @@ module NotesHelper
ts
=
"
#{
time_ago_with_tooltip
(
note
.
created_at
,
'bottom'
,
'note_created_ago'
)
}
"
ts
=
"
#{
time_ago_with_tooltip
(
note
.
created_at
,
'bottom'
,
'note_created_ago'
)
}
"
if
note
.
updated_at
!=
note
.
created_at
if
note
.
updated_at
!=
note
.
created_at
ts
<<
capture_haml
do
ts
<<
capture_haml
do
haml_tag
:small
do
haml_tag
:span
do
haml_concat
" (Edited
#{
time_ago_with_tooltip
(
note
.
updated_at
,
'bottom'
,
'note_edited_ago'
)
}
)"
haml_concat
'·'
haml_concat
'<i class="fa fa-edit" title="edited"></i> '
haml_concat
time_ago_with_tooltip
(
note
.
updated_at
,
'bottom'
,
'note_edited_ago'
)
end
end
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