| 1 | <?php |
|---|
| 2 | echo $html->addCrumb('Control Panel', '/admin/entries/start'); |
|---|
| 3 | echo $html->addCrumb(__('Entries', true), '/admin/entries/listing'); |
|---|
| 4 | echo $html->getCrumbs(' / '); |
|---|
| 5 | |
|---|
| 6 | echo $html->div('title_section', __('Comments in your eduBlog', true)); |
|---|
| 7 | //debug($data); |
|---|
| 8 | if ( count($data) < 1 ): |
|---|
| 9 | echo '<h1>'.__('No comments yet', true) .'</h1>';; |
|---|
| 10 | endif; |
|---|
| 11 | |
|---|
| 12 | foreach($data as $v): |
|---|
| 13 | $tmp = $html->para(null, __('Entry', true).': '.$html->link($v['Entry']['title'], '/entries/view/'.$session->read('Auth.User.username').'/'.$v['Entry']['id']), array('style'=>'font-size:14pt;font-weigth:bold;')); |
|---|
| 14 | |
|---|
| 15 | foreach($v['Comment'] as $c): |
|---|
| 16 | $st = $c['status'] == 1 ? __('Published', true) : __('Hidden', true); |
|---|
| 17 | $t = $c['username'] . ' ' . __('wrote', true) . ':<br />'; |
|---|
| 18 | $t .= $html->para(null, $c['comment']); |
|---|
| 19 | $t .= $html->div(null, $c['created'], array('style'=>'font-size:7pt;margin:4px')); |
|---|
| 20 | $t .= $html->link($st, '/admin/comments/change/'.$c['id'].'/'.$c['status']) . ' '; |
|---|
| 21 | $t .= $html->link(__('Delete', true), '/admin/comments/delete/'.$c['id']) . '<br /> '; |
|---|
| 22 | $tmp .= $html->div('adminblock', $t); |
|---|
| 23 | endforeach; |
|---|
| 24 | |
|---|
| 25 | echo $html->div(null, $tmp, array('style'=>'border:1px dotted gray;margin-top:14px;padding:4px;')); |
|---|
| 26 | endforeach; |
|---|
| 27 | ?> |
|---|