NIHVIVO-2232. Worked on menu management main page. Work in progress.
This commit is contained in:
parent
86a22b397d
commit
7cd7e7f8a6
3 changed files with 78 additions and 2 deletions
|
@ -0,0 +1,36 @@
|
||||||
|
<#-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
|
||||||
|
|
||||||
|
<#-- Default VIVO individual profile page template (extends individual.ftl in vitro) -->
|
||||||
|
|
||||||
|
<#include "individual-setup.ftl">
|
||||||
|
|
||||||
|
<#assign individualProductExtension>
|
||||||
|
<#-- Include for any class specific template additions -->
|
||||||
|
${classSpecificExtension!}
|
||||||
|
|
||||||
|
<#include "individual-overview.ftl">
|
||||||
|
</section> <!-- #individual-info -->
|
||||||
|
</section> <!-- #individual-intro -->
|
||||||
|
</#assign>
|
||||||
|
|
||||||
|
<#assign nameForOtherGroup = "other"> <#-- used by both individual-propertyGroupMenu.ftl and individual-properties.ftl -->
|
||||||
|
|
||||||
|
<h3>Menu management</h3>
|
||||||
|
|
||||||
|
<#-- Menu Ontology properties -->
|
||||||
|
<#include "individual-menu-properties.ftl">
|
||||||
|
|
||||||
|
${stylesheets.add('<link rel="stylesheet" href="${urls.base}/css/individual/individual.css" />',
|
||||||
|
'<link rel="stylesheet" href="${urls.base}/css/individual/individual-vivo.css" />')}
|
||||||
|
|
||||||
|
${headScripts.add('<script type="text/javascript" src="${urls.base}/js/jquery_plugins/jquery.truncator.js"></script>',
|
||||||
|
'<script type="text/javascript" src="${urls.base}/js/jquery_plugins/getURLParam.js"></script>',
|
||||||
|
'<script type="text/javascript" src="${urls.base}/js/jquery_plugins/colorAnimations.js"></script>',
|
||||||
|
'<script type="text/javascript" src="${urls.base}/js/jquery_plugins/jquery.form.js"></script>',
|
||||||
|
'<script type="text/javascript" src="${urls.base}/js/jquery_plugins/qtip/jquery.qtip-1.0.0-rc3.min.js"></script>',
|
||||||
|
'<script type="text/javascript" src="${urls.base}/js/tiny_mce/tiny_mce.js"></script>',
|
||||||
|
'<script type="text/javascript" src="${urls.base}/js/controls.js"></script>',
|
||||||
|
'<script type="text/javascript" src="${urls.base}/js/toggle.js"></script>')}
|
||||||
|
|
||||||
|
${scripts.add('<script type="text/javascript" src="${urls.base}/js/imageUpload/imageUploadUtils.js"></script>',
|
||||||
|
'<script type="text/javascript" src="${urls.base}/js/individual/individualUtils.js"></script>')}
|
|
@ -0,0 +1,24 @@
|
||||||
|
<#-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
|
||||||
|
|
||||||
|
<#-- Template for menu management page -->
|
||||||
|
|
||||||
|
<#import "lib-properties.ftl" as p>
|
||||||
|
|
||||||
|
<#list propertyGroups.all as group>
|
||||||
|
<#assign groupName = group.getName(nameForOtherGroup)>
|
||||||
|
|
||||||
|
<#-- Display the group heading -->
|
||||||
|
<#if groupName?has_content>
|
||||||
|
<h2 id="${groupName}">${groupName?capitalize}</h2>
|
||||||
|
</#if>
|
||||||
|
|
||||||
|
<#-- List the menu items(properties) in the group -->
|
||||||
|
<#list group.properties as property>
|
||||||
|
<#if property.localName == "hasElement">
|
||||||
|
<#-- List menu Items -->
|
||||||
|
<@p.objectProperty property editable property.template />
|
||||||
|
<br /><#--remove break-->
|
||||||
|
<@p.addLink property editable />
|
||||||
|
</#if>
|
||||||
|
</#list>
|
||||||
|
</#list>
|
|
@ -75,7 +75,11 @@ Assumes property is non-null. -->
|
||||||
|
|
||||||
<#macro objectPropertyList property editable statements=property.statements template=property.template>
|
<#macro objectPropertyList property editable statements=property.statements template=property.template>
|
||||||
<#list statements as statement>
|
<#list statements as statement>
|
||||||
|
<#if property.localName == "hasElement">
|
||||||
|
<@menuItem property statement editable><#include "${template}"></@menuItem>
|
||||||
|
<#else>
|
||||||
<@propertyListItem property statement editable><#include "${template}"></@propertyListItem>
|
<@propertyListItem property statement editable><#include "${template}"></@propertyListItem>
|
||||||
|
</#if>
|
||||||
</#list>
|
</#list>
|
||||||
</#macro>
|
</#macro>
|
||||||
|
|
||||||
|
@ -95,9 +99,13 @@ name will be used as the label. -->
|
||||||
<#--@dump var="property"/-->
|
<#--@dump var="property"/-->
|
||||||
<#local url = property.addUrl>
|
<#local url = property.addUrl>
|
||||||
<#if url?has_content>
|
<#if url?has_content>
|
||||||
|
<#if property.localName == "hasElement">
|
||||||
|
<@showAddMenuItemLink property.localName label addParamsToEditUrl(url, extraParams) />
|
||||||
|
<#else>
|
||||||
<@showAddLink property.localName label addParamsToEditUrl(url, extraParams) />
|
<@showAddLink property.localName label addParamsToEditUrl(url, extraParams) />
|
||||||
</#if>
|
</#if>
|
||||||
</#if>
|
</#if>
|
||||||
|
</#if>
|
||||||
</#macro>
|
</#macro>
|
||||||
|
|
||||||
<#function addParamsToEditUrl url extraParams="">
|
<#function addParamsToEditUrl url extraParams="">
|
||||||
|
@ -241,4 +249,12 @@ name will be used as the label. -->
|
||||||
<@editingLinks "label" label editable />
|
<@editingLinks "label" label editable />
|
||||||
</#macro>
|
</#macro>
|
||||||
|
|
||||||
|
<#-- Add menu item button -->
|
||||||
|
<#macro showAddMenuItemLink propertyLocalName label url>
|
||||||
|
<a class="add-${propertyLocalName} green button" href="${url}" title="Add new ${label?lower_case} entry">Add menu item</a>
|
||||||
|
</#macro>
|
||||||
|
|
||||||
|
<#-- List menu items -->
|
||||||
|
<#macro menuItem property statement editable >
|
||||||
|
Position | <#nested> | <@editingLinks "${property.localName}" statement editable/> <br />
|
||||||
|
</#macro>
|
||||||
|
|
Loading…
Add table
Reference in a new issue