Browse files

Remove preview button from history section.

No longer works. Needs to be rewritten to work with side-by-side.
  • Loading branch information...
1 parent 47f41d8 commit 230182fc77738e71af56aa0258bb5a2238a50493 @mateusz mateusz committed with chillu Dec 4, 2012
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;

0 comments on commit 230182f

Please sign in to comment.