Skip to content

Commit

Permalink
Merge branch '3.0' into 3.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Dylan Wagstaff committed Dec 6, 2018
2 parents 468e053 + 233a5e6 commit 62d628c
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/Model/BlogController.php
Original file line number Diff line number Diff line change
Expand Up @@ -396,9 +396,9 @@ public function getFilterDescription()
if ($this->owner->getArchiveDay()) {
$date = $this->owner->getArchiveDate()->Nice();
} elseif ($this->owner->getArchiveMonth()) {
$date = $this->owner->getArchiveDate()->format('F, Y');
$date = $this->owner->getArchiveDate()->format('MMMM, y');
} else {
$date = $this->owner->getArchiveDate()->format('Y');
$date = $this->owner->getArchiveDate()->format('y');
}

$items[] = _t(
Expand Down
9 changes: 8 additions & 1 deletion src/Model/BlogMemberExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
use SilverStripe\Forms\GridField\GridField;
use SilverStripe\Forms\GridField\GridFieldAddNewButton;
use SilverStripe\Forms\Tab;
use SilverStripe\Forms\TextareaField;
use SilverStripe\ORM\DataExtension;
use SilverStripe\Security\Member;
use SilverStripe\View\Parsers\URLSegmentFilter;
Expand Down Expand Up @@ -108,7 +109,6 @@ public function updateCMSFields(FieldList $fields)
$fields->removeByName('URLSegment');

// Remove the automatically-generated posts tab.

$fields->removeFieldFromTab('Root', 'BlogPosts');

// Construct a better posts tab.
Expand All @@ -131,6 +131,13 @@ public function updateCMSFields(FieldList $fields)

$fields->addFieldToTab('Root', $tab);

// Ensure blog fields are added after defaults
$fields->addFieldToTab(
'Root.Main',
TextareaField::create('BlogProfileSummary'),
'BlogProfileImage'
);

return $fields;
}
}
4 changes: 2 additions & 2 deletions templates/SilverStripe/Blog/Model/Layout/Blog.ss
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
<% if $ArchiveDay %>
$ArchiveDate.Nice
<% else_if $ArchiveMonth %>
$ArchiveDate.format('F, Y')
$ArchiveDate.format('MMMM, y')
<% else %>
$ArchiveDate.format('Y')
$ArchiveDate.format('y')
<% end_if %>
<% else_if $CurrentTag %>
<%t SilverStripe\\Blog\\Model\\Blog.Tag 'Tag' %>: $CurrentTag.Title
Expand Down

0 comments on commit 62d628c

Please sign in to comment.