Project

General

Profile

« Previous | Next » 

Revision 33134

Article (similar publications and related data in tables, message for inferred, tooltip in projects funded by, citations-references add show all in top too)

View differences:

modules/uoa-joomla/trunk/joomla-2.5.3/com_openaire/site/helpers/publicationhelper.php
62 62
			return '';
63 63
		if ( property_exists($publication,'similarity')){
64 64
			if ( $publication->similarity!=null){
65
				return  "<div title=\" Similarity:".($publication -> similarity*100)."% \" style=\"float:right\" class=\"uk-progress\"><div class=\"uk-progress-bar\" style=\"width: ".($publication -> similarity*100)."%;\">&nbsp;</div></div>";
65
				return '<span  style=" display: none; ">'  .($publication -> similarity*100).'</span> 	<div title="'.($publication -> similarity*100).'%" style="width:80%;" class="uk-progress"><div class="uk-progress-bar" style="width: '.($publication -> similarity*100).'%;">&nbsp;</div></div>';
66 66
			}
67 67
		}
68 68
		return '';
modules/uoa-joomla/trunk/joomla-2.5.3/com_openaire/site/language/en-GB/en-GB.com_openaire.ini
45 45
CHECK_THIS_ARTICLE_OUT="Check this article out"
46 46
CHECK_THIS_DATASET_OUT="Check this dataset out"
47 47
CHICAGO="Chicago"
48
CITATIONS="References"
48 49
CITE_THIS_ARTICLE="Cite this article"
49 50
CITE_THIS_DATASET="Cite this dataset"
50 51
CLAIM_PUBLICATION="Link publication to"
......
57 58
CLEAR_ALL_FILTERS="clear all filters"
58 59
CLOSE="Close"
59 60
CLOSED_ACCESS="Closed Access"
61
CLAIMED_DATASETS="Claimed datasets"
60 62
COLLECTED_FROM="Collected from"
61 63
COMPATIBILITY="Compatibility"
62 64
COMPATIBILITY_="Compatibility:"
......
182 184
FUNDERS_="Funders:"
183 185
FUNDING_STREAM="Funding Stream"
184 186
FUNDING_STREAMS_="Funding streams:"
187
HARVESTED_DATASETS="Harvested datasets"
185 188
HOW="How"
186 189
HOW_OFTEN="How often"
187 190
HOW_TO_DELIVER="How to deliver"
......
189 192
IDENTIFY="Identify"
190 193
IDENTIFY_PROJECT="Identify project"
191 194
IEEE="IEEE"
195
INFERRED_DATASETS="Inferred datasets"
192 196
INFERRED_SUBJECTS_="Also classified by OpenAIRE into"
193 197
INFERRED_SUBJECTS_TOOLTIP="Questions on how we extract these? Contact us at info@openaire.eu"
194 198
IN_THE_LAST_10_YEARS="in the last 10 years"
......
223 227
LINK_RESEARCH_RESULTS="Link Research Results"
224 228
LINK_TO_PROJECT="Link to project"
225 229
LINK_TO_DATA="Link to dataset"
230
LINK_TO_PUBLICATION="Link to publication"
226 231
LINKED_TO="Related to "
227 232
LOCATE_CONFIRM_PUBLICATIONS="Locate &amp; Confirm Publications"
228 233
LOCATE_REPOSITORY_VIA_YOUR_INSTITUTION="Locate repository via your institution"
......
249 254
NATIONAL_FUNDING="National Funding"
250 255
NO__="no"
251 256
NO_ACCESS_MODE_STATISTICS_FOUND="No access mode statistics found"
257
NO_CITATIONS_STAY_TUNED_ ="No references."
252 258
NO_COMPATIBILITY_STATISTICS_FOUND="No compatibility statistics found"
253 259
NO_CONTENT_STATISTICS_FOUND="No content statistics found"
254 260
NO_COUNTRY_STATISTICS_FOUND="No country statistics found"
......
317 323
ORGANIZATION_TYPES_="Organization Types:"
318 324
ORGANIZATIONS="Organizations"
319 325
ORGANIZATIONS_="Organizations:"
326
OTHER_DATASETS="Other datasets"
320 327
PARTICIPANTS_="Participants:"
321 328
PEER_REVIEWED_ARTICLES="Peer reviewed articles"
322 329
PEOPLE="People"
modules/uoa-joomla/trunk/joomla-2.5.3/com_openaire/site/models/claim.php
1039 1039
	private function parseClaimedPublication($claim) {
1040 1040
		$claimedPublication = new JObject();
1041 1041
		$claimedPublication -> date = $claim -> date;
1042
		$claimedPublication -> claimType=$claim -> type;
1042
		$claimedPublication -> claimType=$claim -> type;		 
1043 1043
		$document = new DOMDocument();
1044 1044
		$document -> recover = TRUE;
1045 1045
		if ($document -> loadXML(trim($claim -> xml)) == FALSE)
......
1102 1102
		$xpath -> registerNamespace('dc', 'http://purl.org/dc/elements/1.1/');
1103 1103
		$xpath -> registerNamespace('oaf', 'http://namespace.openaire.eu/oaf');
1104 1104
		$xpath -> registerNamespace('dr', 'http://www.driver-repository.eu/namespace/dr');
1105
		if (($identifierNodes = $xpath -> query('/record/openaire:metadata/dc:identifier')) == FALSE)
1105
		if (($identifierNodes = $xpath -> query('/record/openaire:metadata/dc:identifier|/record/openaire:metadata/oaf:identifier')) == FALSE)
1106 1106
			throw new Exception('error parsing DMF');
1107 1107
		if (($accessModeNodes = $xpath -> query('/record/openaire:metadata/oaf:accessrights/text()')) == FALSE)
1108 1108
			throw new Exception('error parsing DMF');
......
1333 1333
                return NULL;
1334 1334
			}
1335 1335
	}
1336
	// Get the publications claimed by a user using caching if enabled.
1337
	// $user the user whose claimed publications to retrieve
1338
	// return an array of publications
1339
	public function getClaimedDocsByUser($user) {
1340
	try {
1341
		$time = microtime(TRUE);
1342
		$claimedDocs = $this -> client -> getClaimedPublications($user -> email);
1343
	 	$publications = $this -> parseClaimedDocs($claimedDocs);
1344
	 	 JLog :: add('Retrieved ' . count($publications) . ' claimed publications (user: ' . $user -> username . ') in ' . (microtime(TRUE) - $time) . ' s', JLog :: INFO, self :: LOG);
1345
		return $publications;
1346
		} catch (Exception $e) {
1347
			JLog :: add('Error retrieving claimed publications (user: ' . $user -> username . '): ' . $e -> getMessage(), JLog :: ERROR, self :: LOG);
1348
			return NULL;
1349
		}
1350
	}
1351
        
1352
        // Get the publications claimed by a user using caching if enabled.
1353
	// $user the user whose claimed publications to retrieve
1354
	// return an array of publications
1355
	public function getClaimedDocsByTime($from, $to) {
1356
	try {
1357
		$time = microtime(TRUE);
1358
 		$time1 = strtotime(str_replace("/", "-", $from)) * 1000;
1359
		$time2 = strtotime(str_replace("/", "-", $to)) * 1000;
1360
		$claimedDocs = $this->client ->getAllClaimedPublications($time1, $time2);
1361
		$publications = $this -> parseClaimedDocs($claimedDocs);
1362
		JLog :: add('Retrieved ' . count($publications) . ' claimed publications(from: ' . $from . ', to: '. $to .') in ' . (microtime(TRUE) - $time) . ' s', JLog :: INFO, self :: LOG);
1363
		JLog :: add('Time1 : '.strtotime(str_replace("/", "-", $from)).' from: ' . $time1 . ', to :'. strtotime(str_replace("/", "-", $to)).' time2: '. $time2 .')  time: '.$time , JLog :: INFO, self :: LOG);
1364
		return $publications;
1365
		} catch (Exception $e) {
1366
			JLog :: add('Error retrieving all claims (from: ' . $from . ', to: '. $to .'): ' . $e -> getMessage(), JLog :: ERROR, self :: LOG);
1367
			return NULL;
1368
		}
1369
	}
