1
|
<?php
|
2
|
|
3
|
defined('_JEXEC') or die('Access denied');
|
4
|
|
5
|
jimport('joomla.environment.uri');
|
6
|
jimport('joomla.html.html');
|
7
|
jimport('joomla.methods');
|
8
|
|
9
|
JHtml :: _('behavior.framework',true);
|
10
|
JViewLegacy:: loadHelper('DatasourceHelper');
|
11
|
|
12
|
$document = JFactory :: getDocument();
|
13
|
$document -> addScript(JRoute :: _(JUri :: base() . 'components/com_openaire/js/organization.js'));
|
14
|
|
15
|
?>
|
16
|
|
17
|
<div id="right-column">
|
18
|
<?php if (($this -> organizationId == NULL) || ($this -> organization == NULL) || (($this -> organization -> shortName == NULL) && ($this -> organization -> name == NULL))) { ?>
|
19
|
<div class="error"><?php echo(JText :: _('ERROR_RETRIEVING_ORGANIZATION')); ?></div>
|
20
|
<?php } else { ?>
|
21
|
<div class="projectInfo">
|
22
|
<div class="organizationBox">
|
23
|
<div class="organizationIcon"> </div>
|
24
|
<h3><?php echo((($this -> organization -> url == NULL) ? '' : ('<a target="_blank" class="icon-external" href="' . $this -> organization -> url . '">')) . (($this -> organization -> shortName == NULL) ? $this -> organization -> name : $this -> organization -> shortName) . (($this -> organization -> url == NULL) ? '' : '</a>')); ?></h3>
|
25
|
<dl class="separator">
|
26
|
<dt><?php echo(JText :: _('NAME')); ?></dt>
|
27
|
<dd><?php echo(($this -> organization -> name == NULL) ? '-' : $this -> organization -> name); ?></dd>
|
28
|
<dt><?php echo(JText :: _('COUNTRY')); ?></dt>
|
29
|
<dd><?php echo(($this -> organization -> country == NULL) ? '-' : $this -> organization -> country); ?></dd>
|
30
|
<dt><?php echo(JText :: _('PROJECTS')); ?></dt>
|
31
|
<?php $itemId = $this -> itemId; ?>
|
32
|
<dd><?php echo(($this -> organization -> projects == NULL) ? '-' : implode(', ', array_filter(array_map(function ($project) use ($itemId) {return (($project == NULL) || (($project -> acronym == NULL) && ($project -> title == NULL))) ? '' : ((($project -> id == NULL) ? '' : '<a href="' . JRoute :: _('index.php?option=com_openaire&view=project&Itemid=' . $itemId . '&projectId=' . $project -> id) . '">') . (($project -> acronym == NULL) ? $project -> title : $project -> acronym) . (($project -> code == NULL) ? '' : (' (' . $project -> code . ')')) . (($project -> id == NULL) ? '' : '</a>'));}, $this -> organization -> projects)))); ?></dd>
|
33
|
</dl>
|
34
|
</div>
|
35
|
<div class="contentEntity">
|
36
|
<?php if ($this -> result == NULL) { ?>
|
37
|
<div class="error"><?php echo(JText :: _('ERROR_RETRIEVING_ORGANIZATION_DATASOURCES')); ?></div>
|
38
|
<?php } else if ($this -> result -> datasources == NULL) { ?>
|
39
|
<div class="box-info"><?php echo(JText :: _('NO_ORGANIZATION_DATASOURCES_FOUND')); ?></div>
|
40
|
<?php } else { ?>
|
41
|
<h3><?php echo(JText :: _('DATASOURCES')); ?></h3>
|
42
|
<div class="searchResults">
|
43
|
<?php foreach ($this -> result -> datasources as $datasource) {
|
44
|
echo(DatasourceHelper :: formatDatasource($datasource, $this -> itemId));
|
45
|
}
|
46
|
if ($this -> result -> totalDatasources > OpenAireViewOrganization :: SIZE) { ?>
|
47
|
<div class="pageController">
|
48
|
<a href="<?php echo(JRoute :: _('index.php?option=com_openaire&view=searchdatasources&Itemid=' . $this -> itemId . '&keyword=' . $this -> organizationId)); ?> "><?php JText :: printf('VIEW_ALL_N', $this -> result -> totalDatasources); ?></a>
|
49
|
</div>
|
50
|
<?php } ?>
|
51
|
</div>
|
52
|
<?php } ?>
|
53
|
</div>
|
54
|
</div>
|
55
|
<?php } ?>
|
56
|
</div>
|
57
|
|