projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
rt 4.2.14 (#13852)
[freeside.git]
/
rt
/
share
/
html
/
Elements
/
ShowCustomFields
diff --git
a/rt/share/html/Elements/ShowCustomFields
b/rt/share/html/Elements/ShowCustomFields
index
75e302b
..
0423e1b
100644
(file)
--- a/
rt/share/html/Elements/ShowCustomFields
+++ b/
rt/share/html/Elements/ShowCustomFields
@@
-2,7
+2,7
@@
%#
%# COPYRIGHT:
%#
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-201
5
Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-201
7
Best Practical Solutions, LLC
%# <sales@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
%# <sales@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@
-45,7
+45,8
@@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-% $m->callback( CallbackName => 'BeforeCustomFields' );
+% $m->callback( CallbackName => 'BeforeCustomFields', Object => $Object,
+% Grouping => $Grouping, ARGSRef => \%ARGS, CustomFields => $CustomFields, Table => $Table );
% if ($Table) {
<table>
% }
% if ($Table) {
<table>
% }
@@
-54,6
+55,7
@@
% while ( my $CustomField = $set->Next ) {
% my $Values = $Object->CustomFieldValues( $CustomField->Id );
% my $count = $Values->Count;
% while ( my $CustomField = $set->Next ) {
% my $Values = $Object->CustomFieldValues( $CustomField->Id );
% my $count = $Values->Count;
+% next if $HideEmpty and not $count;
% next if $count == 0 and $CustomField->Disabled;
<tr id="CF-<%$CustomField->id%>-ShowRow">
<td class="label"><% $CustomField->Name %>:</td>
% next if $count == 0 and $CustomField->Disabled;
<tr id="CF-<%$CustomField->id%>-ShowRow">
<td class="label"><% $CustomField->Name %>:</td>
@@
-72,19
+74,23
@@
</ul>
% }
</td>
</ul>
% }
</td>
+% $m->callback( CallbackName => 'AfterCustomFieldValue', CustomField => $CustomField,
+% Object => $Object, Grouping => $Grouping, Table => $Table );
</tr>
% }
% }
% if ($Table) {
</table>
% }
</tr>
% }
% }
% if ($Table) {
</table>
% }
-% $m->callback( CallbackName => 'AfterCustomFields', Object => $Object );
+% $m->callback( CallbackName => 'AfterCustomFields', Object => $Object,
+% Grouping => $Grouping, ARGSRef => \%ARGS, Table => $Table );
<%INIT>
$m->callback(
%ARGS,
CallbackName => 'MassageCustomFields',
<%INIT>
$m->callback(
%ARGS,
CallbackName => 'MassageCustomFields',
- Object => $Object,
+ Object
=> $Object,
CustomFields => $CustomFields,
CustomFields => $CustomFields,
+ Table => $Table,
);
# kludge to allow "Support time" to be displayed even though it's been
);
# kludge to allow "Support time" to be displayed even though it's been
@@
-94,6
+100,8
@@
$HiddenCustomFields->LimitToChildType(ref $Object);
$HiddenCustomFields->Limit( FIELD => 'Type', VALUE => 'TimeValue' );
$HiddenCustomFields->LimitToDeleted;
$HiddenCustomFields->Limit( FIELD => 'Type', VALUE => 'TimeValue' );
$HiddenCustomFields->LimitToDeleted;
+$CustomFields->LimitToGrouping( $Object => $Grouping ) if defined $Grouping;
+
# don't print anything if there is no custom fields
return unless $CustomFields->Count > 0 or $HiddenCustomFields->Count > 0;
# don't print anything if there is no custom fields
return unless $CustomFields->Count > 0 or $HiddenCustomFields->Count > 0;
@@
-102,7
+110,7
@@
my $print_value = sub {
my $linked = $value->LinkValueTo;
if ( defined $linked && length $linked ) {
my $linked = $m->interp->apply_escapes( $linked, 'h' );
my $linked = $value->LinkValueTo;
if ( defined $linked && length $linked ) {
my $linked = $m->interp->apply_escapes( $linked, 'h' );
- $m->out('<a href="'. $linked .'" target="_
new
">');
+ $m->out('<a href="'. $linked .'" target="_
blank
">');
}
my $comp = "ShowCustomField". $cf->Type;
$m->callback(
}
my $comp = "ShowCustomField". $cf->Type;
$m->callback(
@@
-110,6
+118,7
@@
my $print_value = sub {
Name => \$comp,
CustomField => $cf,
Object => $Object,
Name => \$comp,
CustomField => $cf,
Object => $Object,
+ Table => $Table,
);
if ( $m->comp_exists( $comp ) ) {
$m->comp( $comp, Object => $value );
);
if ( $m->comp_exists( $comp ) ) {
$m->comp( $comp, Object => $value );
@@
-137,6
+146,7
@@
my $print_value = sub {
<%ARGS>
$Object => undef
$CustomFields => $Object->CustomFields
<%ARGS>
$Object => undef
$CustomFields => $Object->CustomFields
-
+$Grouping => undef
$Table => 1
$Table => 1
+$HideEmpty => 0
</%ARGS>
</%ARGS>