Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

BUGFIX Show AssetAdmin tree by not invoking $EditForm twice in template

Both for performance reasons, and for weird behaviour on the second invocation (doesn't retain the same record context)
  • Loading branch information...
commit 7f274741595286a2c24dd1099751caffb54043e9 1 parent 3c81958
@chillu chillu authored
Showing with 22 additions and 25 deletions.
  1. +22 −25 templates/Includes/AssetAdmin_Content.ss
View
47 templates/Includes/AssetAdmin_Content.ss
@@ -1,36 +1,33 @@
<div class="cms-content center cms-tabset $BaseCSSClasses" data-layout-type="border" data-pjax-fragment="Content">
+ <% with EditForm %>
<div class="cms-content-header north">
- <% with EditForm %>
- <div class="cms-content-header-info">
- <% include BackLink_Button %>
+ <div class="cms-content-header-info">
+ <% include BackLink_Button %>
- <h2 id="page-title-heading">
- <% with Controller %>
- <% include CMSBreadcrumbs %>
- <% end_with %>
- </h2>
+ <h2 id="page-title-heading">
+ <% with Controller %>
+ <% include CMSBreadcrumbs %>
+ <% end_with %>
+ </h2>
+ </div>
+ <% if Fields.hasTabset %>
+ <% with Fields.fieldByName('Root') %>
+ <div class="cms-content-header-tabs">
+ <ul>
+ <% loop Tabs %>
+ <li<% if extraClass %> class="$extraClass"<% end_if %>><a href="#$id">$Title</a></li>
+ <% end_loop %>
+ </ul>
</div>
- <% if Fields.hasTabset %>
- <% with Fields.fieldByName('Root') %>
- <div class="cms-content-header-tabs">
- <ul>
- <% loop Tabs %>
- <li<% if extraClass %> class="$extraClass"<% end_if %>><a href="#$id">$Title</a></li>
- <% end_loop %>
- </ul>
- </div>
- <% end_with %>
- <% end_if %>
- <% end_with %>
+ <% end_with %>
+ <% end_if %>
</div>
<div class="cms-content-fields center ui-widget-content" data-layout-type="border">
-
- $Tools
-
- $EditForm
-
+ $Top.Tools
+ $forTemplate
</div>
+ <% end_with %>
</div>
Please sign in to comment.
Something went wrong with that request. Please try again.