From 7c943b1cad5a75d4962eaf58291a8244e39534ab Mon Sep 17 00:00:00 2001 From: Guido Diepen Date: Thu, 5 Jul 2018 19:48:18 +0200 Subject: [PATCH] Implemented hover text showing user FullName (#4261) For each action that is displayed in either the public activity overview of a user, or in the dashboard overview, the link to the username is now extended with a title attribute to show the FullName as hover text Signed-off-by: Guido Diepen --- models/action.go | 6 ++++++ templates/user/dashboard/feeds.tmpl | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/models/action.go b/models/action.go index c3ed9c7c0..a6fb209a4 100644 --- a/models/action.go +++ b/models/action.go @@ -122,6 +122,12 @@ func (a *Action) loadRepo() { } } +// GetActFullName gets the action's user full name. +func (a *Action) GetActFullName() string { + a.loadActUser() + return a.ActUser.FullName +} + // GetActUserName gets the action's user name. func (a *Action) GetActUserName() string { a.loadActUser() diff --git a/templates/user/dashboard/feeds.tmpl b/templates/user/dashboard/feeds.tmpl index bdd6c3482..d9082a0f1 100644 --- a/templates/user/dashboard/feeds.tmpl +++ b/templates/user/dashboard/feeds.tmpl @@ -7,7 +7,7 @@

- {{.ShortActUserName}} + {{.ShortActUserName}} {{if eq .GetOpType 1}} {{$.i18n.Tr "action.create_repo" .GetRepoLink .ShortRepoPath | Str2html}} {{else if eq .GetOpType 2}}