Skip to content

Commit

Permalink
Fix issue with tab state restoration when returning from GridField (#24)
Browse files Browse the repository at this point in the history
  • Loading branch information
hchokshi authored and stevie-mayhew committed Jul 27, 2018
1 parent 6f8c3be commit 88c2ec5
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 28 deletions.
7 changes: 7 additions & 0 deletions src/LittleGiant/SinglePageAdmin/SinglePageAdmin.php
Original file line number Diff line number Diff line change
Expand Up @@ -583,4 +583,11 @@ public function edit($request)
}
}

/**
* @return string
*/
public function Backlink()
{
return $this->Link();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,6 @@
<% if $BreadcrumbsBackLink %><a href="$BreadcrumbsBackLink" class="btn btn-secondary btn--no-text font-icon-left-open-big hidden-lg-up toolbar__back-button"></a><% end_if %>
<% include SilverStripe\\Admin\\CMSBreadcrumbs %>
</div>

<% if $EditForm.Fields.hasTabset %>
<% with $EditForm.Fields.fieldByName('Root') %>
<div class="cms-content-header-tabs cms-tabset">
<ul class="cms-tabset-nav-primary nav nav-tabs">
<% loop $Tabs %>
<li class="nav-item<% if $extraClass %> $extraClass<% end_if %>"><a href="#$id">$Title</a></li>
<% end_loop %>
</ul>
</div>
<% end_with %>
<% end_if %>
</div>

<div class="flexbox-area-grow fill-height">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,7 @@
<fieldset>
<% if $Legend %><legend>$Legend</legend><% end_if %>
<% loop $Fields %>
<% if $Tabs %>
<% loop $Tabs %>
<% if $Tabs %>
$FieldHolder
<% else %>
<div $AttributesHTML>
<% loop $Fields %>
$FieldHolder
<% end_loop %>
</div>
<% end_if %>
<% end_loop %>
<% else %>
$FieldHolder
<% end_if %>
$FieldHolder
<% end_loop %>
<div class="clear"><!-- --></div>
</fieldset>
Expand All @@ -34,7 +20,7 @@
<% if $Actions %>
<div class="btn-toolbar">
<% loop $Actions %>
$Field
$FieldHolder
<% end_loop %>
<% if $Controller.LinkPreview %>
<a href="$Controller.LinkPreview" class="cms-preview-toggle-link ss-ui-button" data-icon="preview">
Expand Down

0 comments on commit 88c2ec5

Please sign in to comment.