<?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/>.
*/
// base
$base = new KBModuleBase ();
$base->load (KB_BASE);
// group
$group = new KBModuleGroup ();
$group->load (KB_GROUP);
// instanciate label
$label = new KBModuleLabel ();
// load label
if (!$label->load (KB_LABEL))
{
// failed
$AppUI->setMsg ('invalidID', UI_MSG_ERROR, true);
$AppUI->redirect ();
}
// get keywords
$keywords = KBModuleKeyword::getKeywordsByLabel ($label->getId ());
?>
<h2 style="background-color:#FFFFFF;padding-top:10px;padding-bottom:10px;padding-left:2px;"><?= $AppUI->_('titleKeywords') ?></h2>
<p style="background-color:#FFFFFF;margin:0px;padding-left:2px;padding-bottom:10px;">
<?= $AppUI->_('crumbLabelObject') ?>
<a href="index.php?m=<?= KB_MODULE ?>&e=groups"><?= $group->getName () ?></a>
:
<a href="index.php?m=<?= KB_MODULE ?>&pane=<?= KB_PANE_LABELS ?>"><?= $label->getName () ?></a>
</p>
<table width="100%" border="0" cellpadding="2" cellspacing="1" class="tbl">
<tr>
<th width="35"><?= $AppUI->_('columnEdit') ?></th>
<th><?= $AppUI->_('columnKeywordName') ?></th>
</tr>
<?
// iterate over keywords
foreach ($keywords as $keyword)
{
?>
<tr>
<td align="center">
<a href="index.php?m=<?= KB_MODULE ?>&a=keyword&id=<?= $keyword->getId () ?>">
<?= dPshowImage ('./images/icons/posticon.gif', '14', '11') ?></a>
</td>
<td>
<?= $keyword->getName () ?>
</td>
</tr>
<?
}
// end iteration
// empty list
if (count ($keywords) == 0)
{
?>
<tr>
<td></td>
<td>
<?= $AppUI->_('noKeywordAvailable'); ?>
<br />
<a href="index.php?m=<?= KB_MODULE ?>&a=keyword"><?= $AppUI->_('noKeywordAtLeastOneInLabel'); ?></a>
</td>
</tr>
<?
}
// end empty list
?>
</table>