don't show challenge button on player page when they're playing
This commit is contained in:
parent
b1fdebd4bd
commit
1509542958
|
@ -57,7 +57,8 @@ object User extends LilaController {
|
|||
pag ← (filters.query.fold(Env.bookmark.api.gamePaginatorByUser(u, page)) { query =>
|
||||
gamePaginator.recentlyCreated(query, filters.cachedNb)(page)
|
||||
})
|
||||
} yield html.user.show(u, info, pag, filters)
|
||||
playing <- GameRepo nowPlaying u.id map (_.isDefined)
|
||||
} yield html.user.show(u, info, pag, filters, playing)
|
||||
|
||||
def list(page: Int) = Open { implicit ctx =>
|
||||
Reasonable(page) {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
@(u: User, info: lila.app.mashup.UserInfo, games: Paginator[Game], filters: lila.app.mashup.GameFilterMenu)(implicit ctx: Context)
|
||||
@(u: User, info: lila.app.mashup.UserInfo, games: Paginator[Game], filters: lila.app.mashup.GameFilterMenu, playing: Boolean)(implicit ctx: Context)
|
||||
|
||||
@title = @{ "%s : %s - page %d".format(u.username, userGameFilterTitleNoTag(info, filters.current), games.currentPage) }
|
||||
|
||||
|
@ -68,7 +68,7 @@ themepicker = true) {
|
|||
<a class="button mod_zone_toggle" href="@routes.User.mod(u.username)" title="Mod zone"><span data-icon="y"></span></a>
|
||||
}
|
||||
@if(ctx.isAuth && !ctx.is(u)) {
|
||||
@relation.actions(u.id)
|
||||
@relation.actions(u.id, playing = playing)
|
||||
<a data-icon="!" title="@trans.reportXToModerators(u.username)" class="button" href="@routes.Report.form?username=@u.username"></a>
|
||||
} else {
|
||||
<form id="exportform" action="@routes.User.export(u.username)" method="POST">
|
||||
|
|
Loading…
Reference in a new issue