mirror of
https://github.com/silverstripe/silverstripe-blog
synced 2024-10-22 11:05:58 +02:00
Merge pull request #17 from purplespider/draft-status
Added Date to "Saved as Draft" State
This commit is contained in:
commit
eea227d42e
@ -36,13 +36,20 @@ class GridFieldBlogPostState implements GridField_ColumnProvider {
|
|||||||
|
|
||||||
$published = $record->isPublished();
|
$published = $record->isPublished();
|
||||||
if(!$published) {
|
if(!$published) {
|
||||||
return _t("GridFieldBlogPostState.Draft",
|
return _t(
|
||||||
'<i class="btn-icon blog-icon btn-icon-pencil"></i> Saved as Draft');
|
"GridFieldBlogPostState.Draft",
|
||||||
|
'<i class="btn-icon blog-icon btn-icon-pencil"></i> Saved as Draft on {date}',
|
||||||
|
"State for when a post is saved.",
|
||||||
|
array(
|
||||||
|
"date" => $record->dbObject("LastEdited")->Nice()
|
||||||
|
)
|
||||||
|
);
|
||||||
} else if (strtotime($record->PublishDate) > time()) {
|
} else if (strtotime($record->PublishDate) > time()) {
|
||||||
return _t(
|
return _t(
|
||||||
"GridFieldBlogPostState.Timer",
|
"GridFieldBlogPostState.Timer",
|
||||||
'<i class="blog-icon blog-icon-timer"></i> Publish at {date}',
|
'<i class="blog-icon blog-icon-timer"></i> Publish at {date}',
|
||||||
"State for when a post is published.", array(
|
"State for when a post is published.",
|
||||||
|
array(
|
||||||
"date" => $record->dbObject("PublishDate")->Nice()
|
"date" => $record->dbObject("PublishDate")->Nice()
|
||||||
)
|
)
|
||||||
) . $modifiedLabel;
|
) . $modifiedLabel;
|
||||||
|
@ -6,7 +6,7 @@ en:
|
|||||||
Add: 'Add {name}'
|
Add: 'Add {name}'
|
||||||
GridFieldBlogPostState:
|
GridFieldBlogPostState:
|
||||||
StateTitle: 'State'
|
StateTitle: 'State'
|
||||||
Draft: '<i class="btn-icon blog-icon btn-icon-pencil"></i> Saved as Draft'
|
Draft: '<i class="btn-icon blog-icon btn-icon-pencil"></i> Saved as Draft on {date}'
|
||||||
Published: '<i class="btn-icon blog-icon btn-icon-accept"></i> Published on {date}'
|
Published: '<i class="btn-icon blog-icon btn-icon-accept"></i> Published on {date}'
|
||||||
Timer: '<i class="blog-icon blog-icon-timer"></i> Publish at {date}'
|
Timer: '<i class="blog-icon blog-icon-timer"></i> Publish at {date}'
|
||||||
Modified: 'Modified'
|
Modified: 'Modified'
|
||||||
|
Loading…
Reference in New Issue
Block a user