[Rt-commit] r5686 - in rtir/branches/2.1-EXPERIMENTAL: .
ruz at bestpractical.com
ruz at bestpractical.com
Wed Aug 2 15:50:08 EDT 2006
Author: ruz
Date: Wed Aug 2 15:50:07 2006
New Revision: 5686
Modified:
rtir/branches/2.1-EXPERIMENTAL/ (props changed)
rtir/branches/2.1-EXPERIMENTAL/html/RTIR/Elements/ShowRTIRField
Log:
r1537 at cubic-pc: cubic | 2006-08-02 06:52:20 +0400
* show multiple values in RTIR/Elements/ShowRTIRField
Modified: rtir/branches/2.1-EXPERIMENTAL/html/RTIR/Elements/ShowRTIRField
==============================================================================
--- rtir/branches/2.1-EXPERIMENTAL/html/RTIR/Elements/ShowRTIRField (original)
+++ rtir/branches/2.1-EXPERIMENTAL/html/RTIR/Elements/ShowRTIRField Wed Aug 2 15:50:07 2006
@@ -22,13 +22,21 @@
%#
%#
%# END LICENSE BLOCK
-% if ( $fieldvalue ) {
-<span class="cf-value"><% $fieldvalue %></span>
-% } else {
+% unless ( $count ) {
<span class="cf-value novalue"><&|/l&>no value</&></class>
+% } elsif ( $count == 1 ) {
+<span class="cf-value"><% $values->First->Content %></span>
+% } else {
+<ul class="cf-values">
+% while ( my $value = $values->Next ) {
+<li class="cf-value"><% $value->Content %></li>
+% }
+</ul>
% }
<%INIT>
-my $fieldvalue = RT::IR::Ticket::FirstCustomFieldValue( $Ticket, "_RTIR_".$Name );
+$Name = "_RTIR_". $Name;
+my $values = $Ticket->CustomFieldValues( $Name );
+my $count = $values->Count;
</%INIT>
<%ARGS>
$Ticket => undef
More information about the Rt-commit
mailing list