[rt-commit] [svn] r511 - in rt/branches/rt-3.1/html/Search: . Elements

leira at fsck.com leira at fsck.com
Mon Mar 8 23:12:55 EST 2004


Author: leira
Date: Mon Mar  8 23:12:55 2004
New Revision: 511

Modified:
   rt/branches/rt-3.1/html/Search/Build.html
   rt/branches/rt-3.1/html/Search/Elements/BuildFormatString
   rt/branches/rt-3.1/html/Search/Results.html
Log:
Add support for links & CFs.


Modified: rt/branches/rt-3.1/html/Search/Build.html
==============================================================================
--- rt/branches/rt-3.1/html/Search/Build.html	(original)
+++ rt/branches/rt-3.1/html/Search/Build.html	Mon Mar  8 23:12:55 2004
@@ -952,7 +952,7 @@
 
 # {{{ Deal with format changes
 my ($AvailableColumns, $CurrentFormat);
-($Format, $AvailableColumns, $CurrentFormat) = $m->comp('Elements/BuildFormatString', %ARGS);
+($Format, $AvailableColumns, $CurrentFormat) = $m->comp('Elements/BuildFormatString', cfqueues => \%queues, %ARGS);
 
 $ARGS{'Format'} = $Format;
 $ARGS{'Query'}  = $Query;

Modified: rt/branches/rt-3.1/html/Search/Elements/BuildFormatString
==============================================================================
--- rt/branches/rt-3.1/html/Search/Elements/BuildFormatString	(original)
+++ rt/branches/rt-3.1/html/Search/Elements/BuildFormatString	Mon Mar  8 23:12:55 2004
@@ -1,5 +1,6 @@
 <%args>
 $Format => undef
+%cfqueues => undef
 </%args>
 <%init>
 
@@ -30,8 +31,30 @@
     "Created",             "LastUpdated",
     "Told",                "Due",
     "Resolved",            "NEWLINE",
+    "RefersTo",	           "ReferredToBy",
+    "DependsOn",           "DependedOnBy",
+    "MemberOf",            "HasMember",
     "-",
 );
+
+my $CustomFields = RT::CustomFields->new( $session{'CurrentUser'});
+foreach (keys %cfqueues) {
+    my $id = $_;
+    $id =~ s/^.'*(.*).'*$/$1/;
+    # Gotta load up the $queue object, since queues get stored by name now.
+    my $queue = RT::Queue->new($session{'CurrentUser'});
+    $queue->Load($id);
+    $CustomFields->LimitToQueue($queue->Id);
+}
+$CustomFields->LimitToGlobal;
+
+while ( my $CustomField = $CustomFields->Next ) {
+    my $queuestr;
+    if ($CustomField->QueueObj && $CustomField->QueueObj->Id != 0) {
+	$queuestr = $CustomField->QueueObj->Name . ".";
+    }
+    push @fields, "CustomField." . $queuestr . "{" . $CustomField->Name . "}";
+}
 
 my ( @seen);
 

Modified: rt/branches/rt-3.1/html/Search/Results.html
==============================================================================
--- rt/branches/rt-3.1/html/Search/Results.html	(original)
+++ rt/branches/rt-3.1/html/Search/Results.html	Mon Mar  8 23:12:55 2004
@@ -44,6 +44,7 @@
 <a href="Bulk.html<%$QueryString%>"><&|/l&>Update all these tickets at once</&></a><br>
 <a href="Results.tsv<%$QueryString%>"><&|/l&>spreadsheet</&></a><br>
 <a href="Results.rdf<%$QueryString%>"><&|/l&>RSS</&></a><br>
+<a href="<%$RT::WebPath%>/Tools/Offline.html<%$QueryString%>"><&|/l&>Download</&></a><br>
 </div>
 <%INIT>
 my ($title, $ticketcount);



More information about the Rt-commit mailing list