some changes

This commit is contained in:
David Delikat 2009-03-06 21:54:28 +00:00
parent 1869017ff3
commit 30fa2028ff
4 changed files with 152 additions and 19 deletions

View file

@ -58,16 +58,16 @@ sub definition {
purchaseTemplate => { purchaseTemplate => {
tab => "display", tab => "display",
fieldType => "template", fieldType => "template",
namespace => "AdSku", namespace => "AdSku/Purchase",
defaultValue => 'eqb9sWjFEVq0yHunGV8IGw', # TODO defaultValue => 'R5zzB-ElsYbbiaS7aS3Uxw',
label => $i18n->get("property purchase template"), label => $i18n->get("property purchase template"),
hoverHelp => $i18n->get("property purchase template help"), hoverHelp => $i18n->get("property purchase template help"),
}, },
manageTemplate => { manageTemplate => {
tab => "display", tab => "display",
fieldType => "template", fieldType => "template",
namespace => "AdSku", namespace => "AdSku/Manage",
defaultValue => 'eqb9sWjFEVq0yHunGV8IGw', # TODO defaultValue => 'xZyizWwkApUyvpHL9mI-FQ',
label => $i18n->get("property manage template"), label => $i18n->get("property manage template"),
hoverHelp => $i18n->get("property manage template help"), hoverHelp => $i18n->get("property manage template help"),
}, },
@ -78,6 +78,13 @@ sub definition {
label => $i18n->get("property ad space"), label => $i18n->get("property ad space"),
hoverHelp => $i18n->get("property ad Space help"), hoverHelp => $i18n->get("property ad Space help"),
}, },
priority => {
tab => "properties",
defaultValue => '1',
fieldType => "integer",
label => $i18n->get("property priority"),
hoverHelp => $i18n->get("property priority help"),
},
pricePerClick => { pricePerClick => {
tab => "properties", tab => "properties",
defaultValue => '0.00', defaultValue => '0.00',

View file

@ -63,17 +63,9 @@ The following additional parameters have been added via this sub class.
How many rows should be displayed at once? Defaults to 1. How many rows should be displayed at once? Defaults to 1.
=head4 multiple
Set to "1" if multiple groups should be selectable. Defaults to 0.
=head4 excludeGroups
An array reference containing a list of groups to exclude from the list. Defaults to an empty array reference.
=head4 defaultValue =head4 defaultValue
This will be used if no value is specified. Should be passed as an array reference. Defaults to 7 (Everyone). This will be used if no value is specified. Should be passed as an array reference. Defaults to 1.
=cut =cut
@ -86,7 +78,7 @@ sub definition {
defaultValue=>1 defaultValue=>1
}, },
defaultValue=>{ defaultValue=>{
defaultValue=>[7] defaultValue=>[1]
}, },
}); });
return $class->SUPER::definition($session, $definition); return $class->SUPER::definition($session, $definition);
@ -114,7 +106,7 @@ Returns the human readable name of this control.
sub getName { sub getName {
my ($self, $session) = @_; my ($self, $session) = @_;
return WebGUI::International->new($session, 'WebGUI')->get('Ad Space'); return WebGUI::International->new($session, 'WebGUI')->get('Ad Space control name');
} }
#------------------------------------------------------------------- #-------------------------------------------------------------------
@ -127,9 +119,9 @@ Formats as a name.
sub getValueAsHtml { sub getValueAsHtml {
my $self = shift; my $self = shift;
my $group = WebGUI::Group->new($self->session, $self->getOriginalValue); my $item = WebGUI::AdSpace->new($self->session, $self->getOriginalValue);
if (defined $group) { if (defined $item) {
return $group->name; return $item->name;
} }
return undef; return undef;
} }
@ -186,7 +178,7 @@ Renders the form field to HTML as a table row complete with labels, subtext, hov
sub toHtmlWithWrapper { sub toHtmlWithWrapper {
my $self = shift; my $self = shift;
if ($self->session->user->isAdmin) { if ($self->session->user->isAdmin) {
my $subtext = $self->session->icon->manage("op=listGroups"); my $subtext = $self->session->icon->manage("op=manageAdSpaces");
$self->set("subtext",$subtext . $self->get("subtext")); $self->set("subtext",$subtext . $self->get("subtext"));
} }
return $self->SUPER::toHtmlWithWrapper; return $self->SUPER::toHtmlWithWrapper;

View file

@ -0,0 +1,128 @@
package WebGUI::i18n::English::Asset_AdSku;
use strict;
our $I18N = {
'assetName' => {
message => q|Ad Sales|,
lastUpdated => 0,
context => q|The name of the Ad Sales asset|,
},
'property purchase template' => {
message => q|property purchase template|,
lastUpdated => 0,
context => q|TODO|
},
'property purchase template help' => {
message => q|property purchase template help|,
lastUpdated => 0,
context => q|TODO|
},
'property manage template' => {
message => q|property manage template|,
lastUpdated => 0,
context => q|TODO|
},
'property manage template help' => {
message => q|property manage template help|,
lastUpdated => 0,
context => q|TODO|
},
'property ad space' => {
message => q|property ad space|,
lastUpdated => 0,
context => q|TODO|
},
'property ad Space help' => {
message => q|property ad Space help|,
lastUpdated => 0,
context => q|TODO|
},
'property priority' => {
message => q|property priority|,
lastUpdated => 0,
context => q|TODO|
},
'property price per click' => {
message => q|property price per click|,
lastUpdated => 0,
context => q|TODO|
},
'property price per click help' => {
message => q|property price per click help|,
lastUpdated => 1165511641,
context => q|TODO|
},
'property price per impression' => {
message => q|property price per impression|,
lastUpdated => 0,
context => q|TODO|
},
'property price per impression help' => {
message => q|property price per impression help|,
lastUpdated => 0,
context => q|TODO|
},
'property click discounts' => {
message => q|property click discounts|,
lastUpdated => 0,
context => q|TODO|
},
'property click discounts help' => {
message => q|property click discounts help|,
lastUpdated => 0,
context => q|TODO|
},
'property impression discounts' => {
message => q|property impression discounts|,
lastUpdated => 0,
context => q|TODO|
},
'property impression discounts help' => {
message => q|property impression discounts help|,
lastUpdated => 0,
context => q|TODO|
},
'property adsku karma' => {
message => q|property adsku karma|,
lastUpdated => 0,
context => q|TODO|
},
'property adsku karma description' => {
message => q|property adsku karma description|,
lastUpdated => 0,
context => q|TODO|
},
'Ad Space' => {
message => q|Ad Space|,
lastUpdated => 0,
context => q|name for the Ad Space Sku|
},
'TODO' => {
message => q|TODO|,
lastUpdated => 0,
context => q|TODO|
},
};
1;

View file

@ -4338,6 +4338,12 @@ Users may override this setting in their profile.
'recaptcha public key' => { 'recaptcha public key' => {
message => 'reCAPTCHA Public Key' message => 'reCAPTCHA Public Key'
}, },
'Ad Space control name' => {
message => q|Ad Space|,
lastUpdated => 0,
context => q|name for the Ad Space control|
},
}; };
1; 1;