diff --git a/docs/upgrades/packages-7.6.6/default-matrix-edit-listing-template.wgpkg b/docs/upgrades/packages-7.6.6/default-matrix-edit-listing-template.wgpkg new file mode 100644 index 000000000..69f960986 Binary files /dev/null and b/docs/upgrades/packages-7.6.6/default-matrix-edit-listing-template.wgpkg differ diff --git a/docs/upgrades/packages-7.6.5/matrix-default-compare-template.wgpkg b/docs/upgrades/packages-7.6.6/matrix-default-compare-template.wgpkg similarity index 100% rename from docs/upgrades/packages-7.6.5/matrix-default-compare-template.wgpkg rename to docs/upgrades/packages-7.6.6/matrix-default-compare-template.wgpkg diff --git a/docs/upgrades/packages-7.6.5/matrix-default-view-template.wgpkg b/docs/upgrades/packages-7.6.6/matrix-default-view-template.wgpkg similarity index 100% rename from docs/upgrades/packages-7.6.5/matrix-default-view-template.wgpkg rename to docs/upgrades/packages-7.6.6/matrix-default-view-template.wgpkg diff --git a/docs/upgrades/upgrade_7.6.5-7.6.6.pl b/docs/upgrades/upgrade_7.6.5-7.6.6.pl index 1ca1b4684..4075a8003 100644 --- a/docs/upgrades/upgrade_7.6.5-7.6.6.pl +++ b/docs/upgrades/upgrade_7.6.5-7.6.6.pl @@ -29,6 +29,7 @@ my $quiet; # this line required my $session = start(); # this line required # upgrade functions go here +addMatrixEditListingTemplate( $session ); lengthenThingyDefaultValues($session); finish($session); # this line required @@ -43,6 +44,13 @@ finish($session); # this line required # print "DONE!\n" unless $quiet; #} +# Add editListingTemplate property to Matrix +sub addMatrixEditListingTemplate { + my $session = shift; + print "Add editListingTemplate property to Matrix\t... " unless $quiet; + $session->db->write("alter table Matrix add editListingTemplateId char(22)"); + print "DONE!\n" unless $quiet; +} #---------------------------------------------------------------------------- # Describe what our function does @@ -54,6 +62,7 @@ sub lengthenThingyDefaultValues { print "DONE!\n" unless $quiet; } + # -------------- DO NOT EDIT BELOW THIS LINE -------------------------------- #---------------------------------------------------------------------------- diff --git a/lib/WebGUI/Asset/MatrixListing.pm b/lib/WebGUI/Asset/MatrixListing.pm index c1bcd579c..82e6d2ef3 100644 --- a/lib/WebGUI/Asset/MatrixListing.pm +++ b/lib/WebGUI/Asset/MatrixListing.pm @@ -226,11 +226,78 @@ sub getEditForm { my $session = $self->session; my $db = $session->db; my $matrixId = $self->getParent->getId; - my $tabform = $self->next::method(); my $i18n = WebGUI::International->new($session, 'Asset_MatrixListing'); + my $func = $session->form->process("func"); + + my $form = WebGUI::HTMLForm->new($session); + + if ($func eq "add" || ( $func eq "editSave" && $session->form->process("assetId") eq "new")) { + $form->hidden( + -name =>'assetId', + -value =>'new', + ); + $form->hidden( + -name =>'class', + -value =>'WebGUI::Asset::MatrixListing', + ); + } + $form->hidden( + -name =>'func', + -value =>'editSave', + ); + $form->text( + -name =>'title', + -defaultValue =>'Untitled', + -label =>$i18n->get("product name label"), + -hoverHelp =>$i18n->get('product name description'), + -value =>$self->getValue('title'), + ); + $form->image( + -name =>'screenshots', + -defaultValue =>undef, + -maxAttachments =>20, + -label =>$i18n->get("screenshots label"), + -hoverHelp =>$i18n->get("screenshots description"),, + -value =>$self->getValue('screenshots'), + ); + $form->HTMLArea( + -name =>'description', + -defaultValue =>undef, + -label =>$i18n->get("description label"), + -hoverHelp =>$i18n->get("description description"), + -value =>$self->getValue('description'), + ); + $form->text( + -name =>'version', + -defaultValue =>undef, + -label =>$i18n->get("version label"), + -hoverHelp =>$i18n->get("version description"), + -value =>$self->getValue('version'), + ); + $form->text( + -name =>'manufacturerName', + -defaultValue =>undef, + -label =>$i18n->get("manufacturerName label"), + -hoverHelp =>$i18n->get("manufacturerName description"), + -value =>$self->getValue('manufacturerName'), + ); + $form->url( + -name =>'manufacturerURL', + -defaultValue =>undef, + -label =>$i18n->get("manufacturerURL label"), + -hoverHelp =>$i18n->get("manufacturerURL description"), + -value =>$self->getValue('manufacturerURL'), + ); + $form->url( + -name =>'productURL', + -defaultValue =>undef, + -label =>$i18n->get("productURL label"), + -hoverHelp =>$i18n->get("productURL description"), + -value =>$self->getValue('productURL'), + ); foreach my $category (keys %{$self->getParent->getCategories}) { - $tabform->getTab('properties')->raw('