Anonymous avatar Anonymous committed 04a5f27

Updating templates to work with generic skins

Comments (0)

Files changed (1)

crystallography-handler/src/main/resources/net/chempound/crystal/templates/crystal.ftl

 <@layout.page>
 <div class="crystaleye-structure">
 
-    <h1><#if _.title??>${_.title}<#else>${uri}</#if></h1>
+    <h1><#if __.title??>${__.title}<#else>${uri}</#if></h1>
 
     <div class="jmol">
         <div id="jmol"></div>
 
         <dl class="bib bib-citation">
             <dt>Publisher:</dt>
-            <dd>${_.journalNameFull!}</dd>
+            <dd>${__.journalNameFull!}</dd>
             <dt>Journal:</dt>
-            <dd>${_.journalNameFull!}</dd>
+            <dd>${__.journalNameFull!}</dd>
             <dt>Year:</dt>
-            <dd>${_.journalYear!}</dd>
+            <dd>${__.journalYear!}</dd>
             <dt>Volume/Issue:</dt>
-            <dd>${_.journalVolume!} / ${_.journalIssue!}</dd>
+            <dd>${__.journalVolume!} / ${__.journalIssue!}</dd>
             <dt>DOI:</dt>
-            <dd><#if _.doi??><a href="http://dx.doi.org/${_.doi}">${_.doi}</a></#if></dd>
+            <dd><#if __.doi??><a href="http://dx.doi.org/${__.doi}">${__.doi}</a></#if></dd>
         </dl>
 
         <dl class="bib bib-author">
             <dt>Contact Author:</dt>
-            <dd>${(_.publContactAuthorName!)?html}</dd>
+            <dd>${(__.publContactAuthorName!)?html}</dd>
             <dt>email:</dt>
-            <dd><#if _.publContactAuthorName??><a href="mailto:${_.publContactAuthorEmail}">${_.publContactAuthorEmail}</a></#if></dd>
+            <dd><#if __.publContactAuthorName??><a href="mailto:${__.publContactAuthorEmail}">${__.publContactAuthorEmail}</a></#if></dd>
         </dl>
 
 
 
         <dl class="data">
             <dt>Chemical formula sum</dt>
-            <dd property="${IUCR.chemicalFormulaSum}">${_.chemicalFormulaSum!}</dd>
+            <dd property="${IUCR.chemicalFormulaSum}">${__.chemicalFormulaSum!}</dd>
             <dt>Chemical formula moiety</dt>
-            <dd property="${IUCR.chemicalFormulaMoiety}">${_.chemicalFormulaMoiety!}</dd>
+            <dd property="${IUCR.chemicalFormulaMoiety}">${__.chemicalFormulaMoiety!}</dd>
             <dt>Crystal system</dt>
-            <dd property="${IUCR.spaceGroupCrystalSystem}">${_.spaceGroupCrystalSystem!}</dd>
+            <dd property="${IUCR.spaceGroupCrystalSystem}">${__.spaceGroupCrystalSystem!}</dd>
             <dt>Space group H-M</dt>
-            <dd property="${IUCR.symmetrySpaceGroupNameHM}">${_.spaceGroupNameHMAlt!}</dd>
+            <dd property="${IUCR.symmetrySpaceGroupNameHM}">${__.spaceGroupNameHMAlt!}</dd>
             <dt>Space group Hall</dt>
-            <dd property="${IUCR.symmetrySpaceGroupNameHall}">${_.spaceGroupNameHall!}</dd>
+            <dd property="${IUCR.symmetrySpaceGroupNameHall}">${__.spaceGroupNameHall!}</dd>
             <dt>Data collection temperature</dt>
-            <dd property="${IUCR.diffrnAmbientTemperature}">${_.diffrnAmbientTemperature!} K</dd>
+            <dd property="${IUCR.diffrnAmbientTemperature}">${__.diffrnAmbientTemperature!} K</dd>
         </dl>
 
 
 
         <dl class="data">
             <dt>R Factor (Obs)</dt>
