<commit_before>@(tour: Tournament, verdicts: lila.tournament.Condition.All.WithVerdicts, streamers: Set[User.ID])(implicit ctx: Context)

<div class="side_box padded">
  <div class="game_infos" data-icon="@tour.perfType.map(_.iconChar)">
    <div class="header">
      <span class="setup">
        @tour.clock.show •
        @if(tour.variant.exotic) {
        @game.variantLink(tour.variant, (if (tour.variant == chess.variant.KingOfTheHill) tour.variant.shortName else tour.variant.name), cssClass = "hint--top")
        } else {
        @tour.perfType.map(_.name)
        }
        @if(!tour.position.initial) {
        • @trans.thematic()
        } • @tour.durationString
      </span>
      @tour.mode.fold(trans.casualTournament, trans.ratedTournament)() •
      @systemName(tour.system).capitalize
      <a href="@routes.Tournament.help(tour.system.toString.toLowerCase.some)" data-icon=""></a>
    </div>
  </div>
  @tour.spotlight.map { s =>
  <div class="game_infos spotlight">
    @lila.common.String.html.markdownLinks(s.description)
  </div>
  }
  @if(verdicts.relevant) {
  <div class="game_infos conditions @if(ctx.isAuth) {
    @if(verdicts.accepted){accepted}else{refused}
    }" data-icon="7">
    @if(verdicts.list.size < 2) {
    <p>Condition of entry:</p>
    }
    @verdicts.list.map { v =>
    <p class="condition text @if(v.verdict.accepted){accepted}else{refused}">@v.condition.name(ctx.lang)</p>
    }
  </div>
  }
  @if(tour.createdBy == "lichess") {
  @trans.tournamentOfficial()
  } else {
  @trans.by(usernameOrId(tour.createdBy))
  }
  • @absClientDateTime(tour.startsAt)
  @if(!tour.position.initial) {
  <br /><br />
  <a target="_blank" href="@tour.position.url">
    <strong>@tour.position.eco</strong> @tour.position.name
  </a>
  }
  @tour.winnerId.map { userId =>
  <br /><br />
  @trans.winner(): @userIdLink(userId.some)
  }
  @if(isGranted(_.TerminateTournament)) {
  <form class="terminate" method="post" action="@routes.Tournament.terminate(tour.id)"
    style="margin-top: 7px; text-align: right;">
    <button data-icon="j" class="submit text button thin confirm" type="submit"
      title="Terminates the tournament immediately">Terminate now</button>
  </form>
  }
</div>
@streamers.map { id =>
<a href="@routes.Streamer.show(id)" class="context-streamer text side_box" data-icon="">@usernameOrId(id) is streaming</a><commit_msg>relocate tournament termination mod button<commit_after>@(tour: Tournament, verdicts: lila.tournament.Condition.All.WithVerdicts, streamers: Set[User.ID])(implicit ctx: Context)

<div class="side_box padded">
  <div class="game_infos" data-icon="@tour.perfType.map(_.iconChar)">
    <div class="header">
      @if(isGranted(_.TerminateTournament)) {
      <form class="terminate" method="post" action="@routes.Tournament.terminate(tour.id)" style="float: right;">
        <button data-icon="j" class="submit text fbt confirm" type="submit" title="Terminates the tournament immediately"></button>
      </form>
      }
      <span class="setup">
        @tour.clock.show •
        @if(tour.variant.exotic) {
        @game.variantLink(tour.variant, (if (tour.variant == chess.variant.KingOfTheHill) tour.variant.shortName else tour.variant.name), cssClass = "hint--top")
        } else {
        @tour.perfType.map(_.name)
        }
        @if(!tour.position.initial) {
        • @trans.thematic()
        } • @tour.durationString
      </span>
      @tour.mode.fold(trans.casualTournament, trans.ratedTournament)() •
      @systemName(tour.system).capitalize
      <a href="@routes.Tournament.help(tour.system.toString.toLowerCase.some)" data-icon=""></a>
    </div>
  </div>
  @tour.spotlight.map { s =>
  <div class="game_infos spotlight">
    @lila.common.String.html.markdownLinks(s.description)
  </div>
  }
  @if(verdicts.relevant) {
  <div class="game_infos conditions @if(ctx.isAuth) {
    @if(verdicts.accepted){accepted}else{refused}
    }" data-icon="7">
    @if(verdicts.list.size < 2) {
    <p>Condition of entry:</p>
    }
    @verdicts.list.map { v =>
    <p class="condition text @if(v.verdict.accepted){accepted}else{refused}">@v.condition.name(ctx.lang)</p>
    }
  </div>
  }
  @if(tour.createdBy == "lichess") {
  @trans.tournamentOfficial()
  } else {
  @trans.by(usernameOrId(tour.createdBy))
  }
  • @absClientDateTime(tour.startsAt)
  @if(!tour.position.initial) {
  <br /><br />
  <a target="_blank" href="@tour.position.url">
    <strong>@tour.position.eco</strong> @tour.position.name
  </a>
  }
  @tour.winnerId.map { userId =>
  <br /><br />
  @trans.winner(): @userIdLink(userId.some)
  }
</div>
@streamers.map { id =>
<a href="@routes.Streamer.show(id)" class="context-streamer text side_box" data-icon="">@usernameOrId(id) is streaming</a>
{'fraction_non_alphanumeric': 0.18189473684210528, 'fraction_numerical': 0.0010526315789473684, 'mean_word_length': 3.717974180734856, 'pattern_counts': {'":': 0, '<': 69, '<?xml version=': 0, '>': 75, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4721910', 'n_tokens_mistral': 1775, 'n_tokens_neox': 1691, 'n_words': 257}