<commit_before>import Base from "@patternslib/patternslib/src/core/base";
import AppView from "./js/views/app";

export default Base.extend({
    name: "structure",
    trigger: ".pat-structure",
    parser: "mockup",
    defaults: {
        // for implementing history changes
        // Example: {base: 'http://mysite.com', appended: '/folder_contents'}
        urlStructure: null,
        vocabularyUrl: null,
        indexOptionsUrl: null, // for querystring widget
        contextInfoUrl: null, // for add new dropdown and other info
        setDefaultPageUrl: null,
        menuOptions: null, // default action menu options per item.
        backdropSelector: ".plone-modal", // Element upon which to apply backdrops used for popovers

        activeColumnsCookie: "activeColumns",

        attributes: [
            "CreationDate",
            "EffectiveDate",
            "ExpirationDate",
            "exclude_from_nav",
            "getIcon",
            "getMimeIcon",
            "getObjSize",
            "getURL",
            "id",
            "is_folderish",
            "last_comment_date",
            "ModificationDate",
            "path",
            "portal_type",
            "review_state",
            "Subject",
            "Title",
            "total_comments",
            "UID",
        ],

        activeColumns: ["ModificationDate", "EffectiveDate", "review_state"],

        availableColumns: {
            id: "ID",
            ModificationDate: "Last modified",
            EffectiveDate: "Published",
            ExpirationDate: "Expiration",
            CreationDate: "Created",
            review_state: "Review state",
            Subject: "Tags",
            portal_type: "Type",
            is_folderish: "Folder",
            exclude_from_nav: "Excluded from navigation",
            getObjSize: "Object Size",
            last_comment_date: "Last comment date",
            total_comments: "Total comments",
        },

        typeToViewAction: {
            File: "/view",
            Image: "/view",
            Blob: "/view",
        },

        defaultPageTypes: ["Document", "Event", "News Item", "Collection"],

        momentFormat: "L LT",
        rearrange: {
            properties: {
                id: "ID",
                sortable_title: "Title",
            },
            url: "/rearrange",
        },
        moveUrl: null,

        buttons: [
            {
                tooltip: "Cut",
                title: "Cut",
                url: "/cut",
            },
            {
                tooltip: "Copy",
                title: "Copy",
                url: "/copy",
            },
            {
                tooltip: "Paste",
                title: "Paste",
                url: "/paste",
            },
            {
                tooltip: "Delete",
                title: "Delete",
                url: "/delete",
                context: "danger",
                icon: "trash",
            },
            {
                tooltip: "Workflow",
                title: "Workflow",
                url: "/workflow",
            },
            {
                tooltip: "Tags",
                title: "Tags",
                url: "/tags",
            },
            {
                tooltip: "Properties",
                title: "Properties",
                url: "/properties",
            },
            {
                tooltip: "Rename",
                title: "Rename",
                url: "/rename",
            },
        ],

        datatables_options: {},

        upload: {
            uploadMultiple: true,
            showTitle: true,
        },
    },

    async init() {
        import("./structure.scss");
        import("bootstrap/js/src/dropdown");

        this.browsing = true; // so all queries will be correct with QueryHelper
        this.options.collectionUrl = this.options.vocabularyUrl;
        this.options.pattern = this;

        // the ``attributes`` options key is not compatible with backbone,
        // but queryHelper that will be constructed by the default
        // ResultCollection will expect this to be passed into it.
        this.options.queryHelperAttributes = this.options.attributes;<commit_msg>remove titles from pat-structure buttons<commit_after>import Base from "@patternslib/patternslib/src/core/base";
import AppView from "./js/views/app";

export default Base.extend({
    name: "structure",
    trigger: ".pat-structure",
    parser: "mockup",
    defaults: {
        // for implementing history changes
        // Example: {base: 'http://mysite.com', appended: '/folder_contents'}
        urlStructure: null,
        vocabularyUrl: null,
        indexOptionsUrl: null, // for querystring widget
        contextInfoUrl: null, // for add new dropdown and other info
        setDefaultPageUrl: null,
        menuOptions: null, // default action menu options per item.
        backdropSelector: ".plone-modal", // Element upon which to apply backdrops used for popovers

        activeColumnsCookie: "activeColumns",

        attributes: [
            "CreationDate",
            "EffectiveDate",
            "ExpirationDate",
            "exclude_from_nav",
            "getIcon",
            "getMimeIcon",
            "getObjSize",
            "getURL",
            "id",
            "is_folderish",
            "last_comment_date",
            "ModificationDate",
            "path",
            "portal_type",
            "review_state",
            "Subject",
            "Title",
            "total_comments",
            "UID",
        ],

        activeColumns: ["ModificationDate", "EffectiveDate", "review_state"],

        availableColumns: {
            id: "ID",
            ModificationDate: "Last modified",
            EffectiveDate: "Published",
            ExpirationDate: "Expiration",
            CreationDate: "Created",
            review_state: "Review state",
            Subject: "Tags",
            portal_type: "Type",
            is_folderish: "Folder",
            exclude_from_nav: "Excluded from navigation",
            getObjSize: "Object Size",
            last_comment_date: "Last comment date",
            total_comments: "Total comments",
        },

        typeToViewAction: {
            File: "/view",
            Image: "/view",
            Blob: "/view",
        },

        defaultPageTypes: ["Document", "Event", "News Item", "Collection"],

        momentFormat: "L LT",
        rearrange: {
            properties: {
                id: "ID",
                sortable_title: "Title",
            },
            url: "/rearrange",
        },
        moveUrl: null,

        buttons: [
            {
                tooltip: "Cut",
                url: "/cut",
                icon: "plone-cut"
            },
            {
                tooltip: "Copy",
                url: "/copy",
                icon: "plone-copy"
            },
            {
                tooltip: "Paste",
                url: "/paste",
                icon: "plone-paste",
            },
            {
                tooltip: "Delete",
                url: "/delete",
                context: "danger",
                icon: "plone-delete",
            },
            {
                tooltip: "Workflow",
                url: "/workflow",
                icon: "plone-lock",
            },
            {
                tooltip: "Tags",
                url: "/tags",
                icon: "tags"
            },
            {
                tooltip: "Properties",
                url: "/properties",
                icon: "plone-edit",
            },
            {
                tooltip: "Rename",
                url: "/rename",
                icon: "plone-rename",
            },
        ],

        datatables_options: {},

        upload: {
            uploadMultiple: true,
            showTitle: true,
        },
    },

    async init() {
        import("./structure.scss");
        import("bootstrap/js/src/dropdown");

        this.browsing = true; // so all queries will be correct with QueryHelper
        this.options.collectionUrl = this.options.vocabularyUrl;
        this.options.pattern = this;

        // the ``attributes`` options key is not compatible with backbone,
        // but queryHelper that will be constructed by the default
        // ResultCollection will expect this to be passed into it.
        this.options.queryHelperAttributes = this.options.attributes;
{'fraction_non_alphanumeric': 0.11445141436856433, 'fraction_numerical': 0.0, 'mean_word_length': 1.3246217331499313, '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': '3843194', 'n_tokens_mistral': 2185, 'n_tokens_neox': 2068, 'n_words': 519}