X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=rt%2Fhtml%2FTicket%2FElements%2FShowRequestor;h=d7fe6b18504d2249caecb49f6a5508e6f15f87ef;hp=421d38e0a6e9d58bd12237875bb99f0d19b72653;hb=ef20b2b6b1feb47ad02b5ff7525f1a0fd11d0fa4;hpb=a513c0bef534d05f03c1242831b6f3be19b97dae diff --git a/rt/html/Ticket/Elements/ShowRequestor b/rt/html/Ticket/Elements/ShowRequestor index 421d38e0a..d7fe6b185 100644 --- a/rt/html/Ticket/Elements/ShowRequestor +++ b/rt/html/Ticket/Elements/ShowRequestor @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -22,7 +22,9 @@ %# %# You should have received a copy of the GNU General Public License %# along with this program; if not, write to the Free Software -%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +%# 02110-1301 or visit their web page on the internet at +%# http://www.gnu.org/copyleft/gpl.html. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -45,42 +47,41 @@ %# END BPS TAGGED BLOCK }}} <%PERL> my $rows = 10; +my $has_right_adminusers = $session{'CurrentUser'}->HasRight(Object => $RT::System, Right => 'AdminUsers'); my $people = $Ticket->Requestors->UserMembersObj; while (my $requestor=$people->Next) { +next if $requestor->Privileged; my $name=$requestor->RealName || $requestor->EmailAddress; my $tickets = RT::Tickets->new($session{'CurrentUser'}); -$tickets->LimitWatcher(TYPE => 'Requestor', VALUE => $requestor->EmailAddress ); -$tickets->LimitStatus( VALUE => 'open'); -$tickets->LimitStatus( VALUE => 'new'); +$tickets->FromSQL( "Requestor.id = ". $requestor->id ." AND (Status = 'open' OR Status = 'new')" ); $tickets->RowsPerPage($rows); -$tickets->OrderBy(FIELD => 'Priority', - ORDER => 'DESC'); +$tickets->OrderBy(FIELD => 'Priority', ORDER => 'DESC'); -% unless ($requestor->Privileged) { -<& /Elements/TitleBoxStart, - title => "id."\">".loc("More about [_1]", $name)."" &> +<&| /Widgets/TitleBox, + title_href => $has_right_adminusers ? "$RT::WebPath/Admin/Users/Modify.html?id=".$requestor->id : undef, + title=> loc("More about [_1]", $name), +&> %# Additional information about this user. Empty by default. <& /Elements/Callback, _CallbackName => 'AboutThisUser', requestor => $requestor, %ARGS &> -<&|/l&>Comments about this user:
-<% ($requestor->Comments || loc("No comment entered about this user")) %>
+<&|/l&>Comments about this user:
+<% ($requestor->Comments || loc("No comment entered about this user")) %>
-<&|/l, $rows &>This user's [_1] highest priority tickets:
- -<&|/l&>Groups this user belongs to:
+<&|/l&>Groups this user belongs to:
<& /Elements/ShowMemberships, UserObj => $requestor &> -<& /Elements/TitleBoxEnd &> + -% } %} <%ARGS> $Ticket=>undef