updated ctools, panels, date, diff

This commit is contained in:
Bachir Soussi Chiadmi
2017-05-24 19:22:50 +02:00
parent 542ac42fca
commit 9acef9d37e
189 changed files with 2928 additions and 1797 deletions

View File

@@ -67,7 +67,8 @@ function file_field_diff_view($items, $context) {
if ($settings['compare_display_field'] && !empty($field['settings']['display_field'])) {
$output['display'] = $item['display'] ? t('Displayed') : t('Hidden');
}
$diff_items[$delta] = implode('; ', $output);
$separator = $settings['property_separator'] == 'nl' ? "\n" : $settings['property_separator'];
$diff_items[$delta] = implode($separator, $output);
}
}
@@ -82,6 +83,7 @@ function file_field_diff_default_options($field_type) {
'show_id' => 0,
'compare_display_field' => 0,
'compare_description_field' => 0,
'property_separator' => '; ',
);
}
@@ -107,5 +109,21 @@ function file_field_diff_options_form($field_type, $settings) {
'#default_value' => $settings['compare_display_field'],
'#description' => t('This is only used if the "Enable <em>Display</em> field" is checked in the field settings.'),
);
$options_form['property_separator'] = array(
'#type' => 'select',
'#title' => t('Property separator'),
'#default_value' => $settings['property_separator'],
'#description' => t('Provides the ability to show properties inline or across multiple lines.'),
'#options' => array(
', ' => t('Comma (,)'),
'; ' => t('Semicolon (;)'),
' ' => t('Space'),
'nl' => t('New line'),
),
);
// Allow users to set their own separator using variable_set().
if (!isset($options_form['#options'][$settings['property_separator']])) {
$options_form['#options'][$settings['property_separator']] = $settings['property_separator'];
}
return $options_form;
}