Project

General

Profile

« Previous | Next » 

Revision 2ffe4d59

Added by Andreas Kohlbecker almost 5 years ago

fix #8320 links to references as appended icon & custom icon font set

  • theme method extended by second doIconLink attribute
    • all usages of the theme methods with icon link except for reference result lists
    • refrerences in type designation footnotes now with icon link
    • adding custom icon fontset

View differences:

modules/cdm_dataportal/cdm_dataportal.module
365 365
    return '';
366 366
  }
367 367

  
368
/**
369
 * @param string $glyph_name
370
 *   The name of the gloyph (e.g. 'icon-interal-link-alt-solid') for the foll list please
371
 *   refer to modules/cdm_dataportal/fonts/custom-icon-font
372
 * @param array $attributes
373
 * @return string
374
 */
375
  function custom_icon_font_markup($glyph_name = NULL, $attributes = array()){
376
    _add_font_custom_icon_font();
377

  
378

  
379
    if($glyph_name){
380
      if(!isset($attributes['class'])){
381
        $attributes['class'] = array();
382
      }
383
      $attributes['class'][] = $glyph_name;
384

  
385
      return '<i ' . drupal_attributes($attributes) . '></i>';
386
    }
387

  
388
    return '';
389
  }
390

  
368 391
/**
369 392
 * Adds the css  containing the font awesome icons to the html header.
370 393
 */
371 394
function _add_font_awesome_font()
372 395
{
373
//<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet">
374

  
375 396
  $font_awesome_css_uri = base_path() . drupal_get_path('module', 'cdm_dataportal') . '/fonts/font-awesome-4.6.3/css/font-awesome.min.css';
376
  //$font_awesome_css_uri="//maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css";
377 397

  
378 398
  drupal_add_html_head_link(
379 399
    array(
......
383 403
  );
384 404
}
385 405

  
406
/**
407
 * Adds the css  containing the font awesome icons to the html header.
408
 */
409
function _add_font_custom_icon_font()
410
{
411

  
412
  $custom_icon_font_css_uri = base_path() . drupal_get_path('module', 'cdm_dataportal') . '/fonts/custom-icon-font/style.css';
413

  
414
  drupal_add_html_head_link(
415
    array(
416
      'href' => $custom_icon_font_css_uri,
417
      'rel' => 'stylesheet'
418
    )
419
  );
420
}
386 421

  
387 422
/* ====================== hook implementations ====================== */
388 423
  /**

Also available in: Unified diff