mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
MINOR Backlinks in CMS edit form template, first defined in GridFieldPopupForms
This commit is contained in:
parent
8ff8d32764
commit
f1775b5f84
@ -1,4 +0,0 @@
|
||||
<div class="cms-content-fields center">
|
||||
<a class="backlink ss-ui-button" href="$Backlink">Back</a>
|
||||
$ItemEditForm
|
||||
</div>
|
@ -20,6 +20,13 @@
|
||||
<% end_if %>
|
||||
|
||||
<!-- <div class="cms-content-search">...</div> -->
|
||||
|
||||
<% if Backlink %>
|
||||
<a class="backlink ss-ui-button" href="$Backlink">
|
||||
<% _t('Back', 'Back') %>
|
||||
</a>
|
||||
<% end_if %>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -173,6 +173,11 @@ class GridFieldPopupForm_ItemRequest extends RequestHandler {
|
||||
$form->setTemplate($controller->getTemplatesWithSuffix('_EditForm'));
|
||||
$form->addExtraClass('cms-content center ss-tabset ' . $controller->BaseCSSClasses());
|
||||
if($form->Fields()->hasTabset()) $form->Fields()->findOrMakeTab('Root')->setTemplate('CMSTabSet');
|
||||
// TODO Link back to controller action (and edited root record) rather than index,
|
||||
// which requires more URL knowledge than the current link to this field gives us.
|
||||
// The current root record is held in session only,
|
||||
// e.g. page/edit/show/6/ vs. page/edit/EditForm/field/MyGridField/....
|
||||
$form->Backlink = $controller->Link();
|
||||
}
|
||||
|
||||
$return = $this->customise(array(
|
||||
|
Loading…
Reference in New Issue
Block a user