Skip to content
This repository
Browse code

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
Ingo Schommer authored June 14, 2012

Showing 1 changed file with 22 additions and 25 deletions. Show diff stats Hide diff stats

  1. 47  templates/Includes/AssetAdmin_Content.ss
47  templates/Includes/AssetAdmin_Content.ss
... ...
@@ -1,36 +1,33 @@
1 1
 <div class="cms-content center cms-tabset $BaseCSSClasses" data-layout-type="border" data-pjax-fragment="Content">
2 2
 
  3
+	<% with EditForm %>
3 4
 	<div class="cms-content-header north">
4  
-		<% with EditForm %>
5  
-			<div class="cms-content-header-info">
6  
-				<% include BackLink_Button %>
  5
+		<div class="cms-content-header-info">
  6
+			<% include BackLink_Button %>
7 7
 
8  
-				<h2 id="page-title-heading">
9  
-				<% with Controller %>
10  
-					<% include CMSBreadcrumbs %>
11  
-				<% end_with %>
12  
-				</h2>
  8
+			<h2 id="page-title-heading">
  9
+			<% with Controller %>
  10
+				<% include CMSBreadcrumbs %>
  11
+			<% end_with %>
  12
+			</h2>
  13
+		</div>
  14
+		<% if Fields.hasTabset %>
  15
+			<% with Fields.fieldByName('Root') %>
  16
+			<div class="cms-content-header-tabs">
  17
+				<ul>
  18
+				<% loop Tabs %>
  19
+					<li<% if extraClass %> class="$extraClass"<% end_if %>><a href="#$id">$Title</a></li>
  20
+				<% end_loop %>
  21
+				</ul>
13 22
 			</div>
14  
-			<% if Fields.hasTabset %>
15  
-				<% with Fields.fieldByName('Root') %>
16  
-				<div class="cms-content-header-tabs">
17  
-					<ul>
18  
-					<% loop Tabs %>
19  
-						<li<% if extraClass %> class="$extraClass"<% end_if %>><a href="#$id">$Title</a></li>
20  
-					<% end_loop %>
21  
-					</ul>
22  
-				</div>
23  
-				<% end_with %>
24  
-			<% end_if %>
25  
-		<% end_with %>
  23
+			<% end_with %>
  24
+		<% end_if %>
26 25
 	</div>
27 26
 
28 27
 	<div class="cms-content-fields center ui-widget-content" data-layout-type="border">
29  
-
30  
-		$Tools
31  
-		
32  
-		$EditForm
33  
-		
  28
+		$Top.Tools
  29
+		$forTemplate
34 30
 	</div>
  31
+	<% end_with %>
35 32
 	
36 33
 </div>

0 notes on commit 7f27474

Please sign in to comment.
Something went wrong with that request. Please try again.