- rfe: Event hover detail exclusions (#8761)

- rfe: Database Link test  (#513)
This commit is contained in:
JT Smith 2008-11-18 20:52:44 +00:00
parent e6c80922fb
commit 55da5c6889
6 changed files with 58 additions and 13 deletions

View file

@ -184,7 +184,25 @@ sub getBadgeGroups {
=head2 getEventMetaFields ( )
Returns an arrayref of hash references of the metadata fields.
Returns an arrayref of hash references of the metadata fields. Each hash in the array has the following fields:
fieldId - the GUID for this field.
assetId - the EMS that this field is attached to.
label - the human readable name for this field.
dataType - the form field type for this field.
visible - whether or not this field should display in public views.
required - whether or not this field must be filled out as part of editing the ticket/event.
possibleValues - a list of values that may be used to create this form field if it's a list type.
defaultValues - a list of default values that may be used to create this form field.
sequenceNumber - the order in which this field should be displayed relative to other fields.
=cut
@ -192,6 +210,7 @@ sub getEventMetaFields {
my $self = shift;
return $self->session->db->buildArrayRefOfHashRefs("select * from EMSEventMetaField where assetId=? order by sequenceNumber, assetId",[$self->getId]);
}
#-------------------------------------------------------------------
=head2 getEventFieldsForImport ()
@ -1165,8 +1184,11 @@ className='WebGUI::Asset::Sku::EMSTicket' and state='published' and revisionDate
my $data = $ticket->get('eventMetaData');
$data = '{}' if ($data eq "");
my $meta = JSON->new->utf8->decode($data);
foreach my $field (keys %{$meta}) {
$description .= '<p><b>'.$field.'</b>: '.$meta->{$field}.'</p>' unless ($meta->{$field} eq "");
foreach my $field (@{$self->getEventMetaFields}) {
my $label = $field->{label};
if ($field->{visible} && $meta->{$label} ne "") {
$description .= '<p><b>'.$label.'</b>: '.$meta->{$label}.'</p>';
}
}
my $date = WebGUI::DateTime->new($session, mysql => $ticket->get('startDate'))
->set_time_zone($self->get("timezone"))