Improved Blogpost view
This commit is contained in:
@@ -49,7 +49,7 @@ or <b>=</b>) at the beginning of each of your search values to specify how the c
|
||||
'columns'=>array(
|
||||
'ID',
|
||||
'Date',
|
||||
'Content',
|
||||
'Title',
|
||||
array(
|
||||
'class'=>'bootstrap.widgets.TbButtonColumn',
|
||||
),
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/* @var $this BlogPostController */
|
||||
/* @var $dataProvider CActiveDataProvider */
|
||||
/* @var $blogposts BlogPost[] */
|
||||
?>
|
||||
|
||||
<?php
|
||||
@@ -15,9 +15,22 @@ $this->selectedNav = 'blog';
|
||||
|
||||
?>
|
||||
|
||||
<h1>Blog Posts</h1>
|
||||
<div class="container">
|
||||
|
||||
<?php $this->widget('bootstrap.widgets.TbListView',array(
|
||||
'dataProvider'=>$dataProvider,
|
||||
'itemView'=>'_view',
|
||||
)); ?>
|
||||
<?php echo MsHtml::pageHeader("Blog", "My personal programming blog"); ?>
|
||||
|
||||
<?php
|
||||
$i = 0;
|
||||
foreach($blogposts as $blogpost) {
|
||||
$i++;
|
||||
|
||||
$this->widget('BlogLink',
|
||||
[
|
||||
'date' => new DateTime($blogpost->Date),
|
||||
'caption' => $blogpost->Title,
|
||||
'link' => $blogpost->getLink(),
|
||||
]);
|
||||
}
|
||||
?>
|
||||
|
||||
</div>
|
||||
@@ -15,8 +15,6 @@ $this->breadcrumbs = array(
|
||||
|
||||
<div class="container">
|
||||
|
||||
<h1>View BlogPost #<?php echo $model->ID; ?></h1>
|
||||
|
||||
<div class="well markdownOwner" id="markdownAjaxContent">
|
||||
<?php echo ParsedownHelper::parse($model->Content); ?>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user