-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathindex.ctp
More file actions
37 lines (35 loc) · 1.24 KB
/
index.ctp
File metadata and controls
37 lines (35 loc) · 1.24 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
<?php
/**
* comment index template
*
* @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 if (isset($comments) && $comments): ?>
<div class="panel panel-default" ng-init="more=false">
<div class="panel-body workflow-comments">
<?php foreach ($comments as $i => $comment): ?>
<div class="comment form-group" ng-show="<?php echo $i >= WorkflowComment::START_LIMIT ? 'more' : 'true' ?>">
<div>
<?php echo $this->DisplayUser->handleLink($comment, array('avatar' => true)); ?>
<small class="text-muted"><?php echo $comment['WorkflowComment']['created']; ?></small>
</div>
<div>
<?php echo nl2br(h($comment['WorkflowComment']['comment'])) ?>
</div>
</div>
<?php endforeach ?>
<?php if (count($comments) > WorkflowComment::START_LIMIT) : ?>
<div class="form-group" ng-hide="more">
<button type="button" class="btn btn-info btn-block" ng-click="more=true">
<?php echo __d('net_commons', 'More'); ?>
</button>
</div>
<?php endif; ?>
</div>
</div>
<?php endif;