# You must use a tab-size of 4 spaces to edit this file.
---
zenario__content:
    panels:
        content:
            columns: &columns
                extract_wordcount:
                    db_column: fe.extract_wordcount
                extract_source:
                    db_column: fe.extract_source
                extract_status:
                    db_column: fe.extract_status
            collection_buttons:
                zenario_ctype_document__create_multiple:
                    parent: new_dropdown
                    ord: 2
                    priv: _PRIV_EDIT_DRAFT
                    # For limited admins: if the create button is not enabled, don't enable
                    # the create-multiple button either
                    visible_if: |
                        !zenarioA.adminHasSpecificPerms
                        || zenarioO.tuix.collection_buttons.create
                    css_class: zenario_create_a_new
                    hide_on_filter: true
                    hide_on_refiner: find_duplicates
                    label: Quick create one or multiple...
                    upload:
                        multi: true
                        drag_and_drop: true
                        request:
                            create_multiple: 1
                
                aws_s3_and_vector_data_processing:
                    priv: _PRIV_VIEW_SITE_SETTING
                    label: Settings for AWS S3 and Vector data processing
                    parent: settings_dropdown
                    hide_in_select_mode: true
                    admin_box:
                        path: site_settings
                        key:
                            id: aws_s3_and_vector_data_processing
            
            item_buttons: &itemButtons
                zenario_ctype_document__rescan_extract:
                    priv: _PRIV_EDIT_DRAFT
                    visible_if_for_all_selected_items: |
                        item.type == 'document' &&
                        zenarioA.checkSpecificPerms(id)
                    parent: action_dropdown
                    label: Rescan text/image extract
                    multiple_select: true
                    ajax:
                        confirm:
                            message: |
                                Rescan and update the searchable text extract for the document "[[tag]]"?
                                
                                This action will read the contents of PDF and Microsoft Word documents
                                (subject to external server programs being available).
                                
                                If the file is a PDF, an image of the first page will be attached as a featured image.
                            multiple_select_message: |
                                Rescan and update the searchable text extracts for the selected documents?
                                
                                This action will read the contents of PDF and Microsoft Word documents
                                (subject to external server programs being available).
                                
                                If the files are PDFs, an image of the first page of each one will be attached as a featured image.
                            button_message: Rescan text extract
                            cancel_button_message: Cancel
                            message_type: warning
                        request:
                            rescan_extract: 1
            
            
            inline_buttons: &inlineButtons
                no_extract: 
                    visible_if: |
                        item.type == 'document' &&
                        item.extract_status == 'completed' &&
                        item.extract_wordcount == 0
                    css_class: no_extract
                    tooltip: "0 words"
                    admin_box: 
                        path: zenario_content
                        tab: file
                extract_processing: 
                    visible_if: |
                        item.type == 'document' &&
                        item.extract_status == 'processing'
                    css_class: extract_processing
                    tooltip: "Awaiting extract"
                    admin_box: 
                        path: zenario_content
                        tab: file
                extract_textract: 
                    visible_if: |
                        item.type == 'document' &&
                        item.extract_status == 'completed' &&
                        item.extract_wordcount > 0 &&
                        item.extract_source == 'Textract'
                    css_class: textract
                    tooltip: "[[extract_wordcount]] words, Textract"
                    admin_box: 
                        path: zenario_content
                        tab: file
                extract_antiword: 
                    visible_if: |
                        item.type == 'document' &&
                        item.extract_status == 'completed' &&
                        item.extract_wordcount > 0 &&
                        item.extract_source == 'antiword'
                    css_class: extract
                    tooltip: "[[extract_wordcount]] words, Antiword"
                    admin_box: 
                        path: zenario_content
                        tab: file
                extract_pdftotext: 
                    visible_if: |
                        item.type == 'document' &&
                        item.extract_status == 'completed' &&
                        item.extract_wordcount > 0 &&
                        item.extract_source == 'pdftotext'
                    css_class: extract
                    tooltip: "[[extract_wordcount]] words, pdftotext"
                    admin_box: 
                        path: zenario_content
                        tab: file
                extract_zip: 
                    visible_if: |
                        item.type == 'document' &&
                        item.extract_status == 'completed' &&
                        item.extract_wordcount > 0 &&
                        item.extract_source == 'ZipArchive'
                    css_class: extract
                    tooltip: "[[extract_wordcount]] words"
                    admin_box: 
                        path: zenario_content
                        tab: file
        
        trashed_content_items:
            columns: *columns
            item_buttons: *itemButtons
            inline_buttons: *inlineButtons
        
        hidden_content_items:
            columns: *columns
            item_buttons: *itemButtons
            inline_buttons: *inlineButtons
