<commit_before>TableviewAction = OrchestraView.extend(
  events:
    'click a.ajax-delete': 'clickDelete'
    'click a.ajax-edit' : 'clickEdit'

  initialize: (options) ->
    @options = options
    _.bindAll this, "render"
    @loadTemplates [
      'OpenOrchestraBackofficeBundle:BackOffice:Underscore/tableviewActions'
    ]
    return

  render: ->
    @setElement $('<p />')
    @$el.append @renderTemplate('OpenOrchestraBackofficeBundle:BackOffice:Underscore/tableviewActions',
      deleted: @options.element.get('deleted')
      links: @options.element.get('links')
    )
    @options.domContainer.html(@$el)

  clickDelete: (event) ->
    event.preventDefault()
    smartConfirm(
      'fa-trash-o',
      'Delete this element',
      'The removal will be final',
      callBackParams:
        url: @options.element.get('links')._self_delete
        row: $(event.target).closest('tr')
      yesCallback: (params) ->
        $.ajax
          url: params.url
          method: 'DELETE'
        params.row.hide()
    )

  clickEdit: (event) ->
    event.preventDefault()
    parent = $('#nav-'+@options.entityType).parent('[data-type]')
    if (parent.length)
      @options.entityType = parent[0].getAttribute('data-type')
    parameter =
      'entityType': @options.entityType
      'entityId': @options.element.get('id')
      'language': @options.element.get('language')
      'version' : @options.element.get('version')
    redirectUrl = 'showEntity'
    if @options.element.get('language')
      redirectUrl = 'showEntityWithLanguage'
      if @options.element.get('version')
        redirectUrl = 'showEntityWithLanguageAndVersion'
    redirectUrl = appRouter.generateUrl(redirectUrl, parameter)
    Backbone.history.navigate(redirectUrl)
    options = @options
    viewContext = @
    links = options.element.get('links')
    panelKeys = []
    for key in Object.keys(links)<commit_msg>Fix broken content duplicate<commit_after>TableviewAction = OrchestraView.extend(
  events:
    'click a.ajax-delete': 'clickDelete'
    'click a.ajax-edit' : 'clickEdit'

  initialize: (options) ->
    @options = options
    _.bindAll this, "render"
    @loadTemplates [
      'OpenOrchestraBackofficeBundle:BackOffice:Underscore/tableviewActions'
    ]
    return

  render: ->
    @setElement $('<p />')
    @$el.append @renderTemplate('OpenOrchestraBackofficeBundle:BackOffice:Underscore/tableviewActions',
      deleted: @options.element.get('deleted')
      links: @options.element.get('links')
    )
    @options.domContainer.html(@$el)

  clickDelete: (event) ->
    event.preventDefault()
    smartConfirm(
      'fa-trash-o',
      'Delete this element',
      'The removal will be final',
      callBackParams:
        url: @options.element.get('links')._self_delete
        row: $(event.target).closest('tr')
      yesCallback: (params) ->
        $.ajax
          url: params.url
          method: 'DELETE'
        params.row.hide()
    )

  clickEdit: (event) ->
    event.preventDefault()
    parent = $('#nav-'+@options.entityType).parent('[data-type]')
    parameter =
      'entityType': @options.entityType
      'entityId': @options.element.get('id')
      'language': @options.element.get('language')
      'version' : @options.element.get('version')
    redirectUrl = 'showEntity'
    if @options.element.get('language')
      redirectUrl = 'showEntityWithLanguage'
      if @options.element.get('version')
        redirectUrl = 'showEntityWithLanguageAndVersion'
    redirectUrl = appRouter.generateUrl(redirectUrl, parameter)
    Backbone.history.navigate(redirectUrl)
    options = @options
    viewContext = @
    links = options.element.get('links')
    panelKeys = []
    for key in Object.keys(links)
{'fraction_non_alphanumeric': 0.14101876675603217, 'fraction_numerical': 0.00026809651474530834, 'mean_word_length': 3.1780515117581185, 'pattern_counts': {'":': 0, '<': 5, '<?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': '5326304', 'n_tokens_mistral': 1122, 'n_tokens_neox': 1119, 'n_words': 192}