NIHVIVO-3058 Merged r8848 and r8849 from maint-rel-vivo-1.3 branch.
This commit is contained in:
parent
c42e4fbcbe
commit
85346e2548
1 changed files with 40 additions and 36 deletions
|
@ -4,42 +4,46 @@
|
||||||
|
|
||||||
<#include "individual-setup.ftl">
|
<#include "individual-setup.ftl">
|
||||||
|
|
||||||
<script type="text/javascript">
|
|
||||||
var menuItemData = [];
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<h3>Menu management</h3>
|
|
||||||
|
|
||||||
<#assign hasElement = propertyGroups.pullProperty("${namespaces.display}hasElement")!>
|
<#assign hasElement = propertyGroups.pullProperty("${namespaces.display}hasElement")!>
|
||||||
|
|
||||||
<#-- List the menu items -->
|
<#if hasElement?has_content>
|
||||||
<ul class="menuItems">
|
<script type="text/javascript">
|
||||||
<#list hasElement.statements as statement>
|
var menuItemData = [];
|
||||||
<li class="menuItem"><#include "${hasElement.template}"> <span class="controls"><@p.editingLinks "hasElement" statement editable /></span></li>
|
</script>
|
||||||
</#list>
|
|
||||||
</ul>
|
<h3>Menu management</h3>
|
||||||
|
|
||||||
<#-- Link to add a new menu item -->
|
<#-- List the menu items -->
|
||||||
<#if editable>
|
<ul class="menuItems">
|
||||||
<#assign addUrl = hasElement.addUrl>
|
<#list hasElement.statements as statement>
|
||||||
<#if addUrl?has_content>
|
<li class="menuItem"><#include "${hasElement.template}"> <span class="controls"><@p.editingLinks "hasElement" statement editable /></span></li>
|
||||||
<a class="add-hasElement green button" href="${addUrl}" title="Add new menu item">Add menu item</a>
|
</#list>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<#-- Link to add a new menu item -->
|
||||||
|
<#if editable>
|
||||||
|
<#assign addUrl = hasElement.addUrl>
|
||||||
|
<#if addUrl?has_content>
|
||||||
|
<a class="add-hasElement green button" href="${addUrl}" title="Add new menu item">Add menu item</a>
|
||||||
|
</#if>
|
||||||
</#if>
|
</#if>
|
||||||
</#if>
|
|
||||||
|
${stylesheets.add('<link rel="stylesheet" href="${urls.base}/css/individual/individual.css" />',
|
||||||
${stylesheets.add('<link rel="stylesheet" href="${urls.base}/css/individual/individual.css" />',
|
'<link rel="stylesheet" href="${urls.base}/css/individual/menuManagement.css" />')}
|
||||||
'<link rel="stylesheet" href="${urls.base}/css/individual/menuManagement.css" />')}
|
|
||||||
|
${headScripts.add('<script type="text/javascript" src="${urls.base}/js/jquery-ui/js/jquery-ui-1.8.9.custom.min.js"></script>')}
|
||||||
${headScripts.add('<script type="text/javascript" src="${urls.base}/js/jquery-ui/js/jquery-ui-1.8.9.custom.min.js"></script>')}
|
|
||||||
|
<#assign positionPredicate = "${namespaces.display}menuPosition" />
|
||||||
<#assign positionPredicate = "${namespaces.display}menuPosition" />
|
|
||||||
|
<script type="text/javascript">
|
||||||
<script type="text/javascript">
|
// <#-- We need the controller to provide ${reorderUrl}. This is where ajax request will be sent on drag-n-drop events. -->
|
||||||
// <#-- We need the controller to provide ${reorderUrl}. This is where ajax request will be sent on drag-n-drop events. -->
|
var menuManagementData = {
|
||||||
var menuManagementData = {
|
reorderUrl: '${reorderUrl}',
|
||||||
reorderUrl: '${reorderUrl}',
|
positionPredicate: '${positionPredicate}'
|
||||||
positionPredicate: '${positionPredicate}'
|
};
|
||||||
};
|
</script>
|
||||||
</script>
|
|
||||||
|
${scripts.add('<script type="text/javascript" src="${urls.base}/js/individual/menuManagement.js"></script>')}
|
||||||
${scripts.add('<script type="text/javascript" src="${urls.base}/js/individual/menuManagement.js"></script>')}
|
<#else>
|
||||||
|
<p id="error-alert">There was an error in the system. The display:hasElement property could not be retrieved.</p>
|
||||||
|
</#if>
|
Loading…
Add table
Add a link
Reference in a new issue