[freeside-commits] freeside/rt/html/Elements EditCustomFieldSelect, 1.1.1.2, 1.1.1.2.2.1 QuickCreate, 1.1.1.2.4.1, 1.1.1.2.4.2 Quicksearch, 1.1.1.3, 1.1.1.3.4.1 SelectNewTicketQueue, 1.1.1.3, 1.1.1.3.4.1 ShowCustomFields, 1.1.1.2, 1.1.1.2.2.1
Ivan,,,
ivan at wavetail.420.am
Mon Mar 3 15:07:40 PST 2008
Update of /home/cvs/cvsroot/freeside/rt/html/Elements
In directory wavetail.420.am:/tmp/cvs-serv10370/html/Elements
Modified Files:
Tag: FREESIDE_1_7_BRANCH
EditCustomFieldSelect QuickCreate Quicksearch
SelectNewTicketQueue ShowCustomFields
Log Message:
merge in rt 3.4.6. *gulp*!
Index: EditCustomFieldSelect
===================================================================
RCS file: /home/cvs/cvsroot/freeside/rt/html/Elements/EditCustomFieldSelect,v
retrieving revision 1.1.1.2
retrieving revision 1.1.1.2.2.1
diff -u -d -r1.1.1.2 -r1.1.1.2.2.1
--- EditCustomFieldSelect 17 Oct 2006 08:49:33 -0000 1.1.1.2
+++ EditCustomFieldSelect 3 Mar 2008 23:07:38 -0000 1.1.1.2.2.1
@@ -51,7 +51,7 @@
% while ($CFVs and my $value = $CFVs->Next ) {
<option value="<%$value->Name%>"
% if ($Values) {
- <% $Values->HasEntry($value->Name) && ($selected = 1) && 'SELECTED' %>
+ <% ($Values->HasEntry($value->Name)||'') && ($selected = 1) && 'SELECTED' %>
% } elsif ($Default) {
<% (ref $Default ? (grep {$_ eq $value->Name} @{$Default}) : ($Default eq $value->Name))
&& ($selected = 1) && 'SELECTED' %>
Index: QuickCreate
===================================================================
RCS file: /home/cvs/cvsroot/freeside/rt/html/Elements/QuickCreate,v
retrieving revision 1.1.1.2.4.1
retrieving revision 1.1.1.2.4.2
diff -u -d -r1.1.1.2.4.1 -r1.1.1.2.4.2
--- QuickCreate 20 Jun 2007 22:58:10 -0000 1.1.1.2.4.1
+++ QuickCreate 3 Mar 2008 23:07:38 -0000 1.1.1.2.4.2
@@ -52,7 +52,7 @@
<font size="-2"><&|/l&>Subject</&>:<br><input size="30" name="Subject"></font>
</td>
<td>
-<font size="-2"><&|/l&>Queue</&>:<br><& /Elements/SelectQueue, Name => 'Queue', ShowNullOption => 0 &></font>
+<font size="-2"><&|/l&>Queue</&>:<br><& /Elements/SelectNewTicketQueue, Name => 'Queue' &></font>
</td>
<td>
<font size="-2"><&|/l&>Owner</&>:<br>
Index: SelectNewTicketQueue
===================================================================
RCS file: /home/cvs/cvsroot/freeside/rt/html/Elements/SelectNewTicketQueue,v
retrieving revision 1.1.1.3
retrieving revision 1.1.1.3.4.1
diff -u -d -r1.1.1.3 -r1.1.1.3.4.1
--- SelectNewTicketQueue 15 Oct 2005 09:10:09 -0000 1.1.1.3
+++ SelectNewTicketQueue 3 Mar 2008 23:07:38 -0000 1.1.1.3.4.1
@@ -48,7 +48,7 @@
% foreach my $queue (@{$session{'create_in_queues'}}) {
<OPTION
VALUE="<%$queue->{'id'}%>"
- <%$Default && ($queue->{'id'} == $Default) && 'SELECTED'%>>
+ <% $Default && $queue->{'id'} == $Default ? 'SELECTED': ''%>>
<%$queue->{'Name'}%>
% if (($Verbose) and ($queue->{'Description'}) ){
(<%$queue->{'Description'}%>)
Index: ShowCustomFields
===================================================================
RCS file: /home/cvs/cvsroot/freeside/rt/html/Elements/ShowCustomFields,v
retrieving revision 1.1.1.2
retrieving revision 1.1.1.2.2.1
diff -u -d -r1.1.1.2 -r1.1.1.2.2.1
--- ShowCustomFields 17 Oct 2006 08:49:34 -0000 1.1.1.2
+++ ShowCustomFields 3 Mar 2008 23:07:38 -0000 1.1.1.2.2.1
@@ -44,36 +44,42 @@
%#
%# END BPS TAGGED BLOCK }}}
<table>
-% my @entry_fields;
-% while (my $CustomField = $CustomFields->Next()) {
-% my $Values = $Object->CustomFieldValues($CustomField->Id);
+% while ( my $CustomField = $CustomFields->Next ) {
+% my $Values = $Object->CustomFieldValues( $CustomField->Id );
+% my $count = $Values->Count;
<tr>
- <td class="label"><%$CustomField->Name%>:</td>
+ <td class="label"><% $CustomField->Name %>:</td>
<td class="value">
+% unless ( $count ) {
+<i><&|/l&>(no value)</&></i>
+% } elsif ( $count == 1 ) {
+% $print_value->( $CustomField, $Values->First );
+% } else {
<ul>
-% while (my $Value = $Values->Next()) {
-<li>
-% my $comp = "ShowCustomField".$CustomField->Type;
-% if ($m->comp_exists($comp)) {
-<& $comp, Object => $Value &>
-% } else {
-<%$Value->Content%>
-% }
-</li>
-% }
-% unless ($Values->Count()) {
-<li><i><&|/l&>(no value)</&></i></li>
+% while ( my $Value = $Values->Next ) {
+<li><% $print_value->( $CustomField, $Value ) |n %></li>
% }
</ul>
+% }
</td>
</tr>
% }
</table>
<%INIT>
my $CustomFields = $Object->CustomFields;
- $m->comp('/Elements/Callback', _CallbackName => 'MassageCustomFields',
+$m->comp('/Elements/Callback', _CallbackName => 'MassageCustomFields',
CustomFields => $CustomFields);
+my $print_value = sub {
+ my ($cf, $value) = @_;
+ my $comp = "ShowCustomField". $cf->Type;
+ if ( $m->comp_exists( $comp ) ) {
+ $m->comp( $comp, Object => $value );
+ } else {
+ $m->print( $value->Content );
+ }
+};
+
</%INIT>
<%ARGS>
$Object => undef
Index: Quicksearch
===================================================================
RCS file: /home/cvs/cvsroot/freeside/rt/html/Elements/Quicksearch,v
retrieving revision 1.1.1.3
retrieving revision 1.1.1.3.4.1
diff -u -d -r1.1.1.3 -r1.1.1.3.4.1
--- Quicksearch 15 Oct 2005 09:10:11 -0000 1.1.1.3
+++ Quicksearch 3 Mar 2008 23:07:38 -0000 1.1.1.3.4.1
@@ -57,12 +57,10 @@
while (my $queue = $Queues->Next) {
next unless ($queue->CurrentUserHasRight('ShowTicket'));
- my $name = $queue->Name;
- $name =~ s|(['\\])|\\$1|g;
-
- my $new_q = "Queue = '$name' AND Status = 'new'";
- my $open_q = "Queue = '$name' AND Status = 'open'";
- my $all_q = "Queue = '$name' AND (Status = 'open' OR Status = 'new')";
+ my $qid = $queue->Id;
+ my $new_q = "Queue = '$qid' AND Status = 'new'";
+ my $open_q = "Queue = '$qid' AND Status = 'open'";
+ my $all_q = "Queue = '$qid' AND (Status = 'open' OR Status = 'new')";
$Tickets->FromSQL($open_q);
my $open = $Tickets->Count();
More information about the freeside-commits
mailing list