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));
|
||||
|
||||
// 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.
|
||||
opts = cast.toOptionSet(globals.getObject(VeniceNamespaces.COMMUNITY_GLOBALS_NAMESPACE,"options"));
|
||||
if (opts.get(0))
|
||||
rc.setParameter("use_category",Boolean.TRUE);
|
||||
rc.setParameter("category",comm.category);
|
||||
|
||||
// Set the parameters that correspond to single properties.
|
||||
rc.setParameter("synopsis",PropertyUtils.getPropertyNoErr(comm,VeniceNamespaces.COMMUNITY_PROFILE_NAMESPACE,
|
||||
"synopsis"));
|
||||
rc.setParameter("rules",PropertyUtils.getPropertyNoErr(comm,VeniceNamespaces.COMMUNITY_PROFILE_NAMESPACE,"rules"));
|
||||
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.
|
||||
locs = new ArrayList();
|
||||
|
|
|
@ -17,13 +17,15 @@
|
|||
*#
|
||||
#*
|
||||
Parameters:
|
||||
community = Community we're displaying the profile of.
|
||||
logo = Community logo renderable object.
|
||||
use_category = True (set) if we're using categories on this server.
|
||||
synopsis = Community synopsis.
|
||||
location = List of strings containing location information
|
||||
language = Primary language for community (a com.silverwrist.util.Language object)
|
||||
rules = Community rules/standards of conduct
|
||||
community = Community we're displaying the profile of.
|
||||
logo = Community logo renderable object.
|
||||
type = Community type description.
|
||||
category = The community's category, if we're using categories on this server.
|
||||
synopsis = Community synopsis.
|
||||
location = List of strings containing location information
|
||||
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()}" )
|
||||
#header2( "Community Profile:" "${community.Name}" )
|
||||
|
@ -42,15 +44,21 @@
|
|||
</div>
|
||||
</td>
|
||||
<td align="left" class="content">
|
||||
<b><u>TODO: Type of Community</u></b>
|
||||
#if( $use_category )
|
||||
#set( $c = $community.CategoryID )
|
||||
<b><u>$!type</u></b>
|
||||
#if( $category )
|
||||
#set( $limit = $category.getNumLevels() - 1 )
|
||||
<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
|
||||
#set( $u = $community.HostUser.Name )
|
||||
<p><b>Host:</b> <a href="#formatURL( "SERVLET" "user/$u" )">#encodeHTML( $u )</a></p>
|
||||
<p><em>#encodeHTML( $synopsis )</em></p>
|
||||
<p>
|
||||
<b>Location:</b><br />
|
||||
#if( $location )
|
||||
|
@ -60,6 +68,11 @@
|
|||
#end
|
||||
</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>
|
||||
</tr></table>
|
||||
|
|
Loading…
Reference in New Issue
Block a user