mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-09-29 12:49:00 +02:00
MINOR Fixed history panel non-ajax loading and version links in "comparing X and Y" titles
This commit is contained in:
parent
872239830c
commit
10e76830c4
@ -23,24 +23,32 @@ class CMSPageHistoryController extends CMSMain {
|
|||||||
/**
|
/**
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
function show() {
|
function show($request) {
|
||||||
return array(
|
$form = $this->ShowVersionForm(
|
||||||
'EditForm' => $this->ShowVersionForm(
|
$request->param('VersionID')
|
||||||
$this->request->param('VersionID')
|
|
||||||
)
|
|
||||||
);
|
);
|
||||||
|
if($this->isAjax()) {
|
||||||
|
$content = $form->forTemplate();
|
||||||
|
} else {
|
||||||
|
$content = $this->customise(array('EditForm' => $form))->renderWith($this->getViewer('show'));
|
||||||
|
}
|
||||||
|
return $content;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
function compare() {
|
function compare($request) {
|
||||||
return array(
|
$form = $this->CompareVersionsForm(
|
||||||
'EditForm' => $this->CompareVersionsForm(
|
$request->param('VersionID'),
|
||||||
$this->request->param('VersionID'),
|
$request->param('OtherVersionID')
|
||||||
$this->request->param('OtherVersionID')
|
|
||||||
)
|
|
||||||
);
|
);
|
||||||
|
if($this->isAjax()) {
|
||||||
|
$content = $form->forTemplate();
|
||||||
|
} else {
|
||||||
|
$content = $this->customise(array('EditForm' => $form))->renderWith($this->getViewer('show'));
|
||||||
|
}
|
||||||
|
return $content;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -92,7 +100,7 @@ class CMSPageHistoryController extends CMSMain {
|
|||||||
|
|
||||||
if($compareID) {
|
if($compareID) {
|
||||||
$link = Controller::join_links(
|
$link = Controller::join_links(
|
||||||
$this->Link('version'),
|
$this->Link('show'),
|
||||||
$id
|
$id
|
||||||
);
|
);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user