Project

General

Profile

1 17542 thanos.pap
<?php
2
3
defined('_JEXEC') or die('Access denied');
4
5
jimport('joomla.methods');
6
7 18541 thanos.pap
JView :: loadHelper('PagingHelper');
8 17542 thanos.pap
JView :: loadHelper('DatasourceHelper');
9
10
if ($this -> result == NULL) { ?>
11 18305 thanos.pap
	<div class="error"><?php echo(JText :: _('ERROR_PERFORMING_SEARCH')); ?></div>
12 17542 thanos.pap
<?php } else if ($this -> result -> datasources == NULL) { ?>
13 17868 thanos.pap
	<div class="box-info"><?php echo(JText :: _('NO_DATASOURCES_FOUND')); ?></div>
14 17542 thanos.pap
<?php } else { ?>
15
	<div class="pageController">
16 18541 thanos.pap
		<span class="totalof"><?php JText :: printf('N_DATASOURCES_PAGE_N_OF_N', $this -> result -> totalDatasources, $this -> page, $this -> totalPages); ?></span>
17 23853 thanos.pap
		<?php $baseUrl = 'index.php?option=com_openaire&view=advancedsearchdatasources&Itemid=' . $this -> itemId;
18 18541 thanos.pap
		for ($i = 0; ($i < count($this -> keywords)) && ($i < count($this -> fields)) && ($i < count($this -> constraints)); $i++)
19 24347 thanos.pap
			$baseUrl .= '&keyword%5B%5D=' . urlencode($this -> keywords[$i]) . '&field%5B%5D=' . urlencode($this -> fields[$i]) . '&constraint%5B%5D=' . urlencode($this -> constraints[$i]);
20 18541 thanos.pap
		foreach ($this -> types as $type)
21 24347 thanos.pap
			$baseUrl .= '&type%5B%5D=' . urlencode($type);
22 18541 thanos.pap
		foreach ($this -> languages as $language)
23 24347 thanos.pap
			$baseUrl .= '&language%5B%5D=' . urlencode($language);
24 18541 thanos.pap
		foreach ($this -> contents as $content)
25 24347 thanos.pap
			$baseUrl .= '&content%5B%5D=' . urlencode($content);
26 18541 thanos.pap
		foreach ($this -> compatibilities as $compatibility)
27 24347 thanos.pap
			$baseUrl .= '&compatibility%5B%5D=' . urlencode($compatibility);
28 18541 thanos.pap
		foreach ($this -> filters as $filter)
29 23853 thanos.pap
			$baseUrl .= '&' . urlencode($filter -> name) . '=' . urlencode(($filter -> value === TRUE) ? 'true' : (($filter -> value === FALSE) ? 'false' : $filter -> value));
30
		$baseUrl .= '&size=' . $this -> size . '&noscroll=true&page=';
31 18541 thanos.pap
		echo(PagingHelper :: formatPaging($this -> page, $this -> totalPages, $this -> pagingStart, $this -> pagingEnd, $baseUrl, '#dtsrctab')); ?>
32 17542 thanos.pap
	</div>
33
	<div class="searchResults">
34
		<?php foreach ($this -> result -> datasources as $datasource) {
35
			echo(DatasourceHelper :: formatDatasource($datasource, $this -> itemId));
36
		} ?>
37
	</div>
38
	<div class="pageController">
39 18541 thanos.pap
		<?php echo(PagingHelper :: formatPaging($this -> page, $this -> totalPages, $this -> pagingStart, $this -> pagingEnd, $baseUrl, '#dtsrctab')); ?>
40 17542 thanos.pap
	</div>
41
<?php } ?>