r4613 - in trunk/lib/style: common common/templates skins/esa skins/knb2 skins/pisco/templates/xsl skins/sbclter/templates/xsl
walbridge at ecoinformatics.org
walbridge at ecoinformatics.org
Fri Nov 21 17:27:47 PST 2008
Author: walbridge
Date: 2008-11-21 17:27:47 -0800 (Fri, 21 Nov 2008)
New Revision: 4613
Added:
trunk/lib/style/common/templates/esaGetReviews.tmpl
Removed:
trunk/lib/style/common/templates/getReviews.tmpl
Modified:
trunk/lib/style/common/review_behaviors.js
trunk/lib/style/skins/esa/esa-resultset.xsl
trunk/lib/style/skins/esa/esa.properties
trunk/lib/style/skins/knb2/resultset.xsl
trunk/lib/style/skins/pisco/templates/xsl/resultset.xsl
trunk/lib/style/skins/sbclter/templates/xsl/data_use_agreement.xsl
trunk/lib/style/skins/sbclter/templates/xsl/resultset.xsl
Log:
Replace usage of 'cgi-url' with 'cgi-prefix' in XSLT transformations, fix the ESA review process to accept the 'metacatUrl' parameter (#3687)
Modified: trunk/lib/style/common/review_behaviors.js
===================================================================
--- trunk/lib/style/common/review_behaviors.js 2008-11-21 21:14:03 UTC (rev 4612)
+++ trunk/lib/style/common/review_behaviors.js 2008-11-22 01:27:47 UTC (rev 4613)
@@ -1,7 +1,7 @@
-function get_reviews(docid) {
+function get_reviews(docid, metacatUrl) {
if (docid != null && docid != '') {
- new Ajax.Request("../../metacat?action=read&docid=" + docid,
+ new Ajax.Request( metacatUrl + "?action=read&docid=" + docid,
{asynchronous:true, evalScripts:true, method:'post',
onLoading:function(request){Element.show('busy')},
onComplete: render_reviews});
Copied: trunk/lib/style/common/templates/esaGetReviews.tmpl (from rev 4594, trunk/lib/style/common/templates/getReviews.tmpl)
===================================================================
--- trunk/lib/style/common/templates/esaGetReviews.tmpl (rev 0)
+++ trunk/lib/style/common/templates/esaGetReviews.tmpl 2008-11-22 01:27:47 UTC (rev 4613)
@@ -0,0 +1,52 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+ <title>Reviews</title>
+ <meta http-equiv="content-type" content="text/html; charset=utf-8" />
+
+ <script src="[% styleCommonPath %]/prototype.js"></script>
+ <script src="[% styleCommonPath %]/accordion.js"></script>
+ <script src="[% styleCommonPath %]/review_behaviors.js"></script>
+ <link href="[% styleCommonPath %]/reviews.css" media="all" rel="Stylesheet" type="text/css" />
+
+</head>
+
+<body onload="get_reviews('[%reviewdocid%]', '[% metacatUrl %]')">
+
+[% IF isModerator == 'true' %]
+ <div class="comment_form">
+ <p class="sectionnames">Moderator Actions</p>
+ <form target="_top" id="reviewForm" method="POST" action="[% cgiPrefix %]/register-dataset.cgi">
+ <input value="mod_accept" id="stage" name="stage" type="hidden">
+ <input value="esa" name="cfg" type="hidden">
+ <input name="docid" type="hidden" value="[%docid%]">
+ <h3 style="margin-bottom: -18px;" class="review_emphasis">Please comment</h3>
+ <ul>
+ <li>
+ <textarea name="review" rows="5" cols="25"></textarea>
+ </li>
+ <li>
+ <input name="Accept" value=" Accept " type="SUBMIT" onClick="document.getElementById('stage').value='mod_accept';">
+ <input name="Decline" value="Decline" type="SUBMIT" onClick="document.getElementById('stage').value='mod_decline';">
+ <input name="Revise" value=" Revise " type="SUBMIT" onClick="document.getElementById('stage').value='mod_revise';">
+ </form>
+ </div>
+[% END %]
+
+[% IF reviewdocid != '' %]
+ <h3 style="margin-top:-8px" class="review_emphasis">
+ Reviews
+ <img id="busy" src="[% contextUrl %]/style/images/spinner.gif" style="display:none; margin-bottom: -3px;"/>
+ </h3>
+
+ <!-- ajax will populate this node -->
+ <div id="review_list_container"><div id="review_list"></div></div>
+
+[% ELSE %]
+ No reviews found.
+[% END %]
+
+</body>
+</html>
+
+
Property changes on: trunk/lib/style/common/templates/esaGetReviews.tmpl
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ Author Date Id Revision
Name: svn:mergeinfo
+
Name: svn:eol-style
+ native
Deleted: trunk/lib/style/common/templates/getReviews.tmpl
===================================================================
--- trunk/lib/style/common/templates/getReviews.tmpl 2008-11-21 21:14:03 UTC (rev 4612)
+++ trunk/lib/style/common/templates/getReviews.tmpl 2008-11-22 01:27:47 UTC (rev 4613)
@@ -1,52 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
- <title>Reviews</title>
- <meta http-equiv="content-type" content="text/html; charset=utf-8" />
-
- <script src="[% styleCommonPath %]/prototype.js"></script>
- <script src="[% styleCommonPath %]/accordion.js"></script>
- <script src="[% styleCommonPath %]/review_behaviors.js"></script>
- <link href="[% styleCommonPath %]/reviews.css" media="all" rel="Stylesheet" type="text/css" />
-
-</head>
-
-<body onload="get_reviews('[%reviewdocid%]')">
-
-[% IF isModerator == 'true' %]
- <div class="comment_form">
- <p class="sectionnames">Moderator Actions</p>
- <form target="_top" id="reviewForm" method="POST" action="[% cgiPrefix %]/register-dataset.cgi">
- <input value="mod_accept" id="stage" name="stage" type="hidden">
- <input value="esa" name="cfg" type="hidden">
- <input name="docid" type="hidden" value="[%docid%]">
- <h3 style="margin-bottom: -18px;" class="review_emphasis">Please comment</h3>
- <ul>
- <li>
- <textarea name="review" rows="5" cols="25"></textarea>
- </li>
- <li>
- <input name="Accept" value=" Accept " type="SUBMIT" onClick="document.getElementById('stage').value='mod_accept';">
- <input name="Decline" value="Decline" type="SUBMIT" onClick="document.getElementById('stage').value='mod_decline';">
- <input name="Revise" value=" Revise " type="SUBMIT" onClick="document.getElementById('stage').value='mod_revise';">
- </form>
- </div>
-[% END %]
-
-[% IF reviewdocid != '' %]
- <h3 style="margin-top:-8px" class="review_emphasis">
- Reviews
- <img id="busy" src="[% contextUrl %]/style/images/spinner.gif" style="display:none; margin-bottom: -3px;"/>
- </h3>
-
- <!-- ajax will populate this node -->
- <div id="review_list_container"><div id="review_list"></div></div>
-
-[% ELSE %]
- No reviews found.
-[% END %]
-
-</body>
-</html>
-
-
Modified: trunk/lib/style/skins/esa/esa-resultset.xsl
===================================================================
--- trunk/lib/style/skins/esa/esa-resultset.xsl 2008-11-21 21:14:03 UTC (rev 4612)
+++ trunk/lib/style/skins/esa/esa-resultset.xsl 2008-11-22 01:27:47 UTC (rev 4613)
@@ -31,7 +31,7 @@
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="html"/>
- <xsl:param name="cgi-url" select='string("")'/>
+ <xsl:param name="cgi-prefix"/>
<xsl:param name="sessid"/>
<xsl:param name="contextURL"/>
<xsl:param name="qformat">default</xsl:param>
@@ -108,7 +108,7 @@
<xsl:choose>
<xsl:when test="$enableediting = 'true'">
- <form action="{$cgi-url}/register-dataset.cgi" method="POST">
+ <form action="{$cgi-prefix}/register-dataset.cgi" method="POST">
<xsl:attribute name="name">
<xsl:value-of select="translate(./docid, '()-.', '____')" />
</xsl:attribute>
@@ -215,7 +215,7 @@
<xsl:choose>
<xsl:when test="$isModerator = 'true'">
<td class="text_plain">
- <form action="{$cgi-url}/register-dataset.cgi" method="POST">
+ <form action="{$cgi-prefix}/register-dataset.cgi" method="POST">
<input type="hidden" name="stage" value="mod_accept"/>
<input type="hidden" name="cfg" value="{$qformat}"/>
<input type="hidden" name="sessionid" value="{$sessid}"/>
@@ -229,7 +229,7 @@
</input>
</center>
</form>
- <form action="{$cgi-url}/register-dataset.cgi" method="POST">
+ <form action="{$cgi-prefix}/register-dataset.cgi" method="POST">
<input type="hidden" name="stage" value="mod_decline"/>
<input type="hidden" name="cfg" value="{$qformat}"/>
<input type="hidden" name="sessionid" value="{$sessid}"/>
@@ -243,7 +243,7 @@
</input>
</center>
</form>
- <form action="{$cgi-url}/register-dataset.cgi" method="POST">
+ <form action="{$cgi-prefix}/register-dataset.cgi" method="POST">
<input type="hidden" name="stage" value="mod_revise"/>
<input type="hidden" name="cfg" value="{$qformat}"/>
<input type="hidden" name="sessionid" value="{$sessid}"/>
@@ -261,7 +261,7 @@
</xsl:when>
<xsl:otherwise>
<td class="text_plain">
- <form action="{$cgi-url}/register-dataset.cgi" method="POST">
+ <form action="{$cgi-prefix}/register-dataset.cgi" method="POST">
<input type="hidden" name="stage" value="read"/>
<input type="hidden" name="cfg" value="{$qformat}"/>
<input type="hidden" name="sessionid" value="{$sessid}"/>
@@ -274,7 +274,7 @@
<input type="SUBMIT" value=" View " name="View"></input>
</center>
</form>
- <form action="{$cgi-url}/register-dataset.cgi"
+ <form action="{$cgi-prefix}/register-dataset.cgi"
method="POST">
<input type="hidden" name="stage" value="modify"/>
<input type="hidden" name="cfg" value="{$qformat}"/>
Modified: trunk/lib/style/skins/esa/esa.properties
===================================================================
--- trunk/lib/style/skins/esa/esa.properties 2008-11-21 21:14:03 UTC (rev 4612)
+++ trunk/lib/style/skins/esa/esa.properties 2008-11-22 01:27:47 UTC (rev 4613)
@@ -25,7 +25,7 @@
# ESA-skin specific templates
registry.templates.modEmailNotification=esaModNotification.tmpl
registry.templates.modResult=esaModResultTemplate.tmpl
-registry.templates.getReviews=getReviews.tmpl
+registry.templates.getReviews=esaGetReviews.tmpl
# email settings
email.sender=ESA Data Registry <esaadmin at nceas.ucsb.edu>
Modified: trunk/lib/style/skins/knb2/resultset.xsl
===================================================================
--- trunk/lib/style/skins/knb2/resultset.xsl 2008-11-21 21:14:03 UTC (rev 4612)
+++ trunk/lib/style/skins/knb2/resultset.xsl 2008-11-22 01:27:47 UTC (rev 4613)
@@ -31,7 +31,7 @@
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="html"/>
- <xsl:param name="cgi-url" select='string("")'/>
+ <xsl:param name="cgi-prefix"/>
<xsl:param name="contextURL"/>
<xsl:param name="servletURL"/>
<xsl:param name="sessid"/>
@@ -193,7 +193,7 @@
</input>
</center>
</form>
- <form action="{$cgi-url}/register-dataset.cgi"
+ <form action="{$cgi-prefix}/register-dataset.cgi"
method="POST">
<input type="hidden" name="stage" value="modify"/>
<input type="hidden" name="cfg" value="{$qformat}"/>
@@ -208,7 +208,7 @@
</input>
</center>
</form>
- <form action="{$cgi-url}/register-dataset.cgi"
+ <form action="{$cgi-prefix}/register-dataset.cgi"
method="POST">
<input type="hidden" name="stage" value="delete"/>
<input type="hidden" name="cfg" value="{$qformat}"/>
Modified: trunk/lib/style/skins/pisco/templates/xsl/resultset.xsl
===================================================================
--- trunk/lib/style/skins/pisco/templates/xsl/resultset.xsl 2008-11-21 21:14:03 UTC (rev 4612)
+++ trunk/lib/style/skins/pisco/templates/xsl/resultset.xsl 2008-11-22 01:27:47 UTC (rev 4613)
@@ -43,7 +43,7 @@
doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" />
- <xsl:param name="cgi-url" select='string("")'/>
+ <xsl:param name="cgi-prefix"/>
<xsl:param name="sessid"/>
<xsl:param name="enableediting">false</xsl:param>
<xsl:param name="contextURL"/>
@@ -292,7 +292,7 @@
</input>
</center>
</form>
- <form action="{$cgi-url}/register-dataset.cgi"
+ <form action="{$cgi-prefix}/register-dataset.cgi"
method="POST">
<input type="hidden" name="stage" value="modify"/>
<input type="hidden" name="cfg" value="{$qformat}"/>
@@ -305,7 +305,7 @@
<input type="SUBMIT" value=" Edit " name="Edit">
</input>
</form>
- <form action="{$cgi-url}/register-dataset.cgi"
+ <form action="{$cgi-prefix}/register-dataset.cgi"
method="POST">
<input type="hidden" name="stage" value="delete"/>
<input type="hidden" name="cfg" value="{$qformat}"/>
Modified: trunk/lib/style/skins/sbclter/templates/xsl/data_use_agreement.xsl
===================================================================
--- trunk/lib/style/skins/sbclter/templates/xsl/data_use_agreement.xsl 2008-11-21 21:14:03 UTC (rev 4612)
+++ trunk/lib/style/skins/sbclter/templates/xsl/data_use_agreement.xsl 2008-11-22 01:27:47 UTC (rev 4613)
@@ -29,7 +29,7 @@
* into an HTML format suitable for rendering with modern web browsers.
-->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
- <xsl:param name="cgi-url" select='string("")'/>
+ <xsl:param name="cgi-prefix"/>
<xsl:param name="contextURL"/>
<!-- This parameter gets overidden by the chosen default qformat -->
<xsl:param name="qformat">default</xsl:param>
@@ -193,7 +193,7 @@
</input>
</center>
</form>
- <form action="{$cgi-url}/register-dataset.cgi"
+ <form action="{$cgi-prefix}/register-dataset.cgi"
method="POST">
<input type="hidden" name="stage" value="modify"/>
<input type="hidden" name="cfg" value="sbclter"/>
@@ -206,7 +206,7 @@
<input type="SUBMIT" value=" Edit " name="Edit">
</input>
</form>
- <form action="{$cgi-url}/register-dataset.cgi"
+ <form action="{$cgi-prefix}/register-dataset.cgi"
method="POST">
<input type="hidden" name="stage" value="delete"/>
<input type="hidden" name="cfg" value="sbclter"/>
Modified: trunk/lib/style/skins/sbclter/templates/xsl/resultset.xsl
===================================================================
--- trunk/lib/style/skins/sbclter/templates/xsl/resultset.xsl 2008-11-21 21:14:03 UTC (rev 4612)
+++ trunk/lib/style/skins/sbclter/templates/xsl/resultset.xsl 2008-11-22 01:27:47 UTC (rev 4613)
@@ -33,7 +33,7 @@
-->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
- <xsl:param name="cgi-url" select='string("")'/>
+ <xsl:param name="cgi-prefix"/>
<xsl:param name="sessid"/>
<xsl:param name="enableediting">false</xsl:param>
<xsl:param name="contextURL"/>
@@ -331,7 +331,7 @@
</input>
</center>
</form>
- <form action="{$cgi-url}/register-dataset.cgi"
+ <form action="{$cgi-prefix}/register-dataset.cgi"
method="POST">
<input type="hidden" name="stage" value="modify"/>
<input type="hidden" name="cfg" value="sbclter"/>
@@ -344,7 +344,7 @@
<input type="SUBMIT" value=" Edit " name="Edit">
</input>
</form>
- <form action="{$cgi-url}/register-dataset.cgi"
+ <form action="{$cgi-prefix}/register-dataset.cgi"
method="POST">
<input type="hidden" name="stage" value="delete"/>
<input type="hidden" name="cfg" value="sbclter"/>
@@ -388,7 +388,7 @@
<xsl:param name="entity_name"/>
<xsl:param name="URL1"/>
<!-- create form to pass url and entity's name to cgi with data agreement page. form name must be unique/dynamic -->
- <form action="{$cgi-url}/data-use-agreement.cgi" method="POST">
+ <form action="{$cgi-prefix}/data-use-agreement.cgi" method="POST">
<!-- <form action="http://sbcdata.lternet.edu/cgi-bin/data-use-agreement.cgi" method="POST"> -->
<xsl:attribute name="name">
<xsl:value-of select="translate($entity_name,',:()-. ' ,'')" />
More information about the Metacat-cvs
mailing list