1
|
<?php
|
2
|
|
3
|
defined('_JEXEC') or die('Access denied');
|
4
|
|
5
|
jimport('joomla.methods');
|
6
|
|
7
|
JView :: loadHelper('PagingHelper');
|
8
|
JView :: loadHelper('DatasourceHelper');
|
9
|
|
10
|
if ($this -> result == NULL) { ?>
|
11
|
<div class="error"><?php echo(JText :: _('ERROR_PERFORMING_SEARCH')); ?></div>
|
12
|
<?php } else if ($this -> result -> datasources == NULL) { ?>
|
13
|
<div class="box-info"><?php echo(JText :: _('NO_DATASOURCES_FOUND')); ?></div>
|
14
|
<?php } else { ?>
|
15
|
<div class="pageController">
|
16
|
<span class="totalof"><?php JText :: printf('N_DATASOURCES_PAGE_N_OF_N', $this -> result -> totalDatasources, $this -> page, $this -> totalPages); ?></span>
|
17
|
<?php $baseUrl = 'index.php?option=com_openaire&view=browsedatasources&Itemid=' . $this -> itemId;
|
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 . '&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 -> datasources as $datasource) {
|
25
|
echo(DatasourceHelper :: formatDatasource($datasource, $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
|
|