remove duplicated function

This commit is contained in:
Thibault Duplessis 2016-10-31 23:39:00 +01:00
parent 25aa6352cf
commit 708e4de173
3 changed files with 2 additions and 4 deletions

View file

@ -1,6 +1,6 @@
@(c: lila.coach.Coach.WithUser, size: Int)(implicit ctx: Context)
@c.coach.picturePath.map { path =>
<img width=@size height=@size class="picture" src="@dbImageUrl(path.value)" alt="@c.user.titleName lichess coach" />
<img width=@size height=@size class="picture" src="@dbImageUrl(path.value)" alt="@c.user.titleUsername lichess coach" />
}.getOrElse {
<img width=@size height=@size class="picture" src="@staticUrl("images/coach-nopic.svg")" />
}

View file

@ -1,7 +1,7 @@
@(pag: Paginator[lila.study.Study.WithChaptersAndLiked], order: lila.study.Order, owner: User)(implicit ctx: Context)
@listLayout(
title = s"Studies created by ${owner.titleName}",
title = s"Studies created by ${owner.titleUsername}",
active = "owner",
order = order,
pag = pag,

View file

@ -39,8 +39,6 @@ case class User(
def light = LightUser(id = id, name = username, title = title, isPatron = isPatron)
def titleName = title.fold(username)(_ + " " + username)
def realNameOrUsername = profileOrDefault.nonEmptyRealName | username
def langs = ("en" :: lang.toList).distinct.sorted