1
|
<?php
|
2
|
|
3
|
defined('_JEXEC') or die('Access denied');
|
4
|
|
5
|
jimport('joomla.methods');
|
6
|
|
7
|
JView :: loadHelper('PagingHelper');
|
8
|
JView :: loadHelper('DatasetHelper');
|
9
|
|
10
|
if ($this -> result == NULL) { ?>
|
11
|
<div class="error"><?php echo(JText :: _('ERROR_PERFORMING_SEARCH')); ?></div>
|
12
|
<?php } else if ($this -> result -> datasets == NULL) { ?>
|
13
|
<div class="box-info"><?php echo(JText :: _('NO_DATASETS_FOUND')); ?></div>
|
14
|
<?php } else { ?>
|
15
|
<div class="pageController">
|
16
|
<span class="totalof"><?php JText :: printf('N_DATASETS_PAGE_N_OF_N', $this -> result -> totalDatasets, $this -> page, $this -> totalPages); ?></span>
|
17
|
<?php $baseUrl = 'index.php?option=com_openaire&view=searchdatasets&Itemid=' . $this -> itemId . '&keyword=' . $this -> keyword;
|
18
|
foreach ($this -> filters as $filter)
|
19
|
$baseUrl .= '&' . urlencode($filter -> name) . '=' . urlencode(($filter -> value === TRUE) ? 'true' : (($filter -> value === FALSE) ? 'false' : $filter -> value));
|
20
|
$baseUrl .= '&size=' . $this -> size . '&noscroll=true&page=';
|
21
|
echo(PagingHelper :: formatPaging($this -> page, $this -> totalPages, $this -> pagingStart, $this -> pagingEnd, $baseUrl, '')); ?>
|
22
|
</div>
|
23
|
<div class="searchResults">
|
24
|
<?php foreach ($this -> result -> datasets as $dataset) {
|
25
|
echo(DatasetHelper :: formatDataset($dataset, $this -> itemId));
|
26
|
} ?>
|
27
|
</div>
|
28
|
<div class="pageController">
|
29
|
<?php echo(PagingHelper :: formatPaging($this -> page, $this -> totalPages, $this -> pagingStart, $this -> pagingEnd, $baseUrl, '')); ?>
|
30
|
</div>
|
31
|
<?php } ?>
|
32
|
|