|
|
@ -233,7 +233,7 @@ func TimeSince(then time.Time, lang translation.Locale) template.HTML { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
func htmlTimeSince(then, now time.Time, lang translation.Locale) template.HTML { |
|
|
|
func htmlTimeSince(then, now time.Time, lang translation.Locale) template.HTML { |
|
|
|
return template.HTML(fmt.Sprintf(`<span class="time-since tooltip" data-content="%s">%s</span>`, |
|
|
|
return template.HTML(fmt.Sprintf(`<span class="time-since tooltip" data-content="%s" data-tooltip-interactive="true">%s</span>`, |
|
|
|
then.In(setting.DefaultUILocation).Format(GetTimeFormat(lang.Language())), |
|
|
|
then.In(setting.DefaultUILocation).Format(GetTimeFormat(lang.Language())), |
|
|
|
timeSince(then, now, lang))) |
|
|
|
timeSince(then, now, lang))) |
|
|
|
} |
|
|
|
} |
|
|
@ -244,7 +244,7 @@ func TimeSinceUnix(then TimeStamp, lang translation.Locale) template.HTML { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
func htmlTimeSinceUnix(then, now TimeStamp, lang translation.Locale) template.HTML { |
|
|
|
func htmlTimeSinceUnix(then, now TimeStamp, lang translation.Locale) template.HTML { |
|
|
|
return template.HTML(fmt.Sprintf(`<span class="time-since tooltip" data-content="%s">%s</span>`, |
|
|
|
return template.HTML(fmt.Sprintf(`<span class="time-since tooltip" data-content="%s" data-tooltip-interactive="true">%s</span>`, |
|
|
|
then.FormatInLocation(GetTimeFormat(lang.Language()), setting.DefaultUILocation), |
|
|
|
then.FormatInLocation(GetTimeFormat(lang.Language()), setting.DefaultUILocation), |
|
|
|
timeSinceUnix(int64(then), int64(now), lang))) |
|
|
|
timeSinceUnix(int64(then), int64(now), lang))) |
|
|
|
} |
|
|
|
} |
|
|
|