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/project.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
//$document->setTitle("OpenAIRE -  Project:".(($this -> project == NULL) ||($this -> project -> title == NULL) ? '' : $this -> project -> title));
18
$document->setTitle("OpenAIRE - Project".(isset($this -> project -> title)?': '.(strlen($this -> project -> title) > 30?mb_substr($this -> project -> title,0,30).'...':$this -> project -> title):''));
19
$document->setMetaData( 'description', (isset($this -> project -> title)?$this -> project -> title:''), true );
20

    
21
$parameters = JComponentHelper :: getParams('com_openaire');
22
?>
23
<!-- Go to www.addthis.com/dashboard to customize your tools -->
24
<script type="text/javascript" src="<?php echo(JRoute :: _($parameters -> get('addThisUrl')) .JRoute :: _($parameters -> get('addThisPubId') )); ?>" async="async"></script>
25

    
26
<div id="system" class="uk-grid">
27
	<?php if (($this -> projectId == NULL) || ($this -> project == NULL) || (($this -> project -> acronym == NULL) && ($this -> project -> title == NULL))) { ?>
28
		<div class="error"><?php echo(JText :: _('ERROR_RETRIEVING_PROJECT')); ?></div>
29
	<?php } else { ?>
30
		<div class="uk-width-7-10">
31
			<div class="projectBox">
32
				<div class="projectIcon">
33
				<h3<?php echo(($this -> project -> sc39) ? (' class="sc39" title="' . JText :: _('SPECIAL_CLAUSE_39') . '"') : ''); ?>><?php echo(($this -> project -> acronym == NULL) ? $this -> project -> title : $this -> project -> acronym); ?></h3>
34
				</div>
35
				<dl class="uk-description-list-horizontal">
36
					<dt><?php echo(JText :: _('TITLE')); ?></dt>
37
					<dd><?php echo(($this -> project -> title == NULL) ? '-' : $this -> project -> title); ?></dd>
38
					<!--<dt><?php echo(JText :: _('FUNDER')); ?></dt>
39
					<dd><?php echo(($this -> project -> funder == NULL) ? '-' : $this -> project -> funder)?></dd>
40
					<dt><?php echo(JText :: _('FUNDING_STREAM')); ?></dt>
41
					<dd><?php echo(($this -> project -> fundingStream == NULL) ? '-' : $this -> project -> fundingStream); ?></dd>
42
					<dt><?php echo(JText :: _('SCIENTIFIC_AREA')); ?></dt>
43
					<dd><?php echo(($this -> project -> scientificArea == NULL) ? '-' : $this -> project -> scientificArea); ?></dd>
44
                                        <dt><?php echo(JText :: _('FUNDING_STREAM_LEVEL2')); ?></dt>
45
					<dd><?php echo(($this -> project -> fundingStreamLevel2 == NULL) ? '-' : $this -> project -> fundingStreamLevel2); ?></dd>-->
46
					<dt><?php echo(JText :: _('FUNDING')); ?></dt>					
47
					<dd><?php echo(($this -> project -> funder == NULL) ? '-' : $this -> project -> funder.
48
					($this -> project -> fundingStream!==NULL?' '.JText :: _('FUNDER_SEPARATOR').$this -> project -> fundingStream.' ':'')
49
					.($this -> project -> scientificArea!==NULL?' '.JText :: _('FUNDER_SEPARATOR').$this -> project -> scientificArea.' ':'').
50
					($this -> project -> fundingStreamLevel2!==NULL?' '.JText :: _('FUNDER_SEPARATOR').$this -> project -> fundingStreamLevel2.' ':''))?>
51
					</dd>
52
					<?php if($this -> project -> call !== NULL && $this -> project -> call!==''){ 
53
						 echo('<dt>'.JText :: _('CALL').'</dt>'.
54
						 '<dd>'. $this -> project -> call.'</dd>');
55
					}?>
56
					<dt><?php echo(JText :: _('CONTRACT_GA_NUMBER')); ?></dt>
57
					<dd><?php echo(($this -> project -> code == NULL) ? '-' : $this -> project -> code);?></dd>
58
					<dt><?php echo(JText :: _('START_DATE')); ?></dt>
59
					<dd><?php echo(($this -> project -> startDate == NULL) ? '-' : date(JText :: _('DATE_FORMAT'), ($this -> project -> startDate))); ?></dd>
60
					<dt><?php echo(JText :: _('END_DATE')); ?></dt>
61
					<dd><?php echo(($this -> project -> endDate == NULL) ? '-' : date(JText :: _('DATE_FORMAT'), ($this -> project -> endDate))); ?></dd>
62
					<?php if($this -> project -> oaMandate !== NULL ){ 
63
						 echo('<dt>'.JText :: _('OPEN_ACCESS_MANDATE').'</dt>'.
64
						 '<dd>'.JText :: _($this -> project -> oaMandate ? 'YES__' : 'NO__') .'</dd>');
65
					}?>
66
					<?php if($this -> project -> sc39 !== NULL){ ?>
67
						<dt><?php echo(JText :: _('SPECIAL_CLAUSE_39')); ?></dt>
68
						<dd><?php echo(JText :: _($this -> project -> sc39 ? 'YES__' : 'NO__')); ?></dd>
69
					<?php }?>
70
					<?php if($this -> project -> dataPilot !== NULL){ 
71
						 echo('<dt>'.JText :: _('DATA_PILOT').'</dt>'.
72
						 '<dd>'. JText :: _($this -> project -> dataPilot? 'YES__' : 'NO__').'</dd>');
73
					}?>
74
					<?php $itemId = $this -> itemId; ?>
75
					<dt><?php echo(JText :: _('ORGANIZATIONS')); ?></dt>                                                                               
76
					<dd><?php echo(($this -> project -> organizations == NULL) ? '-' : implode(', ', array_filter(array_map(function ($organization) use ($itemId) {return (($organization == NULL) || (($organization -> shortName == NULL) && ($organization -> name == NULL))) ? '' : ((($organization -> id == NULL) ? '' : '<a href="' . JRoute :: _( 'index.php?option=com_openaire&view=organization&Itemid=' . $itemId . '&organizationId=' . $organization -> id) . '">') . (($organization -> shortName == NULL) ? $organization -> name : $organization -> shortName) . (($organization -> id == NULL) ? '' : '</a>'));}, $this -> project -> organizations)))); ?></dd>
77
					<dt><?php echo(JText :: _('MORE_INFORMATION')); ?></dt>
78
					<dd>
79
                                            
80
                                            <?php                                            
81
                                                //if($this-> project->funding->funding_level_0!=="FP7"){ 
82
                                                if($this-> project->funder!=null&&$this-> project->funder!=="EC"){ 
83
                                                        echo(($this->project -> url!==null&&!empty($this->project -> url))?'<a href="'.$this->project -> url.'" target="_blank" class="custom-external">'.$this->project->url.'</a>':'-');
84
                                                ?>
85
                                               
86
                                               
87
                                                   <?php }else{ ?>
88
                                                <a href="http://cordis.europa.eu/projects/<?php echo($this -> project -> code); ?>" target="_blank" class="custom-external"><?php echo(JText :: _('DETAILED_PROJECT_INFORMATION_CORDIS_')); ?></a>
89
                                            <?php } ?>
90
                                        </dd>
91
				</dl>
92
			</div>
93
			<p>&nbsp;</p>
94
			<div>
95
 					<ul class="uk-tab"  data-uk-tab="{connect:'#tab-content'}"  > 
96
						<li class="uk-active"><a rel="publtab"><?php echo(JText :: _('PUBLICATIONS').' ('.$this -> publications -> totalPublications.')'); ?></a></li>
97
						<li><a rel="datatab"><?php echo(JText :: _('DATA').' ('.$this -> datasets -> totalDatasets.')'); ?></a></li>		
98
						<li ><a rel="statstab"><?php echo(JText :: _('STATISTICS').'&nbsp;<i class="uk-icon-pie-chart uk-icon-small"></i>'); ?></a></li>
99
					</ul>
100
 				<ul id="tab-content" class="uk-switcher uk-margin">  
101
					<li id="publtab" >
102
						<?php if ($this -> publications == NULL) { ?>
103
							<div class="error"><?php echo(JText :: _('ERROR_RETRIEVING_PROJECT_PUBLICATIONS')); ?></div>
104
						<?php } else if ($this -> publications -> publications == NULL) { ?>
105
							<div class="box-info"><?php echo(JText :: _('NO_PROJECT_PUBLICATIONS_FOUND')); ?></div>
106
						<?php } else { ?>				
107
							<div class="searchResults">
108
								<?php if ($this -> publications -> totalPublications > OpenAireViewProject :: SIZE) { ?>
109
									<div class="pageController">
110
										<a class="viewall" href="<?php echo(JRoute :: _( 'index.php?option=com_openaire&view=browsepublications&Itemid=' . $this -> itemId . '&project=' . $this -> projectId.'||'.(($this -> project -> acronym == NULL) ? $this -> project -> title : $this -> project -> acronym))); ?> "><?php JText :: printf('VIEW_ALL_N', $this -> publications -> totalPublications); ?></a>
111
									</div>
112
								<?php }
113
								foreach ($this -> publications -> publications as $publication) {
114
									echo(PublicationHelper :: formatPublication($publication, $this -> itemId));
115
								} ?>
116
							</div>
117
						<?php } ?>
118
					</li>
119
					<li id="datatab"  >
120
						<?php if ($this -> datasets == NULL) { ?>
121
							<div class="error"><?php echo(JText :: _('ERROR_RETRIEVING_PROJECT_DATASETS')); ?></div>
122
						<?php } else if ($this -> datasets -> datasets == NULL) { ?>
123
							<div class="box-info"><?php echo(JText :: _('NO_PROJECT_DATASETS_FOUND')); ?></div>
124
						<?php } else { ?>				
125
							<div class="searchResults">
126
								<?php if ($this -> datasets -> totalDatasets > OpenAireViewProject :: SIZE) { ?>
127
									<div class="pageController">
128
										<a class="viewall" href="<?php echo(JRoute :: _('index.php?option=com_openaire&view=browsedatasets&Itemid=' . $this -> itemId . '&project=' . $this -> projectId .'||'. (($this -> project -> acronym == NULL) ? $this -> project -> title : $this -> project -> acronym))); ?> "><?php JText :: printf('VIEW_ALL_N', $this -> datasets -> totalDatasets); ?></a>
129
									</div>
130
								<?php }
131
								foreach ($this -> datasets -> datasets as $dataset) {
132
									echo(DatasetHelper :: formatDataset($dataset, $this -> itemId));
133
								} ?>
134
							</div>
135
						<?php } ?>
136
					</li>
137
					<li id="statstab"  >
138
						<div class="error" style="display: none;"><?php echo(JText :: _('NO_PROJECT_STATISTICS_FOUND')); ?></div>
139
						<?php if (($this -> publications -> publications == NULL) ) { ?>
140
							<div class="box-info"><?php echo(JText :: _('NO_PROJECT_STATISTICS_FOUND')); ?></div>
141
						<?php } else { ?>
142
                                                        <div id="scientificResults">                                                            
143
                                                            <h3><?php echo(JText :: _('SCIENTIFIC_RESULTS')); ?></h3>
144
                                                             <div class="loading">
145
                                                                <?php echo(JText :: _('PLEASE_WAIT_CHART_IS_LOADING_')); ?>
146
                                                                <img  class="loader  " src="./components/com_openaire/images/loader.gif" />
147
                                                            </div>
148
                                                               <?php 
149
                                                           
150
 $url = $this -> chartUrl.'chart.php?com=query&persistent=false&data='.urlencode('{"query":"projScient","projTitle":"'.$this -> projectId.'", "table": "result", "fields": [{"fld": "number", "agg": "count", "type": "spline", "yaxis":1, "c":false}], "xaxis":{"name": "result_classifications-type", "agg": "avg"}, "group": "", "color": "", "type": "chart", "size":30, "sort": "xaxis", "xStyle":{"r": "-", "s": "-", "l": "-", "ft": "-", "wt": "-"}, "yaxisheaders": [""], "fieldsheaders": ["'.JText :: _('Publications').'"], "in": [], "filters": [{"name": "result_datasources-datasource-name", "values": [" "], "to": "-1"}], "having": [], "incfilters": [], "inchaving": [], "title": "", "subtitle": "", "xaxistitle": ""}');
151
                 
152
           
153
                     
154
                                                            $document->addScriptDeclaration("var scientificResultsUrl = '" . $url."'");                
155
                                                                ?>
156
                                                            <div class="frame"> </div>
157
                                                        </div>
158
                                                         <div id="publicationsAccessMode"> 
159
                                                            <h3><?php echo(JText :: _('PUBLICATIONS BY ACCESS MODE')); ?></h3>
160
                                                             <div class="loading">
161
                                                                <?php echo(JText :: _('PLEASE_WAIT_CHART_IS_LOADING_')); ?>
162
                                                                <img  class="loader  " src="./components/com_openaire/images/loader.gif" />
163
                                                            </div>
164
                                                             <?php 
165
                                                          
166
                                                     
167
                                                $url = $this -> chartUrl.'chart.php?com=query&persistent=false&data='.urlencode('{"query":"projOA","projTitle":"'.$this -> projectId.'", "table": "result", "fields": [{"fld": "number", "agg": "count", "type": "pie", "yaxis":1, "c":false}], "xaxis":{"name": "result_classifications-type", "agg": "avg"}, "group": "", "color": "", "type": "chart", "size":30, "sort": "xaxis", "xStyle":{"r": "-", "s": "-", "l": "-", "ft": "-", "wt": "-"}, "yaxisheaders": [""], "fieldsheaders": ["'.JText :: _('Publications').'"], "in": [], "filters": [{"name": "result_datasources-datasource-name", "values": [" "], "to": "-1"}], "having": [], "incfilters": [], "inchaving": [], "title": "", "subtitle": "", "xaxistitle": ""}');
168
               
169
                                                     
170
                                                     
171
                                                             $document->addScriptDeclaration("var  publicationsAccessModeUrl = '" . $url."'");                
172
                                                                ?>
173
                                                            <div class="frame"> </div>
174
							 </div>                                                        
175
                                                        <div id="publicationsInRepositories"> 
176
                                                            <h3><?php echo(JText :: _('PUBLICATIONS_IN_REPOSITORIES')); ?></h3>
177
                                                            <div class="loading">
178
                                                                <?php echo(JText :: _('PLEASE_WAIT_CHART_IS_LOADING_')); ?>
179
                                                                <img  class="loader  " src="./components/com_openaire/images/loader.gif" />
180
                                                            </div>
181
                                                            <?php 
182
                                                            
183
                                                           $url = $this -> chartUrl.'chart.php?com=query&persistent=false&data='.urlencode('{"query":"projPubsRepos","projTitle":"'.$this -> projectId.'", "table": "result", "fields": [{"fld": "number", "agg": "count", "type": "column", "yaxis":1, "c":false}], "xaxis":{"name": "result_classifications-type", "agg": "avg"}, "group": "", "color": "", "type": "chart", "size":30, "sort": "xaxis", "xStyle":{"r": "-", "s": "-", "l": "-", "ft": "-", "wt": "-"}, "yaxisheaders": [""], "fieldsheaders": ["'.JText :: _('Publications').'"], "in": [], "filters": [{"name": "result_datasources-datasource-name", "values": [" "], "to": "-1"}], "having": [], "incfilters": [], "inchaving": [], "title": "", "subtitle": "", "xaxistitle": ""}');
184
                                                    
185
                                                            $document->addScriptDeclaration("var publicationsInRepositoriesUrl = '" . $url."'");                
186
                                                                ?>
187
                                                            <div class="frame"> </div>
188
                                                             </div>
189
						<?php } ?>
190
					</li>
191
				</ul>
192
			</div>
193
		</div>
194
                <div class="uk-width-3-10">
195
                        <div class="functionsSection">
196
                            <h3 class="title"><?php echo(JText :: _('SHARE_BOOKMARK')); ?></h3>
197
                            <!-- Go to www.addthis.com/dashboard to customize your tools -->
198
                            <div class="addthis_sharing_toolbox"></div>
199
                        </div>
200
			<div class="appBox">
201
				<h3><?php echo(JText :: _('APP_BOX')); ?></h3>
202
				<ul class="uk-list uk-list-striped">
203
					<li>
204
						<a href="<?php echo(JRoute :: _( 'index.php?option=com_openaire&view=browsepublications&Itemid=' . $this -> itemId . '&project=' . $this -> projectId)); ?>" class="pubDets"><?php echo(JText :: _('PUBLICATION_DETAILS')); ?></a>
205
					</li>
206
					<li>
207
						<a href="#" id="showSnippet" class="incHTM"><?php echo(JText :: _('DYNAMICALLY_INCORPORATE_PUBLICATIONS_IN_YOUR_SITE_HTML_')); ?></a>
208
						<div id="snippet" style="display: none;">
209
							<a href="#" id="hideSnippet" class="hide_details"><?php echo(JText :: _('CLOSE')); ?></a>
210
							<code>
211
								<pre>
212
			&lt;script type=&quot;text/javascript&quot;&gt;
213
			&lt;!--
214
			document.write('&lt;div id=&quot;oa_widget&quot;&gt;&lt;/div&gt;');
215
			document.write('&lt;script type=&quot;text/javascript&quot; src=&quot;<?php echo(JRoute :: _(JUri :: base() . 'index.php?option=com_openaire&view=widget&format=raw&projectId=' . $this -> projectId.'&type=publication')); ?>&quot;&gt;&lt;/script&gt;');
216
			--&gt;
217
			&lt;/script&gt;
218
								</pre>	
219
							</code>
220
						</div>
221
					</li>
222
                                        <li>
223
						<a href="#" id="showSnippet2" class="incHTM"><?php echo(JText :: _('DYNAMICALLY_INCORPORATE_DATSETS_IN_YOUR_SITE_HTML_')); ?></a>
224
						<div id="snippet2" style="display: none;">
225
							<a href="#" id="hideSnippet2" class="hide_details"><?php echo(JText :: _('CLOSE')); ?></a>
226
							<code>
227
								<pre>
228
			&lt;script type=&quot;text/javascript&quot;&gt;
229
			&lt;!--
230
			document.write('&lt;div id=&quot;oa_widget&quot;&gt;&lt;/div&gt;');
231
			document.write('&lt;script type=&quot;text/javascript&quot; src=&quot;<?php echo(JRoute :: _(JUri :: base() . 'index.php?option=com_openaire&view=widget&format=raw&projectId=' . $this -> projectId.'&type=dataset')); ?>&quot;&gt;&lt;/script&gt;');
232
			--&gt;
233
			&lt;/script&gt;
234
								</pre>	
235
							</code>
236
						</div>
237
					</li>
238
					<li>
239
						<a target="_blank" href="<?php echo(JRoute :: _('index.php?option=com_openaire&view=publications&Itemid=' . $this -> itemId . '&format=raw&projectId=' . $this -> projectId.'&size='.$this -> publications -> totalPublications)); ?>" class="viewEC"><?php JText :: printf('VIEW_FUNDER_PROGRESS_REPORT_HTML_',$this -> project -> funder == NULL ? ' ' : $this -> project -> funder);   ?></a>
240
					</li>
241
					<li>
242
						<a href="<?php echo(JRoute :: _( 'index.php?option=com_openaire&view=publications&Itemid=' . $this -> itemId . '&format=raw&layout=csv&projectId=' . $this -> projectId.'&size='.$this -> publications -> totalPublications)); ?>" class="dlEC"><?php JText :: printf('DOWNLOAD_FUNDER_PROGRESS_REPORT_CSV_',$this -> project -> funder == NULL ? ' ' : $this -> project -> funder); ?></a>
243
					</li>
244
				
245
                                        <li class="publicationControls">
246
                                                <div><a href="<?php echo(JRoute :: _('index.php?option=com_openaire&view=claim1&Itemid=' . $this -> itemId.'&projectId='.$this -> projectId.'&action=addProject')); ?>" class="button-primary"><?php echo(JText :: _('LINK_RESEARCH_RESULTS')); ?></a></div>
247
                                                <div><a href="<?php echo(JRoute :: _( 'index.php?option=com_openaire&view=ingestion1&Itemid=' . $this -> itemId)); ?>" class="button-primary"><?php echo(JText :: _('DEPOSIT_PUBLICATIONS')); ?></a></div>
248
                                        </li>
249
                                    </ul>
250
			</div>
251
		</div>
252
	<?php } ?>
