Projet

Général

Profil

Révision db9ffd17

Ajouté par Assos Assos il y a presque 10 ans

Weekly update of contrib modules

Voir les différences:

drupal7/sites/all/modules/date/date_views/date_views.module
1 1
<?php
2 2

  
3

  
4
/**
5
 * Implements hook_menu().
6
 */
7
function date_views_menu() {
8
  // Used to import files from a local filesystem into Drupal.
9
  $items['admin/config/regional/date-time/date-views'] = array(
10
    'title' => 'Date views',
11
    'description' => 'Configure settings for date views.',
12
    'page callback' => 'drupal_get_form',
13
    'page arguments' => array('date_views_settings'),
14
    'access arguments' => array('administer site configuration '),
15
    'type' => MENU_LOCAL_TASK,
16
  );
17

  
18
  return $items;
19
}
20

  
21
/**
22
 * Form callback for date views settings.
23
 */
24
function date_views_settings($form, &$form_state) {
25

  
26
  $form['date_views_month_format_with_year'] = array(
27
    '#type' => 'textfield',
28
    '#title' => t('Date views month format with year'),
29
    '#size' => 10,
30
    '#default_value' => variable_get('date_views_month_format_with_year', 'F Y'),
31
    '#description' => t('Date views month format with year, default value : F Y'),
32
  );
33

  
34
  $form['date_views_month_format_without_year'] = array(
35
    '#type' => 'textfield',
36
    '#title' => t('Date views month format without year'),
37
    '#size' => 10,
38
    '#default_value' => variable_get('date_views_month_format_without_year', 'F'),
39
    '#description' => t('Date views month format without year, default value : F'),
40
  );
41

  
42
  $form['date_views_day_format_with_year'] = array(
43
    '#type' => 'textfield',
44
    '#title' => t('Date views day format with year'),
45
    '#size' => 10,
46
    '#default_value' => variable_get('date_views_day_format_with_year', 'l, F j, Y'),
47
    '#description' => t('Date views day format with year, default value : l, F j, Y'),
48
  );
49

  
50
  $form['date_views_day_format_without_year'] = array(
51
    '#type' => 'textfield',
52
    '#title' => t('Date views day format without year'),
53
    '#size' => 10,
54
    '#default_value' => variable_get('date_views_day_format_without_year', 'l, F j'),
55
    '#description' => t('Date views day format without year, default value : l, F j'),
56
  );
57

  
58
  $form['date_views_week_format_with_year'] = array(
59
    '#type' => 'textfield',
60
    '#title' => t('Date views week format with year'),
61
    '#size' => 10,
62
    '#default_value' => variable_get('date_views_week_format_with_year', 'F j, Y'),
63
    '#description' => t('Date views week format with year, default value : F j, Y'),
64
  );
65

  
66
  $form['date_views_week_format_without_year'] = array(
67
    '#type' => 'textfield',
68
    '#title' => t('Date views week format without year'),
69
    '#size' => 10,
70
    '#default_value' => variable_get('date_views_week_format_without_year', 'F j'),
71
    '#description' => t('Date views week format without year, default value : F j'),
72
  );
73

  
74
  return system_settings_form($form);
75

  
76
}
77

  
3 78
/**
4 79
 * Implements hook_views_api().
5 80
 *

Formats disponibles : Unified diff