Added some more skeletons (newWobject, newAsset, changelog(!))
This commit is contained in:
parent
dc82b96d96
commit
0ca14186fe
5 changed files with 3 additions and 116 deletions
|
|
@ -71,7 +71,7 @@ sub definition {
|
|||
className=>'WebGUI::Asset::Wobject::Article',
|
||||
properties=>\%properties
|
||||
});
|
||||
return $class->SUPER::definition($definition);
|
||||
return $class->SUPER::definition($definition);
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -242,38 +242,6 @@ sub getEditForm {
|
|||
return $tabform;
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub getIndexerParams {
|
||||
my $self = shift;
|
||||
my $now = shift;
|
||||
return {
|
||||
Poll => {
|
||||
sql => "select Poll.assetId,
|
||||
Poll.question,
|
||||
Poll.a1 as a1, Poll.a2 as a2, Poll.a3 as a3, Poll.a4 as a4, Poll.a5 as a5,
|
||||
Poll.a6 as a6, Poll.a7 as a7, Poll.a8 as a8, Poll.a9 as a9, Poll.a10 as a10,
|
||||
Poll.a11 as a11, Poll.a12 as a12, Poll.a13 as a13, Poll.a14 as a14, Poll.a15 as a15,
|
||||
Poll.a16 as a16, Poll.a17 as a17, Poll.a18 as a18, Poll.a19 as a19, Poll.a20 as a20,
|
||||
asset.ownerUserId as ownerId,
|
||||
asset.url,
|
||||
asset.groupIdView
|
||||
from Poll, asset
|
||||
where Poll.assetId = asset.assetId
|
||||
and asset.startDate < $now
|
||||
and asset.endDate > $now",
|
||||
fieldsToIndex => ["question", "a1", "a2", "a3", "a4", "a5", "a6", "a7", "a8", "a9", "a10",
|
||||
"a11", "a12", "a13", "a14", "a15", "a16", "a17", "a18", "a19", "a20"],
|
||||
contentType => 'assetDetail',
|
||||
url => 'WebGUI::URL::gateway($data{url})',
|
||||
headerShortcut => 'select question from Poll where assetId = \'$data{assetId}\'',
|
||||
bodyShortcut => 'select a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15,a16,a17,a18,a19,a20
|
||||
from Poll where assetId = \'$data{assetId}\'',
|
||||
}
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub processPropertiesFromFormPost {
|
||||
my $self = shift;
|
||||
|
|
|
|||
|
|
@ -255,51 +255,6 @@ sub getFileUrl {
|
|||
return $store->getUrl($self->getFilename($store));
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub getIndexerParams {
|
||||
my $self = shift;
|
||||
my $now = shift;
|
||||
return {
|
||||
Product => {
|
||||
sql => "select Product.assetId,
|
||||
Product.image1,
|
||||
Product.image2,
|
||||
Product.image3,
|
||||
Product.brochure,
|
||||
Product.manual,
|
||||
Product.warranty,
|
||||
Product.price,
|
||||
Product.productNumber,
|
||||
Product_benefit.benefit,
|
||||
Product_feature.feature,
|
||||
Product_specification.name,
|
||||
Product_specification.value,
|
||||
Product_specification.units,
|
||||
asset.ownerUserId as ownerId,
|
||||
asset.url,
|
||||
asset.groupIdView,
|
||||
asset.title,
|
||||
asset.menuTitle,
|
||||
asset.className,
|
||||
asset.synopsis
|
||||
from Product, asset
|
||||
left join Product_benefit on Product_benefit.assetId=Product.assetId
|
||||
left join Product_feature on Product_feature.assetId=Product.assetId
|
||||
left join Product_specification on Product_specification.assetId=Product.assetId
|
||||
where Product.assetId = asset.assetId
|
||||
and asset.startDate < $now
|
||||
and asset.endDate > $now",
|
||||
fieldsToIndex => ["image1", "image2", "image3", "brochure", "manual", "warranty", "price",
|
||||
"productNumber", "benefit", "feature", "name", "value", "units"],
|
||||
contentType => 'content',
|
||||
url => 'WebGUI::URL::gateway($data{url})',
|
||||
headerShortcut => 'select title from asset where assetId = \'$data{assetId}\'',
|
||||
bodyShortcut => 'select synopsis from asset where assetId = \'$data{asssetId}\'',
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub getThumbnailFilename {
|
||||
my $self = shift;
|
||||
|
|
|
|||
|
|
@ -318,40 +318,6 @@ sub getEditForm {
|
|||
return $tabform;
|
||||
}
|
||||
|
||||
|
||||
#
|
||||
# WID FIXEN!
|
||||
#
|
||||
#-------------------------------------------------------------------
|
||||
sub getIndexerParams {
|
||||
my $self = shift;
|
||||
my $now = shift;
|
||||
return {
|
||||
Survey => {
|
||||
sql =>"select Survey_question.question as question,
|
||||
Survey_question.Survey_questionId as Survey_questionId,
|
||||
asset.className as class,
|
||||
asset.ownerUserId as ownerId,
|
||||
asset.url as url,
|
||||
asset.assetId as assetId,
|
||||
asset.groupIdView as groupIdView,
|
||||
Survey.groupToTakeSurvey as special_groupIdView
|
||||
from Survey, asset
|
||||
left join Survey_question on Survey_question.Survey_id=Survey.Survey_id
|
||||
where Survey.assetId = asset.assetId
|
||||
and asset.startDate < $now
|
||||
and asset.endDate > $now",
|
||||
fieldsToIndex => ["question",
|
||||
'select answer from Survey_answer where Survey_questionId = \'$data{Survey_questionId}\'' ],
|
||||
contentType => 'content',
|
||||
url => 'WebGUI::URL::gateway($data{url})',
|
||||
headerShortcut => 'select title from asset where assetId = \'$data{assetId}\'',
|
||||
bodyShortcut => '$textToIndex'
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub getIp {
|
||||
my $self = shift;
|
||||
|
|
@ -359,8 +325,6 @@ sub getIp {
|
|||
return $ip;
|
||||
}
|
||||
|
||||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub getMenuVars {
|
||||
my $self = shift;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue