Style the "Group" VBO action button.

This commit is contained in:
Michael Stenta 2017-11-14 15:03:33 -05:00
parent 1aa05c49a6
commit 900fc3facc
1 changed files with 6 additions and 1 deletions

View File

@ -149,13 +149,16 @@ function farm_theme_views_bulk_operations_form_alter(&$form, &$form_state, $vbo)
// Move VBO buttons to the bottom.
$form['select']['#weight'] = 100;
// Move the "Assign" and "Clone" actions to the end of the list.
// Move the "Assign", "Clone", and "Group" actions to the end of the list.
if (!empty($form['select']['action::farm_log_assign_action'])) {
$form['select']['action::farm_log_assign_action']['#weight'] = 100;
}
if (!empty($form['select']['action::log_clone_action'])) {
$form['select']['action::log_clone_action']['#weight'] = 100;
}
if (!empty($form['select']['action::farm_group_asset_membership_action'])) {
$form['select']['action::farm_group_asset_membership_action']['#weight'] = 100;
}
// If we are viewing a VBO config form, add Javascript that will hide
// everything on the page except for the form.
@ -182,6 +185,7 @@ function farm_theme_bootstrap_colorize_text_alter(&$texts) {
// Colorize VBO action buttons.
$texts['matches'][t('Move')] = 'default';
$texts['matches'][t('Group')] = 'warning';
$texts['matches'][t('Done')] = 'success';
$texts['matches'][t('Not Done')] = 'danger';
$texts['matches'][t('Reschedule')] = 'warning';
@ -196,6 +200,7 @@ function farm_theme_bootstrap_iconize_text_alter(&$texts) {
// Iconize VBO action buttons.
$texts['matches'][t('Move')] = 'move';
$texts['matches'][t('Group')] = 'bookmark';
$texts['matches'][t('Done')] = 'check';
$texts['matches'][t('Not Done')] = 'unchecked';
$texts['matches'][t('Reschedule')] = 'calendar';