[Rt-commit] rt branch, 3.9-trunk, updated. rt-3.8.8-881-ga1183d4

Thomas Sibley trs at bestpractical.com
Mon Sep 27 16:05:43 EDT 2010


The branch, 3.9-trunk has been updated
       via  a1183d4801dc327656a00441e19f14d2f7bbee58 (commit)
      from  8976c535a0ff0aa5fc9870c1b7061a3a5f45b3fb (commit)

Summary of changes:
 lib/RT/Users_Overlay.pm                            |   16 ++++++
 .../css/base/jquery-ui-1.8.4.custom.modified.css   |   18 +++++++
 share/html/NoAuth/css/base/misc.css                |    4 ++
 share/html/NoAuth/css/base/ticket.css              |   45 ++++++++++++++++++
 .../images/jquery_ui/ui-icons_4488cc_256x240.png   |  Bin 0 -> 1936 bytes
 share/html/NoAuth/js/jquery-ui-1.8.4.custom.min.js |   32 ++++++++++++-
 share/html/Ticket/Elements/ShowRequestor           |   50 ++++++++++++++------
 7 files changed, 150 insertions(+), 15 deletions(-)
 create mode 100644 share/html/NoAuth/images/jquery_ui/ui-icons_4488cc_256x240.png

- Log -----------------------------------------------------------------
commit a1183d4801dc327656a00441e19f14d2f7bbee58
Author: Thomas Sibley <trs at bestpractical.com>
Date:   Mon Sep 27 16:06:33 2010 -0400

    Show More about requestor boxes as an accordion widget
    
    This saves vertical space and scales better to 20 requestors than
    individual title boxes.  With one requestor, their details will be shown
    by default.  With more than one requestor, details will be collapsed by
    default.
    
    Additionally, the conditional to show or omit privileged requestor
    details is now part of the query instead of the iteration logic.

diff --git a/lib/RT/Users_Overlay.pm b/lib/RT/Users_Overlay.pm
index d34d252..5db7770 100755
--- a/lib/RT/Users_Overlay.pm
+++ b/lib/RT/Users_Overlay.pm
@@ -209,6 +209,22 @@ sub LimitToPrivileged {
     $self->MemberOfGroup( $priv->PrincipalId );
 }
 
+=head2 LimitToUnprivileged
+
+Limits to unprivileged users only
+
+=cut
+
+sub LimitToUnprivileged {
+    my $self = shift;
+
+    my $unpriv = RT::Group->new( $self->CurrentUser );
+    $unpriv->LoadSystemInternalGroup('Unprivileged');
+    unless ( $unpriv->Id ) {
+        $RT::Logger->crit("Couldn't find an 'Unprivileged' users group");
+    }
+    $self->MemberOfGroup( $unpriv->PrincipalId );
+}
 
 
 =head2 WhoHaveRight { Right => 'name', Object => $rt_object , IncludeSuperusers => undef, IncludeSubgroupMembers => undef, IncludeSystemRights => undef, EquivObjects => [ ] }
