Project

General

Profile

« Previous | Next » 

Revision d2a09415

Added by Andreas Kohlbecker over 8 years ago

CRLF will be replaced by LF issues

View differences:

themes/garland_EDIT/node-expertsdb_interest.tpl.php
1
<?php 

2
/*

3
   $variables = array(

4
    'content'        => ($teaser && $node->teaser) ? $node->teaser : $node->body,

5
    'date'           => format_date($node->created),

6
    'links'          => $node->links ? theme('links', $node->links, array('class' => 'links inline')) : '',

7
    'name'           => theme('username', $node),

8
    'node'           => $node,  // we pass the actual node to allow more customization

9
    'node_url'       => url('node/'. $node->nid),

10
    'page'           => $page,

11
    'taxonomy'       => $taxonomy,

12
    'teaser'         => $teaser,

13
    'terms'          => theme('links', $taxonomy, array('class' => 'links inline')),

14
    'title'          => check_plain($node->title)

15
  );

16
*/ 

17
?>

1
<?php 
2
/*
3
   $variables = array(
4
    'content'        => ($teaser && $node->teaser) ? $node->teaser : $node->body,
5
    'date'           => format_date($node->created),
6
    'links'          => $node->links ? theme('links', $node->links, array('class' => 'links inline')) : '',
7
    'name'           => theme('username', $node),
8
    'node'           => $node,  // we pass the actual node to allow more customization
9
    'node_url'       => url('node/'. $node->nid),
10
    'page'           => $page,
11
    'taxonomy'       => $taxonomy,
12
    'teaser'         => $teaser,
13
    'terms'          => theme('links', $taxonomy, array('class' => 'links inline')),
14
    'title'          => check_plain($node->title)
15
  );
16
*/ 
17
?>
18 18
<?php phptemplate_comment_wrapper(NULL, $node->type); ?>
19 19

  
20 20
<div id="node-<?php print $node->nid; ?>" class="node<?php if ($sticky) { print ' sticky'; } ?><?php if (!$status) { print ' node-unpublished'; } ?>">
......
30 30
  <?php endif; ?>
31 31

  
32 32
  <div class="content">
33
    <?php 

34
      print '<h3>'.t('Expert: ').$node->content['field_parent_person']['#value'].'</h3>';

35
      
36
      $display_options =  array(

37
            //taxa

38
            12 => array('term_path'=> true, 'notes'=>$node->field_taxon_notes[0]['view']),

39
            //geo

40
            13 => array('term_path'=> true, 'notes'=>$node->field_geo_notes[0]['view']),

41
            // methods

42
            5 => array('term_path'=> true),

43
          );

44
          
45
      
46
      print theme('expertdb_interest_categories', $node->taxonomy, $display_options, true);

47
      
48
      $view_args = array('');

49
      
50
      if($node->field_taxon_project){

51
        foreach($node->field_taxon_project as $project){

52
          $view_args[0] .= (strlen($view_args[0]) ? '+' : '').$project['nid'];

53
        }

54
      }

55
      
56
      $projects_view = views_get_view('projects_by_interest');

57
      if(views_access($projects_view)){

58
        $out = views_build_view('block', $projects_view, $view_args, false, false);

59
        if($out){

60
          print '<h3>'.t('Projects:').'</h3>'.$out;

61
        } else {

62
          // empty table but add_link at bottom

63
          print '<h3>'.t('Projects:').'</h3>'.theme('views_view_table_projects_by_interest',$projects_view, array());

64
        }

65
      }

33
    <?php 
34
      print '<h3>'.t('Expert: ').$node->content['field_parent_person']['#value'].'</h3>';
35
      
36
      $display_options =  array(
37
            //taxa
38
            12 => array('term_path'=> true, 'notes'=>$node->field_taxon_notes[0]['view']),
39
            //geo
40
            13 => array('term_path'=> true, 'notes'=>$node->field_geo_notes[0]['view']),
41
            // methods
42
            5 => array('term_path'=> true),
43
          );
44
          
45
      
46
      print theme('expertdb_interest_categories', $node->taxonomy, $display_options, true);
47
      
48
      $view_args = array('');
49
      
50
      if($node->field_taxon_project){
51
        foreach($node->field_taxon_project as $project){
52
          $view_args[0] .= (strlen($view_args[0]) ? '+' : '').$project['nid'];
53
        }
54
      }
55
      
56
      $projects_view = views_get_view('projects_by_interest');
57
      if(views_access($projects_view)){
58
        $out = views_build_view('block', $projects_view, $view_args, false, false);
59
        if($out){
60
          print '<h3>'.t('Projects:').'</h3>'.$out;
61
        } else {
62
          // empty table but add_link at bottom
63
          print '<h3>'.t('Projects:').'</h3>'.theme('views_view_table_projects_by_interest',$projects_view, array());
64
        }
65
      }
66 66
      //print $content ?>
67 67
  </div>
68 68

  

Also available in: Unified diff