Hide more fields in map popups: group, id_tag, parent, season, status.
This commit is contained in:
parent
a7c5085876
commit
a7f2ea885f
|
@ -5,7 +5,6 @@ dependencies:
|
|||
- asset.type.animal
|
||||
- core.entity_view_mode.asset.map_popup
|
||||
module:
|
||||
- farm_id_tag
|
||||
- options
|
||||
- text
|
||||
id: asset.animal.map_popup
|
||||
|
@ -16,7 +15,7 @@ content:
|
|||
animal_type:
|
||||
label: inline
|
||||
type: entity_reference_label
|
||||
weight: 3
|
||||
weight: 1
|
||||
settings:
|
||||
link: false
|
||||
region: content
|
||||
|
@ -24,30 +23,15 @@ content:
|
|||
flag:
|
||||
label: inline
|
||||
type: list_default
|
||||
weight: 1
|
||||
region: content
|
||||
settings: { }
|
||||
third_party_settings: { }
|
||||
group:
|
||||
label: inline
|
||||
type: entity_reference_label
|
||||
weight: 6
|
||||
settings:
|
||||
link: true
|
||||
region: content
|
||||
third_party_settings: { }
|
||||
id_tag:
|
||||
label: inline
|
||||
type: id_tag
|
||||
weight: 5
|
||||
weight: 0
|
||||
region: content
|
||||
settings: { }
|
||||
third_party_settings: { }
|
||||
location:
|
||||
type: entity_reference_label
|
||||
weight: 7
|
||||
weight: 3
|
||||
region: content
|
||||
label: above
|
||||
label: inline
|
||||
settings:
|
||||
link: true
|
||||
third_party_settings: { }
|
||||
|
@ -58,31 +42,19 @@ content:
|
|||
region: content
|
||||
settings: { }
|
||||
third_party_settings: { }
|
||||
parent:
|
||||
label: inline
|
||||
type: entity_reference_label
|
||||
weight: 4
|
||||
settings:
|
||||
link: true
|
||||
region: content
|
||||
third_party_settings: { }
|
||||
status:
|
||||
label: inline
|
||||
type: list_default
|
||||
weight: 0
|
||||
region: content
|
||||
settings: { }
|
||||
third_party_settings: { }
|
||||
hidden:
|
||||
birthdate: true
|
||||
data: true
|
||||
file: true
|
||||
geometry: true
|
||||
id_tag: true
|
||||
image: true
|
||||
intrinsic_geometry: true
|
||||
is_castrated: true
|
||||
is_fixed: true
|
||||
is_location: true
|
||||
nickname: true
|
||||
parent: true
|
||||
sex: true
|
||||
status: true
|
||||
uid: true
|
||||
|
|
|
@ -5,7 +5,6 @@ dependencies:
|
|||
- asset.type.equipment
|
||||
- core.entity_view_mode.asset.map_popup
|
||||
module:
|
||||
- farm_id_tag
|
||||
- options
|
||||
- text
|
||||
id: asset.equipment.map_popup
|
||||
|
@ -16,28 +15,13 @@ content:
|
|||
flag:
|
||||
label: inline
|
||||
type: list_default
|
||||
weight: 1
|
||||
region: content
|
||||
settings: { }
|
||||
third_party_settings: { }
|
||||
group:
|
||||
label: inline
|
||||
type: entity_reference_label
|
||||
weight: 8
|
||||
settings:
|
||||
link: true
|
||||
region: content
|
||||
third_party_settings: { }
|
||||
id_tag:
|
||||
label: inline
|
||||
type: id_tag
|
||||
weight: 7
|
||||
weight: 0
|
||||
region: content
|
||||
settings: { }
|
||||
third_party_settings: { }
|
||||
location:
|
||||
type: entity_reference_label
|
||||
weight: 9
|
||||
weight: 5
|
||||
region: content
|
||||
label: inline
|
||||
settings:
|
||||
|
@ -46,7 +30,7 @@ content:
|
|||
manufacturer:
|
||||
label: inline
|
||||
type: string
|
||||
weight: 2
|
||||
weight: 1
|
||||
region: content
|
||||
settings:
|
||||
link_to_entity: false
|
||||
|
@ -54,7 +38,7 @@ content:
|
|||
model:
|
||||
label: inline
|
||||
type: string
|
||||
weight: 3
|
||||
weight: 2
|
||||
region: content
|
||||
settings:
|
||||
link_to_entity: false
|
||||
|
@ -62,39 +46,27 @@ content:
|
|||
notes:
|
||||
label: inline
|
||||
type: text_default
|
||||
weight: 5
|
||||
weight: 4
|
||||
region: content
|
||||
settings: { }
|
||||
third_party_settings: { }
|
||||
parent:
|
||||
label: inline
|
||||
type: entity_reference_label
|
||||
weight: 6
|
||||
settings:
|
||||
link: true
|
||||
region: content
|
||||
third_party_settings: { }
|
||||
serial_number:
|
||||
label: inline
|
||||
type: string
|
||||
weight: 4
|
||||
weight: 3
|
||||
region: content
|
||||
settings:
|
||||
link_to_entity: false
|
||||
third_party_settings: { }
|
||||
status:
|
||||
label: inline
|
||||
type: list_default
|
||||
weight: 0
|
||||
region: content
|
||||
settings: { }
|
||||
third_party_settings: { }
|
||||
hidden:
|
||||
data: true
|
||||
file: true
|
||||
geometry: true
|
||||
id_tag: true
|
||||
image: true
|
||||
intrinsic_geometry: true
|
||||
is_fixed: true
|
||||
is_location: true
|
||||
parent: true
|
||||
status: true
|
||||
uid: true
|
||||
|
|
|
@ -15,52 +15,29 @@ content:
|
|||
flag:
|
||||
label: inline
|
||||
type: list_default
|
||||
weight: 1
|
||||
weight: 0
|
||||
region: content
|
||||
settings: { }
|
||||
third_party_settings: { }
|
||||
group:
|
||||
label: inline
|
||||
type: entity_reference_label
|
||||
weight: 5
|
||||
settings:
|
||||
link: true
|
||||
region: content
|
||||
third_party_settings: { }
|
||||
land_type:
|
||||
label: inline
|
||||
type: list_default
|
||||
weight: 2
|
||||
weight: 1
|
||||
region: content
|
||||
settings: { }
|
||||
third_party_settings: { }
|
||||
location:
|
||||
type: entity_reference_label
|
||||
weight: 6
|
||||
weight: 3
|
||||
region: content
|
||||
label: above
|
||||
label: inline
|
||||
settings:
|
||||
link: true
|
||||
third_party_settings: { }
|
||||
notes:
|
||||
label: inline
|
||||
type: text_default
|
||||
weight: 3
|
||||
region: content
|
||||
settings: { }
|
||||
third_party_settings: { }
|
||||
parent:
|
||||
label: inline
|
||||
type: entity_reference_label
|
||||
weight: 4
|
||||
settings:
|
||||
link: true
|
||||
region: content
|
||||
third_party_settings: { }
|
||||
status:
|
||||
label: inline
|
||||
type: list_default
|
||||
weight: 0
|
||||
weight: 2
|
||||
region: content
|
||||
settings: { }
|
||||
third_party_settings: { }
|
||||
|
@ -73,4 +50,6 @@ hidden:
|
|||
intrinsic_geometry: true
|
||||
is_fixed: true
|
||||
is_location: true
|
||||
parent: true
|
||||
status: true
|
||||
uid: true
|
||||
|
|
|
@ -5,7 +5,6 @@ dependencies:
|
|||
- asset.type.plant
|
||||
- core.entity_view_mode.asset.map_popup
|
||||
module:
|
||||
- farm_id_tag
|
||||
- options
|
||||
- text
|
||||
id: asset.plant.map_popup
|
||||
|
@ -16,77 +15,43 @@ content:
|
|||
flag:
|
||||
label: inline
|
||||
type: list_default
|
||||
weight: 2
|
||||
region: content
|
||||
settings: { }
|
||||
third_party_settings: { }
|
||||
group:
|
||||
label: inline
|
||||
type: entity_reference_label
|
||||
weight: 7
|
||||
settings:
|
||||
link: true
|
||||
region: content
|
||||
third_party_settings: { }
|
||||
id_tag:
|
||||
label: inline
|
||||
type: id_tag
|
||||
weight: 6
|
||||
weight: 0
|
||||
region: content
|
||||
settings: { }
|
||||
third_party_settings: { }
|
||||
location:
|
||||
type: entity_reference_label
|
||||
weight: 8
|
||||
weight: 3
|
||||
region: content
|
||||
label: above
|
||||
label: inline
|
||||
settings:
|
||||
link: true
|
||||
third_party_settings: { }
|
||||
notes:
|
||||
label: inline
|
||||
type: text_default
|
||||
weight: 4
|
||||
weight: 2
|
||||
region: content
|
||||
settings: { }
|
||||
third_party_settings: { }
|
||||
parent:
|
||||
label: inline
|
||||
type: entity_reference_label
|
||||
weight: 5
|
||||
settings:
|
||||
link: true
|
||||
region: content
|
||||
third_party_settings: { }
|
||||
plant_type:
|
||||
label: inline
|
||||
type: entity_reference_label
|
||||
weight: 0
|
||||
settings:
|
||||
link: false
|
||||
region: content
|
||||
third_party_settings: { }
|
||||
season:
|
||||
label: inline
|
||||
type: entity_reference_label
|
||||
weight: 3
|
||||
settings:
|
||||
link: false
|
||||
region: content
|
||||
third_party_settings: { }
|
||||
status:
|
||||
label: inline
|
||||
type: list_default
|
||||
weight: 1
|
||||
settings:
|
||||
link: false
|
||||
region: content
|
||||
settings: { }
|
||||
third_party_settings: { }
|
||||
hidden:
|
||||
data: true
|
||||
file: true
|
||||
geometry: true
|
||||
id_tag: true
|
||||
image: true
|
||||
intrinsic_geometry: true
|
||||
is_fixed: true
|
||||
is_location: true
|
||||
parent: true
|
||||
season: true
|
||||
status: true
|
||||
uid: true
|
||||
|
|
|
@ -5,7 +5,6 @@ dependencies:
|
|||
- asset.type.structure
|
||||
- core.entity_view_mode.asset.map_popup
|
||||
module:
|
||||
- farm_id_tag
|
||||
- options
|
||||
- text
|
||||
id: asset.structure.map_popup
|
||||
|
@ -16,59 +15,29 @@ content:
|
|||
flag:
|
||||
label: inline
|
||||
type: list_default
|
||||
weight: 1
|
||||
region: content
|
||||
settings: { }
|
||||
third_party_settings: { }
|
||||
group:
|
||||
label: inline
|
||||
type: entity_reference_label
|
||||
weight: 6
|
||||
settings:
|
||||
link: true
|
||||
region: content
|
||||
third_party_settings: { }
|
||||
id_tag:
|
||||
label: inline
|
||||
type: id_tag
|
||||
weight: 5
|
||||
weight: 0
|
||||
region: content
|
||||
settings: { }
|
||||
third_party_settings: { }
|
||||
location:
|
||||
type: entity_reference_label
|
||||
weight: 7
|
||||
weight: 3
|
||||
region: content
|
||||
label: above
|
||||
label: inline
|
||||
settings:
|
||||
link: true
|
||||
third_party_settings: { }
|
||||
notes:
|
||||
label: inline
|
||||
type: text_default
|
||||
weight: 3
|
||||
region: content
|
||||
settings: { }
|
||||
third_party_settings: { }
|
||||
parent:
|
||||
label: inline
|
||||
type: entity_reference_label
|
||||
weight: 4
|
||||
settings:
|
||||
link: true
|
||||
region: content
|
||||
third_party_settings: { }
|
||||
status:
|
||||
label: inline
|
||||
type: list_default
|
||||
weight: 0
|
||||
weight: 2
|
||||
region: content
|
||||
settings: { }
|
||||
third_party_settings: { }
|
||||
structure_type:
|
||||
label: inline
|
||||
type: list_default
|
||||
weight: 2
|
||||
weight: 1
|
||||
region: content
|
||||
settings: { }
|
||||
third_party_settings: { }
|
||||
|
@ -76,8 +45,11 @@ hidden:
|
|||
data: true
|
||||
file: true
|
||||
geometry: true
|
||||
id_tag: true
|
||||
image: true
|
||||
intrinsic_geometry: true
|
||||
is_fixed: true
|
||||
is_location: true
|
||||
parent: true
|
||||
status: true
|
||||
uid: true
|
||||
|
|
|
@ -60,7 +60,7 @@ function farm_ui_map_asset_view(array &$build, EntityInterface $entity, EntityVi
|
|||
// The default view mode is used if a map_popup view mode is not provided.
|
||||
// Alter the default view mode to only include common fields.
|
||||
if ($display->getMode() === 'default') {
|
||||
$common_fields = ['flag', 'group', 'id_tag', 'location', 'notes', 'parent', 'status'];
|
||||
$common_fields = ['flag', 'notes', 'location'];
|
||||
$build = array_filter($build, function ($key) use ($common_fields) {
|
||||
return strpos($key, '#') === 0 || in_array($key, $common_fields);
|
||||
}, ARRAY_FILTER_USE_KEY);
|
||||
|
|
Loading…
Reference in New Issue