diff --git a/share/html/NoAuth/css/base/jquery-ui-1.8.4.custom.modified.css b/share/html/NoAuth/css/base/jquery-ui-1.8.4.custom.modified.css
index d7bdb6f..d6883d4 100755
--- a/share/html/NoAuth/css/base/jquery-ui-1.8.4.custom.modified.css
+++ b/share/html/NoAuth/css/base/jquery-ui-1.8.4.custom.modified.css
@@ -293,6 +293,24 @@
 /* Overlays */
 .ui-widget-overlay { background: #666666 url(<%RT->Config->Get('WebPath')%>/NoAuth/images/jquery_ui/ui-bg_diagonals-thick_20_666666_40x40.png) 50% 50% repeat; opacity: .50;filter:Alpha(Opacity=50); }
 .ui-widget-shadow { margin: -5px 0 0 -5px; padding: 5px; background: #000000 url(<%RT->Config->Get('WebPath')%>/NoAuth/images/jquery_ui/ui-bg_flat_10_000000_40x100.png) 50% 50% repeat-x; opacity: .20;filter:Alpha(Opacity=20); -moz-border-radius: 5px; -webkit-border-radius: 5px; border-radius: 5px; }/*
+ * jQuery UI Accordion @VERSION
+ *
+ * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Accordion#theming
+ */
+/* IE/Win - Fix animation bug - #4615 */
+.ui-accordion { width: 100%; }
+.ui-accordion .ui-accordion-header { cursor: pointer; position: relative; margin-top: 1px; zoom: 1; }
+.ui-accordion .ui-accordion-li-fix { display: inline; }
+.ui-accordion .ui-accordion-header-active { border-bottom: 0 !important; }
+.ui-accordion .ui-accordion-header a { display: block; font-size: 1em; padding: .5em .5em .5em .7em; }
+.ui-accordion-icons .ui-accordion-header a { padding-left: 2.2em; }
+.ui-accordion .ui-accordion-header .ui-icon { position: absolute; left: .5em; top: 50%; margin-top: -8px; }
+.ui-accordion .ui-accordion-content { padding: 1em 2.2em; border-top: 0; margin-top: -2px; position: relative; top: 1px; margin-bottom: 2px; overflow: auto; display: none; zoom: 1; }
+.ui-accordion .ui-accordion-content-active { display: block; }/*
  * jQuery UI Autocomplete @VERSION
  *
  * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
diff --git a/share/html/NoAuth/css/base/misc.css b/share/html/NoAuth/css/base/misc.css
index ea515f6..6c30f25 100644
--- a/share/html/NoAuth/css/base/misc.css
+++ b/share/html/NoAuth/css/base/misc.css
@@ -99,3 +99,7 @@ fieldset.cfedit {
     margin: 0;
 }
 
+/* jQuery UI overrides */
+.ui-widget {
+    font-family: arial,helvetica,sans-serif !important;
+}
diff --git a/share/html/NoAuth/css/base/ticket.css b/share/html/NoAuth/css/base/ticket.css
index 47a3a8d..ec9bf35 100644
--- a/share/html/NoAuth/css/base/ticket.css
+++ b/share/html/NoAuth/css/base/ticket.css
@@ -45,6 +45,51 @@
 %# those contributions and any derivatives thereof.
 %#
 %# END BPS TAGGED BLOCK }}}
+#requestor-accordion .ui-accordion-content {
+    padding: 0 0 0 20px;
+    margin: -0.5em 0 0.5em 0;
+    border: none;
+    background: none;
+    color: black !important;
+}
+
+#requestor-accordion {
+    margin: 0.5em 0 0 0;
+}
+
+#requestor-accordion h3 .ui-icon {
+    background-image: url(<%RT->Config->Get('WebPath')%>/NoAuth/images/jquery_ui/ui-icons_4488cc_256x240.png);
+    left: 0;
+}
+
+#requestor-accordion h3 {
+    padding: 0;
+    background: none !important;
+}
+
+#requestor-accordion h3, #requestor-accordion h3 a {
+    color: black !important;
+    border: none !important;
+    margin: 0;
+}
+
+#requestor-accordion h3 a {
+    font-size: 90%;
+    padding: 0 0 0.25em 20px;
+}
+
+#requestor-accordion h3 a:hover,
+#requestor-accordion h3.ui-state-active a {
+    text-decoration: underline;
+}
+
+#requestor-accordion a.modify-user {
+    font-size: 80%;
+    color: black !important;
+}
+
+/* More about requestor ticket lists */
+
 .more-about-requestor-tickets {
     background: none;
     border: none;
diff --git a/share/html/NoAuth/images/jquery_ui/ui-icons_4488cc_256x240.png b/share/html/NoAuth/images/jquery_ui/ui-icons_4488cc_256x240.png
new file mode 100644
index 0000000..3361038
Binary files /dev/null and b/share/html/NoAuth/images/jquery_ui/ui-icons_4488cc_256x240.png differ
diff --git a/share/html/NoAuth/js/jquery-ui-1.8.4.custom.min.js b/share/html/NoAuth/js/jquery-ui-1.8.4.custom.min.js
index ed8ad71..e90b4fe 100644
--- a/share/html/NoAuth/js/jquery-ui-1.8.4.custom.min.js
+++ b/share/html/NoAuth/js/jquery-ui-1.8.4.custom.min.js
@@ -46,6 +46,36 @@ elemHeight:l,offset:e,my:a.my,at:a.at})});c.fn.bgiframe&&f.bgiframe();f.offset(c
 -b.elemWidth:b.my[0]==="right"?b.elemWidth:0,g=-2*b.offset[0];a.left+=a.left<0?e+b.targetWidth+g:d>0?e-b.targetWidth+g:0}},top:function(a,b){if(b.at[1]!=="center"){var d=c(window);d=a.top+b.elemHeight-d.height()-d.scrollTop();var e=b.my[1]==="top"?-b.elemHeight:b.my[1]==="bottom"?b.elemHeight:0,g=b.at[1]==="top"?b.targetHeight:-b.targetHeight,h=-2*b.offset[1];a.top+=a.top<0?e+b.targetHeight+h:d>0?e+g+h:0}}}};if(!c.offset.setOffset){c.offset.setOffset=function(a,b){if(/static/.test(c.curCSS(a,"position")))a.style.position=
 "relative";var d=c(a),e=d.offset(),g=parseInt(c.curCSS(a,"top",true),10)||0,h=parseInt(c.curCSS(a,"left",true),10)||0;e={top:b.top-e.top+g,left:b.left-e.left+h};"using"in b?b.using.call(a,e):d.css(e)};c.fn.offset=function(a){var b=this[0];if(!b||!b.ownerDocument)return null;if(a)return this.each(function(){c.offset.setOffset(this,a)});return q.call(this)}}})(jQuery);
 ;/*
+ * jQuery UI Accordion 1.8.5
+ *
+ * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Accordion
+ *
+ * Depends:
+ *	jquery.ui.core.js
+ *	jquery.ui.widget.js
+ */
+(function(c){c.widget("ui.accordion",{options:{active:0,animated:"slide",autoHeight:true,clearStyle:false,collapsible:false,event:"click",fillSpace:false,header:"> li > :first-child,> :not(li):even",icons:{header:"ui-icon-triangle-1-e",headerSelected:"ui-icon-triangle-1-s"},navigation:false,navigationFilter:function(){return this.href.toLowerCase()===location.href.toLowerCase()}},_create:function(){var a=this,b=a.options;a.running=0;a.element.addClass("ui-accordion ui-widget ui-helper-reset").children("li").addClass("ui-accordion-li-fix");
+a.headers=a.element.find(b.header).addClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all").bind("mouseenter.accordion",function(){b.disabled||c(this).addClass("ui-state-hover")}).bind("mouseleave.accordion",function(){b.disabled||c(this).removeClass("ui-state-hover")}).bind("focus.accordion",function(){b.disabled||c(this).addClass("ui-state-focus")}).bind("blur.accordion",function(){b.disabled||c(this).removeClass("ui-state-focus")});a.headers.next().addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom");
+if(b.navigation){var d=a.element.find("a").filter(b.navigationFilter).eq(0);if(d.length){var f=d.closest(".ui-accordion-header");a.active=f.length?f:d.closest(".ui-accordion-content").prev()}}a.active=a._findActive(a.active||b.active).addClass("ui-state-default ui-state-active").toggleClass("ui-corner-all ui-corner-top");a.active.next().addClass("ui-accordion-content-active");a._createIcons();a.resize();a.element.attr("role","tablist");a.headers.attr("role","tab").bind("keydown.accordion",function(g){return a._keydown(g)}).next().attr("role",
+"tabpanel");a.headers.not(a.active||"").attr({"aria-expanded":"false",tabIndex:-1}).next().hide();a.active.length?a.active.attr({"aria-expanded":"true",tabIndex:0}):a.headers.eq(0).attr("tabIndex",0);c.browser.safari||a.headers.find("a").attr("tabIndex",-1);b.event&&a.headers.bind(b.event.split(" ").join(".accordion ")+".accordion",function(g){a._clickHandler.call(a,g,this);g.preventDefault()})},_createIcons:function(){var a=this.options;if(a.icons){c("<span></span>").addClass("ui-icon "+a.icons.header).prependTo(this.headers);
+this.active.children(".ui-icon").toggleClass(a.icons.header).toggleClass(a.icons.headerSelected);this.element.addClass("ui-accordion-icons")}},_destroyIcons:function(){this.headers.children(".ui-icon").remove();this.element.removeClass("ui-accordion-icons")},destroy:function(){var a=this.options;this.element.removeClass("ui-accordion ui-widget ui-helper-reset").removeAttr("role");this.headers.unbind(".accordion").removeClass("ui-accordion-header ui-accordion-disabled ui-helper-reset ui-state-default ui-corner-all ui-state-active ui-state-disabled ui-corner-top").removeAttr("role").removeAttr("aria-expanded").removeAttr("tabIndex");
+this.headers.find("a").removeAttr("tabIndex");this._destroyIcons();var b=this.headers.next().css("display","").removeAttr("role").removeClass("ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active ui-accordion-disabled ui-state-disabled");if(a.autoHeight||a.fillHeight)b.css("height","");return c.Widget.prototype.destroy.call(this)},_setOption:function(a,b){c.Widget.prototype._setOption.apply(this,arguments);a=="active"&&this.activate(b);if(a=="icons"){this._destroyIcons();
+b&&this._createIcons()}if(a=="disabled")this.headers.add(this.headers.next())[b?"addClass":"removeClass"]("ui-accordion-disabled ui-state-disabled")},_keydown:function(a){if(!(this.options.disabled||a.altKey||a.ctrlKey)){var b=c.ui.keyCode,d=this.headers.length,f=this.headers.index(a.target),g=false;switch(a.keyCode){case b.RIGHT:case b.DOWN:g=this.headers[(f+1)%d];break;case b.LEFT:case b.UP:g=this.headers[(f-1+d)%d];break;case b.SPACE:case b.ENTER:this._clickHandler({target:a.target},a.target);
+a.preventDefault()}if(g){c(a.target).attr("tabIndex",-1);c(g).attr("tabIndex",0);g.focus();return false}return true}},resize:function(){var a=this.options,b;if(a.fillSpace){if(c.browser.msie){var d=this.element.parent().css("overflow");this.element.parent().css("overflow","hidden")}b=this.element.parent().height();c.browser.msie&&this.element.parent().css("overflow",d);this.headers.each(function(){b-=c(this).outerHeight(true)});this.headers.next().each(function(){c(this).height(Math.max(0,b-c(this).innerHeight()+
+c(this).height()))}).css("overflow","auto")}else if(a.autoHeight){b=0;this.headers.next().each(function(){b=Math.max(b,c(this).height("").height())}).height(b)}return this},activate:function(a){this.options.active=a;a=this._findActive(a)[0];this._clickHandler({target:a},a);return this},_findActive:function(a){return a?typeof a==="number"?this.headers.filter(":eq("+a+")"):this.headers.not(this.headers.not(a)):a===false?c([]):this.headers.filter(":eq(0)")},_clickHandler:function(a,b){var d=this.options;
+if(!d.disabled)if(a.target){a=c(a.currentTarget||b);b=a[0]===this.active[0];d.active=d.collapsible&&b?false:this.headers.index(a);if(!(this.running||!d.collapsible&&b)){this.active.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all").children(".ui-icon").removeClass(d.icons.headerSelected).addClass(d.icons.header);if(!b){a.removeClass("ui-state-default ui-corner-all").addClass("ui-state-active ui-corner-top").children(".ui-icon").removeClass(d.icons.header).addClass(d.icons.headerSelected);
+a.next().addClass("ui-accordion-content-active")}h=a.next();f=this.active.next();g={options:d,newHeader:b&&d.collapsible?c([]):a,oldHeader:this.active,newContent:b&&d.collapsible?c([]):h,oldContent:f};d=this.headers.index(this.active[0])>this.headers.index(a[0]);this.active=b?c([]):a;this._toggle(h,f,g,b,d)}}else if(d.collapsible){this.active.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all").children(".ui-icon").removeClass(d.icons.headerSelected).addClass(d.icons.header);
+this.active.next().addClass("ui-accordion-content-active");var f=this.active.next(),g={options:d,newHeader:c([]),oldHeader:d.active,newContent:c([]),oldContent:f},h=this.active=c([]);this._toggle(h,f,g)}},_toggle:function(a,b,d,f,g){var h=this,e=h.options;h.toShow=a;h.toHide=b;h.data=d;var j=function(){if(h)return h._completed.apply(h,arguments)};h._trigger("changestart",null,h.data);h.running=b.size()===0?a.size():b.size();if(e.animated){d={};d=e.collapsible&&f?{toShow:c([]),toHide:b,complete:j,
+down:g,autoHeight:e.autoHeight||e.fillSpace}:{toShow:a,toHide:b,complete:j,down:g,autoHeight:e.autoHeight||e.fillSpace};if(!e.proxied)e.proxied=e.animated;if(!e.proxiedDuration)e.proxiedDuration=e.duration;e.animated=c.isFunction(e.proxied)?e.proxied(d):e.proxied;e.duration=c.isFunction(e.proxiedDuration)?e.proxiedDuration(d):e.proxiedDuration;f=c.ui.accordion.animations;var i=e.duration,k=e.animated;if(k&&!f[k]&&!c.easing[k])k="slide";f[k]||(f[k]=function(l){this.slide(l,{easing:k,duration:i||700})});
+f[k](d)}else{if(e.collapsible&&f)a.toggle();else{b.hide();a.show()}j(true)}b.prev().attr({"aria-expanded":"false",tabIndex:-1}).blur();a.prev().attr({"aria-expanded":"true",tabIndex:0}).focus()},_completed:function(a){this.running=a?0:--this.running;if(!this.running){this.options.clearStyle&&this.toShow.add(this.toHide).css({height:"",overflow:""});this.toHide.removeClass("ui-accordion-content-active");this._trigger("change",null,this.data)}}});c.extend(c.ui.accordion,{version:"1.8.5",animations:{slide:function(a,
+b){a=c.extend({easing:"swing",duration:300},a,b);if(a.toHide.size())if(a.toShow.size()){var d=a.toShow.css("overflow"),f=0,g={},h={},e;b=a.toShow;e=b[0].style.width;b.width(parseInt(b.parent().width(),10)-parseInt(b.css("paddingLeft"),10)-parseInt(b.css("paddingRight"),10)-(parseInt(b.css("borderLeftWidth"),10)||0)-(parseInt(b.css("borderRightWidth"),10)||0));c.each(["height","paddingTop","paddingBottom"],function(j,i){h[i]="hide";j=(""+c.css(a.toShow[0],i)).match(/^([\d+-.]+)(.*)$/);g[i]={value:j[1],
+unit:j[2]||"px"}});a.toShow.css({height:0,overflow:"hidden"}).show();a.toHide.filter(":hidden").each(a.complete).end().filter(":visible").animate(h,{step:function(j,i){if(i.prop=="height")f=i.end-i.start===0?0:(i.now-i.start)/(i.end-i.start);a.toShow[0].style[i.prop]=f*g[i.prop].value+g[i.prop].unit},duration:a.duration,easing:a.easing,complete:function(){a.autoHeight||a.toShow.css("height","");a.toShow.css({width:e,overflow:d});a.complete()}})}else a.toHide.animate({height:"hide",paddingTop:"hide",
+paddingBottom:"hide"},a);else a.toShow.animate({height:"show",paddingTop:"show",paddingBottom:"show"},a)},bounceslide:function(a){this.slide(a,{easing:a.down?"easeOutBounce":"swing",duration:a.down?1E3:200})}}})})(jQuery);
+;/*
  * jQuery UI Autocomplete 1.8.4
  *
  * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
@@ -191,4 +221,4 @@ c=this._daylightSavingAdjust(new Date(c,e+(b<0?b:f[0]*f[1]),1));b<0&&c.setDate(t
 "dayNamesShort"),dayNames:this._get(a,"dayNames"),monthNamesShort:this._get(a,"monthNamesShort"),monthNames:this._get(a,"monthNames")}},_formatDate:function(a,b,c,e){if(!b){a.currentDay=a.selectedDay;a.currentMonth=a.selectedMonth;a.currentYear=a.selectedYear}b=b?typeof b=="object"?b:this._daylightSavingAdjust(new Date(e,c,b)):this._daylightSavingAdjust(new Date(a.currentYear,a.currentMonth,a.currentDay));return this.formatDate(this._get(a,"dateFormat"),b,this._getFormatConfig(a))}});d.fn.datepicker=
 function(a){if(!d.datepicker.initialized){d(document).mousedown(d.datepicker._checkExternalClick).find("body").append(d.datepicker.dpDiv);d.datepicker.initialized=true}var b=Array.prototype.slice.call(arguments,1);if(typeof a=="string"&&(a=="isDisabled"||a=="getDate"||a=="widget"))return d.datepicker["_"+a+"Datepicker"].apply(d.datepicker,[this[0]].concat(b));if(a=="option"&&arguments.length==2&&typeof arguments[1]=="string")return d.datepicker["_"+a+"Datepicker"].apply(d.datepicker,[this[0]].concat(b));
 return this.each(function(){typeof a=="string"?d.datepicker["_"+a+"Datepicker"].apply(d.datepicker,[this].concat(b)):d.datepicker._attachDatepicker(this,a)})};d.datepicker=new L;d.datepicker.initialized=false;d.datepicker.uuid=(new Date).getTime();d.datepicker.version="1.8.4";window["DP_jQuery_"+y]=d})(jQuery);
-;
\ No newline at end of file
+;
diff --git a/share/html/Ticket/Elements/ShowRequestor b/share/html/Ticket/Elements/ShowRequestor
index 1cbff9b..c20c92c 100755
--- a/share/html/Ticket/Elements/ShowRequestor
+++ b/share/html/Ticket/Elements/ShowRequestor
@@ -45,31 +45,37 @@
 %# those contributions and any derivatives thereof.
 %#
 %# END BPS TAGGED BLOCK }}}
-% if ($ShowTickets) {
 <script type="text/javascript">
     jQuery(function() {
+        jQuery("#requestor-accordion").accordion({
+            active: <% $count == 1 ? 0 : 'false' %>,
+            collapsible: true,
+            autoHeight: false
+        });
+
+% if ($ShowTickets) {
         jQuery(".more-about-requestor-tickets").tabs({
             cache: true,
             collapsible: true,
             selected: <% $selected %>
         });
+% }
     });
 </script>
-% }
 
+<&| /Widgets/TitleBox,
+    title_raw => loc("More about the requestors"),
+    class => 'ticket-info-requestor'
+&>
+
+<div id="requestor-accordion">
 <%PERL>
-my $people = $Ticket->Requestors->UserMembersObj;
 while ( my $requestor = $people->Next ) {
-    next if !$show_privileged && $requestor->Privileged;
     my $name = $m->scomp('/Elements/ShowUser', User => $requestor);
-
 </%PERL>
 
-<&| /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),
-    class => 'ticket-info-requestor'
-&>
+  <h3><a href="#"><% $name %></a></h3>
+  <div class="details">
 
 %# Additional information about this user.  Empty by default.
 % $m->callback( requestor => $requestor, %ARGS, CallbackName => 'AboutThisUser' );
@@ -115,8 +121,9 @@ while ( my $requestor = $people->Next ) {
 
 % if ( $ShowGroups ) {
 <div class="more-about-user-groups">
-  <span class="label"><&|/l&>Groups this user belongs to</&>:</span>
   <span class="label">
+    <&|/l&>Groups this user belongs to</&>
+    
 % if ( $session{CurrentUser}->HasRight( Right => 'AdminUsers', Object => $RT::System ) &&
 %      $session{CurrentUser}->HasRight( Right => 'ShowConfigTab', Object =>$RT::System ) ) {
   [<a href=<% RT->Config->Get('WebPath') . '/Admin/Users/Memberships.html?id=' . $requestor->id %> ><&|/l&>Edit</&></a>]
@@ -125,10 +132,27 @@ while ( my $requestor = $people->Next ) {
   <span class="value"><& /Elements/ShowMemberships, UserObj => $requestor, Limit => RT->Config->Get('MoreAboutRequestorGroupsLimit') &></span>
 </div>
 % }
-</&>
 
+% if ( $has_right_adminusers ) {
+    <a class="modify-user" href="<% RT->Config->Get('WebPath')."/Admin/Users/Modify.html?id=".$requestor->id %>">Modify this user</a>
+% }
+
+%# end of individual requestor details <div>
+  </div>
 % }
+%# end of requestors loop
+
+</div>
+</&>
 <%INIT>
+my $show_privileged = RT->Config->Get('ShowMoreAboutPrivilegedUsers');
+
+my $people = $Ticket->Requestors->UserMembersObj;
+$people->LimitToUnprivileged unless $show_privileged;
+
+my $count = $people->Count;
+return unless $count;
+
 my $has_right_adminusers = $session{'CurrentUser'}->HasRight(
     Object => $RT::System, Right => 'AdminUsers'
 );
@@ -136,8 +160,6 @@ $has_right_adminusers &&= $session{'CurrentUser'}->HasRight(
     Object => $RT::System, Right => 'ShowConfigTab'
 );
 
-my $show_privileged = RT->Config->Get('ShowMoreAboutPrivilegedUsers');
-
 # Ticket list tabs
 my $selected = -1;
 $DefaultTicketsTab ||= RT->Config->Get('MoreAboutRequestorTicketList', $session{CurrentUser}) || 'Active';

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


More information about the Rt-commit mailing list