<commit_before>/**
  This controller supports actions when listing categories

  @class ListCategoriesController
  @extends Discourse.ObjectController
  @namespace Discourse
  @module Discourse
**/
Discourse.ListCategoriesController = Discourse.ObjectController.extend({
  needs: ['modal'],

  categoriesEven: function() {
    if (this.blank('categories')) return Em.A();

    return this.get('categories').filter(function(item, index) {
      return (index % 2) === 0;
    });
  }.property('categories.@each'),

  categoriesOdd: function() {
    if (this.blank('categories')) return Em.A();
    return this.get('categories').filter(function(item, index) {
      return (index % 2) === 1;
    });
  }.property('categories.@each'),

  canEdit: function() {
    Discourse.User.current('staff');
  }.property(),

  // clear a pinned topic
  clearPin: function(topic) {
    topic.clearPin();
  }

});

<commit_msg>Show Edit buttons to staff on categories page again<commit_after>/**
  This controller supports actions when listing categories

  @class ListCategoriesController
  @extends Discourse.ObjectController
  @namespace Discourse
  @module Discourse
**/
Discourse.ListCategoriesController = Discourse.ObjectController.extend({
  needs: ['modal'],

  categoriesEven: function() {
    if (this.blank('categories')) return Em.A();

    return this.get('categories').filter(function(item, index) {
      return (index % 2) === 0;
    });
  }.property('categories.@each'),

  categoriesOdd: function() {
    if (this.blank('categories')) return Em.A();
    return this.get('categories').filter(function(item, index) {
      return (index % 2) === 1;
    });
  }.property('categories.@each'),

  canEdit: function() {
    return Discourse.User.current('staff');
  }.property(),

  // clear a pinned topic
  clearPin: function(topic) {
    topic.clearPin();
  }

});


{'fraction_non_alphanumeric': 0.15656836461126006, 'fraction_numerical': 0.004289544235924933, 'mean_word_length': 3.9893048128342246, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '6002113', 'n_tokens_mistral': 560, 'n_tokens_neox': 528, 'n_words': 127}