Project

General

Profile

« Previous | Next » 

Revision 6d9071b7

Added by Andreas Kohlbecker over 5 years ago

adding missing font awesome font css to registration serarch form

View differences:

modules/cdm_dataportal/cdm_dataportal.module
340 340
   *
341 341
   */
342 342
  function font_awesome_icon_markup($icon_name = NULL, $attributes = array()){
343
    _add_font_awesome_font();
343 344

  
344 345

  
345
    //<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet">
346

  
347
    $font_awesome_css_uri = base_path() . drupal_get_path('module', 'cdm_dataportal').'/fonts/font-awesome-4.6.3/css/font-awesome.min.css';
348
    //$font_awesome_css_uri="//maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css";
349

  
350
    drupal_add_html_head_link(
351
      array(
352
        'href' => $font_awesome_css_uri,
353
        'rel' => 'stylesheet'
354
      )
355
    );
356

  
357 346
    if($icon_name){
358 347
      if(!isset($attributes['class'])){
359 348
        $attributes['class'] = array();
......
367 356
    return '';
368 357
  }
369 358

  
359
/**
360
 * Adds the css  containing the font awesome icons to the html header.
361
 */
362
function _add_font_awesome_font()
363
{
364
//<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet">
365

  
366
  $font_awesome_css_uri = base_path() . drupal_get_path('module', 'cdm_dataportal') . '/fonts/font-awesome-4.6.3/css/font-awesome.min.css';
367
  //$font_awesome_css_uri="//maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css";
368

  
369
  drupal_add_html_head_link(
370
    array(
371
      'href' => $font_awesome_css_uri,
372
      'rel' => 'stylesheet'
373
    )
374
  );
375
}
376

  
370 377

  
371
  /* ====================== hook implementations ====================== */
378
/* ====================== hook implementations ====================== */
372 379
  /**
373 380
   * Implements hook_permission().
374 381
   *
modules/cdm_dataportal/cdm_dataportal.search.php
771 771

  
772 772
function cdm_dataportal_search_registration_form($form, &$form_state) {
773 773

  
774
  _add_font_awesome_font();
775
  
774 776
  $filter_presets = (isset($_SESSION['cdm'][SESSION_KEY_SEARCH_REGISTRATION_FILTER]) ? $_SESSION['cdm'][SESSION_KEY_SEARCH_REGISTRATION_FILTER] : array());
775 777
  $filter_presets = array_merge($filter_presets, remove_drupal_form_params($_REQUEST));
776 778
  $form['#action'] =  url('/cdm_dataportal/search/registration/');

Also available in: Unified diff