<commit_before>// TODO: refactor to be like other modals

.modal-dialog

  .modal-header
    button(type='button', data-dismiss="modal", aria-hidden="true").close &times;
    h3
      span(data-i18n="play_level.victory_title_prefix")
      span= levelName
      span(data-i18n="play_level.victory_title_suffix") Complete

  .modal-body
    img.victory-banner(src="/images/level/victory.png", alt="")
    div!= body
  
  .modal-footer
    if level.get('type') === 'ladder'
      a.btn.btn-primary(href="/play/ladder/#{level.get('slug')}#my-matches", data-dismiss="modal", data-i18n="play_level.victory_go_home") Go Home
    else if hasNextLevel
      button.btn.btn-primary.next-level-button(data-dismiss="modal", data-i18n="play_level.victory_play_next_level") Play Next Level
    else
      a.btn.btn-primary(href="/", data-dismiss="modal", data-i18n="play_level.victory_go_home") Go Home
    if me.get('anonymous')
      p.sign-up-poke
        button.btn.btn-success.sign-up-button.btn-large(data-toggle="coco-modal", data-target="modal/signup", data-i18n="play_level.victory_sign_up") Sign Up to Save Progress
          span(data-i18n="play_level.victory_sign_up_poke") Want to save your code? Create a free account!
      p.clearfix
    else
      div.rating.secret
        span(data-i18n="play_level.victory_rate_the_level") Rate the level:
        i.icon-star-empty
        i.icon-star-empty
        i.icon-star-empty
        i.icon-star-empty
        i.icon-star-empty
    if !me.get('anonymous')
      div.review.secret
        span(data-i18n="play_level.victory_review") Tell us more!
        br
        textarea
    div.share-buttons
      .g-plusone(data-href="http://codecombat.com", data-size="medium")
      .fb-like(data-href="https://www.facebook.com/codecombat", data-send="false", data-layout="button_count", data-width="350", data-show-faces="true", data-ref="coco_victory_#{fbRef}")
      a.twitter-follow-button(href="https://twitter.com/CodeCombat", data-show-count="true", data-show-screen-name="false", data-dnt="true", data-align="right", data-i18n="nav.twitter_follow") Follow
      iframe.github-star-button(src="http://ghbtns.com/github-btn.html?user=codecombat&repo=codecombat&type=watch&count=true", allowtransparency="true", frameborder="0", scrolling="0", width="110", height="20")
  
  if showHourOfCodeDoneButton
    .modal-footer
      h3.pull-left(data-i18n="play_level.victory_hour_of_code_done") Are You Done?
      a(href="http://code.org/api/hour/finish")
        strong(data-i18n="play_level.victory_hour_of_code_done_yes") Yes, I'm finished with my Hour of Code!
        img(src="/images/level/csedweek-logo-final-small.jpg", alt="CS Ed Week Hour of Code", title="I'm finished with my Hour of Code", width=80)
<commit_msg>Change victory.jade to use the base template<commit_after>extends /templates/modal/modal_base

block modal-header-content
  h3
    span(data-i18n="play_level.victory_title_prefix")
    span= levelName
    span(data-i18n="play_level.victory_title_suffix") Complete

block modal-body-content
  img.victory-banner(src="/images/level/victory.png", alt="")
  div!= body
  
block modal-footer
    if level.get('type') === 'ladder'
      a.btn.btn-primary(href="/play/ladder/#{level.get('slug')}#my-matches", data-dismiss="modal", data-i18n="play_level.victory_go_home") Go Home
    else if hasNextLevel
      button.btn.btn-primary.next-level-button(data-dismiss="modal", data-i18n="play_level.victory_play_next_level") Play Next Level
    else
      a.btn.btn-primary(href="/", data-dismiss="modal", data-i18n="play_level.victory_go_home") Go Home
    if me.get('anonymous')
      p.sign-up-poke
        button.btn.btn-success.sign-up-button.btn-large(data-toggle="coco-modal", data-target="modal/signup", data-i18n="play_level.victory_sign_up") Sign Up to Save Progress
          span(data-i18n="play_level.victory_sign_up_poke") Want to save your code? Create a free account!
      p.clearfix
    else
      div.rating.secret
        span(data-i18n="play_level.victory_rate_the_level") Rate the level:
        i.icon-star-empty
        i.icon-star-empty
        i.icon-star-empty
        i.icon-star-empty
        i.icon-star-empty
    if !me.get('anonymous')
      div.review.secret
        span(data-i18n="play_level.victory_review") Tell us more!
        br
        textarea
    div.share-buttons
      .g-plusone(data-href="http://codecombat.com", data-size="medium")
      .fb-like(data-href="https://www.facebook.com/codecombat", data-send="false", data-layout="button_count", data-width="350", data-show-faces="true", data-ref="coco_victory_#{fbRef}")
      a.twitter-follow-button(href="https://twitter.com/CodeCombat", data-show-count="true", data-show-screen-name="false", data-dnt="true", data-align="right", data-i18n="nav.twitter_follow") Follow
      iframe.github-star-button(src="http://ghbtns.com/github-btn.html?user=codecombat&repo=codecombat&type=watch&count=true", allowtransparency="true", frameborder="0", scrolling="0", width="110", height="20")
  
  if showHourOfCodeDoneButton
    block modal-footer
      h3.pull-left(data-i18n="play_level.victory_hour_of_code_done") Are You Done?
      a(href="http://code.org/api/hour/finish")
        strong(data-i18n="play_level.victory_hour_of_code_done_yes") Yes, I'm finished with my Hour of Code!
        img(src="/images/level/csedweek-logo-final-small.jpg", alt="CS Ed Week Hour of Code", title="I'm finished with my Hour of Code", width=80)

{'fraction_non_alphanumeric': 0.1547314578005115, 'fraction_numerical': 0.013883814395323347, 'mean_word_length': 3.8623445825932503, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, 'lorem ipsum': 0, 'www.': 2, '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': '7380782', 'n_tokens_mistral': 1977, 'n_tokens_neox': 1887, 'n_words': 287}