hasPerm(FAQ::PERM_MANAGE)) { echo sprintf('
'.__('Add New FAQ').' '. __('More').'
', $category->getId(), $category->getId()); } else { ?>
getFullName() ?>
(isPublic()?__('Public'):__('Internal'); ?>)
getDescription()); if ($category->children) { echo '

'; foreach ($category->children as $c) { echo sprintf('
%s (%d) - %s
', $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('
  1. %s - %s %s
  2. ', $faq->getId(),$faq->getQuestion(),$faq->isPublished() ? __('Published'):__('Internal'), $faq->attachments ? '' : '' ); } echo '
'; } elseif (!$category->children) { echo ''.__('Category does not have FAQs').''; } ?>