Révision 661d64c9
Ajouté par Assos Assos il y a plus de 7 ans
drupal7/sites/all/modules/diff/diff.admin.inc | ||
---|---|---|
20 | 20 |
'#empty_option' => t('- None -'), |
21 | 21 |
'#description' => t('Alter the CSS used when displaying diff results.'), |
22 | 22 |
); |
23 |
$form['diff_default_state_node'] = array( |
|
24 |
'#type' => 'select', |
|
25 |
'#title' => t('Diff default state'), |
|
26 |
'#default_value' => variable_get('diff_default_state_node', 'raw'), |
|
27 |
'#options' => array( |
|
28 |
'raw' => t('HTML view'), |
|
29 |
'raw_plain' => t('Plain view'), |
|
30 |
), |
|
31 |
'#empty_option' => t('- None -'), |
|
32 |
'#description' => t('Default display to show when viewing a diff, html tags in diffed result or as plain text.'), |
|
33 |
); |
|
34 | 23 |
$form['diff_radio_behavior'] = array( |
35 | 24 |
'#type' => 'select', |
36 | 25 |
'#title' => t('Diff radio behavior'), |
... | ... | |
68 | 57 |
function diff_admin_global_entity_settings($form, $form_state, $entity_type) { |
69 | 58 |
$entity_info = entity_get_info($entity_type); |
70 | 59 |
drupal_set_title(t('Diff settings for %entity_label entities', array('%entity_label' => $entity_info['label'])), PASS_THROUGH); |
60 |
|
|
61 |
if ($options = module_invoke_all('entity_diff_options', $entity_type)) { |
|
62 |
$form['diff_additional_options_' . $entity_type] = array( |
|
63 |
'#type' => 'checkboxes', |
|
64 |
'#title' => t('Property options'), |
|
65 |
'#default_value' => variable_get('diff_additional_options_' . $entity_type, array()), |
|
66 |
'#options' => $options, |
|
67 |
); |
|
68 |
} |
|
69 |
else { |
|
70 |
$form['diff_additional_options_' . $entity_type] = array( |
|
71 |
'#type' => 'value', |
|
72 |
'#value' => array(), |
|
73 |
); |
|
74 |
} |
|
75 |
|
|
71 | 76 |
$form['diff_show_header_' . $entity_type] = array( |
72 | 77 |
'#type' => 'checkbox', |
73 |
'#title' => t('Show entity label header'), |
|
78 |
'#title' => t('Show entity label row header'),
|
|
74 | 79 |
'#default_value' => variable_get('diff_show_header_' . $entity_type, 1), |
75 | 80 |
); |
81 |
if (user_access('administer permissions')) { |
|
82 |
$admin_link = l(t('View the administration theme'), 'admin/people/permissions', array('fragment' => 'edit-view-the-administration-theme')); |
|
83 |
} |
|
84 |
else { |
|
85 |
$admin_link = t('View the administration theme'); |
|
86 |
} |
|
76 | 87 |
$form['diff_admin_path_' . $entity_type] = array( |
77 | 88 |
'#type' => 'checkbox', |
78 |
'#title' => t('Treat diff pages as administrative'),
|
|
79 |
'#description' => t('Diff pages are treated as administrative pages by default, although it is up to each module to enforce this and to implement this optional setting.'),
|
|
89 |
'#title' => t('Use administration theme'),
|
|
90 |
'#description' => t('This option will enable users with the <em>!link</em> permission to use the admin theme when doing comparisons.', array('!link' => $admin_link)),
|
|
80 | 91 |
'#default_value' => variable_get('diff_admin_path_' . $entity_type, 1), |
81 | 92 |
); |
93 |
$form['diff_default_state_' . $entity_type] = array( |
|
94 |
'#type' => 'select', |
|
95 |
'#title' => t('Diff default state'), |
|
96 |
'#default_value' => variable_get('diff_default_state_' . $entity_type, 'raw'), |
|
97 |
'#options' => array( |
|
98 |
'raw' => t('HTML view'), |
|
99 |
'raw_plain' => t('Plain view'), |
|
100 |
), |
|
101 |
'#empty_option' => t('- None -'), |
|
102 |
'#description' => t('Default display to show when viewing a diff, html tags in diffed result or as plain text.'), |
|
103 |
); |
|
82 | 104 |
return system_settings_form($form); |
83 | 105 |
} |
84 | 106 |
|
Formats disponibles : Unified diff
Weekly update of contrib modules