Added Date to "Saved as Draft" State

This commit is contained in:
James Cocker 2014-06-12 18:49:01 +01:00
parent 17762568cf
commit 5fd07b2c17
2 changed files with 6 additions and 2 deletions

View File

@ -32,7 +32,11 @@ class GridFieldBlogPostState implements GridField_ColumnProvider {
$published = $record->isPublished();
if(!$published) {
return _t("GridFieldBlogPostState.Draft",
'<i class="btn-icon blog-icon btn-icon-pencil"></i> Saved as 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()) {
return _t(
"GridFieldBlogPostState.Timer",

View File

@ -6,7 +6,7 @@ en:
Add: 'Add {name}'
GridFieldBlogPostState:
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}'
Timer: '<i class="blog-icon blog-icon-timer"></i> Publish at {date}'
BlogPost: