[Rt-commit] rt branch, 3.9-trunk, updated. rt-3.8.8-460-gfc0cfc9

Thomas Sibley trs at bestpractical.com
Tue Aug 17 22:24:19 EDT 2010


The branch, 3.9-trunk has been updated
       via  fc0cfc9c781f9528442810ee5af44a52c15fe624 (commit)
      from  daf85ff089a9ee015266a05dc32a786ce682c708 (commit)

Summary of changes:
 etc/RT_Config.pm.in                                |   10 ----------
 lib/RT/Config.pm                                   |   11 -----------
 share/html/Ticket/Elements/ShowRequestor           |   13 ++++++++-----
 share/html/Ticket/Elements/ShowRequestorTickets    |    2 +-
 .../Ticket/Elements/ShowRequestorTicketsActive     |    4 +---
 share/html/Ticket/Elements/ShowRequestorTicketsAll |    4 +---
 .../Ticket/Elements/ShowRequestorTicketsInactive   |    4 +---
 .../html/Ticket/Elements/ShowRequestorTicketsNone  |    8 +++-----
 8 files changed, 15 insertions(+), 41 deletions(-)

- Log -----------------------------------------------------------------
commit fc0cfc9c781f9528442810ee5af44a52c15fe624
Author: Thomas Sibley <trs at bestpractical.com>
Date:   Tue Aug 17 22:24:53 2010 -0400

    On second thought, back out the pref I added in 8f397a39
    
    Instead, we'll always show a ticket search link in the upper right
    corner of the "More About the Requestor" box.

diff --git a/etc/RT_Config.pm.in b/etc/RT_Config.pm.in
index e748ed9..015d02a 100755
--- a/etc/RT_Config.pm.in
+++ b/etc/RT_Config.pm.in
@@ -871,16 +871,6 @@ shown for Privileged Users.
 
 Set($ShowMoreAboutPrivilegedUsers, 0);
 
-=item C<$MoreAboutRequestorTicketsLink>
-
-Determines if a search link or ticket list is shown for for each 'More about
-requestor' box on the ticket display page.  The default is to show a short
-ticket list.
-
-=cut
-
-Set($MoreAboutRequestorTicketsLink, 0);
-
 =item C<$MoreAboutRequestorTicketList>
 
 This can be set to Active, Inactive, All or None.  It controls what ticket
diff --git a/lib/RT/Config.pm b/lib/RT/Config.pm
index 7f0578c..b74faac 100644
--- a/lib/RT/Config.pm
+++ b/lib/RT/Config.pm
@@ -368,17 +368,6 @@ our %META = (
             Hints => 'Use css rules to display text monospaced and with formatting preserved, but wrap as needed.  This does not work well with IE6 and you should use the previous option', #loc
         },
     },
