getFullName() ?>
(isPublic()?__('Public'):__('Internal'); ?>)
getDescription());
if ($category->children) {
echo '
';
foreach ($category->children as $c) {
echo sprintf('
',
$c->getId(),
$c->getLocalName(),
$c->getNumFAQs(),
$c->getVisibilityDescription()
);
}
echo '
';
}
?>
hasPerm(Dept::PERM_DEPT)) {
$staffTopics = $thisstaff->getTopicNames(false);
$filter = true;
}
$faqs = $category->faqs
->constrain(array('attachments__inline' => 0))
->annotate(array('attachments' => SqlAggregate::COUNT('attachments')));
if ($faqs->exists(true)) {
echo '
';
foreach ($faqs as $faq) {
if ($filter) {
if ($faqTopics = $faq->getHelpTopicsIds()) {
foreach ($faqTopics as $key => $value) {
if (array_key_exists($value, $staffTopics))
$show = true;
}
} else
$show = true;
} else
$show = true;
if ($show)
echo sprintf('
- %s - %s %s
',
$faq->getId(),$faq->getQuestion(),$faq->isPublished() ? __('Published'):__('Internal'),
$faq->attachments ? '' : ''
);
}
echo '
';
} elseif (!$category->children) {
echo '
'.__('Category does not have FAQs').'';
}
?>