3
0
Fork 0
mirror of https://github.com/farmOS/farmOS.git synced 2024-02-23 11:37:38 +01:00

Add bulk delete operation to asset, log, and area Views.

This commit is contained in:
Michael Stenta 2017-07-11 08:13:24 -04:00
parent a75e53a5c4
commit 6a0a5bc2ab
16 changed files with 255 additions and 0 deletions

View file

@ -37,6 +37,7 @@ function farm_area_views_default_views() {
$handler->display->display_options['style_options']['parent_field'] = 'tid_1';
$handler->display->display_options['row_plugin'] = 'fields';
$handler->display->display_options['row_options']['inline'] = array(
'views_bulk_operations' => 'views_bulk_operations',
'name' => 'name',
'field_farm_area_type' => 'field_farm_area_type',
);
@ -70,6 +71,31 @@ function farm_area_views_default_views() {
$handler->display->display_options['fields']['tid_1']['exclude'] = TRUE;
$handler->display->display_options['fields']['tid_1']['element_label_colon'] = FALSE;
$handler->display->display_options['fields']['tid_1']['separator'] = '';
/* Field: Bulk operations: Taxonomy term */
$handler->display->display_options['fields']['views_bulk_operations']['id'] = 'views_bulk_operations';
$handler->display->display_options['fields']['views_bulk_operations']['table'] = 'views_entity_taxonomy_term';
$handler->display->display_options['fields']['views_bulk_operations']['field'] = 'views_bulk_operations';
$handler->display->display_options['fields']['views_bulk_operations']['label'] = '';
$handler->display->display_options['fields']['views_bulk_operations']['element_label_colon'] = FALSE;
$handler->display->display_options['fields']['views_bulk_operations']['vbo_settings']['display_type'] = '1';
$handler->display->display_options['fields']['views_bulk_operations']['vbo_settings']['enable_select_all_pages'] = 0;
$handler->display->display_options['fields']['views_bulk_operations']['vbo_settings']['row_clickable'] = 1;
$handler->display->display_options['fields']['views_bulk_operations']['vbo_settings']['force_single'] = 0;
$handler->display->display_options['fields']['views_bulk_operations']['vbo_settings']['entity_load_capacity'] = '10';
$handler->display->display_options['fields']['views_bulk_operations']['vbo_settings']['skip_batching'] = 1;
$handler->display->display_options['fields']['views_bulk_operations']['vbo_operations'] = array(
'action::views_bulk_operations_delete_item' => array(
'selected' => 1,
'postpone_processing' => 0,
'skip_confirmation' => 0,
'skip_permission_check' => 0,
'override_label' => 1,
'label' => 'Delete',
'settings' => array(
'log' => 0,
),
),
);
/* Field: Taxonomy term: Name */
$handler->display->display_options['fields']['name']['id'] = 'name';
$handler->display->display_options['fields']['name']['table'] = 'taxonomy_term_data';
@ -130,6 +156,8 @@ function farm_area_views_default_views() {
t('Parent'),
t('Term ID'),
t('.'),
t('- Choose an operation -'),
t('Delete'),
t('([field_farm_area_type])'),
t('Page'),
);

View file

@ -95,6 +95,17 @@ function farm_asset_views_default_views() {
$handler->display->display_options['fields']['views_bulk_operations']['vbo_settings']['entity_load_capacity'] = '10';
$handler->display->display_options['fields']['views_bulk_operations']['vbo_settings']['skip_batching'] = 1;
$handler->display->display_options['fields']['views_bulk_operations']['vbo_operations'] = array(
'action::views_bulk_operations_delete_item' => array(
'selected' => 1,
'postpone_processing' => 0,
'skip_confirmation' => 0,
'skip_permission_check' => 0,
'override_label' => 1,
'label' => 'Delete',
'settings' => array(
'log' => 0,
),
),
'action::farm_group_asset_membership_action' => array(
'selected' => 1,
'skip_confirmation' => 1,

View file

@ -354,6 +354,17 @@ function farm_crop_views_default_views() {
'override_label' => 0,
'label' => '',
),
'action::views_bulk_operations_delete_item' => array(
'selected' => 1,
'postpone_processing' => 0,
'skip_confirmation' => 0,
'skip_permission_check' => 0,
'override_label' => 1,
'label' => 'Delete',
'settings' => array(
'log' => 0,
),
),
'action::log_done_action' => array(
'selected' => 1,
'postpone_processing' => 0,
@ -624,6 +635,7 @@ function farm_crop_views_default_views() {
t('field collection item from field_farm_movement'),
t('Log'),
t('- Choose an operation -'),
t('Delete'),
t('Done'),
t('Not Done'),
t('✔'),
@ -813,6 +825,17 @@ function farm_crop_views_default_views() {
'override_label' => 0,
'label' => '',
),
'action::views_bulk_operations_delete_item' => array(
'selected' => 1,
'postpone_processing' => 0,
'skip_confirmation' => 0,
'skip_permission_check' => 0,
'override_label' => 1,
'label' => 'Delete',
'settings' => array(
'log' => 0,
),
),
'action::log_done_action' => array(
'selected' => 1,
'postpone_processing' => 0,
@ -1083,6 +1106,7 @@ function farm_crop_views_default_views() {
t('field collection item from field_farm_movement'),
t('Log'),
t('- Choose an operation -'),
t('Delete'),
t('Done'),
t('Not Done'),
t('✔'),
@ -1232,6 +1256,17 @@ function farm_crop_views_default_views() {
$handler->display->display_options['fields']['views_bulk_operations']['vbo_settings']['force_single'] = 0;
$handler->display->display_options['fields']['views_bulk_operations']['vbo_settings']['entity_load_capacity'] = '10';
$handler->display->display_options['fields']['views_bulk_operations']['vbo_operations'] = array(
'action::views_bulk_operations_delete_item' => array(
'selected' => 1,
'postpone_processing' => 0,
'skip_confirmation' => 0,
'skip_permission_check' => 0,
'override_label' => 1,
'label' => 'Delete',
'settings' => array(
'log' => 0,
),
),
'action::farm_group_asset_membership_action' => array(
'selected' => 1,
'skip_confirmation' => 1,
@ -1482,6 +1517,7 @@ function farm_crop_views_default_views() {
t('Group membership'),
t('Farm asset'),
t('- Choose an operation -'),
t('Delete'),
t('Asset ID'),
t('.'),
t('Name'),

View file

@ -146,6 +146,17 @@ function farm_equipment_views_default_views() {
$handler->display->display_options['fields']['views_bulk_operations']['vbo_settings']['force_single'] = 0;
$handler->display->display_options['fields']['views_bulk_operations']['vbo_settings']['entity_load_capacity'] = '10';
$handler->display->display_options['fields']['views_bulk_operations']['vbo_operations'] = array(
'action::views_bulk_operations_delete_item' => array(
'selected' => 1,
'postpone_processing' => 0,
'skip_confirmation' => 0,
'skip_permission_check' => 0,
'override_label' => 1,
'label' => 'Delete',
'settings' => array(
'log' => 0,
),
),
'action::farm_group_asset_membership_action' => array(
'selected' => 1,
'skip_confirmation' => 1,
@ -349,6 +360,7 @@ function farm_equipment_views_default_views() {
t('Group membership'),
t('Farm asset'),
t('- Choose an operation -'),
t('Delete'),
t('Asset ID'),
t('.'),
t('Name'),
@ -500,6 +512,17 @@ function farm_equipment_views_default_views() {
'override_label' => 0,
'label' => '',
),
'action::views_bulk_operations_delete_item' => array(
'selected' => 1,
'postpone_processing' => 0,
'skip_confirmation' => 0,
'skip_permission_check' => 0,
'override_label' => 1,
'label' => 'Delete',
'settings' => array(
'log' => 0,
),
),
'action::log_done_action' => array(
'selected' => 1,
'postpone_processing' => 0,
@ -741,6 +764,7 @@ function farm_equipment_views_default_views() {
t('Owner'),
t('Log'),
t('- Choose an operation -'),
t('Delete'),
t('Done'),
t('Not Done'),
t('✔'),

View file

@ -315,6 +315,17 @@ function farm_livestock_views_default_views() {
$handler->display->display_options['fields']['views_bulk_operations']['vbo_settings']['force_single'] = 0;
$handler->display->display_options['fields']['views_bulk_operations']['vbo_settings']['entity_load_capacity'] = '10';
$handler->display->display_options['fields']['views_bulk_operations']['vbo_operations'] = array(
'action::views_bulk_operations_delete_item' => array(
'selected' => 1,
'postpone_processing' => 0,
'skip_confirmation' => 0,
'skip_permission_check' => 0,
'override_label' => 1,
'label' => 'Delete',
'settings' => array(
'log' => 0,
),
),
'action::farm_group_asset_membership_action' => array(
'selected' => 1,
'skip_confirmation' => 1,
@ -636,6 +647,7 @@ function farm_livestock_views_default_views() {
t('field collection item from field_farm_animal_tag'),
t('Farm asset'),
t('- Choose an operation -'),
t('Delete'),
t('Asset ID'),
t('.'),
t('Name'),
@ -798,6 +810,17 @@ function farm_livestock_views_default_views() {
'override_label' => 0,
'label' => '',
),
'action::views_bulk_operations_delete_item' => array(
'selected' => 1,
'postpone_processing' => 0,
'skip_confirmation' => 0,
'skip_permission_check' => 0,
'override_label' => 1,
'label' => 'Delete',
'settings' => array(
'log' => 0,
),
),
'action::log_done_action' => array(
'selected' => 1,
'postpone_processing' => 0,
@ -1039,6 +1062,7 @@ function farm_livestock_views_default_views() {
t('Owner'),
t('Log'),
t('- Choose an operation -'),
t('Delete'),
t('Done'),
t('Not Done'),
t('✔'),

View file

@ -375,6 +375,17 @@ function farm_log_views_default_views() {
'override_label' => 0,
'label' => '',
),
'action::views_bulk_operations_delete_item' => array(
'selected' => 1,
'postpone_processing' => 0,
'skip_confirmation' => 0,
'skip_permission_check' => 0,
'override_label' => 1,
'label' => 'Delete',
'settings' => array(
'log' => 0,
),
),
'action::log_done_action' => array(
'selected' => 1,
'postpone_processing' => 0,
@ -1184,6 +1195,7 @@ function farm_log_views_default_views() {
t('Owner'),
t('Log'),
t('- Choose an operation -'),
t('Delete'),
t('Done'),
t('Not Done'),
t('✔'),

View file

@ -150,6 +150,17 @@ function farm_log_activity_views_default_views() {
'override_label' => 0,
'label' => '',
),
'action::views_bulk_operations_delete_item' => array(
'selected' => 1,
'postpone_processing' => 0,
'skip_confirmation' => 0,
'skip_permission_check' => 0,
'override_label' => 1,
'label' => 'Delete',
'settings' => array(
'log' => 0,
),
),
'action::log_done_action' => array(
'selected' => 1,
'postpone_processing' => 0,
@ -420,6 +431,7 @@ function farm_log_activity_views_default_views() {
t('Owner'),
t('Log'),
t('- Choose an operation -'),
t('Delete'),
t('Done'),
t('Not Done'),
t('✔'),

View file

@ -179,6 +179,17 @@ function farm_log_harvest_views_default_views() {
'override_label' => 0,
'label' => '',
),
'action::views_bulk_operations_delete_item' => array(
'selected' => 1,
'postpone_processing' => 0,
'skip_confirmation' => 0,
'skip_permission_check' => 0,
'override_label' => 1,
'label' => 'Delete',
'settings' => array(
'log' => 0,
),
),
'action::log_done_action' => array(
'selected' => 1,
'postpone_processing' => 0,
@ -458,6 +469,7 @@ function farm_log_harvest_views_default_views() {
t('field collection item from field_farm_quantity'),
t('Log'),
t('- Choose an operation -'),
t('Delete'),
t('Done'),
t('Not Done'),
t('✔'),

View file

@ -171,6 +171,17 @@ function farm_log_input_views_default_views() {
'override_label' => 0,
'label' => '',
),
'action::views_bulk_operations_delete_item' => array(
'selected' => 1,
'postpone_processing' => 0,
'skip_confirmation' => 0,
'skip_permission_check' => 0,
'override_label' => 1,
'label' => 'Delete',
'settings' => array(
'log' => 0,
),
),
'action::log_done_action' => array(
'selected' => 1,
'postpone_processing' => 0,
@ -450,6 +461,7 @@ function farm_log_input_views_default_views() {
t('field collection item from field_farm_quantity'),
t('Log'),
t('- Choose an operation -'),
t('Delete'),
t('Done'),
t('Not Done'),
t('✔'),

View file

@ -177,6 +177,17 @@ function farm_log_observation_views_default_views() {
'override_label' => 0,
'label' => '',
),
'action::views_bulk_operations_delete_item' => array(
'selected' => 1,
'postpone_processing' => 0,
'skip_confirmation' => 0,
'skip_permission_check' => 0,
'override_label' => 1,
'label' => 'Delete',
'settings' => array(
'log' => 0,
),
),
'action::log_done_action' => array(
'selected' => 1,
'postpone_processing' => 0,
@ -467,6 +478,7 @@ function farm_log_observation_views_default_views() {
t('field collection item from field_farm_quantity'),
t('Log'),
t('- Choose an operation -'),
t('Delete'),
t('Done'),
t('Not Done'),
t('✔'),

View file

@ -194,6 +194,17 @@ function farm_log_sale_views_default_views() {
'override_label' => 0,
'label' => '',
),
'action::views_bulk_operations_delete_item' => array(
'selected' => 1,
'postpone_processing' => 0,
'skip_confirmation' => 0,
'skip_permission_check' => 0,
'override_label' => 1,
'label' => 'Delete',
'settings' => array(
'log' => 0,
),
),
'action::log_done_action' => array(
'selected' => 1,
'postpone_processing' => 0,
@ -454,6 +465,7 @@ function farm_log_sale_views_default_views() {
t('No sales found.'),
t('Log'),
t('- Choose an operation -'),
t('Delete'),
t('Done'),
t('Not Done'),
t('✔'),

View file

@ -530,6 +530,17 @@ function farm_movement_views_default_views() {
'override_label' => 0,
'label' => '',
),
'action::views_bulk_operations_delete_item' => array(
'selected' => 1,
'postpone_processing' => 0,
'skip_confirmation' => 0,
'skip_permission_check' => 0,
'override_label' => 1,
'label' => 'Delete',
'settings' => array(
'log' => 0,
),
),
'action::log_done_action' => array(
'selected' => 1,
'postpone_processing' => 0,
@ -770,6 +781,7 @@ function farm_movement_views_default_views() {
t('field collection item from field_farm_movement'),
t('Log'),
t('- Choose an operation -'),
t('Delete'),
t('Done'),
t('Not Done'),
t('✔'),

View file

@ -116,6 +116,17 @@ function farm_sensor_views_default_views() {
$handler->display->display_options['fields']['views_bulk_operations']['vbo_settings']['force_single'] = 0;
$handler->display->display_options['fields']['views_bulk_operations']['vbo_settings']['entity_load_capacity'] = '10';
$handler->display->display_options['fields']['views_bulk_operations']['vbo_operations'] = array(
'action::views_bulk_operations_delete_item' => array(
'selected' => 1,
'postpone_processing' => 0,
'skip_confirmation' => 0,
'skip_permission_check' => 0,
'override_label' => 1,
'label' => 'Delete',
'settings' => array(
'log' => 0,
),
),
'action::farm_group_asset_membership_action' => array(
'selected' => 1,
'skip_confirmation' => 1,
@ -294,6 +305,7 @@ function farm_sensor_views_default_views() {
t('Group membership'),
t('Farm asset'),
t('- Choose an operation -'),
t('Delete'),
t('Asset ID'),
t('.'),
t('Name'),

View file

@ -122,6 +122,17 @@ function farm_soil_compost_views_default_views() {
$handler->display->display_options['fields']['views_bulk_operations']['vbo_settings']['force_single'] = 0;
$handler->display->display_options['fields']['views_bulk_operations']['vbo_settings']['entity_load_capacity'] = '10';
$handler->display->display_options['fields']['views_bulk_operations']['vbo_operations'] = array(
'action::views_bulk_operations_delete_item' => array(
'selected' => 1,
'postpone_processing' => 0,
'skip_confirmation' => 0,
'skip_permission_check' => 0,
'override_label' => 1,
'label' => 'Delete',
'settings' => array(
'log' => 0,
),
),
'action::farm_group_asset_membership_action' => array(
'selected' => 1,
'skip_confirmation' => 1,
@ -313,6 +324,7 @@ function farm_soil_compost_views_default_views() {
t('Group membership'),
t('Farm asset'),
t('- Choose an operation -'),
t('Delete'),
t('Asset ID'),
t('.'),
t('Name'),

View file

@ -152,6 +152,17 @@ function farm_soil_test_views_default_views() {
'override_label' => 0,
'label' => '',
),
'action::views_bulk_operations_delete_item' => array(
'selected' => 1,
'postpone_processing' => 0,
'skip_confirmation' => 0,
'skip_permission_check' => 0,
'override_label' => 1,
'label' => 'Delete',
'settings' => array(
'log' => 0,
),
),
'action::log_done_action' => array(
'selected' => 1,
'postpone_processing' => 0,
@ -409,6 +420,7 @@ function farm_soil_test_views_default_views() {
t('Owner'),
t('Log'),
t('- Choose an operation -'),
t('Delete'),
t('Done'),
t('Not Done'),
t('✔'),

View file

@ -152,6 +152,17 @@ function farm_water_test_views_default_views() {
'override_label' => 0,
'label' => '',
),
'action::views_bulk_operations_delete_item' => array(
'selected' => 1,
'postpone_processing' => 0,
'skip_confirmation' => 0,
'skip_permission_check' => 0,
'override_label' => 1,
'label' => 'Delete',
'settings' => array(
'log' => 0,
),
),
'action::log_done_action' => array(
'selected' => 1,
'postpone_processing' => 0,
@ -408,6 +419,7 @@ function farm_water_test_views_default_views() {
t('Owner'),
t('Log'),
t('- Choose an operation -'),
t('Delete'),
t('Done'),
t('Not Done'),
t('✔'),