Rewrote comment form controllers and templates in FreeMarker.

This commit is contained in:
rjy7 2010-05-19 19:50:54 +00:00
parent ae01a03122
commit f88a77d307
24 changed files with 723 additions and 208 deletions

View file

@ -5,12 +5,14 @@
<#if message??>
<p>${message}</p>
<#else>
<#list classGroups as classGroup>
<h2>${classGroup.publicName}</h2>
<ul>
<#list classGroup.classes as class>
<li><a href="${class.url}">${class.name}</a> (${class.entityCount})</li>
</#list>
</ul>
</#list>
</#if>
<div class="siteMap">
<#list classGroups as classGroup>
<h2>${classGroup.publicName}</h2>
<ul>
<#list classGroup.classes as class>
<li><a href="${class.url}">${class.name}</a> (${class.entityCount})</li>
</#list>
</ul>
</#list>
</div>
</#if>

View file

@ -0,0 +1,9 @@
<#-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
<#-- Confirmation page for comment form -->
<h2>Thank you for your feedback</h2>
<img src="${siteIconDir}/mail.gif" alt="mailbox"/><br/>
<p>Thank you for contacting our curation and development team. We will respond to your inquiry as soon as possible.</p>
<p>Return to the <a href="${urls.home}">home page</a>.</p>

View file

@ -0,0 +1,3 @@
<#-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
<#-- Comment form email response -->

View file

@ -0,0 +1,13 @@
<#-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
<img src="${siteIconDir}/bomb.gif" alt="email error"/>
<p class="normal">An error occurred during the processing of your request.<br />
<#if errorMessage?has_content>
<strong>${errorMessage}</strong>
</#if>
</p>
<p>Return to the <a href="${urls.home}">home page</a>.</p>

View file

@ -0,0 +1,59 @@
<#-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
<#-- Comment form -->
<div class="staticPageBackground feedbackForm">
<h2>${title}</h2>
<p>Thank you for your interest in
<#compress>
<#if portalType == "CALSResearch">
the Cornell University College of Agriculture and Life Sciences Research Portal
<#elseif portalType == "VIVO">
VIVO
<#else>
the ${siteName} portal
</#if>
</#compress>.
Please submit this form with questions, comments, or feedback about the content of this site.
</p>
<#if siteName == "CALSResearch" || siteName == "CALSImpact">
<p>
${siteName} is a service that depends on regular updates and feedback.
Please help us out by providing comments and suggestions for additional content (people, departments, courses, research services, etc.)
that you would like to see represented. The reference librarians at Albert R. Mann Library will be in touch with you soon.
</p>
</#if>
<form name="contact_form" action="sendMail" method="post" onsubmit="return ValidateForm('contact_form');">
<input type="hidden" name="home" value="${portalId}"/>
<input type="hidden" name="RequiredFields" value="webusername,webuseremail,s34gfd88p9x1"/>
<input type="hidden" name="RequiredFieldsNames" value="Name,Email address,Comments"/>
<input type="hidden" name="EmailFields" value="webuseremail"/>
<input type="hidden" name="EmailFieldsNames" value="emailaddress"/>
<input type="hidden" name="DeliveryType" value="comment"/>
<label for="webusername">Full name</label>
<p><input style="width:33%;" type="text" name="webusername" maxlength="255"/></p>
<label for="webuseremail">Email address</label>
<p><input style="width:25%;" type="text" name="webuseremail" maxlength="255"/></p>
<label>Your comments, questions, or suggestions</label>
<textarea name="s34gfd88p9x1" rows="10" cols="90"></textarea>
<div>
<input type="submit" value="Send Mail" class="yellowbutton"/>
<input type="reset" value="Clear Form" class="plainbutton"/>
</div
<p style="font-weight: bold; margin-top: 1em">Thank you!</p>
</form>
</div>
<#-- RY This is temporary. -->
<script src="${contextPath}/js/commentForm.js"></script>

View file

@ -17,10 +17,10 @@
<p class="normal">${copyrightAnchor} makes no warranty, expressed or implied, including the warranties of merchantability
and fitness for a particular purpose, or assumes any legal liability or responsibility for the accuracy,
completeness, currency or usefulness of any material displayed or distributed through the
${appName} website or represents that its use would not infringe privately owned rights.
${siteName} website or represents that its use would not infringe privately owned rights.
${copyrightAnchor} disclaims all warranties with regard to the information provided. Any reliance upon such information
is at your own risk. In no event will ${copyrightAnchor} be liable to you for any damages or losses whatsoever resulting
from or caused by the ${appName} website or its contents.</p>
from or caused by the ${siteName} website or its contents.</p>
<h3>Disclaimer of Endorsement</h3>
<p class="normal">Reference herein to any specific commercial product, process, or service by trade name,

View file

@ -24,5 +24,3 @@
All Rights Reserved. <a href="${urls.termsOfUse}">Terms of Use</a>
</div>
<#-- SCRIPT TAGS SHOULD GO HERE -->

View file

@ -0,0 +1,21 @@
<#-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
<#-- NOTICE: This is SAMPLE Google Analytics code. You must replace it with your institution's code. -->
<#--
<script type="text/javascript"> var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www."); document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-5164622-5");
pageTracker._setDomainName("vivo.cornell.edu");
pageTracker._setAllowLinker(true);
pageTracker._trackPageview();
var rollupTracker = _gat._getTracker("UA-12531954-1");
rollupTracker._setDomainName("none");
rollupTracker._setAllowLinker(true);
rollupTracker._trackPageview(location.host+location.pathname);
}
catch(err) {}
</script>
-->

View file

@ -1 +1,5 @@
<#-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
<#-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
<#include "googleAnalytics.ftl">
<#-- OTHER SCRIPT TAGS HERE -->

View file

@ -3,6 +3,8 @@
<link rel="stylesheet" type="text/css" href="${stylesheetDir}screen.css" media="screen"/>
<link rel="stylesheet" type="text/css" href="${stylesheetDir}print.css" media="print"/>
<#list stylesheets as stylesheet>
${stylesheet}
</#list>
<#if stylesheeets??>
<#list stylesheets as stylesheet>
${stylesheet}
</#list>
</#if>

View file

@ -22,7 +22,7 @@
<hr class="hidden" />
<div id="contentwrap">
<div id="content" <#if contentClass??> class="${contentClass}" </#if>>
<div id="content">
<#-- We don't do title here because some pages don't get a title, or it may not be the same as the <title> text.
<h2>${title}</h2> -->
${body}
@ -31,6 +31,8 @@
<#include "/components/footer.ftl">
</div> <!-- wrap -->
</div> <!-- wrap -->
<#include "/components/scripts.ftl">
</body>
</html>