Finished BlogPost
This commit is contained in:
parent
c2a829ac6a
commit
09488796d8
@ -636,3 +636,35 @@ ul.nav li.dropdown-append:hover > ul.dropdown-menu {
|
||||
|
||||
border-radius: 6px 6px 0px 0px;
|
||||
}
|
||||
|
||||
/* blog/view
|
||||
-------------------------------------------------- */
|
||||
|
||||
.blogOwner {
|
||||
border: 1px solid #D7E0E2;
|
||||
|
||||
padding-top: 0px;
|
||||
}
|
||||
|
||||
.blogFooter {
|
||||
background-color: #D7E0E2;
|
||||
|
||||
margin-top: 40px;
|
||||
|
||||
margin-bottom: -19px;
|
||||
margin-left: -19px;
|
||||
margin-right: -19px;
|
||||
|
||||
min-height: 22px;
|
||||
padding: 2px 8px;
|
||||
}
|
||||
|
||||
.blogFooterLeft {
|
||||
float:left;
|
||||
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.blogFooterRight {
|
||||
float: right;
|
||||
}
|
@ -88,6 +88,7 @@ return ArrayX::merge(
|
||||
'blog/index' => 'blogPost/index',
|
||||
'blog/update' => 'blogPost/update',
|
||||
'blog/<id>' => 'blogPost/view/id/<id>',
|
||||
'blog/<id>/<name>' => 'blogPost/view/id/<id>',
|
||||
|
||||
'downloads/details.php' => 'programs/index', // Compatibility
|
||||
'downloads/downloads.php' => 'programs/index', // Compatibility
|
||||
|
@ -97,10 +97,26 @@ class BlogPost extends CActiveRecord
|
||||
return parent::model($className);
|
||||
}
|
||||
|
||||
//####################################
|
||||
//########### MY FUNCTIONS ###########
|
||||
//####################################
|
||||
|
||||
/**
|
||||
* @return DateTime
|
||||
*/
|
||||
public function getDateTime() {
|
||||
return new DateTime($this->Date);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getLink() {
|
||||
return '/blog/' . $this->ID;
|
||||
$name = $this->Title;
|
||||
|
||||
$name = str_replace(' ', '_', $name);
|
||||
$name = preg_replace("/[^A-Za-z0-9_]/", '', $name);
|
||||
|
||||
return '/blog/' . $this->ID . '/' . $name;
|
||||
}
|
||||
}
|
||||
|
@ -15,8 +15,19 @@ $this->breadcrumbs = array(
|
||||
|
||||
<div class="container">
|
||||
|
||||
<div class="well markdownOwner" id="markdownAjaxContent">
|
||||
<?php echo MsHtml::pageHeader("Blog", "My personal programming blog"); ?>
|
||||
|
||||
<div class="blogOwner well markdownOwner" id="markdownAjaxContent">
|
||||
<?php echo ParsedownHelper::parse($model->Content); ?>
|
||||
|
||||
<div class="blogFooter">
|
||||
<div class="blogFooterLeft">
|
||||
<?php echo $model->Title; ?>
|
||||
</div>
|
||||
<div class="blogFooterRight">
|
||||
<?php echo $model->getDateTime()->format('d.m.Y'); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
@ -55,15 +55,15 @@ $this->breadcrumbs =
|
||||
); ?>
|
||||
</div>
|
||||
|
||||
<div class="span3" style="display: none">
|
||||
<div class="span3">
|
||||
<?php
|
||||
echo MsHtml::lead('Programs');
|
||||
echo MsHtml::lead('BlogPosts');
|
||||
|
||||
echo MsHtml::stackedTabs(
|
||||
[
|
||||
['label' => 'Home', 'url' => '#'],
|
||||
['label' => 'Profile', 'url' => '#'],
|
||||
['label' => 'Messages', 'url' => '#'],
|
||||
['label' => 'Show', 'url' => '/blog'],
|
||||
['label' => 'Manage', 'url' => '/blog/admin'],
|
||||
['label' => 'Create', 'url' => '/blog/create'],
|
||||
]
|
||||
); ?>
|
||||
</div>
|
||||
|
@ -10,3 +10,6 @@ require_once($yiic);
|
||||
// TODO-MS BefunGen -> MS.de
|
||||
// TODO-MS jClipCorn -> MS.de
|
||||
// TODO-MS jQCCounter (OLD DATE !) -> MS.de
|
||||
|
||||
|
||||
//TODO-MS Add Guest counter
|
Loading…
Reference in New Issue
Block a user