Last change
on this file since 788 was
787,
checked in by gav, 14 years ago
|
Add some null checking to AssetService.getAssemblies and assetTreeCompact template.
|
File size:
786 bytes
|
Line | |
---|
1 | |
---|
2 | <%-- Fetch to prevent lazy initialization error. --%> |
---|
3 | <% assetInstance = Asset.read(assetInstance?.id)%> |
---|
4 | |
---|
5 | <div class="static_tree" > |
---|
6 | ${assetInstance?.encodeAsHTML()} |
---|
7 | <ul> |
---|
8 | <g:each var="assetSubItem1" in="${assetInstance?.assetSubItems?.sort { p1, p2 -> p1.name.compareToIgnoreCase(p2.name) } }"> |
---|
9 | <li> |
---|
10 | ${assetSubItem1?.encodeAsHTML()} |
---|
11 | </li> |
---|
12 | |
---|
13 | <div id="treelevel1"> |
---|
14 | |
---|
15 | <ul> |
---|
16 | <g:each var="assetSubItem2" in="${assetSubItem1.subItems.sort { p1, p2 -> p1.name.compareToIgnoreCase(p2.name) } }"> |
---|
17 | <li> |
---|
18 | ${assetSubItem2?.encodeAsHTML()} |
---|
19 | </li> |
---|
20 | </g:each> <!--assetSubItem2--> |
---|
21 | </ul> |
---|
22 | |
---|
23 | </div> |
---|
24 | |
---|
25 | </g:each> <!--assetSubItem1--> |
---|
26 | </ul> |
---|
27 | </div> |
---|
Note: See
TracBrowser
for help on using the repository browser.