Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Remove preview button from history section.

No longer works. Needs to be rewritten to work with side-by-side.
  • Loading branch information...
commit 230182fc77738e71af56aa0258bb5a2238a50493 1 parent 47f41d8
@mateusz mateusz authored chillu committed
Showing with 3 additions and 4 deletions.
  1. +3 −4 code/controllers/CMSPageHistoryController.php
View
7 code/controllers/CMSPageHistoryController.php
@@ -98,11 +98,11 @@ public function getEditForm($id = null, $fields = null, $versionID = null, $comp
// Respect permission failures from parent implementation
if(!($form instanceof Form)) return $form;
- $nav = new SilverStripeNavigatorItem_ArchiveLink($record);
+ // TODO: move to the SilverStripeNavigator structure so the new preview can pick it up.
+ //$nav = new SilverStripeNavigatorItem_ArchiveLink($record);
$form->setActions(new FieldList(
- $revert = FormAction::create('doRollback', _t('CMSPageHistoryController.REVERTTOTHISVERSION', 'Revert to this version'))->setUseButtonTag(true),
- $navField = new LiteralField('ArchivedLink', $nav->getHTML())
+ $revert = FormAction::create('doRollback', _t('CMSPageHistoryController.REVERTTOTHISVERSION', 'Revert to this version'))->setUseButtonTag(true)
));
$fields = $form->Fields();
@@ -111,7 +111,6 @@ public function getEditForm($id = null, $fields = null, $versionID = null, $comp
$fields->push(new HiddenField("Version"));
$fields = $fields->makeReadonly();
- $navField->setAllowHTML(true);
foreach($fields->dataFields() as $field) {
$field->dontEscape = true;
Please sign in to comment.
Something went wrong with that request. Please try again.