-            <dd property="${IUCR.refineLsRFactorGt}">${_.refineLsRFactorGt!}</dd>
+            <dd property="${IUCR.refineLsRFactorGt}">${__.refineLsRFactorGt!}</dd>
             <dt>R Factor (All)</dt>
-            <dd property="${IUCR.refineLsRFactorAll}">${_.refineLsRFactorAll!}</dd>
+            <dd property="${IUCR.refineLsRFactorAll}">${__.refineLsRFactorAll!}</dd>
             <dt>Weighted R Factor (Obs)</dt>
-            <dd property="${IUCR.refineLsWrFactorGt}">${_.refineLsWrFactorGt!}</dd>
+            <dd property="${IUCR.refineLsWrFactorGt}">${__.refineLsWrFactorGt!}</dd>
             <dt>Weighted R Factor (All)</dt>
-            <dd property="${IUCR.refineLsWrFactorRef}">${_.refineLsWrFactorRef!}</dd>
+            <dd property="${IUCR.refineLsWrFactorRef}">${__.refineLsWrFactorRef!}</dd>
         </dl>
 
 
         <h2>Result files</h2>
 
         <ul class="files">
-            <li><a href="${_.cmlFile}">Chemical Markup Language</a></li>
-            <li><#if cifOriginal??><a href="${cifOriginal}" title="CIF file - original">CIF file</a> [<a href="${_.cifFile}" title="CIF file - local cache">local cache</a>]<#else><a href="${_.cifFile}" title="CIF file">CIF File</a></#if> </li>
-            <li><a href="${_.rdfXmlFile}">RDF XML File</a></li>
+            <li><a href="${__.cmlFile}">Chemical Markup Language</a></li>
+            <li><#if cifOriginal??><a href="${cifOriginal}" title="CIF file - original">CIF file</a> [<a href="${__.cifFile}" title="CIF file - local cache">local cache</a>]<#else><a href="${__.cifFile}" title="CIF file">CIF File</a></#if> </li>
+            <li><a href="${__.rdfXmlFile}">RDF XML File</a></li>
         </ul>
 
     </div>
 
         <dl class="identifier">
             <dt>InChI:</dt>
-            <dd>${_.inchi}</dd>
+            <dd>${__.inchi}</dd>
             <dt>InChIKey:</dt>
-            <dd>${_.inchiKey}
-                <a href="${URI_BASE}/search/?search_provider=structure&inchi_key=${_.inchiKey}&submit=search"" rel="nofollow">[?]</a></dd>
+            <dd>${__.inchiKey}
+                <a href="${URI_BASE}/search/?search_provider=structure&inchi_key=${__.inchiKey}&submit=search"" rel="nofollow">[?]</a></dd>
         </dl>
 
-<#list _.molecularEntities as entry>
+<#if __.molecularEntities??>
+<#list __.molecularEntities as entry>
         <dl class="identifier">
             <dt>InChI:</dt>
             <dd>${entry.inchi}</dd>
                 <a href="${URI_BASE}/search/?search_provider=structure&inchi_key=${entry.inchiKey}&submit=search"" rel="nofollow">[?]</a></dd>
         </dl>
 </#list>
+</#if>
         <div class="clear"></div>
 
     </div>
 </div>
 
 <script type="text/javascript">
+(function($){
     $(document).ready(function() {
         var useSignedApplet = true;
         jmolInitialize("${URI_BASE}/plugins/jmol/jmol/", useSignedApplet);
 
         $("#jmol").jmol({
-            'img': "${_.imageFile}",
-            'url': "${_.cifPath}",
+            'img': "${__.imageFile}",
+            'url': "${__.cifPath}",
             'script': "load $ {1 1 1}"
         });
     });
+})(jQuery);
 </script>
 </@layout.page>
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.