<!-- Uncategorised faq start -->
<div ng-if="view.faqSet.categories.length == 1" class="link-collection-content" ng-repeat="category in view.faqSet.categories">
	<ul class="list-group">
		<li class="list-group-item" ng-repeat="question in category.questions | filter:q as results" ng-show="question.isTopFAQ || category.showAll">
			<a href="javascript:;" ng-hide="webpartProperties.useDialog" wizdom365-faq-slide-toggle="#row_{{question.id}}">
				<i class="glyphicon glyphicon-question-sign question-heading-icon" ng-hide="question.icon"></i>
				<wizdom365-icon class="question-heading-icon" icon="question.icon"></wizdom365-icon>
				<span ng-click="question.showAnswer = !question.showAnswer">{{question.question}}</span>
			</a>
			<a href="javascript:;" ng-show="webpartProperties.useDialog" ng-click="openDialog(question)">
				<i class="glyphicon glyphicon-question-sign question-heading-icon" ng-hide="question.icon"></i>
				<wizdom365-icon class="question-heading-icon" icon="question.icon"></wizdom365-icon>
				{{question.question}}
			</a>
			<div class="question-content" ng-if="question.showAnswer">
				<div id="row_{{question.id}}">
					<div style="margin-left:30px">
						<p class="fr-view" ng-bind-html="question.answer | wizdom365TrustHtml"></p>
					</div>
				</div>
			</div>
		</li>
	</ul>
    <div class="text-center faqShowAllButton" ng-show="category.showShowAllButton" ng-click="category.showAll = !category.showAll">
        <a href="javascript:;">
            <span ng-if="!category.showAll">{{'Show all questions' | translate}}</span>
            <span ng-if="category.showAll">{{'Show only top questions' | translate}}</span>
        </a>
    </div>
</div>
<!-- Uncategorised faq end -->


<div ng-if="view.faqSet.categories.length !== 1 && category.questions.length > 0 " class="link-collection-content" ng-repeat="category in view.faqSet.categories">

	<div class="panel panel-primary">
		<div class="panel-heading">
			<div class="panel-title">
				<span ng-if="!category.isRoot">{{category.title}}</span>
				<span ng-if="category.isRoot">{{'Uncategorized' | translate}}</span>
			</div>
		</div>
		<ul class="list-group">
			<li class="list-group-item" ng-repeat="question in category.questions | filter:q as results" ng-show="question.isTopFAQ || category.showAll">
				<a href="javascript:;" ng-hide="webpartProperties.useDialog" wizdom365-faq-slide-toggle="#row_{{question.id}}">
					<i class="glyphicon glyphicon-question-sign question-heading-icon" ng-hide="question.icon"></i>
					<wizdom365-icon class="question-heading-icon" icon="question.icon"></wizdom365-icon>
					<span ng-click="question.showAnswer = !question.showAnswer">{{question.question}}</span>
				</a>
				<a href="javascript:;" ng-show="webpartProperties.useDialog" ng-click="openDialog(question)">
					<i class="glyphicon glyphicon-question-sign question-heading-icon" ng-hide="question.icon"></i>
					<wizdom365-icon class="question-heading-icon" icon="question.icon"></wizdom365-icon>
					{{question.question}}
				</a>
				<div class="question-content">
					<div id="row_{{question.id}}" ng-if="question.showAnswer">
						<div style="margin-left:30px">
							<p class="fr-view" ng-bind-html="question.answer | wizdom365TrustHtml"></p>
						</div>
					</div>
				</div>
			</li>
		</ul>
		<div class="text-center faqShowAllButton" ng-show="category.showShowAllButton" ng-click="category.showAll = !category.showAll">
			<a href="javascript:;">
				<span ng-if="!category.showAll">{{'Show all questions' | translate}}</span>
				<span ng-if="category.showAll">{{'Show only top questions' | translate}}</span>
			</a>
		</div>
	</div>

</div>

