Merge branch '3.0' into 3.1

This commit is contained in:
Dylan Wagstaff 2018-12-07 09:59:57 +13:00
commit 62d628cf62
3 changed files with 12 additions and 5 deletions

View File

@ -396,9 +396,9 @@ class BlogController extends PageController
if ($this->owner->getArchiveDay()) { if ($this->owner->getArchiveDay()) {
$date = $this->owner->getArchiveDate()->Nice(); $date = $this->owner->getArchiveDate()->Nice();
} elseif ($this->owner->getArchiveMonth()) { } elseif ($this->owner->getArchiveMonth()) {
$date = $this->owner->getArchiveDate()->format('F, Y'); $date = $this->owner->getArchiveDate()->format('MMMM, y');
} else { } else {
$date = $this->owner->getArchiveDate()->format('Y'); $date = $this->owner->getArchiveDate()->format('y');
} }
$items[] = _t( $items[] = _t(

View File

@ -8,6 +8,7 @@ use SilverStripe\Forms\FieldList;
use SilverStripe\Forms\GridField\GridField; use SilverStripe\Forms\GridField\GridField;
use SilverStripe\Forms\GridField\GridFieldAddNewButton; use SilverStripe\Forms\GridField\GridFieldAddNewButton;
use SilverStripe\Forms\Tab; use SilverStripe\Forms\Tab;
use SilverStripe\Forms\TextareaField;
use SilverStripe\ORM\DataExtension; use SilverStripe\ORM\DataExtension;
use SilverStripe\Security\Member; use SilverStripe\Security\Member;
use SilverStripe\View\Parsers\URLSegmentFilter; use SilverStripe\View\Parsers\URLSegmentFilter;
@ -108,7 +109,6 @@ class BlogMemberExtension extends DataExtension
$fields->removeByName('URLSegment'); $fields->removeByName('URLSegment');
// Remove the automatically-generated posts tab. // Remove the automatically-generated posts tab.
$fields->removeFieldFromTab('Root', 'BlogPosts'); $fields->removeFieldFromTab('Root', 'BlogPosts');
// Construct a better posts tab. // Construct a better posts tab.
@ -131,6 +131,13 @@ class BlogMemberExtension extends DataExtension
$fields->addFieldToTab('Root', $tab); $fields->addFieldToTab('Root', $tab);
// Ensure blog fields are added after defaults
$fields->addFieldToTab(
'Root.Main',
TextareaField::create('BlogProfileSummary'),
'BlogProfileImage'
);
return $fields; return $fields;
} }
} }

View File

@ -9,9 +9,9 @@
<% if $ArchiveDay %> <% if $ArchiveDay %>
$ArchiveDate.Nice $ArchiveDate.Nice
<% else_if $ArchiveMonth %> <% else_if $ArchiveMonth %>
$ArchiveDate.format('F, Y') $ArchiveDate.format('MMMM, y')
<% else %> <% else %>
$ArchiveDate.format('Y') $ArchiveDate.format('y')
<% end_if %> <% end_if %>
<% else_if $CurrentTag %> <% else_if $CurrentTag %>
<%t SilverStripe\\Blog\\Model\\Blog.Tag 'Tag' %>: $CurrentTag.Title <%t SilverStripe\\Blog\\Model\\Blog.Tag 'Tag' %>: $CurrentTag.Title