diff --git a/docs/changelog/6.x.x.txt b/docs/changelog/6.x.x.txt index 66d34b115..a5c330d3f 100644 --- a/docs/changelog/6.x.x.txt +++ b/docs/changelog/6.x.x.txt @@ -8,7 +8,7 @@ - Fixed a memory leak in Spectre that could cause it to double in size roughly every 30 hours under certain conditions. - fix: Problems with page.isSibling and page.inBranch - + - Added new EMS event approval states 6.99.4 - fix: better checking of selected template type diff --git a/docs/upgrades/templates-6.99.5/EMS_search.tmpl b/docs/upgrades/templates-6.99.5/EMS_search.tmpl new file mode 100644 index 000000000..1608eddbb --- /dev/null +++ b/docs/upgrades/templates-6.99.5/EMS_search.tmpl @@ -0,0 +1,450 @@ +#EventManagerTmpl000006 +
+ + +

+
+ + +



+
+ + + + + + + + + + + + + +
+
+ +


+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
 Address 
 City 
 State 
 ZIP 
 Phone 
 Country 
+ +
+ + + + +
+ + + + + + + + + + +
^D("%W %Z",);Remove
+
+
+ + + + +
+ + + + + + + +
Start OverAdd Contents to Cart
+
+ +
+
+ +
+

Shopping Cart

+ +
+
+ + Name: + +
Additional Price: $ +
+
+ + +
+
+
+
+

Search Instructions

+ + Basic Search - This is the events search screen. There is a basic search box which allows you to search by event number, event title, and event description.

+ + Advanced Search - Click on Advanced Search and you will see a pull-down list appear in the search area. Select which event characteristic you would like to search by and then in the next drop-down box specify what type of search to do (equals, contains, is not, not like, starts with, ends with). Most searches will likely be "contains." +
+
+ +
+
+

Search

+ + + + +
+ + + + + + + + + +
Search Events:
+ + + + + +
Advanced Search
+ + +
+ + +
+
+ +
+ + + + + + + + + + +
Your search returned results. + + + + + + + + +
+
+
+          of +
+
+
+ + +
+

Available Events

+ + + + + + + + + + + + + + + + + + + + + + + + + +
Event
Number
Event
Name
Start
Date
End
Date
Seats Left/
Available
PriceAdd to Badge
+ + • Not Approved• Approved + ^D("%W %Z",);^D("%W %Z",);/ + + + + + +
+ +
+
+ + + + + + +
+
+          of +
+
+
+
+ +
+ + + + + +
Click Here to add events to a badge you've already purchased, or to select a different badge. (Start Over)


+
Step 2:

Add Events to your Badge

+ +
Browse Events: You have not selected a Badge. You cannot add events to your cart until you select a badge.
+
+ + + + + + +
+ +

How to Use the Events Search

+

Basic Search - This is the events search screen. There is a basic search box which allows you to search by event number, event title, and event description. + +

Advanced Search - Click on Advanced Search and you will see a pull-down list appear in the search area. Select which event characteristic you would like to search by and then in the next drop-down box specify what type of search to do (equals, contains, is not, not like, starts with, ends with). Most searches will likely be "contains." + + + + + + + + + +
Search Events:
+ + + + + +
Search By...
+ + +

+
+

+ +
Go to Step 3:Add Badge and Events to Cart
Go to Step 3:Add Badge and Events to Cart and Checkout
+
+ +

+ +

Of the events you may add to this badge, your search returned results.

+ +

Your search returned results.

+
+ +

+
         of

+ + +
+ +  + + + +
+ + + + + + + + + + + + + + class="oddRow" class="evenRow"> + + + + + + +
Event #Seats
(Available/Max)
Add to Cart
+ + + + ^D("%W %Z",); + ^D("%W %Z",); + / + + + + + + + + + +
+ +
         of
+ + + +
diff --git a/lib/WebGUI/Asset/Wobject/EventManagementSystem.pm b/lib/WebGUI/Asset/Wobject/EventManagementSystem.pm index 08525863f..682bdb22c 100644 --- a/lib/WebGUI/Asset/Wobject/EventManagementSystem.pm +++ b/lib/WebGUI/Asset/Wobject/EventManagementSystem.pm @@ -624,7 +624,7 @@ sub eventIsApproved { my $self = shift; my $eventId = shift; my ($result) = $self->session->db->quickArray("select approved from EventManagementSystem_products where productId=?",[$eventId]); - return $result; + return ($result eq "1"); } #------------------------------------------------------------------ @@ -1191,6 +1191,42 @@ sub getEventDetails { return $self->{_eventDetails}{$eventId}; } +#------------------------------------------------------------------ +=head2 getEventStates + +Returns a hash reference containing event approval states + +=cut + +sub getEventStates { + my $self = shift; + my $i18n = WebGUI::International->new($self->session, 'Asset_EventManagementSystem'); + my $eventStates = { + '-2' => $i18n->echo("Cancelled"), + '-1' => $i18n->echo("Pending"), + '0' => $i18n->echo("Denied"), + '1' => $i18n->echo("Approved"), + }; + + return $eventStates; +} + + +#------------------------------------------------------------------ +=head2 getEventStateLabel ( status_code ) + +Returns an internationalized string that corresponds to an events 'approval' +state + +=cut + +sub getEventStateLabel { + my $self = shift; + my $statusCode = shift; + my $eventStates = $self->getEventStates; + + return $eventStates->{$statusCode}; +} #------------------------------------------------------------------ sub verifyPrerequisitesForm { @@ -1579,12 +1615,23 @@ sub www_editEvent { $f->hidden( -name=>"pid", -value=>$pid ); if ($self->canApproveEvents) { - $f->yesNo( - -value => $event->{approved}, + #$f->yesNo( + # -value => $event->{approved}, + # -name => 'approved', + # -label => $i18n->get('approve event'), + # -hoverHelp => $i18n->get('approve event description') + #); + + $f->radioList( -name => 'approved', -label => $i18n->get('approve event'), - -hoverHelp => $i18n->get('approve event description') + -hoverHelp => $i18n->get('approve event description'), + -options => $self->getEventStates, + -value => ($event->{"approved"} eq "0" ? "0" : $event->{approved} || '-1'), + -vertical => 1, + -sortByValue => 1, ); + } else { $f->hidden( -name => "approved", @@ -2963,7 +3010,11 @@ sub www_search { $eventFields{'endDate'} = $event->{'endDate'}; $eventFields{'productId'} = $event->{'productId'}; $eventFields{'eventIsFull'} = ($eventFields{'seatsRemaining'} <= 0); - $eventFields{'eventIsApproved'} = $event->{'approved'}; + $eventFields{'eventIsApproved'} = ($event->{'approved'} eq "1"); + $eventFields{'eventIsPending'} = ($event->{'approved'} eq "-1"); + $eventFields{'eventIsCanceled'} = ($event->{'approved'} eq "-2"); + $eventFields{'eventIsDenied'} = ($event->{'approved'} eq "0"); + $eventFields{'eventState.label'} = $self->getEventStateLabel($event->{approved}); $eventFields{'manageToolbar'} = $self->session->icon->delete('func=deleteEvent;pid='.$event->{productId}, $self->getUrl, $i18n->get('confirm delete event')). $self->session->icon->edit('func=editEvent;pid='.$event->{productId}, $self->getUrl).