Projet

Général

Profil

Révision 661d64c9

Ajouté par Assos Assos il y a plus de 7 ans

Weekly update of contrib modules

Voir les différences:

drupal7/sites/all/modules/diff/includes/file.inc
67 67
      if ($settings['compare_display_field'] && !empty($field['settings']['display_field'])) {
68 68
        $output['display'] = $item['display'] ? t('Displayed') : t('Hidden');
69 69
      }
70
      $diff_items[$delta] = implode('; ', $output);
70
      $separator = $settings['property_separator'] == 'nl' ? "\n" : $settings['property_separator'];
71
      $diff_items[$delta] = implode($separator, $output);
71 72
    }
72 73
  }
73 74

  
......
82 83
    'show_id' => 0,
83 84
    'compare_display_field' => 0,
84 85
    'compare_description_field' => 0,
86
    'property_separator' => '; ',
85 87
  );
86 88
}
87 89

  
......
107 109
    '#default_value' => $settings['compare_display_field'],
108 110
    '#description' => t('This is only used if the "Enable <em>Display</em> field" is checked in the field settings.'),
109 111
  );
112
  $options_form['property_separator'] = array(
113
    '#type' => 'select',
114
    '#title' => t('Property separator'),
115
    '#default_value' => $settings['property_separator'],
116
    '#description' => t('Provides the ability to show properties inline or across multiple lines.'),
117
    '#options' => array(
118
      ', ' => t('Comma (,)'),
119
      '; ' => t('Semicolon (;)'),
120
      ' ' => t('Space'),
121
      'nl' => t('New line'),
122
    ),
123
  );
124
  // Allow users to set their own separator using variable_set().
125
  if (!isset($options_form['#options'][$settings['property_separator']])) {
126
    $options_form['#options'][$settings['property_separator']] = $settings['property_separator'];
127
  }
110 128
  return $options_form;
111 129
}

Formats disponibles : Unified diff