diff --git a/config/optional/views.view.ado_tools_children.yml b/config/optional/views.view.ado_tools_children.yml new file mode 100644 index 00000000..c599bf80 --- /dev/null +++ b/config/optional/views.view.ado_tools_children.yml @@ -0,0 +1,729 @@ +langcode: en +status: true +dependencies: + config: + - search_api.index.default_solr_index + module: + - search_api + enforced: + module: + - search_api_solr + - strawberryfield +id: ado_tools_children +label: ADO_Tools_Children +module: views +description: 'Lists Member objects of a Collection driven by Solr' +tag: '' +base_table: search_api_index_default_solr_index +base_field: search_api_id +display: + default: + id: default + display_title: Default + display_plugin: default + position: 0 + display_options: + title: 'ADO Children' + fields: + title: + id: title + table: search_api_datasource_default_solr_index_entity_node + field: title + relationship: none + group_type: group + admin_label: '' + entity_type: node + plugin_id: search_api_field + label: Title + exclude: false + alter: + alter_text: false + text: '' + make_link: false + path: '' + absolute: false + external: false + replace_spaces: false + path_case: none + trim_whitespace: false + alt: '' + rel: '' + link_class: '' + prefix: '' + suffix: '' + target: '' + nl2br: false + max_length: 0 + word_boundary: true + ellipsis: true + more_link: false + more_link_text: '' + more_link_path: '' + strip_tags: false + trim: false + preserve_tags: '' + html: false + element_type: '' + element_class: '' + element_label_type: '' + element_label_class: '' + element_label_colon: true + element_wrapper_type: '' + element_wrapper_class: '' + element_default_classes: true + empty: '' + hide_empty: false + empty_zero: false + hide_alter_empty: true + click_sort_column: value + type: string + settings: + link_to_entity: true + group_column: value + group_columns: { } + group_rows: true + delta_limit: 0 + delta_offset: 0 + delta_reversed: false + delta_first_last: false + multi_type: separator + separator: ', ' + field_api_classes: false + field_rendering: true + fallback_handler: search_api + fallback_options: + link_to_item: false + use_highlighting: false + multi_type: separator + multi_separator: ', ' + digital_object_type: + id: digital_object_type + table: search_api_index_default_solr_index + field: digital_object_type + relationship: none + group_type: group + admin_label: '' + plugin_id: search_api + label: 'Digital Object Type' + exclude: false + alter: + alter_text: false + text: '' + make_link: false + path: '' + absolute: false + external: false + replace_spaces: false + path_case: none + trim_whitespace: false + alt: '' + rel: '' + link_class: '' + prefix: '' + suffix: '' + target: '' + nl2br: false + max_length: 0 + word_boundary: true + ellipsis: true + more_link: false + more_link_text: '' + more_link_path: '' + strip_tags: false + trim: false + preserve_tags: '' + html: false + element_type: '' + element_class: '' + element_label_type: '' + element_label_class: '' + element_label_colon: true + element_wrapper_type: '' + element_wrapper_class: '' + element_default_classes: true + empty: '' + hide_empty: false + empty_zero: false + hide_alter_empty: true + link_to_item: false + use_highlighting: false + multi_type: separator + multi_separator: ', ' + author: + id: author + table: search_api_index_default_solr_index + field: author + relationship: none + group_type: group + admin_label: '' + entity_type: null + entity_field: null + plugin_id: search_api_field + label: Author + exclude: false + alter: + alter_text: false + text: '' + make_link: false + path: '' + absolute: false + external: false + replace_spaces: false + path_case: none + trim_whitespace: false + alt: '' + rel: '' + link_class: '' + prefix: '' + suffix: '' + target: '' + nl2br: false + max_length: 0 + word_boundary: true + ellipsis: true + more_link: false + more_link_text: '' + more_link_path: '' + strip_tags: false + trim: false + preserve_tags: '' + html: false + element_type: '' + element_class: '' + element_label_type: '' + element_label_class: '' + element_label_colon: true + element_wrapper_type: '' + element_wrapper_class: '' + element_default_classes: true + empty: '' + hide_empty: false + empty_zero: false + hide_alter_empty: true + click_sort_column: value + type: string + settings: + link_to_entity: true + group_column: value + group_columns: { } + group_rows: true + delta_limit: 0 + delta_offset: 0 + delta_reversed: false + delta_first_last: false + multi_type: separator + separator: ', ' + field_api_classes: false + field_rendering: true + fallback_handler: search_api + fallback_options: + link_to_item: false + use_highlighting: false + multi_type: separator + multi_separator: ', ' + status: + id: status + table: search_api_datasource_default_solr_index_entity_node + field: status + relationship: none + group_type: group + admin_label: '' + entity_type: node + plugin_id: search_api_field + label: Status + exclude: false + alter: + alter_text: false + text: '' + make_link: false + path: '' + absolute: false + external: false + replace_spaces: false + path_case: none + trim_whitespace: false + alt: '' + rel: '' + link_class: '' + prefix: '' + suffix: '' + target: '' + nl2br: false + max_length: 0 + word_boundary: true + ellipsis: true + more_link: false + more_link_text: '' + more_link_path: '' + strip_tags: false + trim: false + preserve_tags: '' + html: false + element_type: '' + element_class: '' + element_label_type: '' + element_label_class: '' + element_label_colon: true + element_wrapper_type: '' + element_wrapper_class: '' + element_default_classes: true + empty: '' + hide_empty: false + empty_zero: false + hide_alter_empty: true + click_sort_column: value + type: boolean + settings: + format: custom + format_custom_false: Unpublished + format_custom_true: Published + group_column: value + group_columns: { } + group_rows: true + delta_limit: 0 + delta_offset: 0 + delta_reversed: false + delta_first_last: false + multi_type: separator + separator: ', ' + field_api_classes: false + field_rendering: true + fallback_handler: search_api_boolean + fallback_options: + type: yes-no + type_custom_true: '' + type_custom_false: '' + not: false + link_to_item: false + use_highlighting: false + multi_type: separator + multi_separator: ', ' + changed: + id: changed + table: search_api_datasource_default_solr_index_entity_node + field: changed + relationship: none + group_type: group + admin_label: '' + entity_type: node + plugin_id: search_api_field + label: Updated + exclude: false + alter: + alter_text: false + text: '' + make_link: false + path: '' + absolute: false + external: false + replace_spaces: false + path_case: none + trim_whitespace: false + alt: '' + rel: '' + link_class: '' + prefix: '' + suffix: '' + target: '' + nl2br: false + max_length: 0 + word_boundary: true + ellipsis: true + more_link: false + more_link_text: '' + more_link_path: '' + strip_tags: false + trim: false + preserve_tags: '' + html: false + element_type: '' + element_class: '' + element_label_type: '' + element_label_class: '' + element_label_colon: true + element_wrapper_type: '' + element_wrapper_class: '' + element_default_classes: true + empty: '' + hide_empty: false + empty_zero: false + hide_alter_empty: true + click_sort_column: value + type: timestamp + settings: + date_format: medium + custom_date_format: '' + timezone: '' + group_column: value + group_columns: { } + group_rows: true + delta_limit: 0 + delta_offset: 0 + delta_reversed: false + delta_first_last: false + multi_type: separator + separator: ', ' + field_api_classes: false + field_rendering: true + fallback_handler: search_api_date + fallback_options: + date_format: fallback + custom_date_format: '' + timezone: '' + link_to_item: false + use_highlighting: false + multi_type: separator + multi_separator: ', ' + sequence_id_1: + id: sequence_id_1 + table: search_api_index_default_solr_index + field: sequence_id_1 + relationship: none + group_type: group + admin_label: '' + plugin_id: search_api + label: 'Sequence ID' + exclude: false + alter: + alter_text: false + text: '' + make_link: false + path: '' + absolute: false + external: false + replace_spaces: false + path_case: none + trim_whitespace: false + alt: '' + rel: '' + link_class: '' + prefix: '' + suffix: '' + target: '' + nl2br: false + max_length: 0 + word_boundary: true + ellipsis: true + more_link: false + more_link_text: '' + more_link_path: '' + strip_tags: false + trim: false + preserve_tags: '' + html: false + element_type: '' + element_class: '' + element_label_type: '' + element_label_class: '' + element_label_colon: true + element_wrapper_type: '' + element_wrapper_class: '' + element_default_classes: true + empty: '' + hide_empty: false + empty_zero: false + hide_alter_empty: true + link_to_item: false + use_highlighting: false + multi_type: separator + multi_separator: ', ' + search_api_operations: + id: search_api_operations + table: search_api_index_default_solr_index + field: search_api_operations + relationship: none + group_type: group + admin_label: '' + plugin_id: search_api_entity_operations + label: Operations + exclude: false + alter: + alter_text: false + text: '' + make_link: false + path: '' + absolute: false + external: false + replace_spaces: false + path_case: none + trim_whitespace: false + alt: '' + rel: '' + link_class: '' + prefix: '' + suffix: '' + target: '' + nl2br: false + max_length: 0 + word_boundary: true + ellipsis: true + more_link: false + more_link_text: '' + more_link_path: '' + strip_tags: false + trim: false + preserve_tags: '' + html: false + element_type: '' + element_class: '' + element_label_type: '' + element_label_class: '' + element_label_colon: true + element_wrapper_type: '' + element_wrapper_class: '' + element_default_classes: true + empty: '' + hide_empty: false + empty_zero: false + hide_alter_empty: true + destination: false + pager: + type: full + options: + offset: 0 + items_per_page: 10 + total_pages: null + id: 0 + tags: + next: 'Next ›' + previous: '‹ Previous' + first: '« First' + last: 'Last »' + expose: + items_per_page: false + items_per_page_label: 'Items per page' + items_per_page_options: '5, 10, 25, 50' + items_per_page_options_all: false + items_per_page_options_all_label: '- All -' + offset: false + offset_label: Offset + quantity: 9 + exposed_form: + type: basic + options: + submit_button: Apply + reset_button: true + reset_button_label: Reset + exposed_sorts_label: 'Sort by' + expose_sort_order: true + sort_asc_label: Asc + sort_desc_label: Desc + access: + type: none + options: { } + cache: + type: search_api_tag + options: { } + empty: + messages: + id: messages + table: views + field: messages + relationship: none + group_type: group + admin_label: 'This ADO has no children.' + plugin_id: messages + empty: true + sorts: + sequence_id_1: + id: sequence_id_1 + table: search_api_index_default_solr_index + field: sequence_id_1 + relationship: none + group_type: group + admin_label: '' + plugin_id: search_api + order: ASC + expose: + label: '' + field_identifier: '' + exposed: false + changed: + id: changed + table: search_api_index_default_solr_index + field: changed + relationship: none + group_type: group + admin_label: '' + plugin_id: search_api + order: ASC + expose: + label: Changed + field_identifier: changed + exposed: false + title_string: + id: title_string + table: search_api_index_default_solr_index + field: title_string + relationship: none + group_type: group + admin_label: '' + plugin_id: search_api + order: ASC + expose: + label: Title + field_identifier: title_string + exposed: false + arguments: + ismemberof: + id: ismemberof + table: search_api_index_default_solr_index + field: ismemberof + relationship: none + group_type: group + admin_label: '' + plugin_id: search_api + default_action: default + exception: + value: all + title_enable: false + title: All + title_enable: false + title: '' + default_argument_type: node + default_argument_options: { } + default_argument_skip_url: false + summary_options: { } + summary: + sort_order: asc + number_of_records: 0 + format: default_summary + specify_validation: false + validate: + type: none + fail: 'not found' + validate_options: { } + break_phrase: true + not: false + filters: + type: + id: type + table: search_api_index_default_solr_index + field: type + relationship: none + group_type: group + admin_label: '' + plugin_id: search_api_options + operator: or + value: + digital_object: digital_object + digital_object_collection: digital_object_collection + group: 1 + exposed: false + expose: + operator_id: '' + label: '' + description: '' + use_operator: false + operator: '' + operator_limit_selection: false + operator_list: { } + identifier: '' + required: false + remember: false + multiple: false + remember_roles: + authenticated: authenticated + reduce: false + is_grouped: false + group_info: + label: '' + description: '' + identifier: '' + optional: true + widget: select + multiple: false + remember: false + default_group: All + default_group_multiple: { } + group_items: { } + reduce_duplicates: false + style: + type: table + options: + grouping: { } + row_class: col + default_row_class: false + uses_fields: false + columns: { } + default: '' + info: { } + override: true + sticky: false + summary: '' + order: asc + empty_table: false + caption: '' + description: '' + row: + type: search_api + options: + view_modes: + 'entity:file': + file: default + 'entity:node': + article: default + digital_object: digital_object_with_thumbnail_for_grid + digital_object_collection: digital_object_with_thumbnail_for_grid + page: default + webform: default + strawberryfield_flavor_datasource: '' + query: + type: search_api_query + options: + bypass_access: false + skip_access: false + relationships: { } + use_ajax: true + header: + area: + id: area + table: views + field: area + relationship: none + group_type: group + admin_label: '' + plugin_id: text + empty: false + content: + value: '' + format: full_html + tokenize: true + footer: { } + display_extenders: { } + cache_metadata: + max-age: -1 + contexts: + - 'languages:language_content' + - 'languages:language_interface' + - url + - url.query_args + - 'user.node_grants:view' + tags: + - 'config:search_api.index.default_solr_index' + block_1: + id: block_1 + display_title: Block + display_plugin: block + position: 1 + display_options: + display_extenders: { } + block_hide_empty: true + allow: + items_per_page: true + offset: '0' + pager: '0' + hide_fields: '0' + sort_fields: '0' + disable_filters: '0' + configure_sorts: '0' + cache_metadata: + max-age: -1 + contexts: + - 'languages:language_content' + - 'languages:language_interface' + - url + - url.query_args + - 'user.node_grants:view' + tags: + - 'config:search_api.index.default_solr_index' diff --git a/config/optional/views.view.ado_tools_children_creative_work_series.yml b/config/optional/views.view.ado_tools_children_creative_work_series.yml new file mode 100644 index 00000000..c6f81da5 --- /dev/null +++ b/config/optional/views.view.ado_tools_children_creative_work_series.yml @@ -0,0 +1,730 @@ +uuid: db041c3a-c29a-4900-80f8-c5383b60584c +langcode: en +status: true +dependencies: + config: + - search_api.index.default_solr_index + module: + - search_api + enforced: + module: + - search_api_solr + - strawberryfield +id: ado_tools_children_creative_work_series +label: ADO_Tools_Children_Creative_Work_Series +module: views +description: 'Lists Member objects of a Collection driven by Solr' +tag: '' +base_table: search_api_index_default_solr_index +base_field: search_api_id +display: + default: + id: default + display_title: Default + display_plugin: default + position: 0 + display_options: + title: 'ADO Children' + fields: + title: + id: title + table: search_api_datasource_default_solr_index_entity_node + field: title + relationship: none + group_type: group + admin_label: '' + entity_type: node + plugin_id: search_api_field + label: Title + exclude: false + alter: + alter_text: false + text: '' + make_link: false + path: '' + absolute: false + external: false + replace_spaces: false + path_case: none + trim_whitespace: false + alt: '' + rel: '' + link_class: '' + prefix: '' + suffix: '' + target: '' + nl2br: false + max_length: 0 + word_boundary: true + ellipsis: true + more_link: false + more_link_text: '' + more_link_path: '' + strip_tags: false + trim: false + preserve_tags: '' + html: false + element_type: '' + element_class: '' + element_label_type: '' + element_label_class: '' + element_label_colon: true + element_wrapper_type: '' + element_wrapper_class: '' + element_default_classes: true + empty: '' + hide_empty: false + empty_zero: false + hide_alter_empty: true + click_sort_column: value + type: string + settings: + link_to_entity: true + group_column: value + group_columns: { } + group_rows: true + delta_limit: 0 + delta_offset: 0 + delta_reversed: false + delta_first_last: false + multi_type: separator + separator: ', ' + field_api_classes: false + field_rendering: true + fallback_handler: search_api + fallback_options: + link_to_item: false + use_highlighting: false + multi_type: separator + multi_separator: ', ' + digital_object_type: + id: digital_object_type + table: search_api_index_default_solr_index + field: digital_object_type + relationship: none + group_type: group + admin_label: '' + plugin_id: search_api + label: 'Digital Object Type' + exclude: false + alter: + alter_text: false + text: '' + make_link: false + path: '' + absolute: false + external: false + replace_spaces: false + path_case: none + trim_whitespace: false + alt: '' + rel: '' + link_class: '' + prefix: '' + suffix: '' + target: '' + nl2br: false + max_length: 0 + word_boundary: true + ellipsis: true + more_link: false + more_link_text: '' + more_link_path: '' + strip_tags: false + trim: false + preserve_tags: '' + html: false + element_type: '' + element_class: '' + element_label_type: '' + element_label_class: '' + element_label_colon: true + element_wrapper_type: '' + element_wrapper_class: '' + element_default_classes: true + empty: '' + hide_empty: false + empty_zero: false + hide_alter_empty: true + link_to_item: false + use_highlighting: false + multi_type: separator + multi_separator: ', ' + author: + id: author + table: search_api_index_default_solr_index + field: author + relationship: none + group_type: group + admin_label: '' + entity_type: null + entity_field: null + plugin_id: search_api_field + label: Author + exclude: false + alter: + alter_text: false + text: '' + make_link: false + path: '' + absolute: false + external: false + replace_spaces: false + path_case: none + trim_whitespace: false + alt: '' + rel: '' + link_class: '' + prefix: '' + suffix: '' + target: '' + nl2br: false + max_length: 0 + word_boundary: true + ellipsis: true + more_link: false + more_link_text: '' + more_link_path: '' + strip_tags: false + trim: false + preserve_tags: '' + html: false + element_type: '' + element_class: '' + element_label_type: '' + element_label_class: '' + element_label_colon: true + element_wrapper_type: '' + element_wrapper_class: '' + element_default_classes: true + empty: '' + hide_empty: false + empty_zero: false + hide_alter_empty: true + click_sort_column: value + type: string + settings: + link_to_entity: true + group_column: value + group_columns: { } + group_rows: true + delta_limit: 0 + delta_offset: 0 + delta_reversed: false + delta_first_last: false + multi_type: separator + separator: ', ' + field_api_classes: false + field_rendering: true + fallback_handler: search_api + fallback_options: + link_to_item: false + use_highlighting: false + multi_type: separator + multi_separator: ', ' + status: + id: status + table: search_api_datasource_default_solr_index_entity_node + field: status + relationship: none + group_type: group + admin_label: '' + entity_type: node + plugin_id: search_api_field + label: Status + exclude: false + alter: + alter_text: false + text: '' + make_link: false + path: '' + absolute: false + external: false + replace_spaces: false + path_case: none + trim_whitespace: false + alt: '' + rel: '' + link_class: '' + prefix: '' + suffix: '' + target: '' + nl2br: false + max_length: 0 + word_boundary: true + ellipsis: true + more_link: false + more_link_text: '' + more_link_path: '' + strip_tags: false + trim: false + preserve_tags: '' + html: false + element_type: '' + element_class: '' + element_label_type: '' + element_label_class: '' + element_label_colon: true + element_wrapper_type: '' + element_wrapper_class: '' + element_default_classes: true + empty: '' + hide_empty: false + empty_zero: false + hide_alter_empty: true + click_sort_column: value + type: boolean + settings: + format: custom + format_custom_false: Unpublished + format_custom_true: Published + group_column: value + group_columns: { } + group_rows: true + delta_limit: 0 + delta_offset: 0 + delta_reversed: false + delta_first_last: false + multi_type: separator + separator: ', ' + field_api_classes: false + field_rendering: true + fallback_handler: search_api_boolean + fallback_options: + type: yes-no + type_custom_true: '' + type_custom_false: '' + not: false + link_to_item: false + use_highlighting: false + multi_type: separator + multi_separator: ', ' + changed: + id: changed + table: search_api_datasource_default_solr_index_entity_node + field: changed + relationship: none + group_type: group + admin_label: '' + entity_type: node + plugin_id: search_api_field + label: Updated + exclude: false + alter: + alter_text: false + text: '' + make_link: false + path: '' + absolute: false + external: false + replace_spaces: false + path_case: none + trim_whitespace: false + alt: '' + rel: '' + link_class: '' + prefix: '' + suffix: '' + target: '' + nl2br: false + max_length: 0 + word_boundary: true + ellipsis: true + more_link: false + more_link_text: '' + more_link_path: '' + strip_tags: false + trim: false + preserve_tags: '' + html: false + element_type: '' + element_class: '' + element_label_type: '' + element_label_class: '' + element_label_colon: true + element_wrapper_type: '' + element_wrapper_class: '' + element_default_classes: true + empty: '' + hide_empty: false + empty_zero: false + hide_alter_empty: true + click_sort_column: value + type: timestamp + settings: + date_format: medium + custom_date_format: '' + timezone: '' + group_column: value + group_columns: { } + group_rows: true + delta_limit: 0 + delta_offset: 0 + delta_reversed: false + delta_first_last: false + multi_type: separator + separator: ', ' + field_api_classes: false + field_rendering: true + fallback_handler: search_api_date + fallback_options: + date_format: fallback + custom_date_format: '' + timezone: '' + link_to_item: false + use_highlighting: false + multi_type: separator + multi_separator: ', ' + sequence_id_1: + id: sequence_id_1 + table: search_api_index_default_solr_index + field: sequence_id_1 + relationship: none + group_type: group + admin_label: '' + plugin_id: search_api + label: 'Sequence ID' + exclude: false + alter: + alter_text: false + text: '' + make_link: false + path: '' + absolute: false + external: false + replace_spaces: false + path_case: none + trim_whitespace: false + alt: '' + rel: '' + link_class: '' + prefix: '' + suffix: '' + target: '' + nl2br: false + max_length: 0 + word_boundary: true + ellipsis: true + more_link: false + more_link_text: '' + more_link_path: '' + strip_tags: false + trim: false + preserve_tags: '' + html: false + element_type: '' + element_class: '' + element_label_type: '' + element_label_class: '' + element_label_colon: true + element_wrapper_type: '' + element_wrapper_class: '' + element_default_classes: true + empty: '' + hide_empty: false + empty_zero: false + hide_alter_empty: true + link_to_item: false + use_highlighting: false + multi_type: separator + multi_separator: ', ' + search_api_operations: + id: search_api_operations + table: search_api_index_default_solr_index + field: search_api_operations + relationship: none + group_type: group + admin_label: '' + plugin_id: search_api_entity_operations + label: Operations + exclude: false + alter: + alter_text: false + text: '' + make_link: false + path: '' + absolute: false + external: false + replace_spaces: false + path_case: none + trim_whitespace: false + alt: '' + rel: '' + link_class: '' + prefix: '' + suffix: '' + target: '' + nl2br: false + max_length: 0 + word_boundary: true + ellipsis: true + more_link: false + more_link_text: '' + more_link_path: '' + strip_tags: false + trim: false + preserve_tags: '' + html: false + element_type: '' + element_class: '' + element_label_type: '' + element_label_class: '' + element_label_colon: true + element_wrapper_type: '' + element_wrapper_class: '' + element_default_classes: true + empty: '' + hide_empty: false + empty_zero: false + hide_alter_empty: true + destination: false + pager: + type: full + options: + offset: 0 + items_per_page: 10 + total_pages: null + id: 0 + tags: + next: 'Next ›' + previous: '‹ Previous' + first: '« First' + last: 'Last »' + expose: + items_per_page: false + items_per_page_label: 'Items per page' + items_per_page_options: '5, 10, 25, 50' + items_per_page_options_all: false + items_per_page_options_all_label: '- All -' + offset: false + offset_label: Offset + quantity: 9 + exposed_form: + type: basic + options: + submit_button: Apply + reset_button: true + reset_button_label: Reset + exposed_sorts_label: 'Sort by' + expose_sort_order: true + sort_asc_label: Asc + sort_desc_label: Desc + access: + type: none + options: { } + cache: + type: search_api_tag + options: { } + empty: + messages: + id: messages + table: views + field: messages + relationship: none + group_type: group + admin_label: 'This ADO has no children.' + plugin_id: messages + empty: true + sorts: + sequence_id_1: + id: sequence_id_1 + table: search_api_index_default_solr_index + field: sequence_id_1 + relationship: none + group_type: group + admin_label: '' + plugin_id: search_api + order: ASC + expose: + label: '' + field_identifier: '' + exposed: false + changed: + id: changed + table: search_api_index_default_solr_index + field: changed + relationship: none + group_type: group + admin_label: '' + plugin_id: search_api + order: ASC + expose: + label: Changed + field_identifier: changed + exposed: false + title_string: + id: title_string + table: search_api_index_default_solr_index + field: title_string + relationship: none + group_type: group + admin_label: '' + plugin_id: search_api + order: ASC + expose: + label: Title + field_identifier: title_string + exposed: false + arguments: + nid_ref_partof: + id: nid_ref_partof + table: search_api_index_default_solr_index + field: nid_ref_partof + relationship: none + group_type: group + admin_label: '' + plugin_id: search_api + default_action: default + exception: + value: all + title_enable: false + title: All + title_enable: false + title: '' + default_argument_type: node + default_argument_options: { } + default_argument_skip_url: false + summary_options: { } + summary: + sort_order: asc + number_of_records: 0 + format: default_summary + specify_validation: false + validate: + type: none + fail: 'not found' + validate_options: { } + break_phrase: false + not: false + filters: + type: + id: type + table: search_api_index_default_solr_index + field: type + relationship: none + group_type: group + admin_label: '' + plugin_id: search_api_options + operator: or + value: + digital_object: digital_object + digital_object_collection: digital_object_collection + group: 1 + exposed: false + expose: + operator_id: '' + label: '' + description: '' + use_operator: false + operator: '' + operator_limit_selection: false + operator_list: { } + identifier: '' + required: false + remember: false + multiple: false + remember_roles: + authenticated: authenticated + reduce: false + is_grouped: false + group_info: + label: '' + description: '' + identifier: '' + optional: true + widget: select + multiple: false + remember: false + default_group: All + default_group_multiple: { } + group_items: { } + reduce_duplicates: false + style: + type: table + options: + grouping: { } + row_class: col + default_row_class: false + uses_fields: false + columns: { } + default: '' + info: { } + override: true + sticky: false + summary: '' + order: asc + empty_table: false + caption: '' + description: '' + row: + type: search_api + options: + view_modes: + 'entity:file': + file: default + 'entity:node': + article: default + digital_object: digital_object_with_thumbnail_for_grid + digital_object_collection: digital_object_with_thumbnail_for_grid + page: default + webform: default + strawberryfield_flavor_datasource: '' + query: + type: search_api_query + options: + bypass_access: false + skip_access: false + relationships: { } + use_ajax: true + header: + area: + id: area + table: views + field: area + relationship: none + group_type: group + admin_label: '' + plugin_id: text + empty: false + content: + value: '' + format: full_html + tokenize: true + footer: { } + display_extenders: { } + cache_metadata: + max-age: -1 + contexts: + - 'languages:language_content' + - 'languages:language_interface' + - url + - url.query_args + - 'user.node_grants:view' + tags: + - 'config:search_api.index.default_solr_index' + block_1: + id: block_1 + display_title: Block + display_plugin: block + position: 1 + display_options: + display_extenders: { } + block_hide_empty: true + allow: + items_per_page: true + offset: '0' + pager: '0' + hide_fields: '0' + sort_fields: '0' + disable_filters: '0' + configure_sorts: '0' + cache_metadata: + max-age: -1 + contexts: + - 'languages:language_content' + - 'languages:language_interface' + - url + - url.query_args + - 'user.node_grants:view' + tags: + - 'config:search_api.index.default_solr_index' diff --git a/js/jmespath-codemirror_strawberryfield.js b/js/jmespath-codemirror_strawberryfield.js new file mode 100644 index 00000000..3005f1ea --- /dev/null +++ b/js/jmespath-codemirror_strawberryfield.js @@ -0,0 +1,16 @@ +(function ($, Drupal) { + Drupal.AjaxCommands.prototype.strawberryfield_codemirror = function (ajax, response, status) { + if (!window.CodeMirror) { + return; + } + + $editors = $(response.selector).find('.CodeMirror'); + + if (response.hasOwnProperty('content') && + $editors.length > 0 ) { + console.log('we have content'); + $editors[0].CodeMirror.setValue(response.content); + } + }; + +})(jQuery, Drupal); diff --git a/src/Ajax/UpdateCodeMirrorCommand.php b/src/Ajax/UpdateCodeMirrorCommand.php new file mode 100644 index 00000000..fc9971f0 --- /dev/null +++ b/src/Ajax/UpdateCodeMirrorCommand.php @@ -0,0 +1,51 @@ +selector = $selector; + $this->content = $content; + + } + + /** + * Implements Drupal\Core\Ajax\CommandInterface:render(). + */ + public function render() { + + return [ + 'command' => 'strawberryfield_codemirror', + 'selector' => $this->selector, + 'content' => $this->content, + ]; + } +} diff --git a/src/Controller/StrawberryfieldAdoRenderChildrenController.php b/src/Controller/StrawberryfieldAdoRenderChildrenController.php new file mode 100644 index 00000000..176dfc5b --- /dev/null +++ b/src/Controller/StrawberryfieldAdoRenderChildrenController.php @@ -0,0 +1,37 @@ +execute(); + $rendered = $view->render(); + if(!empty($rendered['#rows'])) { + $output = \Drupal::service('renderer')->render($rendered); + $markup = ['#markup' => $output]; + array_push($return, $markup); + } + } + } + return $return; + } +} \ No newline at end of file diff --git a/src/Form/StrawberryfieldToolsForm.php b/src/Form/StrawberryfieldToolsForm.php new file mode 100644 index 00000000..b390a177 --- /dev/null +++ b/src/Form/StrawberryfieldToolsForm.php @@ -0,0 +1,124 @@ +bearsStrawberryfield($node)) { + foreach ($sbf_fields as $field_name) { + /* @var $field \Drupal\Core\Field\FieldItemInterface */ + $field = $node->get($field_name); + if (!$field->isEmpty()) { + /** @var $field \Drupal\Core\Field\FieldItemList */ + foreach ($field->getIterator() as $delta => $itemfield) { + // Note: we are not longer touching the metadata here. + /** @var $itemfield \Drupal\strawberryfield\Plugin\Field\FieldType\StrawberryFieldItem */ + $json = json_encode(json_decode($itemfield->value), JSON_PRETTY_PRINT); + $form_state->set('itemfield', $itemfield); + $form['test_jmespath'] = [ + '#type' => 'textfield', + '#default_value' => $form_state->getValue('test_jmespath'), + '#title' => $this->t('JMESPATH'), + '#description' => $this->t( + 'Evaluate a JMESPath Query against this ADO\'s JSON. See JMESPath Tutorial.', + [':href' => 'http://jmespath.org/tutorial.html'] + ), + + '#ajax' => [ + 'callback' => [$this, 'callJmesPathprocess'], + 'event' => 'change', + 'keypress' => FALSE, + 'disable-refocus' => FALSE, + 'progress' => [ + // Graphic shown to indicate ajax. Options: 'throbber' (default), 'bar'. + 'type' => 'throbber', + ], + ], + '#required' => TRUE, + '#executes_submit_callback' => TRUE, + '#submit' => ['::submitForm'] + ]; + $form['test_output'] = [ + '#type' => 'codemirror', + '#prefix' => '
', + '#suffix' => '
', + '#codemirror' => $settings, + '#default_value' => '{}', + '#rows' => 15, + '#attached' => [ + 'library' => [ + 'strawberryfield/jmespath_codemirror_strawberryfield', + ], + ], + ]; + $form['test_jmespath_input'] = [ + '#type' => 'codemirror', + '#codemirror' => $settings, + '#default_value' => $json, + '#rows' => 15, + ]; + } + } + } + } + $form['submit'] = [ + '#type' => 'submit', + '#value' => t('Submit'), + '#attributes' => ['class' => ['js-hide']], + '#submit' => [[$this,'submitForm']] + ]; + return $form; + } + + /** + * @param array $form + * @param \Drupal\Core\Form\FormStateInterface $form_state + */ + public function submitForm(array &$form, FormStateInterface $form_state) { + $form_state->setRebuild(); + } + + /** + * @param array $form + * @param \Drupal\Core\Form\FormStateInterface $form_state + * + * @return \Drupal\Core\Ajax\AjaxResponse + */ + public function callJmesPathprocess(array &$form, FormStateInterface $form_state) { + $response = new AjaxResponse(); + /** @var $itemfield \Drupal\strawberryfield\Plugin\Field\FieldType\StrawberryFieldItem */ + $itemfield = $form_state->get('itemfield'); + try { + $result = $itemfield->searchPath($form_state->getValue('test_jmespath')); + } + catch (\Exception $exception) { + $result = $exception->getMessage(); + } + + $response->addCommand(new UpdateCodeMirrorCommand('#jmespathoutput', json_encode($result,JSON_PRETTY_PRINT))); + + return $response; + } +} diff --git a/strawberryfield.install b/strawberryfield.install index 939ec380..55d3aa61 100644 --- a/strawberryfield.install +++ b/strawberryfield.install @@ -9,6 +9,10 @@ use Drupal\taxonomy\Entity\Vocabulary; use Drupal\taxonomy\Entity\Term; use Drupal\field\Entity\FieldStorageConfig; use Drupal\field\Entity\FieldConfig; +use Drupal\views\Views; +use Drupal\Core\Config\FileStorage; +use Drupal\Core\Config\InstallStorage; +use Drupal\Core\Config\StorageInterface; /** * Implements hook_install(). @@ -92,3 +96,46 @@ function strawberryfield_update_9102() { } } } + +/** + * Import views for ADO Tools children. + * + */ +function strawberryfield_update_9103() { + $view_names = ['ado_tools_children', 'ado_tools_children_creative_work_series']; + $views_set = true; + foreach ($view_names as $view_name) { + $view = Views::getView($view_name); + if(!isset($view)) { + $views_set = false; + } + } + if(!$views_set) { + strawberryfield_update_helper_install_configs(); + } +} + +/** + * Helper function to install all new configs. + * + * @param string $directory + * The configs directory. + */ +function strawberryfield_update_helper_install_configs($directory = InstallStorage::CONFIG_OPTIONAL_DIRECTORY) { + /** @var \Drupal\Core\Config\ConfigInstallerInterface $config_installer */ + $config_installer = \Drupal::service('config.installer'); + $config_installer->installDefaultConfig('module', 'strawberryfield'); + + $optional_install_path = \Drupal::moduleHandler() + ->getModule('strawberryfield') + ->getPath() . '/' . $directory; + if (is_dir($optional_install_path)) { + // Install any optional config the module provides. + $storage = new FileStorage($optional_install_path, StorageInterface::DEFAULT_COLLECTION); + $config_installer->installOptionalConfig($storage); + } + $restrict_by_dependency = [ + 'module' => 'strawberryfield', + ]; + $config_installer->installOptionalConfig(NULL, $restrict_by_dependency); +} diff --git a/strawberryfield.libraries.yml b/strawberryfield.libraries.yml index bf836683..93bee7fc 100644 --- a/strawberryfield.libraries.yml +++ b/strawberryfield.libraries.yml @@ -20,4 +20,11 @@ strawberryfield.d3viz: - core/drupalSettings - strawberryfield/d3js - strawberryfield/d3jsplus - - core/drupal.form \ No newline at end of file + - core/drupal.form +jmespath_codemirror_strawberryfield: + version: 1.0 + js: + js/jmespath-codemirror_strawberryfield.js: {minified: false} + dependencies: + - core/jquery + - core/drupal diff --git a/strawberryfield.links.task.yml b/strawberryfield.links.task.yml index 403295ec..cae5639d 100644 --- a/strawberryfield.links.task.yml +++ b/strawberryfield.links.task.yml @@ -1,11 +1,10 @@ # Add an additional tab to the node page. strawberryfield.custom_node_edit: # The ID of local task is the same as route, to make it easier to control. route_name: 'strawberryfield.custom_node_edit' - title: 'Edit' + title: 'Edit' base_route: 'entity.node.canonical' weight: 3 - strawberryfield_keynameprovider_collection: title: 'JSON Key Name Providers' route_name: entity.strawberry_keynameprovider.collection @@ -16,4 +15,20 @@ strawberryfield_keynameprovider_overview_form: route_name: 'strawberryfield.strawberryfield_keynameprovider_overview_form' title: 'JSON Key Name Providers Overview' base_route: 'entity.strawberry_keynameprovider.collection' - weight: 3 \ No newline at end of file + weight: 3 + +strawberryfield.ado_tools: + route_name: strawberryfield.ado_tools + base_route: entity.node.canonical + title: 'ADO Tools' +strawberryfield.ado_tools_jmespath: + route_name: strawberryfield.ado_tools + base_route: entity.node.canonical + title: 'JMESPATH' + parent_id: strawberryfield.ado_tools + +strawberryfield.ado_tools_children: + route_name: strawberryfield.ado_tools_children + base_route: entity.node.canonical + title: 'ADO Children' + parent_id: strawberryfield.ado_tools diff --git a/strawberryfield.routing.yml b/strawberryfield.routing.yml index b0635367..2b6c0e16 100644 --- a/strawberryfield.routing.yml +++ b/strawberryfield.routing.yml @@ -117,4 +117,29 @@ strawberryfield.strawberryfield_keynameprovider_overview_form: requirements: _permission: 'access administration pages' options: - _admin_route: TRUE \ No newline at end of file + _admin_route: TRUE + +strawberryfield.ado_tools: + path: '/node/{node}/adotools' + defaults: + _form: '\Drupal\strawberryfield\Form\StrawberryfieldToolsForm' + _title: 'ADO Tools' + requirements: + _entity_access: 'node.update' + options: + _node_operation_route: TRUE + parameters: + node: + type: 'entity:node' +strawberryfield.ado_tools_children: + path: '/node/{node}/adotools/children' + defaults: + _controller: '\Drupal\strawberryfield\Controller\StrawberryfieldAdoRenderChildrenController::renderAdoChildrenViews' + _title: 'Ado Children' + requirements: + _entity_access: 'node.update' + options: + _node_operation_route: TRUE + parameters: + node: + type: 'entity:node'