[Rt-commit] r7495 - in rtir/branches/2.3-EXPERIMENTAL: . html/RTIR
jesse at bestpractical.com
jesse at bestpractical.com
Thu Apr 12 04:42:21 EDT 2007
Author: jesse
Date: Thu Apr 12 04:42:20 2007
New Revision: 7495
Added:
rtir/branches/2.3-EXPERIMENTAL/html/RTIR/EditUsername
rtir/branches/2.3-EXPERIMENTAL/html/RTIR/ShowUser
Modified:
rtir/branches/2.3-EXPERIMENTAL/ (props changed)
rtir/branches/2.3-EXPERIMENTAL/html/RTIR/NoAuth/webrtir.css
rtir/branches/2.3-EXPERIMENTAL/html/RTIR/Update.html
Log:
r54791 at pinglin: jesse | 2007-04-12 04:41:30 -0400
* continued refactoring of "list of current recipients"
* Ability for staff with adminusers rights to edit user realnames from Update.html
Added: rtir/branches/2.3-EXPERIMENTAL/html/RTIR/EditUsername
==============================================================================
--- (empty file)
+++ rtir/branches/2.3-EXPERIMENTAL/html/RTIR/EditUsername Thu Apr 12 04:42:20 2007
@@ -0,0 +1,20 @@
+<span id="showuser-<%$User->id%>">
+% my $url = $RT::WebPath."/RTIR/ShowUser?page=1&id=".$User->id;
+<form method="get">
+<&|/l, $User->EmailAddress &>[_1]'s name</&>:
+<input type="text" id="edit-<%$User->id%>" value="<%$User->RealName%>"&>
+<input type="submit" value="<%loc('Save')%>"
+onClick="url = '<%$url|n%>'; url = url + '&Name='+ $('edit-<%$User->id%>').value; ahah(url, 'showuser-<%$User->id|n %>'); return false;"
+>
+[<a href="<%$url|n%>" onClick="ahah('<%$url|n%>', 'showuser-<%$User->id|n %>'); return false;" >Abort</a>]
+</form>
+</span>
+% $m->abort if ($ARGS{'page'});
+<%args>
+$id => undef
+</%args>
+<%init>
+my $User = RT::User->new($session{'CurrentUser'});
+$User->Load($id);
+
+</%init>
Modified: rtir/branches/2.3-EXPERIMENTAL/html/RTIR/NoAuth/webrtir.css
==============================================================================
--- rtir/branches/2.3-EXPERIMENTAL/html/RTIR/NoAuth/webrtir.css (original)
+++ rtir/branches/2.3-EXPERIMENTAL/html/RTIR/NoAuth/webrtir.css Thu Apr 12 04:42:20 2007
@@ -3,6 +3,25 @@
color: red;
}
+ul.userlist {
+ margin:0;
+ padding: 0;
+ border: 0;
+
+}
+ul.userlist li {
+ display: inline;
+}
+
+ul.userlist li::after{
+ content:", ";
+ white-space:pre;
+ }
+
+ul.userlist li:last-child::after{
+ content:"";
+ }
+
% $m->abort;
<%INIT>
$r->content_type('text/css');
Added: rtir/branches/2.3-EXPERIMENTAL/html/RTIR/ShowUser
==============================================================================
--- (empty file)
+++ rtir/branches/2.3-EXPERIMENTAL/html/RTIR/ShowUser Thu Apr 12 04:42:20 2007
@@ -0,0 +1,21 @@
+<span id="showuser-<%$User->id%>">
+% my $url = $RT::WebPath."/RTIR/EditUserName?page=1&id=".$User->id;
+<& /Elements/ShowUser, User => $User &>
+% if ( $session{'CurrentUser'}->HasRight(Right => 'AdminUsers', Object => $RT::System) ) {
+[<a href="<%$RT::WebPath%>/Admin/Users/Modify.html?id=<%$User->id%>"
+ onClick="ahah('<%$url|n%>', 'showuser-<%$User->id|n %>'); return false;"
+><&|/l&>Edit</&></a>]
+
+% }
+% $m->abort if ($ARGS{'page'});
+</span>
+<%args>
+$id => undef
+</%args>
+<%init>
+my $User = RT::User->new($session{'CurrentUser'});
+$User->Load($id);
+if ($ARGS{'Name'}) {
+ $User->SetRealName($ARGS{'Name'});
+}
+</%init>
Modified: rtir/branches/2.3-EXPERIMENTAL/html/RTIR/Update.html
==============================================================================
--- rtir/branches/2.3-EXPERIMENTAL/html/RTIR/Update.html (original)
+++ rtir/branches/2.3-EXPERIMENTAL/html/RTIR/Update.html Thu Apr 12 04:42:20 2007
@@ -54,11 +54,12 @@
% foreach my $type (qw(Requestors Cc AdminCc)) {
<tr><td> </td><td align="right" valign="top">
<%loc($type)%>:
-</td><td valign="top">
+</td><td valign="top" align="left">
<ul class="userlist">
% my $people = $Ticket->$type()->UserMembersObj;
% while (my $person = $people->Next) {
-<li><& /Elements/ShowUser, User => $person &></li>
+<li><& /RTIR/ShowUser, id => $person->id &>
+</li>
% }
</ul>
</td></tr>
More information about the Rt-commit
mailing list