<commit_before>class ActivityContentDisplay extends KDScrollView

  constructor:(options = {}, data)->

    options.cssClass or= "content-display activity-related #{options.type}"

    super options, data

    currentGroup = KD.getSingleton("groupsController").getCurrentGroup()

    getContentGroupLinkPartial = (groupSlug, groupName)->
      if currentGroup?.slug is groupSlug
      then ""
      else "In <a href=\"#{groupSlug}\" target=\"#{groupSlug}\">#{groupName}</a>"

    @contentGroupLink = new KDCustomHTMLView
      tagName     : "span"
      partial     : getContentGroupLinkPartial(data.group, data.group)

    if currentGroup?.slug is data.group
      @contentGroupLink.updatePartial getContentGroupLinkPartial(currentGroup.slug, currentGroup.title)
    else
      KD.remote.api.JGroup.one {slug:data.group}, (err, group)=>
        if not err and group
          @contentGroupLink.updatePartial getContentGroupLinkPartial(group.slug, group.title)

    @header = new HeaderViewSection
      type    : "big"
      title   : @getOptions().title

    @back   = new KDCustomHTMLView
      tagName : "a"
      partial : "<span>&laquo;</span> Back"
      click   : (event)=>
        event.stopPropagation()
        event.preventDefault()
        KD.singleton('display').emit "ContentDisplayWantsToBeHidden", @
        KD.singleton('router').back()

    @back = new KDCustomHTMLView  unless KD.isLoggedIn()<commit_msg>Activity: some unnecessary contentdisplay code cleaned<commit_after>class ActivityContentDisplay extends KDScrollView

  constructor: (options = {}, data) ->

    options.cssClass or= "content-display activity-related #{options.type}"

    super options, data

    @header = new HeaderViewSection
      type    : "big"
      title   : @getOptions().title

    @back   = new KDCustomHTMLView
      tagName : "a"
      partial : "<span>&laquo;</span> Back"
      click   : (event)=>
        event.stopPropagation()
        event.preventDefault()
        KD.singleton('display').emit "ContentDisplayWantsToBeHidden", @
        KD.singleton('router').back()

    @back = new KDCustomHTMLView  unless KD.isLoggedIn()
{'fraction_non_alphanumeric': 0.1180327868852459, 'fraction_numerical': 0.0, 'mean_word_length': 3.246520874751491, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 15, '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': '3873056', 'n_tokens_mistral': 623, 'n_tokens_neox': 606, 'n_words': 130}