-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathindex.ctp
More file actions
70 lines (60 loc) · 2 KB
/
index.ctp
File metadata and controls
70 lines (60 loc) · 2 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
56
57
58
59
60
61
62
63
64
65
66
<?php
/**
* Block 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
*/
?>
<article class="block-setting-body">
<?php echo $this->BlockTabs->main(BlockTabsComponent::MAIN_TAB_BLOCK_INDEX); ?>
<div class="tab-content">
<div class="text-right">
<?php echo $this->Button->addLink(); ?>
</div>
<?php echo $this->Form->create('', array(
'url' => NetCommonsUrl::actionUrl(array('plugin' => 'frames', 'controller' => 'frames', 'action' => 'edit'))
)); ?>
<?php echo $this->Form->hidden('Frame.id'); ?>
<table class="table table-hover">
<thead>
<tr>
<th></th>
<th>
<?php echo $this->Paginator->sort('Blog.name', __d('blogs', 'Blog name')); ?>
</th>
<!--<th class="text-right">-->
<!-- --><?php //echo $this->Paginator->sort('Blog.blog_article_count', __d('blogs', 'Article count')); ?>
<!--</th>-->
<th>
<?php echo $this->Paginator->sort('Block.modified', __d('net_commons', 'Updated date')); ?>
</th>
</tr>
</thead>
<tbody>
<?php foreach ($blogs as $blog) : ?>
<tr<?php echo ($this->data['Frame']['block_id'] === $blog['Block']['id'] ? ' class="active"' : ''); ?>>
<td>
<?php echo $this->BlockForm->displayFrame('Frame.block_id', $blog['Block']['id']); ?>
</td>
<td>
<?php echo $this->NetCommonsHtml->editLink($blog['Blog']['name'], array('block_id' => $blog['Block']['id'])); ?>
</td>
<!--<td class="text-right">-->
<!-- --><?php //echo h($blog['Blog']['blog_article_count']); ?>
<!--</td>-->
<td>
<?php echo $this->Date->dateFormat($blog['Block']['modified']); ?>
</td>
<!--</td>-->
</tr>
<?php endforeach; ?>
</tbody>
</table>
<?php echo $this->Form->end(); ?>
<?php echo $this->element('NetCommons.paginator'); ?>
</div>
</article>