<?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/>.
*/
// special pane
if (KB_PANE != KB_PANE_UNDEFINED)
{
require_once (KB_PANE . '.php');
// standard pane
} else {
// get groups
$groups = KBModuleGroup::getGroupsByBase (KB_BASE);
?>
<h2 style="background-color:#FFFFFF;padding-top:10px;padding-bottom:10px;padding-left:2px;"><?= $AppUI->_('titleGroups') ?></h2>
<table width="100%" border="0" cellpadding="2" cellspacing="1" class="tbl">
<tr>
<th width="45"><?= $AppUI->_('columnGroupLabels') ?></th>
<th width="35"><?= $AppUI->_('columnEdit') ?></th>
<th><?= $AppUI->_('columnGroupName') ?></th>
<th width="60" nowrap="nowwrap"><?= $AppUI->_('columnGroupLabelsCounter') ?></th>
<th width="75"><?= $AppUI->_('columnGroupSearchable') ?></th>
</tr>
<?
// iterate over groups
foreach ($groups as $group)
{
// childs
$labels = KBModuleLabel::getLabelsByGroup ($group->getId ());
?>
<tr>
<td align="center">
<a href="index.php?m=<?= KB_MODULE ?>&pane=<?= KB_PANE_LABELS ?>&group_id=<?= $group->getId () ?>">
<?= dPshowImage ('./images/next.gif', '16', '16') ?></a>
</td>
<td align="center">
<a href="index.php?m=<?= KB_MODULE ?>&a=group&id=<?= $group->getId () ?>">
<?= dPshowImage ('./images/icons/posticon.gif', '14', '11') ?></a>
</td>
<td>
<a href="index.php?m=<?= KB_MODULE ?>&pane=<?= KB_PANE_LABELS ?>&group_id=<?= $group->getId () ?>">
<?= $group->getName () ?></a>
</td>
<td align="center">
<?= count ($labels); ?>
</td>
<td align="center">
<? if ($group->isVisible ()) { ?>
<? if (KBModuleLabel::hasLabelsInGroup ($group->getId ())) { ?>
<?= dPshowImage ('./images/log-notice.gif', '14', '14') ?></a>
<? } else { ?>
<?= dPshowImage ('./images/obj/warning.gif', '14', '14') ?></a>
<? } ?>
<? } else { ?>
<?= dPshowImage ('./images/log-error.gif', '14', '14') ?></a>
<? } ?>
</td>
</tr>
<?
}
// end iteration
// empty list
if (count ($groups) == 0)
{
?>
<tr>
<td></td>
<td></td>
<td>
<?= $AppUI->_('noGroupAvailable'); ?>
<br />
<a href="index.php?m=<?= KB_MODULE ?>&a=group"><?= $AppUI->_('noGroupAtLeastOne'); ?></a>
</td>
<td></td>
<td></td>
</tr>
<?
}
// end empty list
?>
</table>
<?
}
// end standard/special pane
?>
<div> </div>