Subversion Repositories Sites.obs-saisons.fr

Rev

Rev 94 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 94 Rev 109
Line 32... Line 32...
32
 * @param $attributes
32
 * @param $attributes
33
 *   A keyed array of attributes
33
 *   A keyed array of attributes
34
 * @return
34
 * @return
35
 *   A string containing an unordered list of links.
35
 *   A string containing an unordered list of links.
36
 */
36
 */
37
function ods_links($links, $attributes = array('class' => 'links')) {
37
function primary_links($links, $attributes = array('class' => 'links')) {
Line 38... Line 38...
38
	
38
	
39
  global $language;
39
  global $language;
Line 40... Line 40...
40
  $output = '';
40
  $output = '';
Line 58... Line 58...
58
      if (isset($link['href']) && ($link['href'] == $_GET['q'] || ($link['href'] == '<front>' && drupal_is_front_page()))
58
      if (isset($link['href']) && ($link['href'] == $_GET['q'] || ($link['href'] == '<front>' && drupal_is_front_page()))
59
          && (empty($link['language']) || $link['language']->language == $language->language)) {
59
          && (empty($link['language']) || $link['language']->language == $language->language)) {
60
        $class .= ' active';
60
        $class .= ' active';
61
      }
61
      }
Line -... Line 62...
-
 
62
            	
62
            	
63
       $id = 'lien_primaire_'.$i;
Line 63... Line 64...
63
      $class .= ' lien_primaire_'.$i;
64
       $class .= ' lien_primaire';
Line 64... Line 65...
64
      
65
      
Line 65... Line 66...
65
      $output .= '<li'. drupal_attributes(array('class' => $class)) .'>';
66
      $output .= '<li'. drupal_attributes(array('id' => $id, 'class' => $class)) .'>';
66
 
67
 
Line 95... Line 96...
95
 
96
 
96
  return $output;
97
  return $output;
Line 97... Line 98...
97
}
98
}
-
 
99
 
-
 
100
/**
-
 
101
* Override or insert PHPTemplate variables into the search_theme_form template.
-
 
102
*
-
 
103
* @param $vars
-
 
104
*   A sequential array of variables to pass to the theme template.
-
 
105
* @param $hook
-
 
106
*   The name of the theme function being called (not used in this case.)
-
 
107
*/
-
 
108
function ods_preprocess_search_theme_form(&$vars, $hook) {
-
 
109
  // Remove the "Search this site" label from the form.
-
 
110
  $vars['form']['search_theme_form']['#title'] = t('');
-
 
111
 
-
 
112
  // Set a default value for text inside the search box field.
-
 
113
  $vars['form']['search_theme_form']['#value'] = t('');
-
 
114
 
-
 
115
  // Add a custom class and placeholder text to the search box.
-
 
116
  $vars['form']['search_theme_form']['#attributes'] = array('class' => 'NormalTextBox txtSearch',
-
 
117
                                                              'onfocus' => "if (this.value == '') {this.value = '';}",
-
 
118
                                                              'onblur' => "if (this.value == '') {this.value = '';}");
-
 
119
 
-
 
120
  // Change the text on the submit button
-
 
121
  //$vars['form']['submit']['#value'] = t('Go');
-
 
122
 
-
 
123
  // Rebuild the rendered version (search form only, rest remains unchanged)
-
 
124
  unset($vars['form']['search_theme_form']['#printed']);
-
 
125
  $vars['search']['search_theme_form'] = drupal_render($vars['form']['search_theme_form']);
-
 
126
 
-
 
127
  $vars['form']['submit']['#type'] = 'image_button';
-
 
128
  $vars['form']['submit']['#src'] = path_to_theme() . '/images/search.jpg';
-
 
129
   
-
 
130
  // Rebuild the rendered version (submit button, rest remains unchanged)
-
 
131
  unset($vars['form']['submit']['#printed']);
-
 
132
  $vars['search']['submit'] = drupal_render($vars['form']['submit']);
-
 
133
 
-
 
134
  // Collect all form elements to make it easier to print the whole form.
-
 
135
  $vars['search_form'] = implode($vars['search']);
-
 
136
  
-
 
137
}
-
 
138
 
-
 
139
/**
-
 
140
* Override or insert PHPTemplate variables into the search_block_form template.
-
 
141
*
-
 
142
* @param $vars
-
 
143
*   A sequential array of variables to pass to the theme template.
-
 
144
* @param $hook
-
 
145
*   The name of the theme function being called (not used in this case.)
-
 
146
*/
-
 
147
function ods_preprocess_search_block_form(&$vars, $hook) {
-
 
148
  // Remove the "Search this site" label from the form.
-
 
149
  $vars['form']['search_block_form']['#title'] = t('');
-
 
150
 
-
 
151
  // Set a default value for text inside the search box field.
-
 
152
  $vars['form']['search_block_form']['#value'] = t('Rechercher');
-
 
153
 
-
 
154
  // Add a custom class and placeholder text to the search box.
-
 
155
  $vars['form']['search_block_form']['#attributes'] = array('class' => 'NormalTextBox txtSearch',
-
 
156
                                                              'onfocus' => "if (this.value == 'Rechercher') {this.value = '';}",
-
 
157
                                                              'onblur' => "if (this.value == 'Rechercher') {this.value = '';}");
-
 
158
 
-
 
159
  // Change the text on the submit button
-
 
160
  //$vars['form']['submit']['#value'] = t('Go');
-
 
161
  
-
 
162
  
-
 
163
  $vars['form']['search_block_form']['#label'] = t('');
-
 
164
  // Rebuild the rendered version (search form only, rest remains unchanged)
-
 
165
  unset($vars['form']['search_block_form']['#printed']);
-
 
166
  $vars['search']['search_block_form'] = drupal_render($vars['form']['search_block_form']);
-
 
167
 
-
 
168
  $vars['form']['submit']['#type'] = 'image_button';
-
 
169
  $vars['form']['submit']['#src'] = path_to_theme() . '/images/search.jpg';
-
 
170
   
-
 
171
  // Rebuild the rendered version (submit button, rest remains unchanged)
-
 
172
  unset($vars['form']['submit']['#printed']);
-
 
173
  $vars['search']['submit'] = drupal_render($vars['form']['submit']);
-
 
174
 
-
 
175
  // Collect all form elements to make it easier to print the whole form.
-
 
176
  $vars['search_form'] = implode($vars['search']);
-
 
177
}
98
 
178
 
99
/**
179
/**
100
 * Return a themed breadcrumb trail.
180
 * Return a themed breadcrumb trail.
101
 *
181
 *
102
 * @param $breadcrumb
182
 * @param $breadcrumb