- CCT Public Page
 - [CCT Members Area]
 
import com.atlassian.confluence.pages.Page;
import bucket.container.ContainerManager;
def index = null //request.getSession(true).getServletContext().getAttribute("climb.index")
if (index == null )
Use Ctrl & Shift to select multiple values
Stars  | 
Name Starts With  | 
Name Contains  | 
Grade  | 
Area  | 
Sort By  | 
|---|---|---|---|---|---|
\\\\
'''
def filtered = new ArrayList();
for (c in index.climbs)
{
  if ( pages.contains(c.page) && grades.contains(c.grade) && stars.contains(c.stars) )
    filtered.add c
}
out.println "h2. Results"
out.println "|| || Stars || Name || Length || Grade || Area ||"
for (c in filtered)
{
  out.println "| □ |" + c.stars + "|" + c.name + "|" + c.length + "|" + c.grade + "| [" + c.page + "]|"
}
def addChildren(Page page, Index index)
{
  for (child in page.sortedChildren)
}
def doPage (Page page, Index index)
{
  int index1 = page.content.indexOf(" 
String xml = page.content.substring(index1+7, index2)
//out.println ("Page:" + page )
    def x = new XmlParser().parseText(xml)
    def climbs = x.climb
    climbs.addAll x.problem
    if (climbs.size() > 0)
      index.pages.add page.title  
for (climb in climbs)
  }
  addChildren(page, index)
}
class Index
{
  List climbs = []
  List pages = []
}
class Climb
{
  String name
  String grade
  String stars
  String length
  //String extra
  //String number
  String page;  
String toString()
}