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
$application = JFactory :: getApplication();
10
$canonicalUrl = JRoute :: _('index.php?option=com_openaire&view=article&articleId=' . $this -> publication -> id);
11

    
12
?>
13

    
14
<!DOCTYPE html>
15
<html>
16
	<?php if (($this -> publicationId == NULL) || ($this -> publication == NULL) || ($this -> publication -> title == NULL)) { ?>
17
		<head>
18
			<title><?php echo(JText :: _('ERROR_RETRIEVING_PUBLICATION')); ?></title>
19
			<meta charset="UTF-8" />
20
			<link rel="stylesheet" type="text/css" href="<?php echo(JRoute :: _(JURI :: base() . 'templates/' . $application -> getTemplate() . '/css/layout.css')); ?>" />
21
			<link rel="stylesheet" type="text/css" href="<?php echo(JRoute :: _(JURI :: base() . 'templates/' . $application -> getTemplate() . '/css/tools.css')); ?>" />
22
			<link rel="stylesheet" type="text/css" href="<?php echo(JRoute :: _(JURI :: base() . 'templates/' . $application -> getTemplate() . '/styles/openaire/css/custom.css')); ?>" />
23
			<link rel="stylesheet" type="text/css" href="<?php echo(JRoute :: _(JURI :: base() . 'templates/' . $application -> getTemplate() . '/styles/openaire/css/style.css')); ?>" />
24
		</head>
25
		<body id="page">
26
			<div class="error"><?php echo(JText :: _('ERROR_RETRIEVING_PUBLICATION')); ?></div>
27
		</body>
28
	<?php } else { ?>
29
		<head>
30
			<title><?php echo($this -> publication -> title); ?></title>
31
			<meta charset="UTF-8" />
32
			<link rel="stylesheet" type="text/css" href="<?php echo(JRoute :: _(JURI :: base() . 'templates/' . $application -> getTemplate() . '/css/layout.css')); ?>" />
33
			<link rel="stylesheet" type="text/css" href="<?php echo(JRoute :: _(JURI :: base() . 'templates/' . $application -> getTemplate() . '/css/tools.css')); ?>" />
34
			<link rel="stylesheet" type="text/css" href="<?php echo(JRoute :: _(JURI :: base() . 'templates/' . $application -> getTemplate() . '/styles/openaire/css/custom.css')); ?>" />
35
			<link rel="stylesheet" type="text/css" href="<?php echo(JRoute :: _(JURI :: base() . 'templates/' . $application -> getTemplate() . '/styles/openaire/css/style.css')); ?>" />
36
			<script type="text/javascript" src="<?php echo(JRoute :: _(JURI :: base() . 'media/system/js/mootools-core.js')); ?>"></script>
37
			<script type="text/javascript" src="<?php echo(JRoute :: _(JURI :: base() . 'media/system/js/mootools-more.js')); ?>"></script>
38
			<script type="text/javascript" src="<?php echo(JRoute :: _(JURI :: base() . 'components/com_openaire/js/citeproc/loadabbrevs.js')); ?>"></script>
39
			<script type="text/javascript" src="<?php echo(JRoute :: _(JURI :: base() . 'components/com_openaire/js/citeproc/xmle4x.js')); ?>"></script>
40
			<script type="text/javascript" src="<?php echo(JRoute :: _(JURI :: base() . 'components/com_openaire/js/citeproc/xmldom.js')); ?>"></script>
41
			<script type="text/javascript" src="<?php echo(JRoute :: _(JURI :: base() . 'components/com_openaire/js/citeproc/loadlocale.js')); ?>"></script>
42
			<script type="text/javascript" src="<?php echo(JRoute :: _(JURI :: base() . 'components/com_openaire/js/citeproc/loadsys.js')); ?>"></script>
43
			<script type="text/javascript" src="<?php echo(JRoute :: _(JURI :: base() . 'components/com_openaire/js/citeproc/loadcsl.js')); ?>"></script>
44
			<script type="text/javascript" src="<?php echo(JRoute :: _(JURI :: base() . 'components/com_openaire/js/citeproc/citeproc.js')); ?>"></script>
45
			<script type="text/javascript" src="<?php echo(JRoute :: _(JURI :: base() . 'components/com_openaire/js/printpublication.js')); ?>"></script>
46
			
47
		</head>
48
		<body id="page">
49
			<input id="article" type="hidden" value="<?php echo(htmlentities(json_encode($this -> publication)));?>" />
50
			<input id="url" type="hidden" value="<?php echo($canonicalUrl); ?>" />
51
				<div class="publication">
52
					<?php $datasource = (($this -> publication -> datasources != NULL) && array_key_exists($this -> publication -> id, $this -> publication -> datasources)) ? $this -> publication -> datasources[$this -> publication -> id] : NULL;
53
					$accessMode = ($datasource == NULL) ? NULL : $datasource -> accessMode;
54
					$url = ($datasource == NULL) ? NULL : $datasource -> url;
55
					switch ($accessMode) {
56
					case OpenAireViewArticle :: OPEN_ACCESS:
57
						$accessModeClass = 'openAccess';
58
						$accessModeTitle = JText :: _('OPEN_ACCESS');
59
						break;
60
					case OpenAireViewArticle :: CLOSED_ACCESS:
61
						$accessModeClass = 'closedAccess';
62
						$accessModeTitle = JText :: _('CLOSED_ACCESS');
63
						break;
64
					case OpenAireViewArticle :: RESTRICTED_ACCESS:
65
						$accessModeClass = 'restrictedAccess';
66
						$accessModeTitle = JText :: _('RESTRICTED_ACCESS');
67
						break;
68
					case OpenAireViewArticle :: EMBARGO_ACCESS:
69
						$accessModeClass = 'embargoAccess';
70
						$accessModeTitle = JText :: _('EMBARGO_ACCESS');
71
						break;
72
					default:
73
						$accessModeClass = NULL;
74
						$accessModeTitle = NULL;
75
					}
76
					if ($accessModeClass != NULL) { ?>
77
						<div class="<?php echo($accessModeClass); ?>" title="<?php echo($accessModeTitle); ?>">&nbsp;</div>
78
					<?php } ?>
79
					<h2><?php echo(((($this -> publication -> datasources == NULL) || (!array_key_exists($this -> publication -> id, $this -> publication -> datasources))) ? '' : ('<a target="_blank" href="' . $this -> publication -> datasources[$this -> publication -> id] -> url . '">')) . $this -> publication -> title . ((($this -> publication -> datasources == NULL) || (!array_key_exists($this -> publication -> id, $this -> publication -> datasources))) ? '' : '</a>')); ?></h2>
80
					<?php if (($this -> publication -> authors != NULL) || ($this -> publication -> year != NULL)) { ?>				
81
						<div class="infoline">
82
							<?php $itemId = $this -> itemId;
83
							echo(implode('; ', array_filter(array_map(function ($author) use ($itemId) {return (($author == NULL) || ((($author -> lastName == NULL) || ($author -> firstName == NULL)) && ($author -> fullName == NULL))) ? '' : ('<span class="auth">' . (($author -> id == NULL) ? '' : ('<a href="' . JRoute :: _('index.php?option=com_openaire&view=person&Itemid=' . $itemId . '&personId=' . $author -> id) . '">')) . ((($author -> lastName == NULL) || ($author -> firstName == NULL)) ? $author -> fullName : ($author -> lastName . ', ' . $author -> firstName)) . (($author -> id == NULL) ? '' : '</a>') . '</span>');}, $this -> publication -> authors))));
84
							if ($this -> publication -> year!= NULL) { ?>
85
								<span class="date">(<?php echo($this -> publication -> year); ?>)</span>
86
							<?php } ?>
87
						</div>
88
					<?php }
89
					if ($this -> publication -> publisher != NULL) { ?>
90
						<div class="dcinfo">
91
							<?php echo ($this -> publication -> publisher); ?>
92
						</div>
93
					<?php }
94
					if ($this -> publication -> languages != NULL) { ?>
95
						<div class="dcinfo">
96
							<?php echo(implode(', ', $this -> publication -> languages)); ?>
97
						</div>
98
					<?php }
99
					if ($this -> publication -> type != NULL) { ?>
100
						<div class="dcinfo">
101
							<?php echo($this -> publication -> type); ?>
102
						</div>
103
					<?php }
104
					if ($this -> publication -> subjects != NULL) { ?>
105
						<div class="dcinfo">
106
							<?php echo(implode(', ', $this -> publication -> subjects)); ?>
107
						</div>
108
					<?php }
109
					if ($this -> publication -> embargoEndDate != NULL) { ?>
110
						<div class="dcinfo">
111
							<?php echo($this -> publication -> embargoEndDate); ?>
112
						</div>
113
					<?php }
114
					if ($this -> publication -> description != NULL) { ?>
115
						<div class="description">
116
							<?php echo($this -> publication -> description); ?>
117
						</div>
118
					<?php } ?>
119
					<div class="related-Control">
120
						<div class="panel">
121
							<div class="metricsData">
122
								<h3><?php echo(JText :: _('METRICS')); ?></h3>
123
								<img src="<?php echo($this -> statisticsExistUrl . $this -> publication -> id); ?>" style="display: none;" />
124
								<iframe src="<?php echo($this -> statisticsChartUrl . $this -> publication -> id); ?>" style="width: 100%;"></iframe>
125
							</div>
126
						</div>
127
					</div>				
128
				</div>
129
				<div class="mainFunctionsBlock">
130
					<?php if ($this -> publication -> datasources != NULL) { ?>
131
						<div class="functionsSection">
132
							<h3 class="title"><?php echo(JText :: _('DOWNLOAD_FROM')); ?></h3>
133
							<ul class="link">			
134
								<?php foreach($this -> publication -> datasources as $datasource) {
135
									if ((($datasource -> name != NULL) || ($datasource -> englishName != NULL)) && ($datasource -> url != NULL)) {
136
										switch ($datasource -> accessMode) {
137
										case OpenAireViewArticle :: OPEN_ACCESS:
138
											$accessModeClass = 'openAccess';
139
											$accessModeTitle = JText :: _('OPEN_ACCESS');
140
											break;
141
										case OpenAireViewArticle :: CLOSED_ACCESS:
142
											$accessModeClass = 'closedAccess';
143
											$accessModeTitle = JText :: _('CLOSED_ACCESS');
144
											break;
145
										case OpenAireViewArticle :: RESTRICTED_ACCESS:
146
											$accessModeClass = 'restrictedAccess';
147
											$accessModeTitle = JText :: _('RESTRICTED_ACCESS');
148
											break;
149
										case OpenAireViewArticle :: EMBARGO_ACCESS:
150
											$accessModeClass = 'embargoAccess';
151
											$accessModeTitle = JText :: _('EMBARGO_ACCESS');
152
											break;
153
										default:
154
											$accessModeClass = NULL;
155
											$accessModeTitle = NULL;
156
										} ?>
157
										<li>
158
											<?php echo($datasource -> name); ?> (<?php echo($datasource -> url); ?>)
159
											<div class="<?php echo($accessModeClass); ?>" title="<?php echo($accessModeTitle); ?>">&nbsp;</div>
160
										</li>
161
									<?php }
162
								} ?>
163
							</ul>
164
						</div>
165
					<?php }
166
					if ($this -> publication -> projects != NULL) { ?>
167
						<div class="functionsSection">
168
							<h3 class="title"><?php echo(JText :: _('FUNDED_BY_PROJECTS')); ?></h3>
169
							<ul class="line line">
170
								<?php foreach($this -> publication -> projects as $project) {
171
									if (($project != NULL) && (($project -> acronym != NULL) || ($project -> title != NULL))) { ?>
172
										<li><span class="fundinginfo"><?php echo((($project -> id == NULL) ? '' : ('<a href="' . JRoute :: _('index.php?option=com_openaire&view=project&Itemid=' . $this -> itemId . '&projectId=' . $project -> id) . '">')) . (($project -> acronym == NULL) ? $project -> title : $project -> acronym) . (($project -> code == NULL) ? '' : (' (' . $project -> code . ')')) . (($project -> id == NULL) ? '' : ('</a>'))); ?></span></li>
173
									<?php }
174
								} ?>
175
							</ul>
176
						</div>
177
					<?php } ?>
178
					<div class="functionsSection">
179
						<h3 class="title"><?php echo(JText :: _('CITE_THIS_ARTICLE')); ?></h3>
180
						<div class="citationDownloader">
181
							<h4><?php echo(JText :: _('BIBTEX')); ?></h4>
182
							<p id="bibtex"></p>
183
							<h4><?php echo(JText :: _('CHICAGO')); ?></h4>
184
							<p id="chicago"></p>
185
							<h4><?php echo(JText :: _('IEEE')); ?></h4>
186
							<p id="ieee"></p>
187
						</div>
188
					</div>
189
					<img src="https://chart.googleapis.com/chart?cht=qr&amp;chs=256x256&amp;chl=<?php echo(urlencode(JRoute :: _(JURI :: base() . 'index.php?option=com_openaire&view=article&Itemid=' . $this -> itemId . '&articleId=' . $this -> publicationId))); ?>" />
190
				</div>
191
			</div><!--flowWrapper-->
192
		</body>
193
	<?php } ?>
194
</html>
195

    
(1-1/2)