Projet

Général

Profil

Révision 74f6bef0

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

Weekly update of contrib modules

Voir les différences:

drupal7/sites/all/themes/adaptivetheme/at_core/inc/forms/settings.images.inc
4 4
 * @file
5 5
 * Generate form elments for the Image styles settings.
6 6
 */
7
function at_core_images_form(&$form) {
8
  $form['at']['images'] = array(
9
    '#type' => 'fieldset',
10
    '#title' => t('Image Settings'),
11
    '#description' => '<h3>Image Settings</h3><p>Set alignment for image-field images on full and teaser view, and enable captions.',
12
    '#weight' => 0,
13
  );
7 14

  
8
$form['at']['images'] = array(
9
  '#type' => 'fieldset',
10
  '#title' => t('Image Settings'),
11
  '#description' => '<h3>Image Settings</h3><p>Set alignment for image-field images on full and teaser view, and enable captions.',
12
  '#weight' => 0,
13
);
15
  // Alignment
16
  $form['at']['images']['alignment'] = array(
17
    '#type' => 'fieldset',
18
    '#title' => t('Image Alignment'),
19
  );
14 20

  
15
// Alignment
16
$form['at']['images']['alignment'] = array(
17
  '#type' => 'fieldset',
18
  '#title' => t('Image Alignment'),
19
);
21
  // Full
22
  $form['at']['images']['alignment']['image_alignment'] = array(
23
    '#type' => 'radios',
24
    '#title' => t('<strong>Alignment - full view</strong>'),
25
    '#default_value' => at_get_setting('image_alignment'),
26
    '#options' => array(
27
      'ia-n' => t('None'),
28
      'ia-l' => t('Left'),
29
      'ia-c' => t('Center'),
30
      'ia-r' => t('Right'),
31
    ),
32
  );
20 33

  
21
// Full
22
$form['at']['images']['alignment']['image_alignment'] = array(
23
  '#type' => 'radios',
24
  '#title' => t('<strong>Alignment - full view</strong>'),
25
  '#default_value' => at_get_setting('image_alignment'),
26
  '#options' => array(
27
    'ia-n' => t('None'),
28
    'ia-l' => t('Left'),
29
    'ia-c' => t('Center'),
30
    'ia-r' => t('Right'),
31
  ),
32
);
34
  // Teaser
35
  $form['at']['images']['alignment']['image_alignment_teaser'] = array(
36
    '#type' => 'radios',
37
    '#title' => t('<strong>Alignment - teaser view</strong>'),
38
    '#default_value' => at_get_setting('image_alignment_teaser'),
39
    '#description' => t('This will only affect images added using an image-field. If you use another method such as embedding images directly into text areas this will not affect those images.'),
40
    '#options' => array(
41
      'iat-n' => t('None'),
42
      'iat-l' => t('Left'),
43
      'iat-c' => t('Center'),
44
      'iat-r' => t('Right'),
45
    ),
46
  );
33 47

  
34
// Teaser
35
$form['at']['images']['alignment']['image_alignment_teaser'] = array(
36
  '#type' => 'radios',
37
  '#title' => t('<strong>Alignment - teaser view</strong>'),
38
  '#default_value' => at_get_setting('image_alignment_teaser'),
39
  '#description' => t('This will only affect images added using an image-field. If you use another method such as embedding images directly into text areas this will not affect those images.'),
40
  '#options' => array(
41
    'iat-n' => t('None'),
42
    'iat-l' => t('Left'),
43
    'iat-c' => t('Center'),
44
    'iat-r' => t('Right'),
45
  ),
46
);
48
  // Captions
49
  $form['at']['images']['captions'] = array(
50
    '#type' => 'fieldset',
51
    '#title' => t('Image Captions'),
52
    '#description' => t('<strong>Display the image title as a caption</strong>'),
53
  );
54
  $form['at']['images']['captions']['image_caption_teaser'] = array(
55
    '#type' => 'checkbox',
56
    '#title' => t('Show captions on teaser view'),
57
    '#default_value' => at_get_setting('image_caption_teaser'),
58
  );
59
  $form['at']['images']['captions']['image_caption_full'] = array(
60
    '#type' => 'checkbox',
61
    '#title' => t('Show captions on full view'),
62
    '#description' => t('Captions use the title attribute text. You must enable tiles in the field management options for your image fields.'),
63
    '#default_value' => at_get_setting('image_caption_full'),
64
  );
47 65

  
48
// Captions
49
$form['at']['images']['captions'] = array(
50
  '#type' => 'fieldset',
51
  '#title' => t('Image Captions'),
52
  '#description' => t('<strong>Display the image title as a caption</strong>'),
53
);
54
$form['at']['images']['captions']['image_caption_teaser'] = array(
55
  '#type' => 'checkbox',
56
  '#title' => t('Show captions on teaser view'),
57
  '#default_value' => at_get_setting('image_caption_teaser'),
58
);
59
$form['at']['images']['captions']['image_caption_full'] = array(
60
  '#type' => 'checkbox',
61
  '#title' => t('Show captions on full view'),
62
  '#description' => t('Captions use the title attribute text. You must enable tiles in the field management options for your image fields.'),
63
  '#default_value' => at_get_setting('image_caption_full'),
64
);
65

  
66
// Teaser
67
$form['at']['images']['teaser'] = array(
68
  '#type' => 'fieldset',
69
  '#title' => t('Teaser Image Fields'),
70
  '#description' => t('<strong>Show only one image field image on teasers</strong>'),
71
);
72
$form['at']['images']['teaser']['image_teaser'] = array(
73
  '#type' => 'checkbox',
74
  '#title' => t('Show the first image only on teasers'),
75
  '#description' => t('Useful for when you have a multivalue image field and you only want the first image to show on teasers.'),
76
  '#default_value' => at_get_setting('image_teaser'),
77
);
66
  // Teaser
67
  $form['at']['images']['teaser'] = array(
68
    '#type' => 'fieldset',
69
    '#title' => t('Teaser Image Fields'),
70
    '#description' => t('<strong>Show only one image field image on teasers</strong>'),
71
  );
72
  $form['at']['images']['teaser']['image_teaser'] = array(
73
    '#type' => 'checkbox',
74
    '#title' => t('Show the first image only on teasers'),
75
    '#description' => t('Useful for when you have a multivalue image field and you only want the first image to show on teasers.'),
76
    '#default_value' => at_get_setting('image_teaser'),
77
  );
78
}

Formats disponibles : Unified diff