-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathindex.ctp
More file actions
55 lines (47 loc) · 1.6 KB
/
index.ctp
File metadata and controls
55 lines (47 loc) · 1.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<?php
/**
* FaqQuestions index
*
* @author Noriko Arai <arai@nii.ac.jp>
* @author Shohei Nakajima <nakajimashouhei@gmail.com>
* @link http://www.netcommons.org NetCommons Project
* @license http://www.netcommons.org/license.txt NetCommons License
* @copyright Copyright 2014, NetCommons Project
*/
?>
<?php echo $this->NetCommonsHtml->script('/faqs/js/faqs.js'); ?>
<?php echo $this->NetCommonsHtml->css('/faqs/css/style.css'); ?>
<div class="nc-content-list" ng-controller="FaqIndex">
<?php echo $this->NetCommonsHtml->blockTitle($faq['name']); ?>
<header class="clearfix">
<div class="pull-left">
<?php if ($categories) : ?>
<?php echo $this->Category->dropDownToggle(array(
'empty' => true,
'displayMenu' => true,
)); ?>
<?php endif; ?>
<?php echo $this->DisplayNumber->dropDownToggle(); ?>
</div>
<div class="pull-right">
<?php if (Current::permission('content_editable') && $faqQuestions) : ?>
<?php echo $this->LinkButton->sort('',
array('controller' => 'faq_question_orders', 'action' => 'edit')
); ?>
<?php endif; ?>
<?php echo $this->Workflow->addLinkButton('', null, array('tooltip' => __d('faqs', 'Create question'))); ?>
</div>
</header>
<?php if ($faqQuestions) : ?>
<?php foreach($faqQuestions as $faqQuestion): ?>
<?php echo $this->element('Faqs.FaqQuestions/article', array(
'faqQuestion' => $faqQuestion,
)); ?>
<?php endforeach; ?>
<?php echo $this->element('NetCommons.paginator'); ?>
<?php else : ?>
<article class="nc-not-found">
<?php echo __d('faqs', 'No faq found.') ?>
</article>
<?php endif; ?>
</div>