fixed up community profile - some of the features from the origina weren't in
there yet
This commit is contained in:
parent
4a305dcd91
commit
8b40695626
|
@ -53,16 +53,27 @@ if (logo_url==null)
|
||||||
|
|
||||||
rc.setParameter("logo",logorender.getRenderingObject(logo_url));
|
rc.setParameter("logo",logorender.getRenderingObject(logo_url));
|
||||||
|
|
||||||
|
// Get the community type.
|
||||||
|
tmp = cast.toInteger(comm.getObject(VeniceNamespaces.COMMUNITY_SECURITY_NAMESPACE,"type.hint"));
|
||||||
|
if (tmp==0)
|
||||||
|
rc.setParameter("type","Public Community");
|
||||||
|
else if (tmp==1)
|
||||||
|
rc.setParameter("type","Private Community");
|
||||||
|
else if (tmp==2)
|
||||||
|
rc.setParameter("type","Invitation-Only Community");
|
||||||
|
|
||||||
// Get the "use category" flag.
|
// Get the "use category" flag.
|
||||||
opts = cast.toOptionSet(globals.getObject(VeniceNamespaces.COMMUNITY_GLOBALS_NAMESPACE,"options"));
|
opts = cast.toOptionSet(globals.getObject(VeniceNamespaces.COMMUNITY_GLOBALS_NAMESPACE,"options"));
|
||||||
if (opts.get(0))
|
if (opts.get(0))
|
||||||
rc.setParameter("use_category",Boolean.TRUE);
|
rc.setParameter("category",comm.category);
|
||||||
|
|
||||||
// Set the parameters that correspond to single properties.
|
// Set the parameters that correspond to single properties.
|
||||||
rc.setParameter("synopsis",PropertyUtils.getPropertyNoErr(comm,VeniceNamespaces.COMMUNITY_PROFILE_NAMESPACE,
|
rc.setParameter("synopsis",PropertyUtils.getPropertyNoErr(comm,VeniceNamespaces.COMMUNITY_PROFILE_NAMESPACE,
|
||||||
"synopsis"));
|
"synopsis"));
|
||||||
rc.setParameter("rules",PropertyUtils.getPropertyNoErr(comm,VeniceNamespaces.COMMUNITY_PROFILE_NAMESPACE,"rules"));
|
rc.setParameter("rules",PropertyUtils.getPropertyNoErr(comm,VeniceNamespaces.COMMUNITY_PROFILE_NAMESPACE,"rules"));
|
||||||
rc.setParameter("language",comm.getObject(VeniceNamespaces.COMMUNITY_PROFILE_NAMESPACE,"language"));
|
rc.setParameter("language",comm.getObject(VeniceNamespaces.COMMUNITY_PROFILE_NAMESPACE,"language"));
|
||||||
|
rc.setParameter("homepage",PropertyUtils.getPropertyNoErr(comm,VeniceNamespaces.COMMUNITY_PROFILE_NAMESPACE,
|
||||||
|
"url.homepage"));
|
||||||
|
|
||||||
// Fill in the location list.
|
// Fill in the location list.
|
||||||
locs = new ArrayList();
|
locs = new ArrayList();
|
||||||
|
|
|
@ -17,13 +17,15 @@
|
||||||
*#
|
*#
|
||||||
#*
|
#*
|
||||||
Parameters:
|
Parameters:
|
||||||
community = Community we're displaying the profile of.
|
community = Community we're displaying the profile of.
|
||||||
logo = Community logo renderable object.
|
logo = Community logo renderable object.
|
||||||
use_category = True (set) if we're using categories on this server.
|
type = Community type description.
|
||||||
synopsis = Community synopsis.
|
category = The community's category, if we're using categories on this server.
|
||||||
location = List of strings containing location information
|
synopsis = Community synopsis.
|
||||||
language = Primary language for community (a com.silverwrist.util.Language object)
|
location = List of strings containing location information
|
||||||
rules = Community rules/standards of conduct
|
language = Primary language for community (a com.silverwrist.util.Language object)
|
||||||
|
rules = Community rules/standards of conduct
|
||||||
|
homepage = Community home page
|
||||||
*#
|
*#
|
||||||
#comment( "Profile for community #${community.getCID()}" )
|
#comment( "Profile for community #${community.getCID()}" )
|
||||||
#header2( "Community Profile:" "${community.Name}" )
|
#header2( "Community Profile:" "${community.Name}" )
|
||||||
|
@ -42,15 +44,21 @@
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
<td align="left" class="content">
|
<td align="left" class="content">
|
||||||
<b><u>TODO: Type of Community</u></b>
|
<b><u>$!type</u></b>
|
||||||
#if( $use_category )
|
#if( $category )
|
||||||
#set( $c = $community.CategoryID )
|
#set( $limit = $category.getNumLevels() - 1 )
|
||||||
<br /><b>Category:</b>
|
<br /><b>Category:</b>
|
||||||
<a href="#formatURL( "SERVLET" "find_communities.js.vs?cat=$c" )">#encodeHTML( $community.Category.toString() )</a>
|
#foreach( $i in [0..$limit] )
|
||||||
|
#if( $i > 0 ): #end
|
||||||
|
#set( $c = $category.getIDAtLevel($i) )
|
||||||
|
<a href="#formatURL( "SERVLET" "find_communities.js.vs?cat=$c" )">#encodeHTML( $category.getTitleAtLevel($i) )</a>
|
||||||
|
#end
|
||||||
|
#end
|
||||||
|
#if( $synopsis )
|
||||||
|
<p><em>#encodeHTML( $synopsis )</em></p>
|
||||||
#end
|
#end
|
||||||
#set( $u = $community.HostUser.Name )
|
#set( $u = $community.HostUser.Name )
|
||||||
<p><b>Host:</b> <a href="#formatURL( "SERVLET" "user/$u" )">#encodeHTML( $u )</a></p>
|
<p><b>Host:</b> <a href="#formatURL( "SERVLET" "user/$u" )">#encodeHTML( $u )</a></p>
|
||||||
<p><em>#encodeHTML( $synopsis )</em></p>
|
|
||||||
<p>
|
<p>
|
||||||
<b>Location:</b><br />
|
<b>Location:</b><br />
|
||||||
#if( $location )
|
#if( $location )
|
||||||
|
@ -60,6 +68,11 @@
|
||||||
#end
|
#end
|
||||||
</p>
|
</p>
|
||||||
<p><b>Primary Language:</b> #encodeHTML( $language.Name )</p>
|
<p><b>Primary Language:</b> #encodeHTML( $language.Name )</p>
|
||||||
<p><b>Standards of Conduct:</b> #encodeHTML( $rules )</p>
|
#if( $rules )
|
||||||
|
<p><b>Standards of Conduct:</b> #encodeHTML( $rules )</p>
|
||||||
|
#end
|
||||||
|
#if( $homepage )
|
||||||
|
<p><b>Home Page:</b> <a href="$homepage" target="Wander">#encodeHTML( $homepage )</a></p>
|
||||||
|
#end
|
||||||
</td>
|
</td>
|
||||||
</tr></table>
|
</tr></table>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user