Project

General

Profile

1
<?php
2

    
3
defined('_JEXEC') or die('Access denied');
4

    
5
jimport('joomla.environment.uri');
6
jimport('joomla.html.html');
7
jimport('joomla.methods');
8

    
9
JHtml :: _('behavior.framework',true);
10
JViewLegacy:: loadHelper('PublicationHelper');
11
JViewLegacy:: loadHelper('DatasetHelper');
12

    
13
$document = JFactory :: getDocument();
14
$document -> addScript(JRoute :: _(JUri :: base() . 'components/com_openaire/js/person.js'));
15
$document -> addStyleSheet(JRoute :: _(JUri :: base() . 'components/com_openaire/css/tabcontent.css'));
16
$document -> addScript(JRoute :: _(JUri :: base() . 'components/com_openaire/js/tabcontent.js'));
17

    
18
?>
19

    
20
<div id="right-column">
21
	<?php if (($this -> personId == NULL) || ($this -> person == NULL) || (($this -> person -> fullName == NULL) && ($this -> person -> lastName == NULL) && ($this -> person -> firstName == NULL))) { ?>
22
		<div class="error"><?php echo(JText :: _('ERROR_RETRIEVING_PERSON')); ?></div>
23
	<?php } else { ?>
24
		<div class="projectInfo">
25
			<div class="curveBox xtraMargin10">
26
				<div class="personIcon"></div>
27
				<h3><?php echo(($this -> person -> fullName == NULL) ? ($this -> person -> lastName . ((($this -> person -> lastName == NULL) || ($this -> person -> firstName == NULL)) ? '' : ',&nbsp;') . $this -> person -> firstName) : $this -> person -> fullName); ?></h3>
28
				<dl class="separator">
29
					<dt><?php echo(JText :: _('LAST_NAME')); ?></dt>
30
					<dd><?php echo(($this -> person -> lastName == NULL) ? '-' : $this -> person -> lastName); ?></dd>
31
					<dt><?php echo(JText :: _('FIRST_NAME')); ?></dt>
32
					<dd><?php echo(($this -> person -> firstName == NULL) ? '-' : $this -> person -> firstName)?></dd>
33
					<dt><?php echo(JText :: _('COUNTRY')); ?></dt>
34
					<dd><?php echo(($this -> person -> country == NULL) ? '-' : $this -> person -> country); ?></dd>
35
				</dl>
36
			</div>
37
			<div>
38
				<div class="nav-container nav-left clearfix">
39
					<ul class="tabs" persist="true">
40
						<li class="selected"><a rel="publtab"><?php echo(JText :: _('PUBLICATIONS')); ?></a></li>
41
						<li><a rel="datatab"><?php echo(JText :: _('DATA')); ?></a></li>		
42
					</ul>
43
				</div>
44
				<div class="tabcontents">
45
					<div id="publtab" class="tabcontent">
46
						<?php if ($this -> publications == NULL) { ?>
47
							<div class="error"><?php echo(JText :: _('ERROR_RETRIEVING_PERSON_PUBLICATIONS')); ?></div>
48
						<?php } else if ($this -> publications -> publications == NULL) { ?>
49
							<div class="box-info"><?php echo(JText :: _('NO_PERSON_PUBLICATIONS_FOUND')); ?></div>
50
						<?php } else { ?>					
51
							<div class="searchResults">
52
								<?php foreach ($this -> publications -> publications as $publication) {
53
									echo(PublicationHelper :: formatPublication($publication, $this -> itemId));
54
								}
55
								if ($this -> publications -> totalPublications > OpenAireViewPerson :: SIZE) { ?>
56
									<div class="pageController">
57
										<a class="viewall" href="<?php echo(JRoute :: _('index.php?option=com_openaire&view=browsepublications&Itemid=' . $this -> itemId . '&author=' . $this -> personId)); ?> "><?php JText :: printf('VIEW_ALL_N', $this -> publications -> totalPublications); ?></a>
58
									</div>
59
								<?php } ?>
60
							</div>
61
						<?php } ?>
62
					</div>
63
					<div id="datatab" class="tabcontent">
64
						<?php if ($this -> datasets == NULL) { ?>
65
							<div class="error"><?php echo(JText :: _('ERROR_RETRIEVING_PERSON_DATASETS')); ?></div>
66
						<?php } else if ($this -> datasets -> datasets == NULL) { ?>
67
							<div class="box-info"><?php echo(JText :: _('NO_PERSON_DATASETS_FOUND')); ?></div>
68
						<?php } else { ?>
69
							<div class="searchResults">
70
								<?php foreach ($this -> datasets -> datasets as $dataset) {
71
									echo(DatasetHelper :: formatDataset($dataset, $this -> itemId));
72
								}
73
								if ($this -> datasets -> totalDatasets > OpenAireViewPerson :: SIZE) { ?>
74
									<div class="pageController">
75
										<a class="viewall" href="<?php echo(JRoute :: _('index.php?option=com_openaire&view=browsedatasets&Itemid=' . $this -> itemId . '&author=' . $this -> personId)); ?> "><?php JText :: printf('VIEW_ALL_N', $this -> datasets -> totalDatasets); ?></a>
76
									</div>
77
								<?php } ?>
78
							</div>
79
						<?php } ?>
80
					</div>
81
					
82
				</div>
83
			</div>
84
		</div>
85
	<?php } ?>
86
</div>
87

    
(1-1/2)