GridFieldBlogPostState: Added 'Modified' tag to timer state

and adjusted code spacing.
This commit is contained in:
James Cocker 2014-06-13 11:49:28 +01:00
parent b380f4ac11
commit 020f466bf8

View File

@ -31,7 +31,7 @@ class GridFieldBlogPostState implements GridField_ColumnProvider {
if($record->hasMethod("isPublished")) { if($record->hasMethod("isPublished")) {
$modifiedLabel = ""; $modifiedLabel = "";
if($record->isModified()) { if($record->isModified()) {
$modifiedLabel = "<span class='modified'>"._t("GridFieldBlogPostState.Modified")."</span>"; $modifiedLabel = "<span class='modified'>" . _t("GridFieldBlogPostState.Modified") . "</span>";
} }
$published = $record->isPublished(); $published = $record->isPublished();
@ -45,7 +45,7 @@ class GridFieldBlogPostState implements GridField_ColumnProvider {
"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;
} else { } else {
return _t( return _t(
"GridFieldBlogPostState.Published", "GridFieldBlogPostState.Published",
@ -54,7 +54,7 @@ class GridFieldBlogPostState implements GridField_ColumnProvider {
array( array(
"date" => $record->dbObject("PublishDate")->Nice() "date" => $record->dbObject("PublishDate")->Nice()
) )
).$modifiedLabel; ) . $modifiedLabel;
} }
} }
} }