1370
	public function parseClaimedDocs($claimedDocs ) {
1371
		$locale = JFactory :: getLanguage()->getTag();
1372
		$claimedPublications = array();
1373
		$claimedPublicationsGrouped = array();
1374
		$time = microtime(TRUE);		 
1375
		foreach ($claimedDocs as $claim){
1376
			$parsedClaim = $this -> parseClaimedPublication($claim);
1377
			if ($parsedClaim == null)
1378
				continue;
1379
			$claimedPublications[] = $parsedClaim;
1380
		}
1381
		$resultsToGet = array();
1382
		$projectsToGet = array();
1383
		$claimedDocuments = array();
1384
		foreach ($claimedPublications as $claimedPublication){
1385
			if ($claimedPublication -> publication != null and $claimedPublication -> publication -> id != null)
1386
				$claimedDocuments[$claimedPublication->publicationId] = $claimedPublication -> publication;
1387
			if ($claimedPublication -> projectId !== null){
1388
				$projectsToGet[] = $claimedPublication -> projectId;
1389
			}
1390
			if ($claimedPublication -> targetPublicationId !== null){
1391
				$resultsToGet[] = $claimedPublication -> targetPublicationId;
1392
			}
1393
			if ($claimedPublication -> targetDatasetId !== null){
1394
				$resultsToGet[] = $claimedPublication -> targetDatasetId;
1395
			}
1396
			if (($claimedPublication -> publication == null || ($claimedPublication -> publication != null and $claimedPublication -> publication -> id == null))){
1397
				$resultsToGet[] = $claimedPublication -> publicationId;   
1398
			}
1399
			if ($claimedPublication -> publication == null && $claimedPublication -> type == "dataset"){
1400
				$resultsToGet[] = $claimedPublication -> publicationId;   
1401
			}
1402
		}
1403
            $resultsToGet = array_unique($resultsToGet);
1404
            $projectsToGet = array_unique($projectsToGet);
1405
            $searchModel = new OpenAireModelSearch();
1406
            $results = $searchModel->getResults($resultsToGet, $locale);
1407
            $projects = $searchModel->getProjects($projectsToGet, $locale);
1408
            $keydResults = array();
1409
            $keydProjects = array();
1410
            foreach ($results as $result)
1411
                $keydResults[$result->id] = $result;
1412
            foreach ($projects as $project)
1413
                $keydProjects[$project->id] = $project;
1414
            
1415
            foreach ($claimedPublications as $claimedPublication){
1416
                if (!isset($claimedPublicationsGrouped[$claimedPublication -> publicationId])){                      
1417
                    if ($claimedPublication -> publication == null ||  $claimedPublication -> publication -> id == null){
1418
                        $publication = isset($keydResults[$claimedPublication -> publicationId])?$keydResults[$claimedPublication -> publicationId]:null;
1419
                    }
1420
                    else{
1421
                        $publication = $claimedPublication -> publication;
1422
                    }
1423
                    if ($publication == null || $publication -> id == null)
1424
                        continue;
1425
                    $claimedPublicationsGrouped[$claimedPublication -> publicationId] = new stdClass();
1426
                    $claimedPublicationsGrouped[$claimedPublication -> publicationId] -> publicationId = $claimedPublication -> publicationId;
1427
                    $claimedPublicationsGrouped[$claimedPublication -> publicationId] -> date = $claimedPublication -> date;
1428
                    $claimedPublicationsGrouped[$claimedPublication -> publicationId] -> publication = $publication;
1429
                    $claimedPublicationsGrouped[$claimedPublication -> publicationId] -> publications = array();
1430
                    $claimedPublicationsGrouped[$claimedPublication -> publicationId] -> datasets = array();
1431
                    $claimedPublicationsGrouped[$claimedPublication -> publicationId] -> projects = array();
1432
                    $claimedPublicationsGrouped[$claimedPublication -> publicationId] -> concepts = array();
1433
                    $claimedPublicationsGrouped[$claimedPublication -> publicationId] -> type = isset($claimedPublication -> type)?$claimedPublication -> type:'';
1434
                    $claimedPublicationsGrouped[$claimedPublication -> publicationId] -> claimType = $claimedPublication -> claimType;
1435
                    $claimedPublicationsGrouped[$claimedPublication -> publicationId] -> userEmail = $claimedPublication -> userEmail;
1436
                }
1437
                if ($claimedPublicationsGrouped[$claimedPublication -> publicationId] -> date < $claimedPublication -> date)
1438
                    $claimedPublicationsGrouped[$claimedPublication -> publicationId] -> date = $claimedPublication -> date;
1439
                if ($claimedPublication -> publication != null){
1440
                    $claimedConcepts = array();
1441
                    foreach ($claimedPublication -> publication -> concepts as $concept){
1442
                        $concept = $this->getConcept($concept);
1443
                        if(!isset( $concept)){
1444
							$concept  = new stdClass();
1445
						}
1446
                        $claimedConcept = new stdClass();
1447
                        $claimedConcept->id = isset($concept->id)?$concept->id:'';
1448
                        $claimedConcept->title = isset($concept->path)?$concept->path:'';
1449
                        $claimedConcept->date = $claimedPublication->date;
1450
                        $claimedConcept-> userEmail = $claimedPublication -> userEmail;
1451
                        $claimedConcepts[] = $claimedConcept;
1452
                    }
1453
                    $claimedPublicationsGrouped[$claimedPublication -> publicationId] -> concepts = array_merge($claimedPublicationsGrouped[$claimedPublication -> publicationId] -> concepts, $claimedConcepts);
1454
                }
1455
                if ($claimedPublication -> targetPublicationId !== null){
1456
                    $claimedPublication->title = isset($keydResults[$claimedPublication -> targetPublicationId ])?$keydResults[$claimedPublication -> targetPublicationId ]->title:null;
1457
                    if ($claimedPublication->title == null){
1458
                        $claimedPublication->title = isset($claimedDocuments[$claimedPublication -> targetDatasetId ])?$claimedDocuments[$claimedPublication -> targetDatasetId ]->title:null;
1459
                    }
1460
                    $claimedPublicationsGrouped[$claimedPublication -> publicationId] -> publications[] = $claimedPublication;
1461
                }
1462
                if ($claimedPublication -> targetDatasetId !== null){
1463
                    $claimedPublication->title = isset($keydResults[$claimedPublication -> targetDatasetId ])?$keydResults[$claimedPublication -> targetDatasetId ]->title:null;
1464
                    if ($claimedPublication->title == null){
1465
                        $claimedPublication->title = isset($claimedDocuments[$claimedPublication -> targetDatasetId ])?$claimedDocuments[$claimedPublication -> targetDatasetId ]->title:null;
1466
                    }
1467
                    $claimedPublicationsGrouped[$claimedPublication -> publicationId] -> datasets[] = $claimedPublication;
1468
                }
1469
                if ($claimedPublication -> projectId !== null){
1470
                    $claimedPublication->title = isset($keydProjects[$claimedPublication -> projectId ])?$keydProjects[$claimedPublication -> projectId ]->title:null;
1471
                    $claimedPublication->acronym = isset($keydProjects[$claimedPublication -> projectId ])?$keydProjects[$claimedPublication -> projectId ]->acronym:null;
1472
                    $claimedPublicationsGrouped[$claimedPublication -> publicationId] -> projects[] = $claimedPublication;
1473
                    
1474
                    }
1475
            }
1476
             return $claimedPublicationsGrouped;		
1477
	}
1336 1478
}
1337 1479

  
modules/uoa-joomla/trunk/joomla-2.5.3/com_openaire/site/models/search.php
3909 3909
			$similarPublication -> embargoEndDate = NULL;
3910 3910
			$similarPublication -> description = NULL;
3911 3911
			$similarPublication -> similarity = (($similarityNode = $similarityNodes -> item(0)) == NULL) ? NULL : trim($similarityNode -> nodeValue);
3912
			$similarPublication -> similarity =number_format((float)$similarPublication -> similarity ,5);
3912
			$similarPublication -> similarity =number_format((float)$similarPublication -> similarity ,2);
3913 3913
			if (($similarPublication -> id != NULL) || ($similarPublication -> title != NULL) || ($similarPublication -> year != NULL)){
3914 3914
            	$publication -> similarPublications[] = $similarPublication;
3915 3915
                        }
......
3959 3959
				$relatedDataset -> title = (($titleNode = $titleNodes -> item(0)) == NULL) ? NULL : trim($titleNode -> nodeValue);
3960 3960
				$relatedDataset -> inferred = (($inferredNode = $inferredNodes -> item(0)) == NULL) ? NULL : trim($inferredNode -> nodeValue)=="true"?true:false;
3961 3961
				$relatedDataset -> trust = (($trustNode = $trustNodes -> item(0)) == NULL) ? NULL : trim($trustNode -> nodeValue);
3962
				$relatedDataset -> trust =number_format((float)$relatedDataset -> trust ,2);
3962 3963
                $relatedDataset -> provenance = (($provenanceNode = $provenanceNodes -> item(0)) == NULL) ? NULL : trim($provenanceNode -> nodeValue);
3963 3964
                $relatedDataset -> authors = array();
3964 3965
				$relatedDataset -> year = (($yearNode = $yearNodes -> item(0)) == NULL) ? NULL : intval(trim($yearNode -> nodeValue));
modules/uoa-joomla/trunk/joomla-2.5.3/com_openaire/site/js/article.js
156 156
                            });
157 157
                    }
158 158
                });
159
		related.viewMore = related.getElement('a.viewall');
159
		related.viewMoreUp = related.getElement('a.viewallTop');                
160
		related.viewMoreBottom = related.getElement('a.viewallBottom');
160 161
		related.more = related.getElement('div.more');
