Merge pull request #385 from sekjal/Issue384

ENHANCEMENT Format dates in Blog Posts gridfield based on user preferences
This commit is contained in:
Damian Mooyman 2016-03-07 15:33:12 +13:00
commit 7a59c13b3f

View File

@ -34,7 +34,7 @@ class GridFieldBlogPostState extends GridFieldSiteTreeState
'<i class="btn-icon gridfield-icon btn-icon-pencil"></i> Saved as Draft on {date}', '<i class="btn-icon gridfield-icon btn-icon-pencil"></i> Saved as Draft on {date}',
'State for when a post is saved.', 'State for when a post is saved.',
array( array(
'date' => $lastEdited->Nice(), 'date' => $lastEdited->FormatFromSettings(),
) )
); );
} }
@ -50,7 +50,7 @@ class GridFieldBlogPostState extends GridFieldSiteTreeState
'<i class="gridfield-icon blog-icon-timer"></i> Publish at {date}', '<i class="gridfield-icon blog-icon-timer"></i> Publish at {date}',
'State for when a post is published.', 'State for when a post is published.',
array( array(
'date' => $publishDate->Nice(), 'date' => $publishDate->FormatFromSettings(),
) )
) . $modifiedLabel; ) . $modifiedLabel;
} }
@ -60,7 +60,7 @@ class GridFieldBlogPostState extends GridFieldSiteTreeState
'<i class="btn-icon gridfield-icon btn-icon-accept"></i> Published on {date}', '<i class="btn-icon gridfield-icon btn-icon-accept"></i> Published on {date}',
'State for when a post is published.', 'State for when a post is published.',
array( array(
'date' => $publishDate->Nice(), 'date' => $publishDate->FormatFromSettings(),
) )
) . $modifiedLabel; ) . $modifiedLabel;
} }