<?xml version="1.0" encoding="$encoding" ?>
<!-- 
/*
 * Copyright 2001-2004 The Apache Software Foundation.
 * 
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 *      http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
 -->


#macro (displayLink $label $link)
<td>
  #if ($link && $link.length() != 0)
    #if ($link.trim().startsWith("http"))
      <a href="$escape.getText($link)">$label</a>
    #else
      <a href="mailto:$link">$label</a>
    #end
  #else
    Not Available
  #end
</td>
#end

<document>

  <properties>
    <title>Mailing Lists</title>
  </properties>

  <body>
    <section name="Mailing Lists">
    #if ($project.mailingLists.size() == 0)
      <p> 
        There are no mailing lists established for this project.  Please
        check back at a later date.
      </p>
    #else
      <p> 
        These are the mailing lists that have been established for this
        project.  For each list, there is a subscribe, unsubscribe, and an
        archive link.
      </p>
      <table>
        <thead>
        <tr>
          <th>List Name</th>
          <th>Subscribe</th>
          <th>Unsubscribe</th>
          <th>Archive</th>
        </tr>
        </thead>
        <tbody>
        #foreach ($list in $project.mailingLists)
        <tr>
          <td>$list.name</td>
          #displayLink("Subscribe" $list.subscribe)
          #displayLink("Unsubscribe" $list.unsubscribe)
          #displayLink("Archive" $list.archive)
        </tr>
        #end
        </tbody>
      </table>
    #end
    </section>
  </body>
</document>
