diff --git a/app/controllers/Tournament.scala b/app/controllers/Tournament.scala index 9bc821e66a..6ae039d333 100644 --- a/app/controllers/Tournament.scala +++ b/app/controllers/Tournament.scala @@ -108,12 +108,10 @@ object Tournament extends LilaController { _.fold(tournamentNotFound(ctx).fuccess) { tour ⇒ env.forms.joinPassword.bindFromRequest.fold( err ⇒ renderJoinPassword(tour, err) map { BadRequest(_) }, - password ⇒ FuRedirect { - env.api.join(tour, me, password.some).fold( - err ⇒ routes.Tournament.show(tour.id), - _ ⇒ routes.Tournament.show(tour.id) - ) - } + password ⇒ env.api.join(tour, me, password.some) flatFold ( + _ ⇒ renderJoinPassword(tour, env.forms.joinPassword) map { BadRequest(_) }, + _ ⇒ fuccess(Redirect(routes.Tournament.show(tour.id))) + ) ) } } diff --git a/app/views/tournament/homeInner.scala.html b/app/views/tournament/homeInner.scala.html index 7108141612..860b4a8a01 100644 --- a/app/views/tournament/homeInner.scala.html +++ b/app/views/tournament/homeInner.scala.html @@ -31,7 +31,7 @@ JOINED } else {
- +
} } diff --git a/app/views/tournament/infoBox.scala.html b/app/views/tournament/infoBox.scala.html index 8be8832ca0..b586f585d1 100644 --- a/app/views/tournament/infoBox.scala.html +++ b/app/views/tournament/infoBox.scala.html @@ -7,10 +7,13 @@ @timeago(tour.createdAt) @tour.password.map { password =>
- @trans.isPrivate() - @if(ctx.userId == tour.createdBy.some) { - (@trans.password(): @tour.password) - } + + @if(ctx.userId == tour.createdBy.some) { + @trans.password(): @tour.password + } else { + @trans.isPrivate() + } + }

@tour.clock.show, diff --git a/app/views/tournament/show/createdInner.scala.html b/app/views/tournament/show/createdInner.scala.html index 1b6f4cfbfc..586003e0e7 100644 --- a/app/views/tournament/show/createdInner.scala.html +++ b/app/views/tournament/show/createdInner.scala.html @@ -2,7 +2,7 @@

@tour.nameT @if(tour.hasPassword) { - (@trans.isPrivate()) + @trans.isPrivate() }

@form @@ -30,7 +30,7 @@ } else {
- +
} diff --git a/public/images/s16.png b/public/images/s16.png index 7439c36ff9..a19459cc16 100644 Binary files a/public/images/s16.png and b/public/images/s16.png differ diff --git a/public/stylesheets/common.css b/public/stylesheets/common.css index 84fe532531..ca70af25b5 100644 --- a/public/stylesheets/common.css +++ b/public/stylesheets/common.css @@ -974,6 +974,9 @@ span.s16.clock { .s16.tdown { background-position: 0 -448px; } +.s16.lock { + background-position: 0 -480px; +} .user_link.white, .user_link.black, .user_link.online, .user_link.offline { line-height: 16px; display: block; diff --git a/public/stylesheets/tournament.css b/public/stylesheets/tournament.css index 8a31c20ace..a2c3ecbff0 100644 --- a/public/stylesheets/tournament.css +++ b/public/stylesheets/tournament.css @@ -101,6 +101,12 @@ padding: 3px 5px; } +.s16.lock { + display: inline-block; + height: 16px; + line-height: 16px; +} + #tournament_side { float: right; width: 246px;