mirror of
https://github.com/wahyd4/gitlabhq.git
synced 2026-08-15 15:46:08 +10:00
Add issue edited timestamp
This commit is contained in:
@@ -62,6 +62,19 @@ module IssuesHelper
|
||||
''
|
||||
end
|
||||
|
||||
def issue_timestamp(issue)
|
||||
# Shows the created at time and the updated at time if different
|
||||
ts = "#{time_ago_with_tooltip(issue.created_at, 'bottom', 'note_created_ago')}"
|
||||
if issue.updated_at != issue.created_at
|
||||
ts << capture_haml do
|
||||
haml_tag :small do
|
||||
haml_concat " (Edited #{time_ago_with_tooltip(issue.updated_at, 'bottom', 'issue_edited_ago')})"
|
||||
end
|
||||
end
|
||||
end
|
||||
ts.html_safe
|
||||
end
|
||||
|
||||
# Checks if issues_tracker setting exists in gitlab.yml
|
||||
def external_issues_tracker_enabled?
|
||||
Gitlab.config.issues_tracker && Gitlab.config.issues_tracker.values.any?
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
Open
|
||||
|
||||
.creator
|
||||
Created by #{link_to_member(@project, @issue.author)} #{time_ago_with_tooltip(@issue.created_at)}
|
||||
Created by #{link_to_member(@project, @issue.author)} #{issue_timestamp(@issue)}
|
||||
|
||||
%h4.title
|
||||
= gfm escape_once(@issue.title)
|
||||
|
||||
Reference in New Issue
Block a user