[otrs-cvs] otrs/Kernel/Modules CustomerTicketZoom.pm,1.106,1.107
"CVS commits notifications of OTRS.org" <[email protected]>
| Newsgroups | gmane.comp.otrs.cvs |
|---|---|
| Message-ID | <[email protected]> |
Comments:
Update of /home/cvs/otrs/Kernel/Modules
In directory lancelot:/tmp/cvs-serv16509/Kernel/Modules
Modified Files:
CustomerTicketZoom.pm
Log Message:
The reply button should also be visible if no articles are present.
Author: mab
Index: CustomerTicketZoom.pm
===================================================================
RCS file: /home/cvs/otrs/Kernel/Modules/CustomerTicketZoom.pm,v
retrieving revision 1.106
retrieving revision 1.107
diff -2 -u -d -r1.106 -r1.107
--- CustomerTicketZoom.pm 20 Nov 2012 14:54:36 -0000 1.106
+++ CustomerTicketZoom.pm 12 Dec 2012 09:10:15 -0000 1.107
@@ -1363,5 +1363,4 @@
$Self->{LayoutObject}->Block(
Name => 'NoArticles',
- Data => {},
);
}
@@ -1405,161 +1404,161 @@
);
}
+ }
- # check follow up permissions
- my $FollowUpPossible
- = $Self->{QueueObject}->GetFollowUpOption( QueueID => $Article{QueueID}, );
- my %State = $Self->{StateObject}->StateGet(
- ID => $Article{StateID},
- );
- if (
- $Self->{TicketObject}->TicketCustomerPermission(
- Type => 'update',
- TicketID => $Self->{TicketID},
- UserID => $Self->{UserID}
- )
- && (
- ( $FollowUpPossible !~ /(new ticket|reject)/i && $State{TypeName} =~ /^close/i )
- || $State{TypeName} !~ /^close/i
- )
- )
- {
+ # check follow up permissions
+ my $FollowUpPossible
+ = $Self->{QueueObject}->GetFollowUpOption( QueueID => $Article{QueueID}, );
+ my %State = $Self->{StateObject}->StateGet(
+ ID => $Article{StateID},
+ );
+ if (
+ $Self->{TicketObject}->TicketCustomerPermission(
+ Type => 'update',
+ TicketID => $Self->{TicketID},
+ UserID => $Self->{UserID}
+ )
+ && (
+ ( $FollowUpPossible !~ /(new ticket|reject)/i && $State{TypeName} =~ /^close/i )
+ || $State{TypeName} !~ /^close/i
+ )
+ )
+ {
- my $DynamicFieldNames = $Self->_GetFieldsToUpdate(
- OnlyDynamicFields => 1,
- );
+ my $DynamicFieldNames = $Self->_GetFieldsToUpdate(
+ OnlyDynamicFields => 1,
+ );
- # create a string with the quoted dynamic field names separated by a commas
- if ( IsArrayRefWithData($DynamicFieldNames) ) {
- my $FirstItem = 1;
- FIELD:
- for my $Field ( @{$DynamicFieldNames} ) {
- if ($FirstItem) {
- $FirstItem = 0;
- }
- else {
- $Param{DynamicFieldNamesStrg} .= ', ';
- }
- $Param{DynamicFieldNamesStrg} .= "'" . $Field . "'";
+ # create a string with the quoted dynamic field names separated by a commas
+ if ( IsArrayRefWithData($DynamicFieldNames) ) {
+ my $FirstItem = 1;
+ FIELD:
+ for my $Field ( @{$DynamicFieldNames} ) {
+ if ($FirstItem) {
+ $FirstItem = 0;
+ }
+ else {
+ $Param{DynamicFieldNamesStrg} .= ', ';
}
+ $Param{DynamicFieldNamesStrg} .= "'" . $Field . "'";
}
+ }
+
+ # check subject
+ if ( !$Param{Subject} ) {
+ $Param{Subject} = "Re: $Param{Title}";
+ }
+ $Self->{LayoutObject}->Block(
+ Name => 'FollowUp',
+ Data => \%Param,
+ );
+
+ # add rich text editor
+ if ( $Self->{LayoutObject}->{BrowserRichText} ) {
+
+ # use height/width defined for this screen
+ $Param{RichTextHeight} = $Self->{Config}->{RichTextHeight} || 0;
+ $Param{RichTextWidth} = $Self->{Config}->{RichTextWidth} || 0;
- # check subject
- if ( !$Param{Subject} ) {
- $Param{Subject} = "Re: $Param{Title}";
- }
$Self->{LayoutObject}->Block(
- Name => 'FollowUp',
+ Name => 'RichText',
Data => \%Param,
);
+ }
- # add rich text editor
- if ( $Self->{LayoutObject}->{BrowserRichText} ) {
-
- # use height/width defined for this screen
- $Param{RichTextHeight} = $Self->{Config}->{RichTextHeight} || 0;
- $Param{RichTextWidth} = $Self->{Config}->{RichTextWidth} || 0;
-
- $Self->{LayoutObject}->Block(
- Name => 'RichText',
- Data => \%Param,
- );
+ # build next states string
+ if ( $Self->{Config}->{State} ) {
+ my %NextStates = $Self->{TicketObject}->TicketStateList(
+ TicketID => $Self->{TicketID},
+ Action => $Self->{Action},
+ CustomerUserID => $Self->{UserID},
+ );
+ my %StateSelected;
+ if ( $Param{StateID} ) {
+ $StateSelected{SelectedID} = $Param{StateID};
}
-
- # build next states string
- if ( $Self->{Config}->{State} ) {
- my %NextStates = $Self->{TicketObject}->TicketStateList(
- TicketID => $Self->{TicketID},
- Action => $Self->{Action},
- CustomerUserID => $Self->{UserID},
- );
- my %StateSelected;
- if ( $Param{StateID} ) {
- $StateSelected{SelectedID} = $Param{StateID};
- }
- else {
- $StateSelected{SelectedValue} = $Self->{Config}->{StateDefault};
- }
- $Param{NextStatesStrg} = $Self->{LayoutObject}->BuildSelection(
- Data => \%NextStates,
- Name => 'StateID',
- %StateSelected,
- );
- $Self->{LayoutObject}->Block(
- Name => 'FollowUpState',
- Data => \%Param,
- );
+ else {
+ $StateSelected{SelectedValue} = $Self->{Config}->{StateDefault};
}
+ $Param{NextStatesStrg} = $Self->{LayoutObject}->BuildSelection(
+ Data => \%NextStates,
+ Name => 'StateID',
+ %StateSelected,
+ );
+ $Self->{LayoutObject}->Block(
+ Name => 'FollowUpState',
+ Data => \%Param,
+ );
+ }
- # get priority
- if ( $Self->{Config}->{Priority} ) {
- my %Priorities = $Self->{TicketObject}->TicketPriorityList(
- CustomerUserID => $Self->{UserID},
- Action => $Self->{Action},
- );
- my %PrioritySelected;
- if ( $Param{PriorityID} ) {
- $PrioritySelected{SelectedID} = $Param{PriorityID};
- }
- else {
- $PrioritySelected{SelectedValue} = $Self->{Config}->{PriorityDefault}
- || '3 normal';
- }
- $Param{PriorityStrg} = $Self->{LayoutObject}->BuildSelection(
- Data => \%Priorities,
- Name => 'PriorityID',
- %PrioritySelected,
- );
- $Self->{LayoutObject}->Block(
- Name => 'FollowUpPriority',
- Data => \%Param,
- );
+ # get priority
+ if ( $Self->{Config}->{Priority} ) {
+ my %Priorities = $Self->{TicketObject}->TicketPriorityList(
+ CustomerUserID => $Self->{UserID},
+ Action => $Self->{Action},
+ );
+ my %PrioritySelected;
+ if ( $Param{PriorityID} ) {
+ $PrioritySelected{SelectedID} = $Param{PriorityID};
}
+ else {
+ $PrioritySelected{SelectedValue} = $Self->{Config}->{PriorityDefault}
+ || '3 normal';
+ }
+ $Param{PriorityStrg} = $Self->{LayoutObject}->BuildSelection(
+ Data => \%Priorities,
+ Name => 'PriorityID',
+ %PrioritySelected,
+ );
+ $Self->{LayoutObject}->Block(
+ Name => 'FollowUpPriority',
+ Data => \%Param,
+ );
+ }
- # Dynamic fields
- # cycle trough the activated Dynamic Fields for this screen
- DYNAMICFIELD:
- for my $DynamicFieldConfig ( @{ $Self->{FollowUpDynamicField} } ) {
- next DYNAMICFIELD if !IsHashRefWithData($DynamicFieldConfig);
+ # Dynamic fields
+ # cycle trough the activated Dynamic Fields for this screen
+ DYNAMICFIELD:
+ for my $DynamicFieldConfig ( @{ $Self->{FollowUpDynamicField} } ) {
+ next DYNAMICFIELD if !IsHashRefWithData($DynamicFieldConfig);
- # skip fields that HTML could not be retrieved
- next DYNAMICFIELD if !IsHashRefWithData(
- $Param{DynamicFieldHTML}->{ $DynamicFieldConfig->{Name} }
- );
+ # skip fields that HTML could not be retrieved
+ next DYNAMICFIELD if !IsHashRefWithData(
+ $Param{DynamicFieldHTML}->{ $DynamicFieldConfig->{Name} }
+ );
- # get the html strings form $Param
- my $DynamicFieldHTML = $Param{DynamicFieldHTML}->{ $DynamicFieldConfig->{Name} };
+ # get the html strings form $Param
+ my $DynamicFieldHTML = $Param{DynamicFieldHTML}->{ $DynamicFieldConfig->{Name} };
- $Self->{LayoutObject}->Block(
- Name => 'FollowUpDynamicField',
- Data => {
- Name => $DynamicFieldConfig->{Name},
- Label => $DynamicFieldHTML->{Label},
- Field => $DynamicFieldHTML->{Field},
- },
- );
+ $Self->{LayoutObject}->Block(
+ Name => 'FollowUpDynamicField',
+ Data => {
+ Name => $DynamicFieldConfig->{Name},
+ Label => $DynamicFieldHTML->{Label},
+ Field => $DynamicFieldHTML->{Field},
+ },
+ );
- # example of dynamic fields order customization
- $Self->{LayoutObject}->Block(
- Name => 'FollowUpDynamicField_' . $DynamicFieldConfig->{Name},
- Data => {
- Name => $DynamicFieldConfig->{Name},
- Label => $DynamicFieldHTML->{Label},
- Field => $DynamicFieldHTML->{Field},
- },
- );
- }
+ # example of dynamic fields order customization
+ $Self->{LayoutObject}->Block(
+ Name => 'FollowUpDynamicField_' . $DynamicFieldConfig->{Name},
+ Data => {
+ Name => $DynamicFieldConfig->{Name},
+ Label => $DynamicFieldHTML->{Label},
+ Field => $DynamicFieldHTML->{Field},
+ },
+ );
+ }
- # show attachments
- # get all attachments meta data
- my @Attachments = $Self->{UploadCacheObject}->FormIDGetAllFilesMeta(
- FormID => $Self->{FormID},
+ # show attachments
+ # get all attachments meta data
+ my @Attachments = $Self->{UploadCacheObject}->FormIDGetAllFilesMeta(
+ FormID => $Self->{FormID},
+ );
+ for my $Attachment (@Attachments) {
+ next if $Attachment->{ContentID} && $Self->{LayoutObject}->{BrowserRichText};
+ $Self->{LayoutObject}->Block(
+ Name => 'FollowUpAttachment',
+ Data => $Attachment,
);
- for my $Attachment (@Attachments) {
- next if $Attachment->{ContentID} && $Self->{LayoutObject}->{BrowserRichText};
- $Self->{LayoutObject}->Block(
- Name => 'FollowUpAttachment',
- Data => $Attachment,
- );
- }
}
}
---------------------------------------------------------------------
OTRS mailing list: cvs-log - Webpage: http://otrs.org/
Archive: http://lists.otrs.org/pipermail/cvs-log
To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/cvs-log