253
</div>
254
<?php
255
 //$document->addScriptDeclaration("var latestPublicationsTimelineUrl = '" .$this -> projectStatisticsChartUrl."chart.php?com=query&data={%22table%22: %22result%22, %22fields%22: [{%22fld%22: %22number%22, %22agg%22: %22count%22, %22type%22: %22line%22, %22yaxis%22:1, %22c%22:true}], %22xaxis%22:{%22name%22: %22year%22, %22agg%22: %22avg%22}, %22group%22: %22%22, %22color%22: %22%22, %22type%22: %22chart%22, %22size%22:30, %22sort%22: %22xaxis%22, %22xStyle%22:{%22r%22: %22-%22, %22s%22: %22-%22, %22l%22: %22-%22, %22ft%22: %22-%22, %22wt%22: %22-%22}, %22yaxisheaders%22: [%22%22], %22fieldsheaders%22: [%22".(JText :: _('PUBLICATIONS'))."%22], %22in%22: [{%22f%22:0, %22text%22: %22".(JText ::_('YEARLY'))."%22}], %22filters%22: [{%22name%22:%22year%22,%22max%22:%22". date("Y",strtotime("-1 year"))."%22,%22min%22:%22".date("Y",strtotime("-20 year"))."%22},{%22name%22: %22result_datasources-datasource-name%22, %22values%22:[%22".$sanitized."%22], %22to%22: %22-1%22}],%22having%22: [], %22incfilters%22: [], %22inchaving%22: [], %22title%22: %22%22, %22subtitle%22: %22%22, %22xaxistitle%22: %22".JText :: _('YEAR')."%22}'");
256
?>
(1-1/2)