NIHVIVO-2232: Worked on template for Institutional internal class

This commit is contained in:
manolobevia 2011-07-14 20:01:36 +00:00
parent b5c3385350
commit ab1585b337
2 changed files with 72 additions and 54 deletions

View file

@ -0,0 +1,15 @@
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
#localClassName {
margin-bottom: 0;
}
#createNewLocalClass p.note {
margin-top: 3px;
margin-bottom: 15px;
}
#noLocalOntologyExists p {
padding: 0.2em 0.4em;
background: #f4f4f4;
margin-right: .4em;
display: inline-block;
}

View file

@ -6,76 +6,79 @@ To be associated later (upon completion of N3 Refactoring) with
edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators.InstitutionalInternalClassForm. edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators.InstitutionalInternalClassForm.
--> -->
<h2>Institutional Internal Class</h2>
<h3>Institutional Internal Class</h3>
<section id="introMessage" role="region"> <section id="introMessage" role="region">
<p>This class will be used to designate those individuals internal to your institution. <p>This class will be used to designate those individuals internal to your institution.</p>
This will allow you to limit the individuals displayed on your menu pages (People, Research, etc.) <p>This will allow you to limit the individuals displayed on your menu pages (People, Research, etc.)
to only those within your institution.</p> to only those within your institution.</p>
</section> </section>
<section> <section role="region">
<form method="POST" action="${formUrl}" class="customForm"> <form method="POST" action="${formUrl}" class="customForm">
<input type="hidden" name="submitForm" id="submitForm" value="true" /> <input type="hidden" name="submitForm" id="submitForm" value="true" />
<#--If no local ontologies, display message for user to create a local ontology-->
<#if ontologiesExist = false> <#--If no local ontologies, display message for user to create a local ontology-->
<section id="noLocalOntologyExists"> <#if ontologiesExist = false>
<p>${noLocalOntologiesMessage}</p> <section id="noLocalOntologyExists" role="region">
</section> <p>There are currently no local ontologies. You must create a <a href='${urls.base}/editForm?controller=Ontology'>new local ontology</a></p>
<#--else if local ontologies exist and local classes exist, show drop-down of local classes-->
<#elseif useExistingLocalClass?has_content>
<section id="existingLocalClass">
<#--Populated based on class list returned-->
<select id="existingLocalClasses" name="existingLocalClasses">
<#assign classUris = existingLocalClasses?keys />
<#--If internal class exists, check against value in drop-down and select option-->
<#list classUris as localClassUri>
<option value="${localClassUri}" <#if existingInternalClass = localClassUri>selected</#if> >${existingLocalClasses[localClassUri]}</option>
</#list>
</select>
<p>Can't find an appropriate class? Create a <a href="${formUrl}?cmd=createClass">new one</a>.</p>
</section> </section>
<#--else if local ontologies exist and local classes exist, show drop-down of local classes-->
<#elseif useExistingLocalClass?has_content>
<section id="existingLocalClass" role="region">
<#--Populated based on class list returned-->
<label for="existingLocalClasses">Select an existing class from a local extension</label>
<select id="existingLocalClasses" name="existingLocalClasses" role="combobox"<strong></strong>>
<#assign classUris = existingLocalClasses?keys />
<#--If internal class exists, check against value in drop-down and select option-->
<#--<option value="" role="option">Select one</option>-->
<#list classUris as localClassUri>
<option value="${localClassUri}" role="option" <#if existingInternalClass = localClassUri>selected</#if> >${existingLocalClasses[localClassUri]}</option>
</#list>
</select>
<p>Can't find an appropriate class? Create a <a href="${formUrl}?cmd=createClass">new one</a>.</p>
</section>
<#--if parameter to create new class passed or if there are local ontologies but no local classes, show create new class page--> <#--if parameter to create new class passed or if there are local ontologies but no local classes, show create new class page-->
<#elseif createNewClass?has_content> <#elseif createNewClass?has_content>
<section id="createNewLocalClass"> <section id="createNewLocalClass" role="region">
<h2>Create a new class</h2> <h3>Create a new class</h3>
<label for="menu-name">Name<span class="requiredHint"> *</span></label>
<input type="text" id="localClassName" name="localClassName" value="" /> <label for="localClassName">Name<span class="requiredHint"> *</span></label>
<input type="text" id="localClassName" name="localClassName" value="" role="input" />
<#--If more than one local namespace, generate select--> <p class="note">use capitals for the first letter of each word</p>
<#if multipleLocalNamespaces = true>
<select id="existingLocalNamespaces" name="existingLocalNamespaces"> <#--If more than one local namespace, generate select-->
<#assign namespaceUris = existingLocalNamespaces?keys /> <#if multipleLocalNamespaces = true>
<#list namespaceUris as existingNamespace> <label for="existingLocalNamespace">Local Namespace<span class="requiredHint"> *</span></label>
<option value="${existingNamespace}">${existingLocalNamespaces[existingNamespace]}</option>
</#list> <select id="existingLocalNamespaces" name="existingLocalNamespaces" role="combobox">
</select> <#assign namespaceUris = existingLocalNamespaces?keys />
<#else> <#list namespaceUris as existingNamespace>
<input type="hidden" id="existingLocalNamespaces" name="existingLocalNamespaces" value="${existingLocalNamespace}"/> <option value="${existingNamespace}" role="option">${existingLocalNamespaces[existingNamespace]}</option>
</#if> </#list>
</select>
<#else>
<input type="hidden" id="existingLocalNamespaces" name="existingLocalNamespaces" value="${existingLocalNamespace}" />
</#if>
</section> </section>
<#--this case is an error case--> <#--this case is an error case-->
<#else> <#else>
Problematic section as above should all have been handled <p>Problematic section as above should all have been handled</p>
</#if> </#if>
<#--only show submit and cancel if ontologies exist--> <#--only show submit and cancel if ontologies exist-->
<#if ontologiesExist = true> <#if ontologiesExist = true>
<input type="submit" name="submit-internalClass" value="${submitAction}" class="submit" /> or <a class="cancel" href="${cancelUrl}">Cancel</a> <input type="submit" name="submit-internalClass" value="${submitAction}" class="submit" /> or <a class="cancel" href="${cancelUrl}">Cancel</a>
</#if> </#if>
</form> </form>
</section> </section>
<#-- Add necessary css files associated with this page ${stylesheets.add('<link rel="stylesheet" href="${urls.base}/css/menupage/institutinalInternalClass.css" />')}
${stylesheets.add('<link rel="stylesheet" href="${urls.base}/css/institutional.css" />')}-->
${stylesheets.add('<link rel="stylesheet" href="${urls.base}/edit/forms/css/customForm.css" />')} ${stylesheets.add('<link rel="stylesheet" href="${urls.base}/edit/forms/css/customForm.css" />')}
<#-- Add necessary javascript files associated with this page
${scripts.add('<script type="text/javascript" src="${urls.base}/js/institutional.js"></script>')}
-->