Skip to content

Commit

Permalink
FIX push element history revert button to bottom of page
Browse files Browse the repository at this point in the history
Previously both the revert button shows immediately under the content,
and the save/publish buttons show at the bottom of the page (in the CMS)
as per the usual actions for an edit form (for which the
HistoryViewerField is added to under a tab of it's own). Clearly
confusing, a work around has been introduced to
silverstripe/versioned-admin in order work around this - this commit
enables that functionality which has been made opt-in as the nature of
it being a work-around.
  • Loading branch information
Dylan Wagstaff committed Jul 3, 2018
1 parent 621faf3 commit 1140626
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Models/BaseElement.php
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,8 @@ public function getCMSFields()
$historyViewer = HistoryViewerField::create('ElementHistory');
$fields->addFieldToTab('Root.History', $historyViewer);

$fields->fieldByName('Root.History')->addExtraClass('elemental-block__history-tab');
$fields->fieldByName('Root.History')
->addExtraClass('elemental-block__history-tab tab--history-viewer');
}
});

Expand Down

0 comments on commit 1140626

Please sign in to comment.