<commit_before>class AccountSubscriptionsListController extends AccountListViewController

  constructor:(options={}, data)->
    options.noItemFoundText or= 'You have no subscriptions.'

    super options, data

    @loadItems()

    @getListView().on 'ItemWasAdded', (item) =>
      subscription = item.getData()

      subscription.plan.fetchProducts (err, products) ->
        KD.showError err  if err

        item.setProductComponents subscription, products

      item
        .on 'UnsubscribeRequested', =>
          @confirm 'cancel', subscription

        .on 'ReactivateRequested', =>
          @confirm 'resume', subscription

        .on 'PlanChangeRequested', -> debugger<commit_msg>payment: show upgrade form on account screen<commit_after>class AccountSubscriptionsListController extends AccountListViewController

  constructor:(options={}, data)->
    options.noItemFoundText or= 'You have no subscriptions.'

    super options, data

    @loadItems()

    @getListView().on 'ItemWasAdded', (item) =>
      subscription = item.getData()

      subscription.plan.fetchProducts (err, products) ->
        KD.showError err  if err

        item.setProductComponents subscription, products

      item
        .on 'UnsubscribeRequested', =>
          @confirm 'cancel', subscription

        .on 'ReactivateRequested', =>
          @confirm 'resume', subscription

        .on 'PlanChangeRequested', ->
          payment = KD.getSingleton 'paymentController'
          form = payment.createUpgradeForm 'vm'
          new KDModalView
            view    : form
            overlay : yes
{'fraction_non_alphanumeric': 0.0969355847404628, 'fraction_numerical': 0.0, 'mean_word_length': 2.8004750593824226, 'pattern_counts': {'":': 0, '<': 3, '<?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': '5454920', 'n_tokens_mistral': 416, 'n_tokens_neox': 394, 'n_words': 106}