#------------------------------------------------------------
# Copyright (C) 2006 RoyaltyShare, Inc.   All Rights Reserved
# $Id$
#------------------------------------------------------------
package RPS::Catalog::Command::ShowMain;
use strict;
use warnings;

use lib '/app/tools/rps/lib';
use RPS::Catalog::Form;
use RPS::Command;
use RPS::CommandLog;
use base 'RSApache::Command::XMLCommand';

use lib '/app/tools/common/lib';
use RSApache::Response::XSLT;

sub cmd  { return 'show_main'; }
sub area { return 'catalog'; }

use constant kTemplate => "/app/tools/rps/templates/catalog/ajax_main.xsl";

sub execute
{
	my ($self) = @_;

	my $response = $self->SUPER::execute();
	return $response if $response;

	my $albumID = $self->getParam("AlbumID");
	my $form = RPS::Catalog::Form->new(albumID => $albumID);

    RPS::CommandLog::Log($self, $albumID);
	$self->{xml}{Form} = $form;

	$response = RSApache::Response::XSLT->new($self->{xml}, kTemplate);
	return $response;
}



1;
