completely rewrote templates for CS.

This commit is contained in:
JT Smith 2005-03-19 02:58:41 +00:00
parent 899004d23e
commit 208816a8d9
4 changed files with 28 additions and 3 deletions

View file

@ -41,6 +41,7 @@ sub canSubscribe {
#-------------------------------------------------------------------
sub createSubscriptionGroup {
my $self = shift;
return if ($self->get("subscriptionGroupId"));
my $group = WebGUI::Group->new("new");
$group->name($self->getId);
$group->description("The group to store subscriptions for the thread ".$self->getId);
@ -513,6 +514,7 @@ Subscribes the user to this thread.
sub subscribe {
my $self = shift;
$self->createSubscriptionGroup;
WebGUI::Grouping::addUsersToGroups([$session{user}{userId}],[$self->get("subscriptionGroupId")]);
}

View file

@ -829,6 +829,8 @@ sub view {
$var{'user.isModerator'} = $self->canModerate;
$var{'user.isVisitor'} = ($session{user}{userId} eq '1');
$var{'user.isSubscribed'} = $self->isSubscribed;
$var{'sortby.title.url'} = $self->getSortByUrl("title");
$var{'sortby.username.url'} = $self->getSortByUrl("username");
$var{'sortby.date.url'} = $self->getSortByUrl("dateSubmitted");
$var{'sortby.lastreply.url'} = $self->getSortByUrl("lastreply");
$var{'sortby.views.url'} = $self->getSortByUrl("views");