kaz 02/04/23 06:41:05
Modified: src/dvsl/xdocs mail-lists.dvsl
Log:
Patch from "Glenn A. McAllister" <[EMAIL PROTECTED]>. Thanks!
[glenn's comments]
Currently, mail-list.dvsl assumes the <subscribe/> and <unsubscribe/>
elements are email addresses. Unfortunately, this doesn't work for those
of us with mailing lists on SourceForge, which uses Mailman. The links to
subscribe and unsubscribe from the list are http links to forms.
The attached patch allows for http links in addition to the current
format. It also deals with missing <mailingList> elements.
Glenn McAllister
SOMA Networks, Inc.
Revision Changes Path
1.3 +27 -3 jakarta-turbine-maven/src/dvsl/xdocs/mail-lists.dvsl
Index: mail-lists.dvsl
===================================================================
RCS file: /home/cvs/jakarta-turbine-maven/src/dvsl/xdocs/mail-lists.dvsl,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- mail-lists.dvsl 17 Mar 2002 19:21:04 -0000 1.2
+++ mail-lists.dvsl 23 Apr 2002 13:41:05 -0000 1.3
@@ -2,7 +2,7 @@
mail list page generator
- version : $Id: mail-lists.dvsl,v 1.2 2002/03/17 19:21:04 kaz Exp $
+ version : $Id: mail-lists.dvsl,v 1.3 2002/04/23 13:41:05 kaz Exp $
-->
#match ("/")
@@ -50,8 +50,32 @@
#match ("mailingList")
<tr>
<td>$node.name.value()</td>
- <td><a href="mailto:$node.subscribe.value()">Subscribe</a></td>
- <td><a href="mailto:$node.unsubscribe.value()">Unsubscribe</a></td>
+ #if( $node.subscribe )
+ #if( $node.subscribe.value().startsWith( "http" ) )
+ #set( $subscribe = $node.subscribe.value() )
+ #else
+ #set( $subscribe = "mailto:$node.subscribe.value()" )
+ #end
+ <td><a href="$subscribe">Subscribe</a></td>
+ #else
+ <td>Subscribe</td>
+ #end
+
+ #if( $node.unsubscribe )
+ #if( $node.unsubscribe.value().startsWith( "http" ) )
+ #set( $unsubscribe = $node.unsubscribe.value() )
+ #else
+ #set( $unsubscribe = "mailto:$node.unsubscribe.value()" )
+ #end
+ <td><a href="$unsubscribe">Unsubscribe</a></td>
+ #else
+ <td>Unsubscribe</td>
+ #end
+
+ #if( $node.archive )
<td><a href="$node.archive.value()">Archive</a></td>
+ #else
+ <td>No archive available</td>
+ #end
</tr>
#end