#* The contents of this file are subject to the Mozilla Public License Version 1.1 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at . Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. The Original Code is the Venice Web Communities System. The Initial Developer of the Original Code is Eric J. Bowersox , for Silverwrist Design Studios. Portions created by Eric J. Bowersox are Copyright (C) 2003 Eric J. Bowersox/Silverwrist Design Studios. All Rights Reserved. Contributor(s): *# #* Parameters: comm = Community we're working with stdlist = 0 if this is a "search" operation, 1 if this is a "member list" operation field = Search field (string equivalent) mode = Search mode (string equivalent) term = Search term ofs = Offset within the search we're at right now fcount = Total number of items found in current search pagesize = Number of items to display per page results = Results list from find/member list, a List of DynamoUser objects (may be null) *# #header2( "Community Members:" "$comm.Name" )
#comment( "Find Community Members form" )

Search for members of community "$comm.Name":

Display all users whose      

#button( "INPUT" "search" )

#comment( "end Find Community Members form" )
#if( $results ) ## Do a tricky set of computations here to figure out what we need to display in terms of the search results ## and the form to the right that lets us page through results. #set( $resultcount = $results.size() ) #set( $is_next = 0 ) #set( $is_prev = 0 ) #if( $resultcount > $pagesize ) #set( $resultcount = $pagesize ) #set( $is_next = 1 ) #end #if( $ofs > 0 ) #set( $is_prev = 1 ) #end #set( $is_form = $is_next + $is_prev ) #set( $ndx_first = $ofs + 1 ) #set( $ndx_last = $ofs + $pagesize ) #if( $ndx_last > $fcount ) #set( $ndx_last = $fcount ) #end #comment( "Results display" )
#if( $stdlist == 1 ) Community Members #else Search Results #end #if( $is_form >= 1 ) (Displaying ${ndx_first}-${ndx_last} of ${fcount}) #end #if( $is_form >= 1 ) #comment( "Results navigation form" )
#if( $is_prev == 1 ) #button( "INPUT" "previous" ) #else #button( "IMAGE" "0transparent" ) #end    #if( $is_next == 1 ) #button( "INPUT" "next" ) #else #button( "IMAGE" "0transparent" ) #end
#else   #end
#if( $fcount > 0 ) #set( $i = $resultcount ) #set( $prof_ns = "http://www.silverwrist.com/NS/venice/2002/12/31/user.profile" ) #foreach( $usr in $results ) #set( $i = $i - 1 ) #if( $i >= 0 ) #set( $first = $std.getProperty($usr,$prof_ns,"name.given") ) #set( $last = $std.getProperty($usr,$prof_ns,"name.family") ) #set( $city = $std.getProperty($usr,$prof_ns,"locality") ) #set( $state = $std.getProperty($usr,$prof_ns,"region") ) #set( $country = $std.getProperty($usr,$prof_ns,"country") ) #set( $descr = $std.getProperty($usr,$prof_ns,"description") ) #end #end
#bullet() #encodeHTML( $usr.Name )
#encodeHTML( $first ) #encodeHTML( $last ), from #encodeHTML( $city ), #encodeHTML( $state )  #encodeHTML( $country.getCode() ) #if( $descr )
#encodeHTML( $descr ) #end
#else No members found. #end #comment( "End results display" ) #end