161
		if ((related.viewMore != null) && (related.more != null)) {
162
			related.viewMore.related = related;
163
			related.viewMore.addEvent('click', function () {
164
				this.related.viewMore.hide();
162
		
163
		if ((related.viewMoreUp != null) && (related.more != null)) {
164
			related.viewMoreUp.related = related;
165
			related.viewMoreUp.addEvent('click', function () {
166
				this.related.viewMoreUp.hide();
167
				this.related.viewMoreBottom.hide();
165 168
				this.related.more.show();
166 169
			});
167 170
			related.more.hide();
168 171
		}
172
		if ((related.viewMoreBottom != null) && (related.more != null)) {
173
			related.viewMoreBottom.related = related;
174
			related.viewMoreBottom.addEvent('click', function () {
175
				this.related.viewMoreBottom.hide();
176
				this.related.viewMoreUp.hide();
177
				this.related.more.show();
178
			});
179
			related.more.hide();
180
		}
181
		
169 182
	});
170 183
	// tabs
171 184
	selectTab(0);	
modules/uoa-joomla/trunk/joomla-2.5.3/com_openaire/site/js/DataTables-1.10.0/extensions/TableTools/css/dataTables.tableTools.css
334 334
	font-size: 14px;
335 335
	line-height: 20px;
336 336
}
337

  
337
div .dataTables_length{
338
	clear:both;
339
}
modules/uoa-joomla/trunk/joomla-2.5.3/com_openaire/site/views/article/tmpl/default.php
28 28
$document -> addStyleSheet(JRoute :: _(JURI :: base() . 'components/com_openaire/css/tooltip/tooltip1.css'));
29 29
$document -> addScript( 'https://d1bxh8uas1mnw7.cloudfront.net/assets/embed.js');
30 30

  
31
$document->addStyleSheet(JRoute :: _(JURI :: base() . 'components/com_openaire/js/DataTables-1.10.0/extensions/TableTools/css/dataTables.tableTools.css'));
32
$document->addStyleSheet(JRoute :: _(JURI :: base() . 'components/com_openaire/js/DataTables-1.10.0/media/css/jquery.dataTables.css'));
33
$document->addScript(JRoute :: _(JURI :: base() . 'templates/yoo_solar/warp/libraries/jquery/jquery.js'));
34
$document->addScript(JRoute :: _(JURI :: base() . 'components/com_openaire/js/DataTables-1.10.0/media/js/jquery.dataTables.js'));
35
$document->addScript(JRoute :: _(JURI :: base() . 'components/com_openaire/js/DataTables-1.10.0/extensions/TableTools/js/dataTables.tableTools.js'));
36

  
31 37
$application = JFactory :: getApplication();
32 38
$user = JFactory :: getUser();
33 39
$parameters = JComponentHelper :: getParams('com_openaire');
......
156 162
						if($subjects_inferred!=null){ ?>
157 163
							<div class="dcinfo">
158 164
								<div class="inferred_section">
165
									<blockquote class="blockquote-nopad"><?php echo(JText :: _('INFERRED_SUBJECTS_TECHNOLOGY')); ?></blockquote>	
159 166
								<!-- NMI tooltip must be nicer. Do something -->
160 167
								<!--<a title="<?php echo(JText :: _('INFERRED_SUBJECTS_TOOLTIP')); ?>" class="inferred-popup"><span class="tooltip-info"><?php echo(JText :: _('INFERRED_SUBJECTS_')); ?></span></a> 
161 168
								<?php //echo(implode(', ', $subjects_inferred)); ?>
......
163 170
								<?php
164 171
									foreach($subjects_inferred as $taxonomy => $taxonomySubjects){
165 172
								?>
166
								<span class="dchdr"><a><?php echo(JText :: _($taxonomy).":"); ?></a> </span>
173
								<span class="dchdr"><strong><?php echo(JText :: _($taxonomy).":"); ?></strong> </span>
167 174
										<!--
168 175
										<a title="<?php echo(JText :: _('INFERRED_SUBJECTS_TOOLTIP')); ?>" class="inferred-popup"><span class="tooltip-info"><?php echo(JText :: _($taxonomy).":"); ?></span></a> 
169 176
										-->
......
210 217
					<div  class="slideshow tabs" data-widgetkit="slideshow" data-options="{&quot;style&quot;:&quot;tabs&quot;,&quot;autoplay&quot;:0,&quot;interval&quot;:5000,&quot;width&quot;:&quot;auto&quot;,&quot;height&quot;:&quot;auto&quot;,&quot;duration&quot;:500,&quot;index&quot;:0,&quot;order&quot;:&quot;default&quot;,&quot;navigation&quot;:&quot;left&quot;,&quot;animated&quot;:&quot;fade&quot;}">
211 218
						<div class="nav-container nav-left clearfix">
212 219
							<ul class="tabs" persist="true">							
213
							<li class="selected"><a rel="citationsTab">Citations</a></li>
220
							<li class="selected"><a rel="citationsTab"><?php echo(JText :: _('CITATIONS')); ?></a></li>
214 221
								<li ><a rel="datatab"><?php echo(JText :: _('RELATED_DATA')); ?></a></li>
215 222
							<!-- Related publications title tab  -->
216 223
							<!--<li><a rel="publtab"><?php echo(JText :: _('RELATED_PUBLICATIONS')); ?></a></li>  -->
......
227 234
								<?php } else { ?> 									
228 235
									<div class="searchResults">
229 236
									 
230
										 <?php 			
237
										 <?php 	
238
										 if (count($this -> article -> citations) > OpenAireViewArticle :: MAX_RELATED) { ?>
239
												<div class="pageController">
240
													<a class="viewall viewallTop"><?php JText :: printf('VIEW_ALL_N', count($this -> article -> citations)); ?></a>
241
												</div>
242
										<?php	
243
										} 			
231 244
										/* Remove the usort if citations are sorted from db*/
232 245
										 //usort($this -> article -> citations , function ($citation1, $citation2) {return explode("]",explode("[",$citation1 -> title)[1])[0] - explode("]",explode("[",$citation2 -> title)[1])[0] ;});										  
233 246
											foreach (array_slice($this -> article -> citations, 0, OpenAireViewArticle :: MAX_RELATED) as $citation) {														 
234
																echo(PublicationHelper :: formatCitationLinks($citation));								
247
													echo(PublicationHelper :: formatCitationLinks($citation));								
235 248
											}
236 249
											if (count($this -> article -> citations) > OpenAireViewArticle :: MAX_RELATED) { ?>
237 250
												<div class="pageController">
238
													<a class="viewall"><?php JText :: printf('VIEW_ALL_N', count($this -> article -> citations)); ?></a>
251
													<a class="viewall viewallBottom"><?php JText :: printf('VIEW_ALL_N', count($this -> article -> citations)); ?></a>
239 252
												</div>
240 253
												<div class="more">
241 254
													<?php foreach (array_slice($this -> article -> citations, OpenAireViewArticle :: MAX_RELATED) as $citation) {
......
300 313
								}
301 314
								if($harvestedRelatedDatasets!=null||$externalHarvestedDatasets!=null){?>										 							
302 315
									<div class="section_harvested">
303
										<blockquote class="blockquote-nopad"><?php echo(JText :: _('RELATED_DATA_TECHNOLOGY')); ?></blockquote>										
304
									<?php if($harvestedRelatedDatasets!=null){ 
305
										usort($harvestedRelatedDatasets, function ($a, $b) {if ($a->trust == $b->trust) {return 0;}return ($a->trust > $b->trust) ? -1 : 1;});
306
										?>
316
										<h4>
317
										<?php echo(JText :: _('HARVESTED_DATASETS')); ?> 
318
										</h4>	
319
										<blockquote class="blockquote-nopad"><?php echo(JText :: _('RELATED_DATA_HARVESTED_TECHNOLOGY')); ?></blockquote>		
320
										 <table width="100%" cellspacing="0" cellpadding="0" border="0" class=" display harhestedTable" id="harhestedTable">
321
											<thead>
322
												<tr class="even">
323
	 												<th align="left" valign="bottom" nowrap="nowrap">Title</th>												
324
												</tr>
325
											</thead>
307 326
										 
308
										<span class="internal-dataset">
309
										<div class="searchResults">
310
											<?php foreach (array_slice($harvestedRelatedDatasets, 0, OpenAireViewArticle :: MAX_RELATED) as $relatedDataset) {
311
													/* NMI this is a sample, width must be a parameter. This code could be in the datahelper php file. DO the same in the similar documents */												
312
													
313
													echo("<div title=\" ".($relatedDataset -> trust*100)."% \" style=\"float:right\" class=\"uk-progress\"><div class=\"uk-progress-bar\" style=\"width: ".($relatedDataset -> trust*100)."%;\">&nbsp;</div></div>");
314
													echo(DatasetHelper :: formatDataset($relatedDataset, $this -> itemId));												
315
											}
316
											if (count($harvestedRelatedDatasets) > OpenAireViewArticle :: MAX_RELATED) { ?>
317
												<div class="pageController">
318
													<a class="viewall"><?php JText :: printf('VIEW_ALL_N', count($harvestedRelatedDatasets)); ?></a>
319
												</div>
320
												<div class="more">
321
													<?php foreach (array_slice($harvestedRelatedDatasets, OpenAireViewArticle :: MAX_RELATED) as $relatedDataset) {
322
														echo("<div title=\" ".($relatedDataset -> trust*100)."% \" style=\"float:right\" class=\"uk-progress\"><div class=\"uk-progress-bar\" style=\"width: ".($relatedDataset -> trust*100)."%;\">&nbsp;</div></div>");
323
														echo(DatasetHelper :: formatDataset($relatedDataset, $this -> itemId));
324
													} ?>
325
												</div>
326
											<?php } ?>
327
										
328
										</div>  
329
										</span>
330
										<?php } ?>
331
										
332
										<?php 
333
											if($externalHarvestedDatasets!=null){
334
												usort($externalHarvestedDatasets, function ($a, $b) {if ($a->trust == $b->trust) {return 0;}return ($a->trust > $b->trust) ? -1 : 1;});
335
												 ?>
336
												 
337
										<span class="external-dataset">
338
										<div class="searchResults">
339
											<?php foreach (array_slice($externalHarvestedDatasets, 0, OpenAireViewArticle :: MAX_RELATED) as $externalDataset) {
340
												echo("<div title=\" ".($relatedDataset -> trust*100)."% \" style=\"float:right\" class=\"uk-progress\"><div class=\"uk-progress-bar\" style=\"width: ".($relatedDataset -> trust*100)."%;\">&nbsp;</div></div>");
341
												echo(DatasetHelper :: formatDataset($externalDataset, $this -> itemId));
342
											}
343
											if (count($externalHarvestedDatasets) > OpenAireViewArticle :: MAX_RELATED) { ?>
344
												<div class="pageController">
345
													<a class="viewall"><?php JText :: printf('VIEW_ALL_N', count($externalHarvestedDatasets)); ?></a>
346
												</div>
347
												<div class="more">
348
													<?php foreach (array_slice($externalHarvestedDatasets, OpenAireViewArticle :: MAX_RELATED) as $externalDataset) {
349
														echo("<div title=\" ".($relatedDataset -> trust*100)."% \" style=\"float:right\" class=\"uk-progress\"><div class=\"uk-progress-bar\" style=\"width: ".($relatedDataset -> trust*100)."%;\">&nbsp;</div></div>");
350
														echo(DatasetHelper :: formatDataset($externalDataset, $this -> itemId));
351
													} ?>
352
												</div>
353
											<?php } ?>
354
										</div> 
355
										</span>
356
										<?php } ?>
357
											
327
											<tbody>
328
												<?php 
329
												foreach ($harvestedRelatedDatasets  as $relatedDataset) {	 
330
													echo '<tr><td class="internal">';
331
													echo(DatasetHelper :: formatDataset($relatedDataset, $this -> itemId));
332
													echo '</td></tr>';
333
												}	
334
												foreach ( $externalHarvestedDatasets  as $relatedDataset) {	 
335
													echo '<tr><td class="external">';
336
													echo(DatasetHelper :: formatDataset($relatedDataset, $this -> itemId));
337
													echo '</td></tr>';
338
												}
339
												?>	
340
										    </tbody>
341
									    </table>
342
																		
343
 
358 344
									</div>	
359 345
								<?php } 
360 346
								if($claimedRelatedDatasets!=null||$externalClaimedDatasets!=null){?>									
361 347
								?>
362 348
									<div class="section_claimed">
349
										<h4>
350
										<?php echo(JText :: _('CLAIMED_DATASETS')); ?> 
351
										</h4>	
363 352
											<blockquote class="blockquote-nopad"><?php echo(JText :: _('RELATED_DATA_TECHNOLOGY')); ?></blockquote>										
364
									<?php if($claimedRelatedDatasets!=null){
365
										usort($claimedRelatedDatasets, function ($a, $b) {if ($a->trust == $b->trust) {return 0;}return ($a->trust > $b->trust) ? -1 : 1;});
353
										<?php 
354
										if($claimedRelatedDatasets!=null){
355
											usort($claimedRelatedDatasets, function ($a, $b) {if ($a->trust == $b->trust) {return 0;}return ($a->trust > $b->trust) ? -1 : 1;});
356
										}
366 357
										 ?>
358
										  <table width="100%" cellspacing="0" cellpadding="0" border="0" class=" display claimedTable" id="claimedTable">
359
											<thead>
360
												<tr class="even">
361
	 												<th align="left" valign="bottom" nowrap="nowrap">Title</th>												
362
												</tr>
363
											</thead>
367 364
										 
368
										<span class="internal-dataset">
369
										<div class="searchResults">
370
											<?php foreach (array_slice($claimedRelatedDatasets, 0, OpenAireViewArticle :: MAX_RELATED) as $relatedDataset) {									
371
													echo("<div title=\" ".($relatedDataset -> trust*100)."% \" style=\"float:right\" class=\"uk-progress\"><div class=\"uk-progress-bar\" style=\"width: ".($relatedDataset -> trust*100)."%;\">&nbsp;</div></div>");
372
													echo(DatasetHelper :: formatDataset($relatedDataset, $this -> itemId));												
373
											}
374
											if (count($claimedRelatedDatasets) > OpenAireViewArticle :: MAX_RELATED) { ?>
375
												<div class="pageController">
376
													<a class="viewall"><?php JText :: printf('VIEW_ALL_N', count($claimedRelatedDatasets)); ?></a>
377
												</div>
378
												<div class="more">
379
													<?php foreach (array_slice($claimedRelatedDatasets, OpenAireViewArticle :: MAX_RELATED) as $relatedDataset) {
380
														echo("<div title=\" ".($relatedDataset -> trust*100)."% \" style=\"float:right\" class=\"uk-progress\"><div class=\"uk-progress-bar\" style=\"width: ".($relatedDataset -> trust*100)."%;\">&nbsp;</div></div>");
381
														echo(DatasetHelper :: formatDataset($relatedDataset, $this -> itemId));
382
													} ?>
383
												</div>
384
											<?php } ?>
385
										
386
										</div>  
387
										</span>
388
										<?php } ?>
389
										
390
										<?php 
391
											if($externalClaimedDatasets!=null){
392
												usort($externalClaimedDatasets, function ($a, $b) {if ($a->trust == $b->trust) {return 0;}return ($a->trust > $b->trust) ? -1 : 1;});
393
												 ?>
394
												 
395
										<span class="external-dataset">
396
										<div class="searchResults">
397
											<?php foreach (array_slice($externalClaimedDatasets, 0, OpenAireViewArticle :: MAX_RELATED) as $externalDataset) {
398
												echo("<div title=\" ".($relatedDataset -> trust*100)."% \" style=\"float:right\" class=\"uk-progress\"><div class=\"uk-progress-bar\" style=\"width: ".($relatedDataset -> trust*100)."%;\">&nbsp;</div></div>");
399
												echo(DatasetHelper :: formatDataset($externalDataset, $this -> itemId));
400
											}
401
											if (count($externalClaimedDatasets) > OpenAireViewArticle :: MAX_RELATED) { ?>
402
												<div class="pageController">
403
													<a class="viewall"><?php JText :: printf('VIEW_ALL_N', count($externalClaimedDatasets)); ?></a>
404
												</div>
405
												<div class="more">
406
													<?php foreach (array_slice($externalClaimedDatasets, OpenAireViewArticle :: MAX_RELATED) as $externalDataset) {
407
														echo("<div title=\" ".($relatedDataset -> trust*100)."% \" style=\"float:right\" class=\"uk-progress\"><div class=\"uk-progress-bar\" style=\"width: ".($relatedDataset -> trust*100)."%;\">&nbsp;</div></div>");
408
														echo(DatasetHelper :: formatDataset($externalDataset, $this -> itemId));
409
													} ?>
410
												</div>
411
											<?php } ?>
412
										</div> 
413
										</span>
414
										<?php } ?>
415
											
365
											<tbody>
366
												<?php 
367
												foreach ($claimedRelatedDatasets  as $relatedDataset) {	 
368
													echo '<tr><td class="internal">';
369
													echo(DatasetHelper :: formatDataset($relatedDataset, $this -> itemId));
370
													echo '</td></tr>';
371
												}	
372
												foreach ( $externalClaimedDatasets  as $relatedDataset) {	 
373
													echo '<tr><td class="external">';
374
													echo(DatasetHelper :: formatDataset($relatedDataset, $this -> itemId));
375
													echo '</td></tr>';
376
												}
377
												?>	
378
										    </tbody>
379
									    </table>
380
 
416 381
									</div>
417 382
								<?php 
418 383
								} 
419 384
								 if($inferredRelatedDatasets!=null||$externalInferredDatasets!=null){?>									
420 385
								 
421 386
									<div class="section_inferred">
422
										
387
										<h4>
388
										<?php echo(JText :: _('INFERRED_DATASETS')); ?> 
389
										</h4>
423 390
										<blockquote class="blockquote-nopad"><?php echo(JText :: _('RELATED_DATA_TECHNOLOGY')); ?></blockquote>										
424
									<?php if($inferredRelatedDatasets!=null){
425
										usort($inferredRelatedDatasets, function ($a, $b) {if ($a->trust == $b->trust) {return 0;}return ($a->trust > $b->trust) ? -1 : 1;});
426
										 ?>										
391
										<?php
392
										$allInferred=array();
393
										$allInferred=array_merge($inferredRelatedDatasets, $externalInferredDatasets);										 
394
										//usort($allInferred, function ($a, $b) {if ($a->trust == $b->trust) {return 0;}return ($a->trust > $b->trust) ? -1 : 1;});
395
										?>
396
										<table width="100%" cellspacing="0" cellpadding="0" border="0" class=" display inferredTable" id="inferredTable">
397
											<thead>
398
												<tr class="even">
399
	 												<th align="left" valign="bottom" nowrap="nowrap">Title</th>
400
	 												<th align="left" valign="bottom" nowrap="nowrap">Trust</th>	
401
 												</tr>
402
											</thead>
427 403
										 
428
										<span class="internal-dataset">
429
										<div class="searchResults">
430
											<?php foreach (array_slice($inferredRelatedDatasets, 0, OpenAireViewArticle :: MAX_RELATED) as $relatedDataset) {													
431
													echo("<div title=\" ".($relatedDataset -> trust*100)."% \" style=\"float:right\" class=\"uk-progress\"><div class=\"uk-progress-bar\" style=\"width: ".($relatedDataset -> trust*100)."%;\">&nbsp;</div></div>");
432
													echo(DatasetHelper :: formatDataset($relatedDataset, $this -> itemId));												
433
											}
434
											if (count($inferredRelatedDatasets) > OpenAireViewArticle :: MAX_RELATED) { ?>
435
												<div class="pageController">
436
													<a class="viewall"><?php JText :: printf('VIEW_ALL_N', count($inferredRelatedDatasets)); ?></a>
437
												</div>
438
												<div class="more">
439
													<?php foreach (array_slice($inferredRelatedDatasets, OpenAireViewArticle :: MAX_RELATED) as $relatedDataset) {
440
														echo("<div title=\" ".($relatedDataset -> trust*100)."% \" style=\"float:right\" class=\"uk-progress\"><div class=\"uk-progress-bar\" style=\"width: ".($relatedDataset -> trust*100)."%;\">&nbsp;</div></div>");
441
														echo(DatasetHelper :: formatDataset($relatedDataset, $this -> itemId));
442
													} ?>
443
												</div>
444
											<?php } ?>
445
										</div>  
446
										</span>
447
										<?php } ?>
448
										
449
										<?php 
450
											if($externalInferredDatasets!=null){
451
												usort($externalInferredDatasets, function ($a, $b) {if ($a->trust == $b->trust) {return 0;}return ($a->trust > $b->trust) ? -1 : 1;});
452
												 ?>
404
											<tbody>
405
												<?php 
406
												foreach ($allInferred  as $relatedDataset) {	 
407
													echo '<tr><td>';
408
													echo(DatasetHelper :: formatDataset($relatedDataset, $this -> itemId));
409
													echo '</td>';
410
													echo '<td>';
411
													echo('<span  style=" display: none; ">'  .($relatedDataset -> trust*100).'</span> 	<div title=" Trust:'.($relatedDataset -> trust*100).'%" style="width:80%;" class="uk-progress"><div class="uk-progress-bar" style="width: '.($relatedDataset -> trust*100).'%;">&nbsp;</div></div>');
412
													//"<div title=\" Trust:".($relatedDataset -> trust*100)."% \" style=\"float:right\" class=\"uk-progress\"><div class=\"uk-progress-bar\" style=\"width: ".($relatedDataset -> trust*100)."%;\">&nbsp;</div></div>"												
413
													echo '</td></tr>';
414
												}	
453 415
												 
454
										<span class="external-dataset">
455
										<div class="searchResults">
456
											<?php foreach (array_slice($externalInferredDatasets, 0, OpenAireViewArticle :: MAX_RELATED) as $externalDataset) {
457
												echo("<div title=\" ".($relatedDataset -> trust*100)."% \" style=\"float:right\" class=\"uk-progress\"><div class=\"uk-progress-bar\" style=\"width: ".($relatedDataset -> trust*100)."%;\">&nbsp;</div></div>");
458
												echo(DatasetHelper :: formatDataset($externalDataset, $this -> itemId));
459
											}
460
											if (count($externalInferredDatasets) > OpenAireViewArticle :: MAX_RELATED) { ?>
461
												<div class="pageController">
462
													<a class="viewall"><?php JText :: printf('VIEW_ALL_N', count($externalInferredDatasets)); ?></a>
463
												</div>
464
												<div class="more">
465
													<?php foreach (array_slice($externalInferredDatasets, OpenAireViewArticle :: MAX_RELATED) as $externalDataset) {
466
														echo("<div title=\" ".($relatedDataset -> trust*100)."% \" style=\"float:right\" class=\"uk-progress\"><div class=\"uk-progress-bar\" style=\"width: ".($relatedDataset -> trust*100)."%;\">&nbsp;</div></div>");
467
														echo(DatasetHelper :: formatDataset($externalDataset, $this -> itemId));
468
													} ?>
469
												</div>
470
											<?php } ?>
471
										</div>  
472
										</span>
473
										<?php } ?>
474
											
416
												?>	
417
										    </tbody>
418
									    </table>
419
									<?php } ?>
420
 
475 421
									</div>  
422

  
476 423
								<?php }  
477
								
478
								if($otherRelatedDatasets!=null||$externalOtherDatasets!=null){?>									
424
?>
425
<!--
426
<?php								
427
								/*if($otherRelatedDatasets!=null||$externalOtherDatasets!=null){?>									
479 428
								?>
480 429
									<div class="section_other">
481
										
430
										<h4>
431
										<?php echo(JText :: _('OTHER_DATASETS')); ?> 
432
										</h4>	
482 433
										<blockquote class="blockquote-nopad"><?php echo(JText :: _('RELATED_DATA_TECHNOLOGY')); ?></blockquote>										
483 434
									<?php if($otherRelatedDatasets!=null){
484 435
										usort($otherRelatedDatasets, function ($a, $b) {if ($a->trust == $b->trust) {return 0;}return ($a->trust > $b->trust) ? -1 : 1;});
485 436
										 ?>
486 437
										 
487 438
										<span class="internal-dataset">
439
										<h5>
440
										<?php echo(JText :: _('INTERNAL_DATASETS')); ?> 
441
										</h5>
488 442
										<div class="searchResults">
489 443
											<?php foreach (array_slice($otherRelatedDatasets, 0, OpenAireViewArticle :: MAX_RELATED) as $relatedDataset) {													
490
													echo("<div title=\" ".($relatedDataset -> trust*100)."% \" style=\"float:right\" class=\"uk-progress\"><div class=\"uk-progress-bar\" style=\"width: ".($relatedDataset -> trust*100)."%;\">&nbsp;</div></div>");
444
													//echo("<div title=\" ".($relatedDataset -> trust*100)."% \" style=\"float:right\" class=\"uk-progress\"><div class=\"uk-progress-bar\" style=\"width: ".($relatedDataset -> trust*100)."%;\">&nbsp;</div></div>");
491 445
													echo(DatasetHelper :: formatDataset($relatedDataset, $this -> itemId));												
492 446
											}
493 447
											if (count($otherRelatedDatasets) > OpenAireViewArticle :: MAX_RELATED) { ?>
......
496 450
												</div>
497 451
												<div class="more">
498 452
													<?php foreach (array_slice($otherRelatedDatasets, OpenAireViewArticle :: MAX_RELATED) as $relatedDataset) {
499
														echo("<div title=\" ".($relatedDataset -> trust*100)."% \" style=\"float:right\" class=\"uk-progress\"><div class=\"uk-progress-bar\" style=\"width: ".($relatedDataset -> trust*100)."%;\">&nbsp;</div></div>");
453
														//echo("<div title=\" ".($relatedDataset -> trust*100)."% \" style=\"float:right\" class=\"uk-progress\"><div class=\"uk-progress-bar\" style=\"width: ".($relatedDataset -> trust*100)."%;\">&nbsp;</div></div>");
500 454
														echo(DatasetHelper :: formatDataset($relatedDataset, $this -> itemId));
501 455
													} ?>
502 456
												</div>
......
511 465
												?>
512 466
												 
513 467
										<span class="external-dataset">
468
										<h5>
469
										<?php echo(JText :: _('EXTERNAL_DATASETS')); ?> 
470
										</h5>
514 471
										<div class="searchResults">
515 472
											<?php foreach (array_slice($externalOtherDatasets, 0, OpenAireViewArticle :: MAX_RELATED) as $externalDataset) {
516
												echo("<div title=\" ".($relatedDataset -> trust*100)."% \" style=\"float:right\" class=\"uk-progress\"><div class=\"uk-progress-bar\" style=\"width: ".($relatedDataset -> trust*100)."%;\">&nbsp;</div></div>");
473
												//echo("<div title=\" ".($relatedDataset -> trust*100)."% \" style=\"float:right\" class=\"uk-progress\"><div class=\"uk-progress-bar\" style=\"width: ".($relatedDataset -> trust*100)."%;\">&nbsp;</div></div>");
517 474
												echo(DatasetHelper :: formatDataset($externalDataset, $this -> itemId));
518 475
											}
519 476
											if (count($externalOtherDatasets) > OpenAireViewArticle :: MAX_RELATED) { ?>
......
522 479
												</div>
523 480
												<div class="more">
524 481
													<?php foreach (array_slice($externalOtherDatasets, OpenAireViewArticle :: MAX_RELATED) as $externalDataset) {
525
														echo("<div title=\" ".($relatedDataset -> trust*100)."% \" style=\"float:right\" class=\"uk-progress\"><div class=\"uk-progress-bar\" style=\"width: ".($relatedDataset -> trust*100)."%;\">&nbsp;</div></div>");
482
														//echo("<div title=\" ".($relatedDataset -> trust*100)."% \" style=\"float:right\" class=\"uk-progress\"><div class=\"uk-progress-bar\" style=\"width: ".($relatedDataset -> trust*100)."%;\">&nbsp;</div></div>");
526 483
														echo(DatasetHelper :: formatDataset($externalDataset, $this -> itemId));
527 484
													} ?>
528 485
												</div>
......
532 489
										<?php } ?>
533 490
											
534 491
									</div>
535
								<?php }  ?>
536
								
492
								<?php } */ ?>
493
-->								
537 494
							 	<!-- <div class="section_inferred">
538 495
									<blockquote class="blockquote-nopad"><?php echo(JText :: _('RELATED_DATA_TECHNOLOGY')); ?></blockquote>
539 496
									
......
573 530
								</div>
574 531
								-->
575 532
							
576
								<?php } ?>
533
							
577 534
							</div>
578 535
					<!-- 	Related Publications content tab  -->
579 536
					<!--	<div id="publtab" class="tabcontent"> 
......
625 582
								
626 583
									<div class="searchResults">
627 584
										<?php
628
										usort($this -> article -> similarPublications, function ($a, $b) {if ($a->similarity == $b->similarity) {
629
											if($a->year==null||$b->year==null||$a->year==$b->year){return 0;}return $a->year < $b->year;}return ($a->similarity > $b->similarity) ? -1 : 1;});
630
										 foreach (array_slice($this -> article -> similarPublications, 0, OpenAireViewArticle :: MAX_RELATED) as $relatedPublication) {
631
											echo(PublicationHelper :: formatTrustMeter($relatedPublication));
632
											echo(PublicationHelper :: formatPublication($relatedPublication, $this -> itemId));
633
										}
634
										if (count($this -> article -> similarPublications) > OpenAireViewArticle :: MAX_RELATED) { ?>
585
										/*usort($this -> article -> similarPublications, function ($a, $b) {
586
											//if ($a->similarity === $b->similarity) {
587
											//if($a->year==null||$b->year==null||$a->year==$b->year){return 0;}return $a->year < $b->year;}
588
											return  ($a->similarity-$b->similarity);
589
											//($a->similarity > $b->similarity) ? -1 : 1;
590
											});*/
591
										?> <table  width="100%" cellspacing="0" cellpadding="0" border="0" class=" display data-table">
592
											<thead>
593
												<tr><th>Title </th><th> Year </th> <th class="sorting_desc"> Similarity </th></tr>
594
                                                </thead>
595
                                                <tbody> <?php
596
//										 foreach (array_slice($this -> article -> similarPublications, 0, OpenAireViewArticle :: MAX_RELATED) as $relatedPublication) {
597
//											echo(PublicationHelper :: formatTrustMeter($relatedPublication));
598
//											echo(PublicationHelper :: formatPublication($relatedPublication, $this -> itemId));
599
										foreach ($this -> article -> similarPublications as $similarPublication) {
600
											echo('<tr><td  >'.PublicationHelper :: _formatTitle(htmlspecialchars($similarPublication -> title), $similarPublication -> accessMode, $similarPublication -> id, $similarPublication -> source, $similarPublication -> url, $itemId, 
601
												isset($similarPublication -> inferred)?$similarPublication -> inferred:false, 
602
												isset($similarPublication -> trust)?$similarPublication -> trust:"", 
603
												isset($similarPublication -> provenance)?$similarPublication -> provenance:"").'</td>');
604
											echo('<td >'.$similarPublication -> year.'</td>');
605
											if(isset($similarPublication -> inferred)&&($similarPublication -> inferred)){
606
												echo('<td >'.PublicationHelper :: formatTrustMeter($similarPublication).'</td></tr>');
607
											}
608
										} ?>
609
										</tbody>
610
										</table> <?php
611
										/*if (count($this -> article -> similarPublications) > OpenAireViewArticle :: MAX_RELATED) { ?>
635 612
											<div class="pageController">
636 613
												<a class="viewall"><?php JText :: printf('VIEW_ALL_N', count($this -> article -> similarPublications)); ?></a>
637 614
											</div>
......
641 618
													echo(PublicationHelper :: formatPublication($relatedPublication, $this -> itemId));
642 619
												} ?>
643 620
											</div>
644
										<?php } ?>
621
										<?php } */ ?>
645 622
									</div>
646 623
									
647 624
								<?php } ?>
......
771 748
					<?php if ($this -> article -> projects != NULL) { ?>
772 749
						<div class="functionsSection">
773 750
							<h3 class="title"><?php echo(JText :: _('FUNDED_BY_PROJECTS')); ?></h3>
774
							<ul class="line">
775
								
751
							<ul class="line">								
776 752
								<?php foreach($this -> article -> projects as $project) {
777 753
									if (($project != NULL) && (($project -> acronym != NULL) || ($project -> title != NULL))) { ?>
778 754
									<!-- slow ajax call
......
795 771
											 
796 772
										 <!--<span><?php echo((($project -> id == NULL) ? '' : ('<a href="' . JRoute :: _('index.php?option=com_openaire&view=project&Itemid=' . $this -> itemId . '&projectId=' . $project -> id) . '">')) .($project -> funding->funding_level_0 != NULL?$project -> funding->funding_level_0 . ": ":"").(($project -> acronym == NULL) ? $project -> title : $project -> acronym) . (($project -> code == NULL) ? '' : (' (' . $project -> code . ')')) . (($project -> id == NULL) ? '' : ('</a>'))); ?></span>-->
797 773
										 <span><?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>
798
										<span onmouseover="tooltip.pop(this, '#demo2_tip')"> <img src="templates/yoo_solar/styles/openaire/images/box_info<?php echo ($project -> inferred)?"_ok":""?>.png" /></span>
799
										<span><?php echo('<br>Funding:'.(!empty($fundings)?implode(">", $fundings):"") );?></span>
774
										<span onmouseover="tooltip.pop(this, '#demo2_tip')"> <img src="templates/yoo_solar/styles/openaire/images/box_info<?php //echo ($project -> inferred)?"_ok":""?>.png" /></span>
800 775
										<div style="display:none;"> 
801 776
											<div id="demo2_tip"> 
802
											<!--<h3><?php echo $project -> title?></h3>-->
803
											<h4><?php echo $project -> title?></h4>
777
 
778
											<h4 style="margin:5px;"><?php echo $project -> title?></h4> 
804 779
<!--
805 780
											<ul>
806 781
											<?php if ($project -> funding -> funding_level_0 != NULL){ ?>
......
814 789
											<?php }?>
815 790
											</ul>
816 791
-->
817
											<?php if ($project -> inferred){?>
818
											<div style="text-align:center;" >Trust: <?php echo $project -> trust?><!--, provenance: <?php echo $project -> provenance?>--></div>
792
											<div style="text-align:center;"><?php echo('Funding:'.(!empty($fundings)?implode(">", $fundings):"") );?></div>
793
											<?php if ($project -> inferred){
794
												echo('<div style="text-align:center;">'.JText :: _('INFERRED_PROJECT_MESSAGE').'</div>');
795
											?>
796
											
797
											<!--<div style="text-align:center;" >Trust: <?php echo $project -> trust?>, provenance: <?php echo $project -> provenance?></div>-->
819 798
											<?php }?>
820 799
											</div>
821 800
										</div>
......
888 867
		<?php } ?>
889 868
	</div><!--flowWrapper-->
890 869
</div>
870
<script language="javascript" type="text/javascript">
871
    var tableOptions = {};
872
    var table = null; 
873
     <?php
874
     $i=count($this -> article -> similarPublications);
875
     if($i>50){
876
		?>
877
		tableOptions  = {
878
           "bFilter": false,
879
			 "order": [[ 2, "desc" ]],
880
            "lengthMenu": [[10, 20, 50, -1], [10, 20, 50, "All"]],
881
             "dom": '<"top"ifl>rt<"bottom"ifp><"clear">'
882
        };
883
	<?php	
884
	}else if($i>20){
885
		?>
886
		tableOptions  = {
887
           "bFilter": false,
888
			 "order": [[ 2, "desc" ]],
889
            "lengthMenu": [[10, 20,  -1], [10, 20,  "All"]],
890
             "dom": '<"top"ifl>rt<"bottom"ifp><"clear">'
891
        };
892
		
893
    <?php
894
}else if($i>10){
895
		?>
896
		tableOptions  = {
897
           "bFilter": false,
898
			 "order": [[ 2, "desc" ]],
899
            "lengthMenu": [[10,  -1], [10,  "All"]],
900
             "dom": '<"top"ifl>rt<"bottom"ifp><"clear">'
901
        };
902
		
903
    <?php
904
}else {
905
		?>
906
		tableOptions  = {            
907
           "bFilter": false,
908
			 "order": [[ 2, "desc" ]],
909
              "dom": '<"top"if>rt<"bottom"ifp><"clear">'
910
        };
911
		
912
    <?php
913
}
914
    ?>
915
        
916
 
917
	var harvestedTableOptions = {};
918
    var harvestedTable = null; 
919
 
920
 <?php
921
 if(isset($harvestedRelatedDatasets)){
922
	 $i=count($harvestedRelatedDatasets)+count($externalHarvestedDatasets);
923
	 if($i>50){
924
		?>
925
		harvestedTableOptions  = {
926
			"bFilter": false,			 
927
			"lengthMenu": [[10, 20, 50, -1], [10, 20, 50, "All"]],
928
			 "dom": '<"top"ifl>rt<"bottom"ifp><"clear">'
929
		}; 
930
	<?php	
931
	}else if($i>20){
932
		?>
933
		harvestedTableOptions  = {
934
			"bFilter": false,			 
935
			"lengthMenu": [[10, 20,   -1], [10, 20,   "All"]],
936
			 "dom": '<"top"ifl>rt<"bottom"ifp><"clear">'
937
		}; 
938
	<?php
939
	}else if($i>10){
940
		?>
941
		harvestedTableOptions  = {
942
			"bFilter": false,			 
943
			"lengthMenu": [[10, -1], [10,  "All"]],
944
			 "dom": '<"top"ifl>rt<"bottom"ifp><"clear">'
945
		}; 
946
	<?php
947
	}else {
948
		?>
949
		harvestedTableOptions  = {
950
			"bFilter": false,			 
951
			  "dom": '<"top"if>rt<"bottom"ifp><"clear">'
952
		}; 
953
	<?php
954
	}
955
	?> 
956
	var claimedTableOptions = {};
957
	var claimedTable = null; 
958
	 
959
		 <?php
960
	$i=count($claimedRelatedDatasets)+count($externalClaimedDatasets);
961
	 if($i>50){
962
		?>
963
		claimedTableOptions  = {
964
			"bFilter": false,			 
965
			"lengthMenu": [[10, 20, 50, -1], [10, 20, 50, "All"]],
966
			 "dom": '<"top"ifl>rt<"bottom"ifp><"clear">'
967
		}; 
968
	<?php	
969
	}else if($i>20){
970
		?>
971
		claimedTableOptions  = {
972
			"bFilter": false,			 
973
			"lengthMenu": [[10, 20,   -1], [10, 20,   "All"]],
974
			 "dom": '<"top"ifl>rt<"bottom"ifp><"clear">'
975
		}; 
976
	<?php
977
	}else if($i>10){
978
		?>
979
		claimedTableOptions  = {
980
			"bFilter": false,			 
981
			"lengthMenu": [[10, -1], [10,  "All"]],
982
			 "dom": '<"top"ifl>rt<"bottom"ifp><"clear">'
983
		}; 
984
	<?php
985
	}else {
986
		?>
987
		claimedTableOptions  = {
988
			"bFilter": false,			 
989
			  "dom": '<"top"if>rt<"bottom"ifp><"clear">'
990
		}; 
991
	<?php
992
	}
993
	?>  
994
	var inferredTableOptions = {};
995
	var inferredTable = null; 
996
	
997
	 <?php
998
	$i=count($inferredRelatedDatasets)+count($externalInferredDatasets);  
999
	if($i>50){
1000
		?>
1001
		inferredTableOptions  = {
1002
			"bFilter": false,		
1003
		   "order": [[ 1, "desc" ]],	 	 
1004
			"lengthMenu": [[10, 20, 50, -1], [10, 20, 50, "All"]],
1005
			 "dom": '<"top"ifl>rt<"bottom"ifp><"clear">'
1006
		}; 
1007
	<?php	
1008
	}else if($i>20){
1009
		?>
1010
		inferredTableOptions  = {
1011
			"bFilter": false,	
1012
		   "order": [[ 1, "desc" ]],	 		 
1013
			"lengthMenu": [[10, 20,   -1], [10, 20,   "All"]],
1014
			 "dom": '<"top"ifl>rt<"bottom"ifp><"clear">'
1015
		}; 
1016
	<?php
1017
	}else if($i>10){
1018
		?>
1019
		inferredTableOptions  = {
1020
			"bFilter": false,		
1021
		   "order": [[ 1, "desc" ]],	 	 
1022
			"lengthMenu": [[10, -1], [10,  "All"]],
1023
			 "dom": '<"top"ifl>rt<"bottom"ifp><"clear">'
1024
		}; 
1025
	<?php
1026
	}else {
1027
	?>
1028
		inferredTableOptions  = {
1029
			"bFilter": false,		
1030
			"order": [[ 1, "desc" ]],	 
1031
			"dom": '<"top"if>rt<"bottom"ifp><"clear">'
1032
		}; 
1033
<?php
1034
	}
1035
}
1036
?> 
1037
    window.addEvent('domready', function() {        
1038
		 table = jQuery('.data-table').dataTable(tableOptions);
1039
        harvestedTable = jQuery('.harvestedTable').dataTable(harvestedTableOptions);			
1040
		claimedTable = jQuery('.claimedTable').dataTable(claimedTableOptions);			
1041
    	inferredTable = jQuery('.inferredTable').dataTable(inferredTableOptions);			
1042
    });
1043
    
1044
</script>
modules/uoa-joomla/trunk/joomla-2.5.3/com_openaire/site/views/claiminline/tmpl/default.xml
1 1
<?xml version="1.0" encoding="utf-8"?>
2 2
<metadata>
3
	<layout title="CLAIM">
4
		<message>CLAIM</message>
3
	<layout title="CLAIMINLINE">
4
		<message>CLAIMINLINE</message>
5 5
	</layout>
6 6
</metadata>
7 7

  
modules/uoa-joomla/trunk/joomla-2.5.3/com_openaire/site/views/claims/view.html.php
49 49
                        }
50 50
                    //}
51 51
                }            
52
		$claims = $model->getAllClaimedPublications($from, $to, $orderBy);
52
//		$claims = $model->getAllClaimedPublications($from, $to, $orderBy);
53
		$claims = $model->getClaimedDocsByTime($from, $to);
53 54
		$this->assignRef('claims', $claims);
54 55
		$this->assignRef('fromDate', $from);
55 56
		$this->assignRef('toDate', $to);
modules/uoa-joomla/trunk/joomla-2.5.3/com_openaire/site/views/claims/tmpl/default.php
16 16
$document->addStyleSheet(JRoute :: _(JURI :: base() . 'components/com_openaire/js/DataTables-1.10.0/extensions/TableTools/css/dataTables.tableTools.css'));
17 17
$document->addStyleSheet(JRoute :: _(JURI :: base() . 'components/com_openaire/js/DataTables-1.10.0/media/css/jquery.dataTables.css'));
18 18
$document->addScript(JRoute :: _(JURI :: base() . 'templates/yoo_solar/warp/libraries/jquery/jquery.js'));
19
$document->addScript(JRoute :: _(JURI :: base() . 'components/com_openaire/js/DataTables-1.10.0/media/js/jquery.dataTables.js'));
20
$document->addScript(JRoute :: _(JURI :: base() . 'components/com_openaire/js/DataTables-1.10.0/extensions/TableTools/js/dataTables.tableTools.js'));
19
$document->addScript(JRoute :: _(JURI :: base() . 'components/com_openaire/js/DataTables-1.10.0/media/js/jquery.dataTables.min.js'));
20
$document->addScript(JRoute :: _(JURI :: base() . 'components/com_openaire/js/DataTables-1.10.0/extensions/TableTools/js/dataTables.tableTools.min.js'));
21

  
21 22
//$tipModel = $this->getModel('tooltip');
23
JView :: loadHelper('PublicationHelper');
24
JView :: loadHelper('ProjectHelper');
22 25
?>
23 26

  
24 27
<div class="headline">
25 28
    <h1 class="title">Claimed Documents (<?php echo($this->fromDate) ?> - <?php echo($this->toDate) ?>)</h1>
26 29
</div>
30
<h4>&nbsp;</h4>
27 31

  
28
<?php 
32
<h5>Change period:</h5>
33
<?php OpenaireHelperForm :: openForm(array('option' => JRequest :: getVar('option'), 'view' => JRequest :: getVar('view'), 'Itemid' => JRequest :: getVar('Itemid')), array('method' => 'post', 'id' => 'form')); ?>
34
From
35
<input type="text" id="fromDate" value="<?php echo($this->fromDate) ?>" size="10" />
36
<input type="hidden" id="fromDateShadow" name="fromDate" value="<?php echo urlencode($this->fromDate); ?>"/>
37
To
38
<input type="text" id="toDate" value="<?php echo($this->toDate) ?>" size="10" />
39
<input type="hidden" id="toDateShadow" name="toDate" value="<?php echo urlencode($this->toDate); ?>"/>
40
<input type="hidden" name="action" id="action" value="changeDate" />
41
<input type="hidden" id="toRemove" name="toRemove" value="" />
42
<input type="submit" />
43
<?php OpenaireHelperForm :: closeForm();  
29 44
 if (count($this->claims) == 0) { ?>
30 45
    No publications were deposited in the specified date range.
31 46
<?php } else { ?>
32
    <table width="100%" cellspacing="0" cellpadding="0" border="0" class=" display data-table">
47
<div class="filterClaims">
48
	<input type="checkbox" class="cat_project" id="cat_project" value="cat_project">Projects 
49
    <input type="checkbox" class="cat_concept" id="cat_concept" value="cat_concept">Concepts
50
    <input type="checkbox" class="cat_publ_dataset" id="cat_publ_dataset" value="cat_publ_dataset">Publication/Dataset
51
    </div>
52
     <table width="100%" cellspacing="0" cellpadding="0" border="0" class=" display data-table" id="claimsTable">
33 53
        <thead>
34 54
            <tr class="even">
35
				<th align="left" valign="bottom" nowrap="nowrap">Source type</th>
55
<!-- 				<th align="left" valign="bottom" nowrap="nowrap">Source type</th>-->
36 56
                <th align="left" valign="bottom" nowrap="nowrap">Source Title</th>
37 57
                <th align="left" valign="bottom" nowrap="nowrap">Target type</th>
38 58
                <th align="left" valign="bottom" nowrap="nowrap">Target Title</th>
......
48 68
                ?>
49 69
            </tr>
50 70
        </thead>
71
	 
51 72
        <tbody>
52 73
            <?php
53 74
            $i = 0;
54
            foreach ($this->claims as $doc) {				 
55
               // if (!isset($doc->publication))
56
                 //   continue;
57
                //$userInfo = $doc->claimers[0];
75
            foreach ($this->claims as $doc) {		
76
		        if ($doc->publication != NULL &&(count($doc->projects)>0||count($doc->concepts)>0||count($doc->publications)>0||count($doc->datasets)>0)) {          
58 77
                $oddEven = (($i % 2 == 0) ? 'even' : 'odd');
59
                $i++;
60
                ?>
61
                <tr class="<?php echo($oddEven); ?>" id="publication-<?php echo $doc->publication->id ?>">
62
					<td >
63
						 <?php
64
                            
65
                               echo (isset($doc->publication->type)?$doc->publication->type:isset($doc->type)?$doc->type:"");
66

  
67
                            ?>
68
					</td>
69
                    <td width="55%">
70
                        <div id="claimed-<?php echo($i); ?>" class="yoo-tooltip-toggler">
71
                            <?php
72
                            if ($doc->publication->url != null)
73
                                echo ('<a href="' . $doc->publication->url . '" target="_blank">' . $doc->publication->title . '</a>');
74
                            else
75
                                echo ($doc->publication->title);
76
                            ?>
77
                        </div>
78
                    </td>
79
                    <td >
80
						 <?php
81
                             if ( $doc->projectId !== null  ){
82
								  
83
								 echo ('Project');
84
							 }else  if ( $doc->targetDatasetId !== null  ){
85
								  
86
								 echo ('Dataset');
87
							 }else  if ( $doc->targetPublicationId !== null  ){
88
								  
89
								 echo ('Publication');
90
							 }else  if ( $doc->targetConceptId !== null ){
91
								                     
92
								 echo ('Concept');
93
							 }else{
94
								  echo ('Unknown');
95
							  }
96
							?>
97
								 
98
						 
99
					</td>
100
					<td >
101
						 <?php
102
                             if ( $doc->projectId !== null  ){
103
								 
104
								 
105
							?>
106
								<div class ="project" id="project"   title="<?php echo($doc -> title); ?>"> 
107
								 <span class="acronym" id="acronym"  data-info="<?php echo($doc -> projectId); ?>"><span class="tooltip" id="tooltip"><?php echo(($doc -> acronym == NULL) ? ((strlen($doc -> title) > OpenAireViewClaim3 :: MAX_TITLE) ? (substr($doc -> title, 0, OpenAireViewClaim3 :: MAX_TITLE - strlen('...')) . '...') : $doc -> title) : $doc -> acronym); ?></span></span>
108
								 </div>
109
								 <?php
110
							/* }else if( $doc->targetDatasetId !== null){
111
								 echo($doc->title);							 
112
							 }else  if ( $doc->publication !== null &&  $doc->publication ->concept){
113
								 echo($doc->publication -> concept[0] -> title);	
114
							}else  if( $doc->targetPublicationId !== null){
115
								 echo($doc->title);
116
							 }*/
117
							}else{
118
								echo(isset($doc->title)?$doc -> title:"");
119
							}
120
                            ?>
121
					</td>
122
                    <td width="15%">
123
                        <?php echo date(DateTime::ATOM, ($doc->date / 1000)) ?>
124
                    </td>
125
                    <?php
126
                    if (JFactory::getUser()->get('isRoot')) {
127
                        ?>
128
                        <td width="25%">
129
                            <?php echo $doc->userEmail?>
130
                        </td>
131
                        <?php
132
                    }
133
                    ?>
134
             
135 78
                
136
                <?php
137
                /* $scriptText = "window.addEvent('domready', function() {";
138
                  $scriptText .= $tipModel->createDocumentTooltip($doc, "claimed-".$i);
139
                  $scriptText .= "});"; */
79
  				 foreach ($doc->publications as $pub) {	
80
					 $i++;
81
					 write_table_row($oddEven,'tr_publication','Publication/Dataset',$doc -> publication,'Publication/Dataset',
82
					 PublicationHelper :: _formatTitle(htmlspecialchars($pub -> title),
83
					  isset($pub -> c)?$pub -> accessMode:'', isset($pub -> id)?$pub -> id:'',  isset($pub -> source)?$pub -> source:'', 
84
					  isset($pub -> url)?$pub -> url:"", '', 
85
                        isset($pub -> inferred)?$pub -> inferred:false, 
86
                        isset($pub -> trust)?$pub -> trust:"", 
87
                        isset($pub -> provenance)?$pub -> provenance:""),$doc->date,isset($pub->userEmail)?$pub->userEmail:'');
88
				 } 
89
				 foreach ($doc->datasets as $dataset) {	
90
					 $i++;
91
					 write_table_row($oddEven,'tr_dataset','Publication/Dataset',$doc -> publication,'Publication/Dataset',
92
					 PublicationHelper :: _formatTitle(htmlspecialchars($dataset -> title),
93
					   isset($dataset -> accessMode)?$dataset -> accessMode:"",  isset($dataset -> id)?$dataset -> source:"",  isset($dataset -> id)?$dataset -> source:"", 
94
					  isset($dataset -> url)?$dataset -> url:"", '', 
95
                        isset($dataset -> inferred)?$dataset -> inferred:false, 
96
                        isset($dataset -> trust)?$dataset -> trust:"", 
97
                        isset($dataset -> provenance)?$dataset -> provenance:""),$dataset->date,isset($dataset->userEmail)?$dataset->userEmail:'');
98
				 } 
99
				 foreach ($doc->projects as $project) {	
100
					 $i++;
101
					 $project_title= '<div class ="project" id="project"   title="'.$project -> title.'"> 
102
					 <span class="acronym" id="acronym"  data-info="'.($project -> projectId).'">
103
					 <span class="tooltip" id="tooltip">'.
104
					 
105
					 ($project -> acronym == NULL) 
106
					 ? (
107
					 (strlen($project -> title) > OpenAireViewClaim3 :: MAX_TITLE)
108
					  ? (substr($project -> title, 0, OpenAireViewClaim3 :: MAX_TITLE - strlen("...")) . "...") 
109
					  : $project -> title) : $project -> acronym.'</span></span>
110
					<div style="display: none;">
111
						<div id="'.($project -> projectId).'">'.($project -> title).
112
						'</div></div> </div>';
113
					 write_table_row($oddEven,'tr_project','Publication/Dataset',$doc -> publication,'Project',
114
					$project_title,$project->date, isset($project->userEmail)?$project->userEmail:'' );
115
					
116
				 } 
117
				 foreach ($doc->concepts as $concept) {	
118
					 $i++;
119
				 	 write_table_row($oddEven,'tr_concept','Publication/Dataset',$doc -> publication,'Concept',
120
					  $concept->title ,$concept->date,isset($concept->userEmail)?$concept->userEmail:'');
121
 				 } 
122
			 }
123
		 } 
140 124

  
141
                //$document->addScriptDeclaration($scriptText);
142
            }
125
                ?> 
143 126
            
144
            ?>
145
              </tr>
146
              
147 127
        </tbody>
148 128
    </table>
149
<?php } ?>
150
<h4>&nbsp;</h4>
129
   
130
<?php } 
151 131

  
152
<h5>Change period:</h5>
153
<?php OpenaireHelperForm :: openForm(array('option' => JRequest :: getVar('option'), 'view' => JRequest :: getVar('view'), 'Itemid' => JRequest :: getVar('Itemid')), array('method' => 'post', 'id' => 'form')); ?>
154
From
155
<input type="text" id="fromDate" value="<?php echo($this->fromDate) ?>" size="10" />
156
<input type="hidden" id="fromDateShadow" name="fromDate" value="<?php echo urlencode($this->fromDate); ?>"/>
157
To
158
<input type="text" id="toDate" value="<?php echo($this->toDate) ?>" size="10" />
159
<input type="hidden" id="toDateShadow" name="toDate" value="<?php echo urlencode($this->toDate); ?>"/>
160
<input type="hidden" name="action" id="action" value="changeDate" />
161
<input type="hidden" id="toRemove" name="toRemove" value="" />
162
<input type="submit" />
163
<?php OpenaireHelperForm :: closeForm(); ?>
132
function write_table_row($oddEven,$category,$source_type,$publication,$target_type,$target_title,$date,$email) {
133
?>
134
<!--	<tr class="<?php echo $category; ?>" id="publication-<?php echo $publication->id.' '.$category ?>  "   style="display:table-row;">
135
-->              
136
	<tr class="publication-<?php echo $publication->id.' '.$category ?>  " id="<?php echo  $category ?>"  style="display:table-row;">
137
	<!--	<td >
138
			<?php echo($source_type); ?>
139
		</td>-->
140
		<td  width="70%">
141
			<div id="claimed-<?php //echo($i); ?>" class="yoo-tooltip-toggler">
142
				<?php 
143
 				echo( PublicationHelper :: _formatTitle(htmlspecialchars($publication -> title), $publication -> accessMode, $publication -> id, $publication -> source, $publication -> url, '', 
144
				isset($publication -> inferred)?$publication -> inferred:false, 
145
				isset($publication -> trust)?$publication -> trust:"", 
146
				isset($publication -> provenance)?$publication -> provenance:"")); 
147
				?>
148
			</div>
149
		</td>
150
		<td >
151
			<?php 
152
			echo ($target_type); 
153
			?>
154
		</td>
155
		<td >
156
			<?php
157
			echo($target_title);
158
			?>
159

  
160
		</td>
161
		
162
		<td width="15%">
163
			<?php 
164
			echo date("Y/m/d H:i", $date / 1000)  
165
 			?>
166
		</td>
167
		<?php
168
		if (JFactory::getUser()->get('isRoot')) {
169
		?>
170
			<td width="25%">
171
				<?php echo $email?>
172
			</td>
173
		<?php
174
		}
175
		?>
176
	  </tr>
177
<?php
178
}
179
?>
180

  
164 181
<script language="javascript" type="text/javascript">
165 182
    var tableOptions = {};
166 183
    var table = null;
167
    <?php if (JFactory::getUser()->get('isRoot')) {?>
168
        tableOptions  = {
169
            dom: 'T<"clear">lfrtip',
184
    var size ="";
185
     <?php
186
     if($i>50){
187
		?>
188
		tableOptions  = {
189

  
190
            "lengthMenu": [[10, 20, 50, -1], [10, 20, 50, "All"]],
191
            "order": [[ 3, "desc" ]],
192
            "dom": 'T<"top"iflp>rt<"bottom"ip><"clear">',
170 193
            tableTools: {
171
                "sRowSelect": "multi",
194
                "sRowSelect": "multi",                
172 195
                "aButtons": [ "select_all", "select_none", "delete_selected" ]
196

  
197
                
173 198
            }
174 199
        };
200
	<?php	
201
	}else if($i>20){
202
		?>
203
		tableOptions  = {
204

  
205
            "lengthMenu": [[10, 20,  -1], [10, 20, "All"]],
206
            "order": [[ 3, "desc" ]],
207
            "dom": 'T<"top"iflp>rt<"bottom"ip><"clear">',
208
            tableTools: {
209
                "sRowSelect": "multi",                
210
                "aButtons": [ "select_all", "select_none", "delete_selected" ]
211

  
212
                
213
            }
214
        };
215
		
216
    <?php
217
}else if($i>10){
218
		?>
219
		tableOptions  = {
220

  
221
            "lengthMenu": [[10,  -1], [10, "All"]],
222
            "order": [[ 3, "desc" ]],
223
            "dom": 'T<"top"iflp>rt<"bottom"ip><"clear">',
224
            tableTools: {
225
                "sRowSelect": "multi",                
226
                "aButtons": [ "select_all", "select_none", "delete_selected" ]
227

  
228
                
229
            }
230
        };
231
		
232
    <?php
233
}else {
234
		?>
235
		tableOptions  = {
236
             "order": [[ 3, "desc" ]],
237
            "dom": 'T<"top"ifp>rt<"bottom"ip><"clear">',
238
            tableTools: {
239
                "sRowSelect": "multi",                
240
                "aButtons": [ "select_all", "select_none", "delete_selected" ]
241

  
242
                
243
            }
244
        };
245
		
246
    <?php
247
}
248
    ?>
249
        
250
 
175 251
    jQuery.fn.dataTable.TableTools.buttons.delete_selected = jQuery.extend(
176 252
    true,
177 253
    jQuery.fn.dataTable.TableTools.buttonBase,
......
181 257
        "sDiv": "",
182 258
        "fnClick": function( nButton, oConfig ) {
183 259
            var selected = [];
184
            var rows = this.fnGetSelected();	
185
                        
260
            var rows = this.fnGetSelected();	    
186 261
            jQuery.each (rows, function(index, row){
187 262
               selected.push(row.id);
188 263
            });
189 264
            jQuery("#action").val('removeSelected');
190
			jQuery("#toRemove").val(selected.join(","));
191
            
265
			jQuery("#toRemove").val(selected.join(","));            
192 266
            jQuery("#form").submit();
193
             
194 267
        }
195 268
    }
196 269
);
197
<?php }?>
198
    window.addEvent('domready', function() {
199
        
200
        table = jQuery('.data-table').dataTable(tableOptions);
201
		
270
     window.addEvent('domready', function() {
202 271
        Calendar.setup({
203 272
            inputField: 'fromDate', // id of the input field
204 273
            ifFormat: '%d/%m/%Y', // format of the input field
......
215 284
            step: 1,
216 285
            singleClick: true
217 286
        });
218
			
219 287
        $('form').addEvent('submit', function() {
220 288
            $('fromDateShadow').value = encodeURIComponent($('fromDate').value);		
221 289
            $('toDateShadow').value = encodeURIComponent($('toDate').value);
222 290
        });
223

  
224
			
225
    });
291
		
292
	      $('cat_project').addEvent('click', function() {
293
			  table.draw();
294
		 });
295
	 	   
296
 	      $('cat_publ_dataset').addEvent('click', function() {
297
			  table.draw();
298
		 });
299
 	      $('cat_concept').addEvent('click', function() {	 
300
			  table.draw();
301
		 });
302
		table = jQuery('.data-table').DataTable(tableOptions);	
303
		/* Custom filtering function which will search data in column four between two values */
304
		jQuery.fn.dataTable.ext.search.push(
305
		    function( settings, data, dataIndex ) {
306
		     var type =  data[1] ; // use data for the target type column
307
		        if($('cat_project').checked&& type.indexOf( "Project" ) != -1){
308
					return true;
309
				}
310
				if($('cat_concept').checked&& type.indexOf( "Concept" ) != -1){
311
					return true;
312
				}
313
				if($('cat_publ_dataset').checked&& type.indexOf( "Publication/Dataset" ) != -1){
314
					return true;
315
				}				 
316
				if(!$('cat_project').checked &&! $('cat_concept').checked && !$('cat_publ_dataset').checked){
317
					return true;
318
				}
319
		        return false;
320
		    }
321
		);
226 322
	
323
	});
324
 
325
  
227 326
</script>
327

  
modules/uoa-joomla/trunk/joomla-2.5.3/com_openaire/site/views/claim3/tmpl/default.php
31 31
	<div class="claimNavigationBlock">
32 32
		<ul>
33 33
			<li class="step step-1">
34
				<a class="completedState" href="<?php echo(JRoute :: _(JURI :: base() . 'index.php?option=com_openaire&view=claim1&Itemid=' . $this -> itemId)); ?>" ><strong>1</strong><?php echo(JText :: _('IDENTIFY_PROJECT')); ?></a>
34
				<a class="completedState" href="<?php echo(JRoute :: _('index.php?option=com_openaire&view=claim1&Itemid=' . $this -> itemId)); ?>" ><strong>1</strong><?php echo(JText :: _('IDENTIFY_PROJECT')); ?></a>
35 35
			</li>
36 36
			<li class="step step-2">
37
				<a class="completedState" href="<?php echo(JRoute :: _(JURI :: base() . 'index.php?option=com_openaire&view=claim2&Itemid=' . $this -> itemId)); ?>"><strong>2</strong><?php echo(JText :: _('SELECT_PUBLICATIONS_DATASETS')); ?></a>
37
				<a class="completedState" href="<?php echo(JRoute :: _( 'index.php?option=com_openaire&view=claim2&Itemid=' . $this -> itemId)); ?>"><strong>2</strong><?php echo(JText :: _('SELECT_PUBLICATIONS_DATASETS')); ?></a>
38 38
			</li>
39 39
			<li class="step step-3">
40 40
				<a class="activeState"><strong>3</strong><?php echo(JText :: _('SET_ACCESS_RIGHTS')); ?></a>
modules/uoa-joomla/trunk/joomla-2.5.3/com_openaire/site/views/claim4/view.html.php
47 47
		}
48 48
		JView :: loadHelper('PiwikHelper');
49 49
		PiwikHelper :: logPageView('viewClaims', '');
50
		$claimedPublications = $claim -> getClaimedPublications($user);
50
//		$claimedPublications = $claim -> getClaimedPublications($user);
51
		$claimedPublications = $claim -> getClaimedDocsByUser($user);
51 52
		if ($claimedPublications === NULL)
52 53
			$this -> claimedPublications = NULL;
53 54
		else {
modules/uoa-joomla/trunk/joomla-2.5.3/com_openaire/site/views/claim4/tmpl/default.php
64 64
    <?php
65 65
    foreach ($this->claimedPublications as $claim) {
66 66

  
67
        if ($claim->publication != NULL) {
67
        if ($claim->publication != NULL &&(count($claim->projects)>0||count($claim->concepts)>0||count($claim->publications)>0||count($claim->datasets)>0)) {
68 68
            ?>
69 69
                                <li class="publication">
70 70
                                <?php echo(PublicationHelper :: formatPublication($claim->publication, $this->itemId)); ?>
......
119 119
                                                </thead>
120 120
                                                <tbody>
121 121
            <?php foreach ($claim->concepts as $concept): ?>
... This diff was truncated because it exceeds the maximum size that can be displayed.

Also available in: Unified diff