<?php
/*
* Free IT Foundation
* Free Technology Serving Knowledge
* http://www.free-it-foundation.org
*
* This file is part of Knowledge Box.
*
* Knowledge Box is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Knowledge Box is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Knowledge Box. If not, see <http://www.gnu.org/licenses/>.
*/
// get elements
$elements = KBModuleElement::getElementsByBase (KB_BASE);
// base
$base = new KBModuleBase ();
$base->load (KB_BASE);
?>
<h2 style="background-color:#FFFFFF;padding-top:10px;padding-bottom:10px;padding-left:2px;"><?= $AppUI->_('titleResultsOutput') ?></h2>
<table width="100%" border="0" cellpadding="2" cellspacing="1" class="tbl">
<tr>
<th width="35"><?= $AppUI->_('columnEdit') ?></th>
<th><?= $AppUI->_('columnElementName') ?></th>
<th width="140"><?= $AppUI->_('columnElementType') ?></th>
</tr>
<?
// iterate over elements
foreach ($elements as $element)
{
?>
<tr>
<td align="center">
<a href="index.php?m=<?= KB_MODULE ?>&a=element&id=<?= $element->getId () ?>">
<?= dPshowImage ('./images/icons/posticon.gif', '14', '11') ?></a>
</td>
<td>
<? if ($element->getName () == '#fieldTypeName#') { ?>
<?= $AppUI->_('fieldTypeName') ?>
<? } elseif ($element->getName () == '#elementTypeKeywords#') { ?>
<?= $AppUI->_('elementTypeKeywords') ?>
<? } elseif ($element->getName () == '#elementTypeRelations#') { ?>
<?= $AppUI->_('elementTypeRelations') ?>
<? } else { ?>
<?= $element->getName () ?>
<? } ?>
</td>
<td align="center" nowrap="nowrap">
<? if ($element->isType (KB_ELEMENT_FIELD)) { ?>
<?= $AppUI->_('elementTypeField') ?>
<? } elseif ($element->isType (KB_ELEMENT_ENTRY)) { ?>
<?= $AppUI->_('fieldTypeName') ?>
<? } elseif ($element->isType (KB_ELEMENT_KEYWORDS)) { ?>
<?= $AppUI->_('elementTypeKeywords') ?>
<? } elseif ($element->isType (KB_ELEMENT_AGGREGATION)) { ?>
<?= $AppUI->_('elementTypeKeywordsAggregation') ?>
<? } elseif ($element->isType (KB_ELEMENT_RELATIONS)) { ?>
<?= $AppUI->_('elementTypeRelations') ?>
<? } elseif ($element->isType (KB_ELEMENT_COLLECTION)) { ?>
<?= $AppUI->_('elementTypeRelationsAggregation') ?>
<? } ?>
</td>
</tr>
<?
}
// end iteration
// empty list
if (count ($elements) == 0)
{
?>
<tr>
<td></td>
<td>
<?= $AppUI->_('noResultsOutputConfigured'); ?>
<br />
<a href="index.php?m=<?= KB_MODULE ?>&a=element"><?= $AppUI->_('noResultsOutputNeeded'); ?></a>
</td>
<td></td>
</tr>
<?
}
// end empty list
?>
</table>
<div> </div>