removing diag output from tests
Fix SQLForm help label so automatically generated Asset list works EMS Help and i18n
This commit is contained in:
parent
f041a0b8b1
commit
7d94874bcc
8 changed files with 80 additions and 35 deletions
|
|
@ -2601,7 +2601,7 @@ sub view {
|
|||
push (@events, {'event' => $self->processTemplate(\%eventFields, $event->{'templateId'}), %eventFields });
|
||||
}
|
||||
$var{'checkout.url'} = $self->getUrl('op=viewCart');
|
||||
$var{'checkout.label'} = "Checkout";
|
||||
$var{'checkout.label'} = $i18n->get('checkout');
|
||||
$var{'events_loop'} = \@events;
|
||||
$var{'paginateBar'} = $p->getBarTraditional;
|
||||
$var{'manageEvents.url'} = $self->getUrl('func=manageEvents');
|
||||
|
|
@ -2619,7 +2619,6 @@ sub view {
|
|||
$p->appendTemplateVars(\%var);
|
||||
$self->buildMenu(\%var);
|
||||
$var{'ems.wobject.dir'} = $self->session->config->get("extrasURL")."/wobject/EventManagementSystem";
|
||||
my $templateId = $self->get("displayTemplateId");
|
||||
return $self->processTemplate(\%var, undef, $self->{_viewTemplate});
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -168,6 +168,10 @@ our $HELP = {
|
|||
tag => 'event management system event template',
|
||||
namespace => 'Asset_EventManagementSystem',
|
||||
},
|
||||
{
|
||||
tag => 'pagination template variables',
|
||||
namespace => 'WebGUI',
|
||||
},
|
||||
{
|
||||
tag => 'template language',
|
||||
namespace => 'Asset_Template',
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
package WebGUI::Help::Asset_SQLForm;
|
||||
|
||||
our $HELP = {
|
||||
'sqlform add/edit' => {
|
||||
'sql form add/edit' => {
|
||||
title => 'edit sqlform',
|
||||
body => 'sqlform description',
|
||||
fields => [
|
||||
|
|
@ -335,7 +335,7 @@ our $HELP = {
|
|||
body => 'edit template help',
|
||||
related => [
|
||||
{
|
||||
tag => 'sqlform add/edit',
|
||||
tag => 'sql form add/edit',
|
||||
namespace => 'Asset_SQLForm',
|
||||
},
|
||||
{
|
||||
|
|
@ -350,7 +350,7 @@ our $HELP = {
|
|||
body => 'search template help',
|
||||
related => [
|
||||
{
|
||||
tag => 'sqlform add/edit',
|
||||
tag => 'sql form add/edit',
|
||||
namespace => 'Asset_SQLForm',
|
||||
},
|
||||
{
|
||||
|
|
|
|||
|
|
@ -375,12 +375,28 @@ This loop contains all events that have been approved so that users can register
|
|||
The information for one event that has been processed by its own event template.
|
||||
</p>
|
||||
|
||||
<p><b>Event template variables</b><br />
|
||||
The template variables from the Event template. This gives you access to the raw
|
||||
data for the event.
|
||||
|
||||
</blockquote>
|
||||
|
||||
<p><b>checkout.url</b><br />
|
||||
A URL to take the user the screen that displays the contents of their shopping cart.
|
||||
</p>
|
||||
|
||||
<p><b>checkout.label</b><br />
|
||||
A label to go with checkout.url. The internationalized word "Checkout".
|
||||
</p>
|
||||
|
||||
<p><b>paginateBar</b><br />
|
||||
A bar to help the user page through sets of Events if several pages of Events exist.
|
||||
</p>
|
||||
|
||||
<p><b>Pagination variables</b><br />
|
||||
Common pagination template variables.
|
||||
</p>
|
||||
|
||||
<p><b>canManageEvents</b><br />
|
||||
A flag to indiciate if the current user is allowed to Manage Events.
|
||||
</p>
|
||||
|
|
@ -393,8 +409,28 @@ A URL to take the user to the screen where Events can be managed (i.e. added, ap
|
|||
An internationalized label to dispaly to the user the link for managing events.
|
||||
</p>
|
||||
|
||||
<p><b>managePurchases.url</b><br />
|
||||
A URL to take the user to the screen where purchases can be managed (i.e. added, approved, deleted)
|
||||
</p>
|
||||
|
||||
<p><b>managePurchases.label</b><br />
|
||||
An internationalized label to dispaly to the user the link for managing purchases.
|
||||
</p>
|
||||
|
||||
<p><b>search.filters.options</b><br />
|
||||
Javascript for a search interface for Events based on metadata.
|
||||
</p>
|
||||
|
||||
<p><b>search.data.url</b><br />
|
||||
The URL to this Asset.
|
||||
</p>
|
||||
|
||||
<p><b>ems.wobject.dir</b><br />
|
||||
The URL the EventManagementSystem area in the WebGUI Extras directory.
|
||||
</p>
|
||||
|
||||
|,
|
||||
lastUpdated => 1140465899,
|
||||
lastUpdated => 1145421686,
|
||||
},
|
||||
|
||||
'event template help title' => {
|
||||
|
|
@ -419,16 +455,42 @@ The description of this event.
|
|||
The price of this event.
|
||||
</p>
|
||||
|
||||
<p><b>purchase.url</b><br />
|
||||
A URL for the user to register for this event and add it to their shopping cart.
|
||||
<p><b>numberRegistered</b><br />
|
||||
The number of people currently registered for this event.
|
||||
</p>
|
||||
|
||||
<p><b>maximumAttendees</b><br />
|
||||
The number of people allowed to attend this event.
|
||||
</p>
|
||||
|
||||
<p><b>seatsRemaining</b><br />
|
||||
The number of available seats remaining for this event.
|
||||
</p>
|
||||
|
||||
<p><b>startDate.human</b><br />
|
||||
The date and time this event starts, in human readable format.
|
||||
</p>
|
||||
|
||||
<p><b>endDate.human</b><br />
|
||||
The date and time this event ends, in human readable format.
|
||||
</p>
|
||||
|
||||
<p><b>eventIsFull</b><br />
|
||||
A boolean that is true if the there are no available seats remaining in this event.
|
||||
</p>
|
||||
|
||||
<p><b>purchase.label</b><br />
|
||||
An internationalized label to dispaly to the user the link for purchasing this event.
|
||||
An internationalized label to display to the user the link for purchasing this event.
|
||||
If the event is full, the label will be "Sold out".
|
||||
</p>
|
||||
|
||||
<p><b>purchase.url</b><br />
|
||||
A URL for the user to register for this event and add it to their shopping cart.
|
||||
If the event is full, the url will be blank.
|
||||
</p>
|
||||
|
||||
|,
|
||||
lastUpdated => 1140471404,
|
||||
lastUpdated => 1145421471,
|
||||
},
|
||||
|
||||
'add/edit event help title' => {
|
||||
|
|
@ -592,6 +654,11 @@ allows you to edit events, delete events, or change their order.</p>
|
|||
lastUpdated => 1145402683,
|
||||
},
|
||||
|
||||
'checkout' => {
|
||||
message => q|Checkout|,
|
||||
lastUpdated => 1145402683,
|
||||
},
|
||||
|
||||
};
|
||||
|
||||
1;
|
||||
|
|
|
|||
|
|
@ -30,8 +30,6 @@ my @helpFileSet = WebGUI::Operation::Help::_getHelpFilesList($session);
|
|||
|
||||
$numTests = scalar @helpFileSet; #One for each help compile
|
||||
|
||||
diag("Planning on running $numTests tests\n");
|
||||
|
||||
plan tests => $numTests;
|
||||
|
||||
foreach my $helpSet (@helpFileSet) {
|
||||
|
|
|
|||
|
|
@ -51,8 +51,6 @@ foreach my $topic ( keys %helpTable ) {
|
|||
}
|
||||
}
|
||||
|
||||
diag("Planning on running $numTests tests\n");
|
||||
|
||||
plan tests => $numTests;
|
||||
|
||||
##Each array element is a hash with two keys, tag (entry) and namespace (topic).
|
||||
|
|
|
|||
|
|
@ -30,12 +30,8 @@ my @helpFileSet = WebGUI::Operation::Help::_getHelpFilesList($session);
|
|||
|
||||
$numTests = scalar @helpFileSet;
|
||||
|
||||
diag("Planning on running $numTests tests\n");
|
||||
|
||||
plan tests => $numTests;
|
||||
|
||||
diag("Check for mandatory lables for Help table of contents");
|
||||
|
||||
foreach my $fileSet (@helpFileSet) {
|
||||
my $file = $fileSet->[1];
|
||||
ok(WebGUI::Operation::Help::_getHelpName($session, $file), "Missing label for $file");
|
||||
|
|
|
|||
|
|
@ -69,35 +69,22 @@ my @sqlLabels;
|
|||
my @libLabels;
|
||||
my @objLabels;
|
||||
|
||||
diag("Getting Help labels");
|
||||
@helpLabels = getHelpLabels();
|
||||
|
||||
#diag("Getting SQL labels");
|
||||
#@sqlLabels = getSQLLabels();
|
||||
|
||||
diag("Getting subroutine labels");
|
||||
find(\&label_finder_pm, $lib);
|
||||
|
||||
diag("Getting object labels");
|
||||
find(\&obj_finder_pm, $lib);
|
||||
|
||||
diag ("Checking ". scalar(@helpLabels). " help labels");
|
||||
#diag ("Checking ". scalar(@sqlLabels). " SQL labels");
|
||||
diag ("Checking ". scalar(@libLabels). " library code labels");
|
||||
diag ("Checking ". scalar(@objLabels). " library code labels via object");
|
||||
|
||||
$numTests = scalar(@helpLabels)
|
||||
# + scalar(@sqlLabels)
|
||||
+ scalar(@libLabels)
|
||||
+ scalar(@objLabels)
|
||||
;
|
||||
|
||||
diag("Planning on running $numTests tests\n");
|
||||
|
||||
plan tests => $numTests;
|
||||
|
||||
diag("Help Label tests\n");
|
||||
|
||||
my $i18n = WebGUI::International->new($session);
|
||||
|
||||
foreach my $label ( @helpLabels ) {
|
||||
|
|
@ -105,7 +92,6 @@ foreach my $label ( @helpLabels ) {
|
|||
sprintf "label: %s->%s inside %s->%s->%s", @{ $label }{'namespace', 'label', 'topic', 'entry', 'tag', });
|
||||
}
|
||||
|
||||
#diag("SQL Label tests\n");
|
||||
#
|
||||
#foreach my $label ( @sqlLabels ) {
|
||||
# ok($i18n->get(@{ $label }{qw(label namespace )} ),
|
||||
|
|
@ -113,15 +99,12 @@ foreach my $label ( @helpLabels ) {
|
|||
#}
|
||||
#
|
||||
##Subroutine calls are now illegal, everything must be done by object methods.
|
||||
diag("Subroutine Call Label tests\n");
|
||||
|
||||
foreach my $label ( @libLabels ) {
|
||||
ok(0,
|
||||
sprintf "label: %s->%s inside %s", @{ $label }{'namespace', 'label', 'file', });
|
||||
}
|
||||
|
||||
diag("Object Method Label tests\n");
|
||||
|
||||
foreach my $label ( @objLabels ) {
|
||||
ok($i18n->get(@{ $label }{qw(label namespace )} ),
|
||||
sprintf "label: %s->%s inside %s", @{ $label }{'namespace', 'label', 'file', });
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue