1
|
<?php
|
2
|
|
3
|
defined('_JEXEC') or die('Access denied');
|
4
|
|
5
|
jimport('joomla.methods');
|
6
|
|
7
|
JViewLegacy :: loadHelper('PagingHelper');
|
8
|
JViewLegacy :: loadHelper('OrganizationHelper');
|
9
|
|
10
|
if ($this -> result == NULL) { ?>
|
11
|
<div class="error"><?php echo(JText :: _('ERROR_PERFORMING_SEARCH')); ?></div>
|
12
|
<?php } else if ($this -> result -> organizations == NULL) { ?>
|
13
|
<div class="box-info"><?php echo(JText :: _('NO_ORGANIZATIONS_FOUND')); ?></div>
|
14
|
<?php } else { ?>
|
15
|
<div class="pageController">
|
16
|
<span class="totalof"><?php JText :: printf('N_ORGANIZATIONS_PAGE_N_OF_N', $this -> result -> totalOrganizations, $this -> page, $this -> totalPages); ?></span>
|
17
|
<?php $baseUrl = 'index.php?option=com_openaire&view=advancedsearchorganizations&Itemid=' . $this -> itemId;
|
18
|
for ($i = 0; ($i < count($this -> keywords)) && ($i < count($this -> fields)) && ($i < count($this -> constraints)); $i++)
|
19
|
$baseUrl .= '&keyword%5B%5D=' . urlencode($this -> keywords[$i]) . '&field%5B%5D=' . urlencode($this -> fields[$i]) . '&constraint%5B%5D=' . urlencode($this -> constraints[$i]);
|
20
|
foreach ($this -> countries as $country)
|
21
|
$baseUrl .= '&country%5B%5D=' . urlencode($country);
|
22
|
foreach ($this -> types as $type)
|
23
|
$baseUrl .= '&type%5B%5D=' . urlencode($type);
|
24
|
foreach ($this -> filters as $filter)
|
25
|
$baseUrl .= '&' . urlencode($filter -> name) . '=' . urlencode(($filter -> value === TRUE) ? 'true' : (($filter -> value === FALSE) ? 'false' : $filter -> value));
|
26
|
$baseUrl .= '&size=' . $this -> size . '&noscroll=true&page=';
|
27
|
echo(PagingHelper :: formatPaging($this -> page, $this -> totalPages, $this -> pagingStart, $this -> pagingEnd, $baseUrl, '#orgtab')); ?>
|
28
|
</div>
|
29
|
<div class="searchResults">
|
30
|
<?php foreach ($this -> result -> organizations as $organization) {
|
31
|
echo(OrganizationHelper :: formatOrganization($organization, $this -> itemId));
|
32
|
} ?>
|
33
|
</div>
|
34
|
<div class="pageController">
|
35
|
<?php echo(PagingHelper :: formatPaging($this -> page, $this -> totalPages, $this -> pagingStart, $this -> pagingEnd, $baseUrl, '#orgtab')); ?>
|
36
|
</div>
|
37
|
<?php } ?>
|
38
|
|