This commit is contained in:
naomi 2021-02-22 11:38:45 +00:00
parent 20cc8cd753
commit 74fac415c8
3 changed files with 80 additions and 187 deletions

View File

@ -24,7 +24,6 @@ class ContextualMenu extends BlockBase {
public function build() { public function build() {
$route_name = \Drupal::routeMatch()->getRouteName(); $route_name = \Drupal::routeMatch()->getRouteName();
if ($route_name == 'entity.oc_actor.canonical' && \Drupal::routeMatch()->getParameter('oc_actor')->bundle() == 'client' ) { if ($route_name == 'entity.oc_actor.canonical' && \Drupal::routeMatch()->getParameter('oc_actor')->bundle() == 'client' ) {
;
$markup = $this->actorPage(); $markup = $this->actorPage();
$build = []; $build = [];
$build['contextual_menu'] = [ $build['contextual_menu'] = [

View File

@ -1,11 +1,11 @@
langcode: en langcode: en
status: true status: true
dependencies: dependencies:
module:
- opencase_entities
- search_api
config: config:
- search_api.server.opencase_server - search_api.server.opencase_server
module:
- search_api
- opencase_entities
id: opencase_actors id: opencase_actors
name: 'OpenCase Search: Actors' name: 'OpenCase Search: Actors'
description: '' description: ''
@ -16,11 +16,33 @@ field_settings:
datasource_id: 'entity:oc_actor' datasource_id: 'entity:oc_actor'
property_path: first_name property_path: first_name
type: text type: text
dependencies:
module:
- opencase_entities
full_name:
label: Name
datasource_id: 'entity:oc_actor'
property_path: full_name
type: text
dependencies:
module:
- opencase_entities
last_name: last_name:
label: 'Last Name' label: 'Last Name'
datasource_id: 'entity:oc_actor' datasource_id: 'entity:oc_actor'
property_path: last_name property_path: last_name
type: text type: text
dependencies:
module:
- opencase_entities
name:
label: Name
datasource_id: 'entity:oc_organisation'
property_path: name
type: text
dependencies:
module:
- opencase_entities
datasource_settings: datasource_settings:
'entity:oc_actor': 'entity:oc_actor':
bundles: bundles:
@ -29,6 +51,13 @@ datasource_settings:
languages: languages:
default: true default: true
selected: { } selected: { }
'entity:oc_organisation':
bundles:
default: true
selected: { }
languages:
default: true
selected: { }
processor_settings: processor_settings:
add_url: { } add_url: { }
aggregated_field: { } aggregated_field: { }
@ -36,10 +65,13 @@ processor_settings:
all_fields: true all_fields: true
fields: fields:
- first_name - first_name
- full_name
- last_name - last_name
- name
weights: weights:
preprocess_index: -20 preprocess_index: -20
preprocess_query: -20 preprocess_query: -20
language_with_fallback: { }
rendered_item: { } rendered_item: { }
tracker_settings: tracker_settings:
default: default:

View File

@ -14,7 +14,6 @@ description: ''
tag: '' tag: ''
base_table: search_api_index_opencase_actors base_table: search_api_index_opencase_actors
base_field: search_api_id base_field: search_api_id
core: 8.x
display: display:
default: default:
display_plugin: default display_plugin: default
@ -77,17 +76,13 @@ display:
description: '' description: ''
columns: columns:
name: name name: name
created: created
type: type type: type
id: id type_1: type_1
nothing: nothing name_1: name_1
info: info:
name: name:
align: '' sortable: false
separator: '' default_sort_order: asc
empty_column: false
responsive: ''
created:
align: '' align: ''
separator: '' separator: ''
empty_column: false empty_column: false
@ -97,14 +92,12 @@ display:
separator: '' separator: ''
empty_column: false empty_column: false
responsive: '' responsive: ''
id: type_1:
align: '' align: ''
separator: '' separator: ''
empty_column: false empty_column: false
responsive: '' responsive: ''
nothing: name_1:
sortable: false
default_sort_order: asc
align: '' align: ''
separator: '' separator: ''
empty_column: false empty_column: false
@ -114,15 +107,15 @@ display:
row: row:
type: fields type: fields
fields: fields:
first_name: name:
id: first_name id: name
table: search_api_datasource_opencase_actors_entity_oc_actor table: search_api_index_opencase_actors
field: first_name field: name
relationship: none relationship: none
group_type: group group_type: group
admin_label: '' admin_label: ''
label: 'First Name' label: 'Organisation name '
exclude: false exclude: true
alter: alter:
alter_text: false alter_text: false
text: '' text: ''
@ -165,7 +158,7 @@ display:
click_sort_column: value click_sort_column: value
type: string type: string
settings: settings:
link_to_entity: false link_to_entity: true
group_column: value group_column: value
group_columns: { } group_columns: { }
group_rows: true group_rows: true
@ -183,20 +176,19 @@ display:
use_highlighting: false use_highlighting: false
multi_type: separator multi_type: separator
multi_separator: ', ' multi_separator: ', '
entity_type: oc_actor
plugin_id: search_api_field plugin_id: search_api_field
last_name: name_1:
id: last_name id: name_1
table: search_api_datasource_opencase_actors_entity_oc_actor table: search_api_datasource_opencase_actors_entity_oc_actor
field: last_name field: name
relationship: none relationship: none
group_type: group group_type: group
admin_label: '' admin_label: ''
label: 'Last Name' label: Name
exclude: false exclude: false
alter: alter:
alter_text: false alter_text: false
text: '' text: '{{ name_1 }}'
make_link: false make_link: false
path: '' path: ''
absolute: false absolute: false
@ -229,14 +221,14 @@ display:
element_wrapper_type: '' element_wrapper_type: ''
element_wrapper_class: '' element_wrapper_class: ''
element_default_classes: true element_default_classes: true
empty: '' empty: '{{ name }}'
hide_empty: false hide_empty: false
empty_zero: false empty_zero: false
hide_alter_empty: true hide_alter_empty: true
click_sort_column: value click_sort_column: value
type: string type: string
settings: settings:
link_to_entity: false link_to_entity: true
group_column: value group_column: value
group_columns: { } group_columns: { }
group_rows: true group_rows: true
@ -263,8 +255,8 @@ display:
relationship: none relationship: none
group_type: group group_type: group
admin_label: '' admin_label: ''
label: Type label: 'Person type'
exclude: false exclude: true
alter: alter:
alter_text: false alter_text: false
text: '' text: ''
@ -330,94 +322,18 @@ display:
display_method: label display_method: label
entity_type: oc_actor entity_type: oc_actor
plugin_id: search_api_field plugin_id: search_api_field
created: type_1:
id: created id: type_1
table: search_api_datasource_opencase_actors_entity_oc_actor table: search_api_datasource_opencase_actors_entity_oc_organisation
field: created field: type
relationship: none relationship: none
group_type: group group_type: group
admin_label: '' admin_label: ''
label: 'Record created on' label: Type
exclude: false exclude: false
alter: alter:
alter_text: false alter_text: true
text: '' text: '{{ type }}{{ type_1 }}'
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: false
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: short
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: ', '
entity_type: oc_actor
plugin_id: search_api_field
id:
id: id
table: search_api_datasource_opencase_actors_entity_oc_actor
field: id
relationship: none
group_type: group
admin_label: ''
label: ID
exclude: true
alter:
alter_text: false
text: ''
make_link: false make_link: false
path: '' path: ''
absolute: false absolute: false
@ -450,16 +366,15 @@ display:
element_wrapper_type: '' element_wrapper_type: ''
element_wrapper_class: '' element_wrapper_class: ''
element_default_classes: true element_default_classes: true
empty: '' empty: '{{ type }}{{ type_1 }}'
hide_empty: false hide_empty: false
empty_zero: false empty_zero: false
hide_alter_empty: true hide_alter_empty: true
click_sort_column: value click_sort_column: target_id
type: number_integer type: entity_reference_label
settings: settings:
thousand_separator: '' link: false
prefix_suffix: true group_column: target_id
group_column: value
group_columns: { } group_columns: { }
group_rows: true group_rows: true
delta_limit: 0 delta_limit: 0
@ -470,74 +385,17 @@ display:
separator: ', ' separator: ', '
field_api_classes: false field_api_classes: false
field_rendering: true field_rendering: true
fallback_handler: search_api_numeric fallback_handler: search_api_entity
fallback_options: fallback_options:
set_precision: false
precision: 0
decimal: .
separator: ','
format_plural: false
format_plural_string: !!binary MQNAY291bnQ=
prefix: ''
suffix: ''
link_to_item: false link_to_item: false
use_highlighting: false use_highlighting: false
multi_type: separator multi_type: separator
multi_separator: ', ' multi_separator: ', '
format_plural_values: display_methods:
- '1' oc_organisation_type:
- '@count' display_method: label
entity_type: oc_actor entity_type: oc_organisation
plugin_id: search_api_field plugin_id: search_api_field
nothing:
id: nothing
table: views
field: nothing
relationship: none
group_type: group
admin_label: ''
label: 'Go to'
exclude: false
alter:
alter_text: true
text: "&bull;&nbsp;<a href='/opencase/oc_actor/{{ id }}/'>Details</a>&nbsp;&nbsp;&nbsp;&bull;&nbsp;<a href='/opencase/oc_actor/{{ id}}/case_list'>Cases</a>\n"
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: false
element_wrapper_type: ''
element_wrapper_class: ''
element_default_classes: true
empty: ''
hide_empty: false
empty_zero: false
hide_alter_empty: false
plugin_id: custom
filters: filters:
search_api_fulltext: search_api_fulltext:
id: search_api_fulltext id: search_api_fulltext
@ -566,6 +424,8 @@ display:
administrator: '0' administrator: '0'
standard_user: '0' standard_user: '0'
placeholder: '' placeholder: ''
operator_limit_selection: false
operator_list: { }
is_grouped: false is_grouped: false
group_info: group_info:
label: '' label: ''
@ -611,7 +471,8 @@ display:
- url - url
- url.query_args - url.query_args
- user.roles - user.roles
tags: { } tags:
- 'config:search_api.index.opencase_actors'
page_1: page_1:
display_plugin: page display_plugin: page
id: page_1 id: page_1
@ -629,4 +490,5 @@ display:
- url - url
- url.query_args - url.query_args
- user.roles - user.roles
tags: { } tags:
- 'config:search_api.index.opencase_actors'