[Rt-commit] rt branch, 3.9-trunk, updated. rt-3.8.8-774-g01b1bef
Thomas Sibley
trs at bestpractical.com
Thu Sep 16 16:18:37 EDT 2010
The branch, 3.9-trunk has been updated
via 01b1befbb4b58fe5991d4cd9b2fc17d208da9fd1 (commit)
from 549ca2b07e49005a4a1a7aaad68d4cac6e3258b6 (commit)
Summary of changes:
share/html/Ticket/Elements/ShowRequestor | 29 +++++++++++++++++++++++------
1 files changed, 23 insertions(+), 6 deletions(-)
- Log -----------------------------------------------------------------
commit 01b1befbb4b58fe5991d4cd9b2fc17d208da9fd1
Author: Thomas Sibley <trs at bestpractical.com>
Date: Thu Sep 16 16:14:46 2010 -0400
Statically include the default requestor ticket list
This trades the advantage of delay loading the selected ticket list
in favor of making the content more accessible for browsers lacking
in Javascript. Tabs unselected by default still load via ajax.
diff --git a/share/html/Ticket/Elements/ShowRequestor b/share/html/Ticket/Elements/ShowRequestor
index c9eaa73..4df8752 100755
--- a/share/html/Ticket/Elements/ShowRequestor
+++ b/share/html/Ticket/Elements/ShowRequestor
@@ -83,17 +83,31 @@ while ( my $requestor = $people->Next ) {
% }
% if ( $ShowTickets ) {
-<div class="more-about-requestor-tickets" id="more-about-requestor-tickets-<%$requestor->Id%>">
+<div class="more-about-requestor-tickets ui-tabs" id="more-about-requestor-tickets-<%$requestor->Id%>">
<ul>
+% my $index = 1;
% for my $status ( @$status_order ) {
-% my $url = RT->Config->Get('WebPath').'/Helpers/Toggle/ShowRequestor?'.
-% $m->comp('/Elements/QueryString', Requestor => $requestor->Id , Status => $status);
- <li><a href="<% $url | n %>"><% $status_link_text->{$status} %></a></li>
+ <li>
+% if ( $status eq $DefaultTicketsTab ) {
+ <a href="#requestor-<%$requestor->Id%>-ticket-tab-default">\
+% } else {
+% my $url = RT->Config->Get('WebPath').'/Helpers/Toggle/ShowRequestor?'.
+% $m->comp('/Elements/QueryString', Requestor => $requestor->Id , Status => $status);
+ <a href="<% $url | n %>" title="requestor-<%$requestor->Id%>-ticket-tab-<% $index++ %>">\
+% }
+<% $status_link_text->{$status} %></a>
+ </li>
% }
</ul>
-% for (1 .. scalar @$status_order) {
- <div id="ui-tabs-<% $_ %>" class="ui-tabs-hide">
+% $index = 1;
+% for my $status (@$status_order) {
+% if ( $status eq $DefaultTicketsTab ) {
+ <div id="requestor-<%$requestor->Id%>-ticket-tab-default">
+ <& $TicketTemplate, Requestor => $requestor &>
+% } else {
+ <div id="requestor-<%$requestor->Id%>-ticket-tab-<% $index++ %>" class="ui-tabs-hide">
<span class="label"><&|/l&>Loading...</&></span>
+% }
</div>
% }
</div>
@@ -139,6 +153,9 @@ unless ( $DefaultTicketsTab eq 'None' ) {
if $status_order->[$_] eq $DefaultTicketsTab;
}
}
+
+my $TicketTemplate = "ShowRequestorTickets$DefaultTicketsTab";
+$TicketTemplate = "ShowRequestorTicketsActive" unless $m->comp_exists($TicketTemplate);
</%INIT>
<%ARGS>
$Ticket=>undef
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list