<commit_before>window.ReactEvidenceVote = React.createBackboneClass
  _on_up_vote: ->
    return unless Factlink.Global.signed_in

    mp_track "Factlink: Upvote evidence click"
    @model().clickCurrentUserOpinion 'believes'

  _on_down_vote: ->
    return unless Factlink.Global.signed_in

    mp_track "Factlink: Downvote evidence click"
    @model().clickCurrentUserOpinion 'disbelieves'

  render: ->
    up_classes = [
      'comment-vote-up'
      'evidence-active' if @model().get('current_user_opinion') == 'believes'
      'spec-evidence-vote-up'
    ].join(' ')

    down_classes = [
      'comment-vote-down'
      'evidence-active' if @model().get('current_user_opinion') == 'disbelieves'
      'spec-evidence-vote-down'
    ].join(' ')

    R.div className: 'comment-votes',
      if Factlink.Global.signed_in
        R.a
          className: up_classes
          href: "javascript:"
          onClick: @_on_up_vote
          R.i className: "icon-up-open"
      else
        R.span(className: up_classes)

      R.span className:"comment-vote-amount spec-evidence-relevance",
        format_as_short_number(@model().relevance())

      if Factlink.Global.signed_in
        R.a
          className: down_classes
          href: "javascript:"
          onClick: @_on_down_vote
          R.i className: "icon-down-open"
      else
        R.span(className: down_classes)<commit_msg>Added vote up/down icons when not logged in above/below vote amount<commit_after>window.ReactEvidenceVote = React.createBackboneClass
  _on_up_vote: ->
    return unless Factlink.Global.signed_in

    mp_track "Factlink: Upvote evidence click"
    @model().clickCurrentUserOpinion 'believes'

  _on_down_vote: ->
    return unless Factlink.Global.signed_in

    mp_track "Factlink: Downvote evidence click"
    @model().clickCurrentUserOpinion 'disbelieves'

  render: ->
    up_classes = [
      'comment-vote-up'
      'evidence-active' if @model().get('current_user_opinion') == 'believes'
      'spec-evidence-vote-up'
    ].join(' ')

    down_classes = [
      'comment-vote-down'
      'evidence-active' if @model().get('current_user_opinion') == 'disbelieves'
      'spec-evidence-vote-down'
    ].join(' ')

    if Factlink.Global.signed_in
      R.div className: 'comment-votes',
    else
      R.div className: 'comment-votes disabled',

        if Factlink.Global.signed_in
          R.a
            className: up_classes
            href: "javascript:"
            onClick: @_on_up_vote
            R.i className: "icon-up-open"
        else
          R.span
            className: up_classes
            R.i className: "icon-up-open"

        R.span className:"comment-vote-amount spec-evidence-relevance",
          format_as_short_number(@model().relevance())

        if Factlink.Global.signed_in
          R.a
            className: down_classes
            href: "javascript:"
            onClick: @_on_down_vote
            R.i className: "icon-down-open"
        else
          R.span
            className: down_classes
            R.i className: "icon-down-open"
{'fraction_non_alphanumeric': 0.11241065627030539, 'fraction_numerical': 0.0, 'mean_word_length': 2.409745293466224, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, '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': '5524571', 'n_tokens_mistral': 993, 'n_tokens_neox': 933, 'n_words': 180}