2018-10-16 16:28:42 +00:00
< ? php
defined ( 'BASEPATH' ) OR exit ( 'No direct script access allowed' );
?>
< div class = " right_col " role = " main " >
< div class = " " >
< div class = " row " >
< div class = " col-md-12 col-sm-12 col-xs-12 " >
< div class = " x_panel " >
< div class = " x_title " >
< h2 >< ? = isset ( $trashbin ) && $trashbin ? 'Gelöschte ' : '' ?> Blog-Posts</h2>
< div class = " clearfix " ></ div >
</ div >
< div class = " x_content " >
< p class = " text-muted font-13 m-b-30 " >
< ? =
isset ( $trashbin ) && $trashbin ? 'Hier sind alle bisher in den Papierkorb verschobenen Blog-Posts zu finden, zu verwalten, zu wiederherstellen und zum endgültigen Löschen!' : 'Hier sind alle bisher verfassten Blog-Posts zu finden und zu verwalten.'
?>
</ p >
< div style = " overflow-x: auto " >
< table id = " datatable-fixed-header " class = " table table-striped table-bordered " data - order = '[[ 0, "desc" ]]' data - page - length = " 25 " >
< thead >
< tr >
< th > ID </ th >
< th > Titel </ th >
< th > Beschreibung </ th >
< th > Status </ th >
< th > Veröffentlichung </ th >
< th > Letzte Änderung </ th >
< th > Author </ th >
< th > Kategorie </ th >
< th > Aufrufe </ th >
< th > Likes </ th >
< th > Kommentare </ th >
< th > Aktionen </ th >
</ tr >
</ thead >
< tbody >
< ? php foreach ( $posts as $post ) { ?>
2019-01-08 21:42:54 +00:00
< tr id = " post-<?= $post['ID'] ?> " >
2018-10-16 16:28:42 +00:00
< td >
2019-01-08 21:42:54 +00:00
< ? = $post [ 'ID' ] ?>
2018-10-16 16:28:42 +00:00
</ td >
< td >
2019-01-08 21:42:54 +00:00
< a href = " <?= base_url('blog/post/' . $post['url'] ) ?> " target = " _blank " >< ? = $post [ 'title' ] ?> </a>
2018-10-16 16:28:42 +00:00
</ td >
< td >
2019-01-08 21:42:54 +00:00
< ? = substr ( $post [ 'description' ], 0 , 40 ) ?> ...
2018-10-16 16:28:42 +00:00
</ td >
< td >
2019-01-08 21:42:54 +00:00
< ? = $post [ 'stateName' ] ?>
2018-10-16 16:28:42 +00:00
</ td >
< td >
2019-01-08 21:42:54 +00:00
< ? = date ( 'd.m.Y H:i' , strtotime ( $post [ 'initialRelease' ])) ?>
2018-10-16 16:28:42 +00:00
</ td >
< td >
2019-01-08 21:42:54 +00:00
< ? = date ( 'd.m.Y H:i' , strtotime ( $post [ 'lastEdit' ])) ?>
2018-10-16 16:28:42 +00:00
</ td >
< td >
2019-01-08 21:42:54 +00:00
< a href = " <?= base_url('user/' . $post['author'] ['displayname']) ?> " target = " _blank " >< ? = $post [ 'author' ][ 'displayname' ] ?> </a>
2018-10-16 16:28:42 +00:00
</ td >
< td >
2019-01-08 21:42:54 +00:00
<!-- < a href = " --><?//= base_url('blog/category/' . $post['categoryName'] ) ?><!-- " target = " _blank " >-->< ? //= $post['categoryDisplayName'] ?><!--</a>-->
2018-10-16 16:28:42 +00:00
</ td >
< td >
2019-01-08 21:42:54 +00:00
< ? = $post [ 'views' ] ?>
2018-10-16 16:28:42 +00:00
< i class = " fa fa-eye " ></ i >
</ td >
< td >
< ? = $post [ 'likeCount' ] ?>
< i class = " fa fa-heart "
</ td >
< td >
< ? = $post [ 'commentCount' ] ?>
< i class = " fa fa-comment " ></ i >
</ td >
< ? php if ( isset ( $trashbin ) && $trashbin ) : ?>
< td >
2019-01-08 21:42:54 +00:00
< a data - toggle = " tooltip " data - placement = " top " title = " " data - original - title = " Bearbeiten " href = " <?= base_url('admin/blog/edit/' . $post['ID'] ) ?> " target = " _blank " class = " btn btn-xs btn-default " >
2018-10-16 16:28:42 +00:00
< i class = " fa fa-edit " ></ i >
</ a >
2019-01-08 21:42:54 +00:00
< a data - toggle = " tooltip " data - placement = " top " title = " " data - original - title = " History " href = " <?= base_url('admin/blog/history/' . $post['ID'] ) ?> " target = " _blank " class = " btn btn-xs btn-default " >
2018-10-16 16:28:42 +00:00
< i class = " fa fa-history " ></ i >
</ a >
2019-01-08 21:42:54 +00:00
< a data - toggle = " tooltip " data - placement = " top " title = " " data - original - title = " Wiederherstellen " onclick = " restorePost(<?= $post['ID'] ?>) " class = " btn btn-xs btn-green " >
2018-10-16 16:28:42 +00:00
< i class = " fa fa-undo " ></ i >
</ a >
< a href = " " data - toggle = " tooltip " data - placement = " top " title = " Endgültig löschen " >
2019-01-08 21:42:54 +00:00
< button type = " button " class = " btn btn-xs btn-red " data - toggle = " modal " data - target = " #deleteModal " data - type = " Blog-Post " data - title = " <?= $post['title'] ?> " data - id = " <?= $post['ID'] ?> " >
2018-10-16 16:28:42 +00:00
< i class = " fa fa-trash " ></ i >
</ button >
</ a >
</ td >
< ? php else : ?>
< td >
2019-01-08 21:42:54 +00:00
< a data - toggle = " tooltip " data - placement = " top " title = " " data - original - title = " Bearbeiten " href = " <?= base_url('admin/blog/edit/' . $post['ID'] . '/') ?> " target = " _blank " class = " btn btn-xs btn-default " >
2018-10-16 16:28:42 +00:00
< i class = " fa fa-edit " ></ i >
</ a >
2019-01-08 21:42:54 +00:00
< a data - toggle = " tooltip " data - placement = " top " title = " " data - original - title = " History " href = " <?= base_url('admin/blog/history/' . $post['ID'] ) ?> " target = " _blank " class = " btn btn-xs btn-default " >
2018-10-16 16:28:42 +00:00
< i class = " fa fa-history " ></ i >
</ a >
2019-01-08 21:42:54 +00:00
< a data - toggle = " tooltip " data - placement = " top " title = " " data - original - title = " Löschen " onclick = " deletePost(<?= $post['ID'] ?>) " class = " btn btn-xs btn-red " >
2018-10-16 16:28:42 +00:00
< i class = " fa fa-trash " ></ i >
</ a >
</ td >
< ? php endif ; ?>
</ tr >
< ? php } ?>
</ tbody >
</ table >
</ div >
< ? php if ( isset ( $trashbin ) && $trashbin ) : ?>
< div class = " modal fade " id = " deleteModal " tabindex = " -1 " role = " dialog "
aria - labelledby = " deleteModalTitle " >
< div class = " modal-dialog modal-dialog-centered " role = " document " >
< div class = " modal-content " >
< div class = " modal-header " >
< button type = " button " class = " close " data - dismiss = " modal "
aria - label = " Schließen " >
< span aria - hidden = " true " >& times ; </ span >
</ button >
< h4 class = " modal-title " id = " deleteModalTitle " > Bist du dir WIRKLICH sicher ? </ h4 >
</ div >
< div class = " modal-body " >
< h3 >
< i class = " fa fa-spinner fa-spin " ></ i >
</ h3 >
</ div >
< div class = " modal-footer " >
< button type = " reset " class = " btn btn-default " data - dismiss = " modal " > Nicht
löschen !
</ button >
< button type = " button " class = " btn btn-red " > Ja , löschen !</ button >
</ div >
</ div >
</ div >
</ div >
< ? php endif ; ?>
</ div >
</ div >
</ div >
</ div >
</ div >
</ div >