added upgrade script
This commit is contained in:
parent
aab3a74026
commit
6932ddfeb3
6 changed files with 228 additions and 0 deletions
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -32,6 +32,8 @@ my $session = start(); # this line required
|
|||
|
||||
# upgrade functions go here
|
||||
dropSkipNotification($session);
|
||||
addEMSSubmissionTables($session);
|
||||
configEMSActivities($session);
|
||||
|
||||
finish($session); # this line required
|
||||
|
||||
|
|
@ -46,6 +48,118 @@ finish($session); # this line required
|
|||
#}
|
||||
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
# Describe what our function does
|
||||
sub configEMSActivities {
|
||||
my $session = shift;
|
||||
print "\tConfigure EMS Activities... " unless $quiet;
|
||||
$config->addToArray('workflowActivities/None', 'WebGUI::Workflow::Activity::CleanupEMSSubmissions');
|
||||
$config->addToArray('workflowActivities/None', 'WebGUI::Workflow::Activity::ProcessEMSApprovals');
|
||||
my $workflow = WebGUI::Workflow->new($session, 'pbworkflow000000000001'); # Daily
|
||||
BREAK: { foreach my $activity (@{ $workflow->getActivities }) {
|
||||
last BREAK if $activity->getName() eq 'WebGUI::Workflow::Activity::CleanupEMSSubmissions';
|
||||
}
|
||||
my $activity = $workflow->addActivity('WebGUI::Workflow::Activity::CleanupEMSSubmissions');
|
||||
$activity->set('title', 'Purge Denied EMS Submissions');
|
||||
$activity->set('description', 'Purges EMS Submissions that were denied and are aged according to parameters'');
|
||||
} # end of BREAK block
|
||||
$workflow = WebGUI::Workflow->new($session, 'pbworkflow000000000004'); # Hourly
|
||||
BREAK: { foreach my $activity (@{ $workflow->getActivities }) {
|
||||
last BREAK if $activity->getName() eq 'WebGUI::Workflow::Activity::ProcessEMSApprovals';
|
||||
}
|
||||
$activity = $workflow->addActivity('WebGUI::Workflow::Activity::ProcessEMSApprovals');
|
||||
$activity->set('title', 'Process Approves EMS Submissions');
|
||||
$activity->set('description', 'Create EMS Ticket Assets for approved submissions.');
|
||||
} # end of BREAK block
|
||||
print "DONE!\n" unless $quiet;
|
||||
}
|
||||
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
# make database changes relevant to EMS Submission system
|
||||
sub addEMSSubmissionTables {
|
||||
my $session = shift;
|
||||
print "\tCreate EMS Submission Tables... " unless $quiet;
|
||||
|
||||
$db->write(<<ENDSQL);
|
||||
CREATE TABLE EMSSubmissionForm (
|
||||
assetId CHAR(22) BINARY NOT NULL,
|
||||
revisionDate BIGINT NOT NULL,
|
||||
canSubmitGroupId CHAR(22) BINARY,
|
||||
daysBeforeCleanup INT,
|
||||
deleteCreatedItems INT(1),
|
||||
formDescription TEXT,
|
||||
submissionDeadline Date,
|
||||
pastDeadlineMessage TEXT,
|
||||
PRIMARY KEY ( assetId, revisionDate )
|
||||
)
|
||||
ENDSQL
|
||||
|
||||
$db->write(<<ENDSQL);
|
||||
CREATE TABLE EMSSubmission (
|
||||
assetId CHAR(22) BINARY NOT NULL,
|
||||
revisionDate BIGINT NOT NULL,
|
||||
submissionId INT NOT NULL,
|
||||
submissionStatus CHAR(30),
|
||||
ticketId CHAR(22) BINARY,
|
||||
description mediumtext,
|
||||
sku char(35),
|
||||
vendorId char(22) BINARY,
|
||||
displayTitle tinyint(1),
|
||||
shipsSeparately tinyint(1),
|
||||
price FLOAT,
|
||||
seatsAvailable INT,
|
||||
startDate DATETIME,
|
||||
duration FLOAT,
|
||||
eventNumber INT,
|
||||
location CHAR(100),
|
||||
relatedBadgeGroups MEDIUMTEXT,
|
||||
relatedRibbons MEDIUMTEXT,
|
||||
eventMetaData MEDIUMTEXT,
|
||||
sendEmailOnChange INT(1),
|
||||
PRIMARY KEY ( assetId, revisionDate )
|
||||
)
|
||||
ENDSQL
|
||||
|
||||
$db->write(<<ENDSQL);
|
||||
ALTER TABLE EventManagementSystem
|
||||
ADD COLUMN eventSubmissionTemplateId CHAR(22) BINARY;
|
||||
ENDSQL
|
||||
|
||||
$db->write(<<ENDSQL);
|
||||
ALTER TABLE EventManagementSystem
|
||||
ADD COLUMN eventSubmissionQueueTemplateId CHAR(22) BINARY;
|
||||
ENDSQL
|
||||
|
||||
$db->write(<<ENDSQL);
|
||||
ALTER TABLE EventManagementSystem
|
||||
ADD COLUMN eventSubmissionMainTemplateId CHAR(22) BINARY;
|
||||
ENDSQL
|
||||
|
||||
$db->write(<<ENDSQL);
|
||||
ALTER TABLE EventManagementSystem
|
||||
ADD COLUMN eventSubmissionGroups MEDIUMTEXT;
|
||||
ENDSQL
|
||||
|
||||
$db->write(<<ENDSQL);
|
||||
ALTER TABLE EventManagementSystem
|
||||
ADD COLUMN submittedLocationsList MEDIUMTEXT;
|
||||
ENDSQL
|
||||
|
||||
$db->write(<<ENDSQL);
|
||||
ALTER TABLE EventManagementSystem
|
||||
ADD COLUMN nextSubmissionId INT;
|
||||
ENDSQL
|
||||
|
||||
$db->write(<<ENDSQL);
|
||||
ALTER TABLE EMSEventMetaField
|
||||
ADD COLUMN helpText MEDIUMTEXT;
|
||||
ENDSQL
|
||||
|
||||
print "DONE!\n" unless $;
|
||||
}
|
||||
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
sub dropSkipNotification {
|
||||
my $session = shift;
|
||||
|
|
|
|||
114
www/extras/wobject/EMS/submission.css
Normal file
114
www/extras/wobject/EMS/submission.css
Normal file
|
|
@ -0,0 +1,114 @@
|
|||
legend {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
form {
|
||||
margin: 0;
|
||||
padding: 0
|
||||
}
|
||||
.submission_title {
|
||||
background: #d8d8d8 url(../../yui/build/assets/skins/sam/sprite.png) repeat-x;
|
||||
border: solid #a3a3a3;
|
||||
border-width: 0 1px 0;
|
||||
font-family: arial;
|
||||
font-weight: bold;
|
||||
font-size: 14pt;
|
||||
}
|
||||
.submission_body {
|
||||
background: #FFFFFF;
|
||||
border: 1px solid #000000;
|
||||
}
|
||||
.submission_desc {
|
||||
background: #d8d8d8;
|
||||
}
|
||||
.userArea {
|
||||
font-family: arial;
|
||||
font-size: 9pt;
|
||||
color: black;
|
||||
background-color: white;
|
||||
overflow: auto;
|
||||
height: 310px;
|
||||
}
|
||||
.hd_searchBtn {
|
||||
background-color:silver;
|
||||
color:white;
|
||||
border:solid gray 1px;
|
||||
text-decoration:none;
|
||||
font-weight:bold;
|
||||
text-align:center;
|
||||
cursor:pointer;
|
||||
font-size:9pt;
|
||||
}
|
||||
.inputBox {
|
||||
border:solid gray 1px;
|
||||
font-size:9pt;
|
||||
}
|
||||
.grayArea {
|
||||
background-color:#F2F2F2;
|
||||
border:solid #E8E8E8 1px;
|
||||
padding:3px;
|
||||
-moz-box-sizing:border-box;
|
||||
}
|
||||
#solutionDialog {
|
||||
background-color: #FFFFFF;
|
||||
}
|
||||
.whiteArea {
|
||||
font-family: arial;
|
||||
font-size: 9pt;
|
||||
color: black;
|
||||
}
|
||||
.solutionArea {
|
||||
font-family: arial;
|
||||
font-size: 9pt;
|
||||
color: black;
|
||||
background-color:#FFFFFF;
|
||||
overflow: auto;
|
||||
height: 160px;
|
||||
}
|
||||
#userList_div {
|
||||
overflow: auto;
|
||||
width: 100%;
|
||||
height: auto;
|
||||
font-family: arial;
|
||||
font-size: 10pt;
|
||||
border: solid #CACACA 1px;
|
||||
}
|
||||
* html #userList_div {
|
||||
overflow: hidden;
|
||||
overflow-y: auto;
|
||||
}
|
||||
#userList_div img {
|
||||
padding-right: 10px;
|
||||
padding-left: 10px;
|
||||
}
|
||||
#userList_div td {
|
||||
background-color: #F2F2F2;
|
||||
border-top: solid #F9F9F9 1px;
|
||||
border-bottom: solid #E0E0E0 1px;
|
||||
text-align: left;
|
||||
vertical-align: top;
|
||||
}
|
||||
#userList_div tr.odd td {
|
||||
background-color: #EAEAEA;
|
||||
}
|
||||
.submission_private {
|
||||
background-color:#AA0002;
|
||||
border:solid #E8E8E8 1px;
|
||||
color:white;
|
||||
font-size: 9pt;
|
||||
font-weight: bold;
|
||||
text-align:center;
|
||||
-moz-box-sizing:border-box;
|
||||
}
|
||||
.submission_public {
|
||||
background-color:#00FF00;
|
||||
border:solid #E8E8E8 1px;
|
||||
color:white;
|
||||
font-size: 0pt;
|
||||
font-weight: bold;
|
||||
text-align:center;
|
||||
-moz-box-sizing:border-box;
|
||||
}
|
||||
.dyn_form_field {
|
||||
width: 120px;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue