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() {
$route_name = \Drupal::routeMatch()->getRouteName();
if ($route_name == 'entity.oc_actor.canonical' && \Drupal::routeMatch()->getParameter('oc_actor')->bundle() == 'client' ) {
;
$markup = $this->actorPage();
$build = [];
$build['contextual_menu'] = [

View File

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

View File

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