-    MoreAboutRequestorTicketsLink => {
-        Section         => 'Ticket display',    #loc
-        Overridable     => 1,
-        SortOrder       => 6,
-        Widget          => '/Widgets/Form/Boolean',
-        WidgetArguments => {
-            Description => q|Display a link to requestors' tickets?|,  #loc
-            Hints       => 'If yes, the link will replace the inline ticket list.  '
-                          .'The search conditions are still determined by the option below.',
-        },
-    },
     MoreAboutRequestorTicketList => {
         Section         => 'Ticket display',                       #loc
         Overridable     => 1,
diff --git a/share/html/Ticket/Elements/ShowRequestor b/share/html/Ticket/Elements/ShowRequestor
index fbb49f8..31c099a 100755
--- a/share/html/Ticket/Elements/ShowRequestor
+++ b/share/html/Ticket/Elements/ShowRequestor
@@ -56,6 +56,7 @@ while ( my $requestor = $people->Next ) {
 <&| /Widgets/TitleBox,
     title_href => $has_right_adminusers? RT->Config->Get('WebPath')."/Admin/Users/Modify.html?id=".$requestor->id: undef,
     title_raw => loc("More about [_1]", $name),
+    titleright_raw => $m->scomp( $TicketsLinkTemplate, AsLink => 1, Requestor => $requestor ),
     class => 'ticket-info-requestor'
 &>
 
@@ -66,7 +67,9 @@ while ( my $requestor = $people->Next ) {
 <span class="label commentsaboutuser"><&|/l&>Comments about this user</&>:</span><br />
 <b class="value commentsaboutuser"><% ($requestor->Comments || loc("No comment entered about this user")) %></b><br />
 
-<& $TicketTemplate, AsLink => $TicketsAsLink, Requestor => $requestor &>
+<span id="more-about-requestor-<%$requestor->Id%>">
+  <& $TicketTemplate, Requestor => $requestor &>
+</span>
 
 <div class="moreaboutusergroups">
 <&|/l&>Groups this user belongs to</&>:<br />
@@ -90,12 +93,12 @@ my $show_privileged = RT->Config->Get('ShowMoreAboutPrivilegedUsers');
 $TicketTemplate ||= "ShowRequestorTickets".(RT->Config->Get('MoreAboutRequestorTicketList', $session{CurrentUser})||'Active');
 $TicketTemplate = "ShowRequestorTicketsActive" unless $m->comp_exists($TicketTemplate);
 
-$TicketsAsLink = RT->Config->Get('MoreAboutRequestorTicketsLink',
-                                 $session{'CurrentUser'})
-    unless defined $TicketsAsLink;
+$TicketsLinkTemplate ||= $TicketTemplate;
+$TicketsLinkTemplate = "ShowRequestorTicketsActive"
+    if $TicketsLinkTemplate =~ /None$/;
 </%INIT>
 <%ARGS>
 $Ticket=>undef
 $TicketTemplate=>undef
-$TicketsAsLink => undef
+$TicketsLinkTemplate => undef
 </%ARGS>
diff --git a/share/html/Ticket/Elements/ShowRequestorTickets b/share/html/Ticket/Elements/ShowRequestorTickets
index 39fa252..a599efd 100644
--- a/share/html/Ticket/Elements/ShowRequestorTickets
+++ b/share/html/Ticket/Elements/ShowRequestorTickets
@@ -84,5 +84,5 @@ if (@$conditions) {
 $Requestor => undef
 $conditions
 $Rows => 10
-$AsLink
+$AsLink => undef
 </%ARGS>
diff --git a/share/html/Ticket/Elements/ShowRequestorTicketsActive b/share/html/Ticket/Elements/ShowRequestorTicketsActive
index 122ce17..e31397a 100644
--- a/share/html/Ticket/Elements/ShowRequestorTicketsActive
+++ b/share/html/Ticket/Elements/ShowRequestorTicketsActive
@@ -45,13 +45,11 @@
 %# those contributions and any derivatives thereof.
 %# 
 %# END BPS TAGGED BLOCK }}}
-<span id="more-about-requestor-<%$Requestor->Id%>">
 % unless ( $AsLink ) {
 <span class="label"><&|/l, $Rows &>This user's [_1] highest priority active tickets</&>:</span>
 <& ShowRequestorToggleLinks, %ARGS, Status => 'Active' &>
 % }
 <& ShowRequestorTickets, %ARGS, conditions => $conditions, Rows => $Rows  &>
-</span>
 <%INIT>
 unless ( @$conditions ) {
     foreach (RT::Queue->ActiveStatusArray()) {
@@ -63,5 +61,5 @@ unless ( @$conditions ) {
 $Requestor => undef
 $conditions => []
 $Rows => 10
-$AsLink
+$AsLink => undef
 </%ARGS>
diff --git a/share/html/Ticket/Elements/ShowRequestorTicketsAll b/share/html/Ticket/Elements/ShowRequestorTicketsAll
index 88fe019..47c1c6d 100644
--- a/share/html/Ticket/Elements/ShowRequestorTicketsAll
+++ b/share/html/Ticket/Elements/ShowRequestorTicketsAll
@@ -45,16 +45,14 @@
 %# those contributions and any derivatives thereof.
 %# 
 %# END BPS TAGGED BLOCK }}}
-<span id="more-about-requestor-<%$Requestor->Id%>">
 % unless ( $AsLink ) {
 <span class="label"><&|/l, $Rows &>This user's [_1] highest priority tickets</&>:</span>
 <& ShowRequestorToggleLinks, %ARGS, Status => 'All' &>
 % }
 <& ShowRequestorTickets, %ARGS, conditions => $conditions, Rows => $Rows  &>
-</span>
 <%ARGS>
 $Requestor => undef
 $conditions => []
 $Rows => 10
-$AsLink
+$AsLink => undef
 </%ARGS>
diff --git a/share/html/Ticket/Elements/ShowRequestorTicketsInactive b/share/html/Ticket/Elements/ShowRequestorTicketsInactive
index 50007bb..affdb47 100644
--- a/share/html/Ticket/Elements/ShowRequestorTicketsInactive
+++ b/share/html/Ticket/Elements/ShowRequestorTicketsInactive
@@ -45,13 +45,11 @@
 %# those contributions and any derivatives thereof.
 %# 
 %# END BPS TAGGED BLOCK }}}
-<span id="more-about-requestor-<%$Requestor->Id%>">
 % unless ( $AsLink ) {
 <span class="label"><&|/l, $Rows &>This user's [_1] highest priority inactive tickets</&>:</span>
 <& ShowRequestorToggleLinks, %ARGS, Status => 'Inactive' &>
 % }
 <& ShowRequestorTickets, %ARGS, conditions => $conditions, Rows => $Rows  &>
-</span>
 <%INIT>
 unless ( @$conditions ) {
     foreach (RT::Queue->InactiveStatusArray()) {
@@ -63,5 +61,5 @@ unless ( @$conditions ) {
 $Requestor => undef
 $conditions => []
 $Rows => 10
-$AsLink
+$AsLink => undef
 </%ARGS>
diff --git a/share/html/Ticket/Elements/ShowRequestorTicketsNone b/share/html/Ticket/Elements/ShowRequestorTicketsNone
index efc93aa..a0ce0ff 100644
--- a/share/html/Ticket/Elements/ShowRequestorTicketsNone
+++ b/share/html/Ticket/Elements/ShowRequestorTicketsNone
@@ -45,15 +45,13 @@
 %# those contributions and any derivatives thereof.
 %# 
 %# END BPS TAGGED BLOCK }}}
-<span id="more-about-requestor-<%$Requestor->Id%>">
 %# showing no tickets means doing no work
-% unless ( $AsLink ) {
-<& ShowRequestorToggleLinks, %ARGS, Status => 'Inactive' &>
+% if ( $AsLink ) {
+<& ShowRequestorTickets, %ARGS, conditions => $conditions, Rows => $Rows  &>
 % }
-</span>
 <%ARGS>
 $Requestor => undef
 $conditions => []
 $Rows => 10
-$AsLink
+$AsLink => undef
 </%ARGS>

-----------------------------------------------------------------------


More information about the Rt-commit mailing list