From ef20b2b6b1feb47ad02b5ff7525f1a0fd11d0fa4 Mon Sep 17 00:00:00 2001 From: ivan Date: Thu, 2 Aug 2007 19:56:20 +0000 Subject: import rt 3.6.4 --- rt/html/Admin/Users/CustomFields.html | 6 +- rt/html/Admin/Users/History.html | 8 +- rt/html/Admin/Users/Memberships.html | 6 +- rt/html/Admin/Users/Modify.html | 302 ++++++++++++++++++---------------- rt/html/Admin/Users/MyRT.html | 132 +++++++++++++++ rt/html/Admin/Users/index.html | 28 ++-- 6 files changed, 316 insertions(+), 166 deletions(-) create mode 100644 rt/html/Admin/Users/MyRT.html (limited to 'rt/html/Admin/Users') diff --git a/rt/html/Admin/Users/CustomFields.html b/rt/html/Admin/Users/CustomFields.html index 5662c6c16..1455c1de6 100644 --- a/rt/html/Admin/Users/CustomFields.html +++ b/rt/html/Admin/Users/CustomFields.html @@ -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: diff --git a/rt/html/Admin/Users/History.html b/rt/html/Admin/Users/History.html index 024a90b00..e47f67e78 100644 --- a/rt/html/Admin/Users/History.html +++ b/rt/html/Admin/Users/History.html @@ -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: @@ -52,7 +54,7 @@ <& /Ticket/Elements/ShowHistory, Ticket => $UserObj, - ShowHeaderModes => 0, + ShowDisplayModes => 0, &> <%INIT> diff --git a/rt/html/Admin/Users/Memberships.html b/rt/html/Admin/Users/Memberships.html index 3e632393f..493cb0f12 100644 --- a/rt/html/Admin/Users/Memberships.html +++ b/rt/html/Admin/Users/Memberships.html @@ -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: diff --git a/rt/html/Admin/Users/Modify.html b/rt/html/Admin/Users/Modify.html index 8a24f9c4a..9198cbe78 100644 --- a/rt/html/Admin/Users/Modify.html +++ b/rt/html/Admin/Users/Modify.html @@ -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: @@ -52,188 +54,189 @@ <& /Elements/ListActions, actions => \@results &> -
+ %if ($Create) { - + % } else { - + % } - - +
+ - + + - + - -
-<& /Elements/TitleBoxStart, title => loc('Identity') &> + +<&| /Widgets/TitleBox, title => loc('Identity') &> - - +
+ + - + - + - + - + - + - + -
<&|/l&>Username: - - <&|/l&>(required) -
+ + <&|/l&>(required) +
<&|/l&>Email: - - -
+ + +
<&|/l&>Real Name: - - -
+ + +
<&|/l&>Nickname: - - -
+ + +
<&|/l&>Unix login: - - -
+ + +
<&|/l&>Language: - + <& /Elements/SelectLang, Name => 'Lang', Default => $UserObj->Lang &> -
+
<&|/l&>Extra info: - - -
-<& /Elements/TitleBoxEnd &> -
-<& /Elements/TitleBoxStart, title => loc('Access control') &> - -> -<&|/l&>Let this user access RT
- - - -> <&|/l&>Let this user be granted rights
+
+ +
+ +
+<&| /Widgets/TitleBox, title => loc('Access control') &> + + /> +<&|/l&>Let this user access RT
+ + + + /> <&|/l&>Let this user be granted rights
% unless ($RT::WebExternalAuth and !$RT::WebFallbackToInternalAuth) { - - - + + +
+ + + - - - + + + - - -
<&|/l&>New Password: - - -
+ + +
<&|/l&>Retype Password: - - -
+
+ +
% } -<& /Elements/TitleBoxEnd &> -
-<& /Elements/TitleBoxStart, title => loc('Location') &> - - - + +
+ +<&| /Widgets/TitleBox, title => loc('Location') &> + + - + - + - + - + - + - + -
<&|/l&>Organization: - - -
+ + +
<&|/l&>Address1: - - -
+ + +
<&|/l&>Address2: - - -
+ + +
<&|/l&>City: - - + + -
+
<&|/l&>State: - - + + -
+
<&|/l&>Zip: - - -
+ + +
<&|/l&>Country: - - -
-<& /Elements/TitleBoxEnd &> -
-<& /Elements/TitleBoxStart, title => loc('Phone numbers') &> - - +
+ + +
+ +
+<&| /Widgets/TitleBox, title => loc('Phone numbers') &> + + - + - + - + - - - -
<&|/l&>Residence: - -
-
+ +
+
<&|/l&>Work: - -
-
+ +
+
<&|/l&>Mobile: - -
-
+ +
+
<&|/l&>Pager: - -
-<& /Elements/TitleBoxEnd &> -
-
-<& /Elements/TitleBoxStart, title => loc('Custom Fields') &> - + +
+
+
+ +
+<&| /Widgets/TitleBox, title => loc('Custom Fields') &> + % my $CFs = $UserObj->CustomFields; % while (my $CF = $CFs->Next) { - +% } else { +<& /Elements/EditCustomField, %ARGS, NamePrefix => 'Object-RT::User-new-CustomField-', CustomField => $CF &> +% } + % } - - -
+
<% $CF->Name %>: - + +% if ($UserObj->id) { <& /Elements/EditCustomField, %ARGS, Object => $UserObj, CustomField => $CF &> -
-<& /Elements/TitleBoxEnd &> -
-<& /Elements/TitleBoxStart, title => loc('Comments about this user') &> - -<& /Elements/TitleBoxEnd &> +
+ +
+<&| /Widgets/TitleBox, title => loc('Comments about this user') &> + + %if ($UserObj->Privileged) { -
-<& /Elements/TitleBoxStart, title => loc('Signature') &> - -<& /Elements/TitleBoxEnd &> +
+<&| /Widgets/TitleBox, title => loc('Signature') &> + + % } -
+ + + <& /Elements/Submit, Label => loc('Save Changes') &>
@@ -289,12 +292,19 @@ else { if ($val) { push @results, $msg; + foreach my $key ( keys %ARGS) { + # Convert custom fields on the "new" object to custom fields on the one we've just created + if ($key =~ /^Object-RT::User-new-CustomField-(.*)$/) { + $ARGS{'Object-RT::User-'.$val.'-CustomField-'.$1} = delete $ARGS{$key}; + } + } + push @results, ProcessObjectCustomFieldUpdates( ARGSRef => \%ARGS, Object => $UserObj ); } else { push @results, loc('User could not be created: [_1]', $msg); } } else { - $UserObj->Load($id) || $UserObj->Load($Name) || Abort("Couldn't load user '$Name'"); - $val = $UserObj->Id(); + $UserObj->Load($id) || $UserObj->Load($Name) || Abort("Couldn't load user '$Name'"); + $val = $UserObj->Id(); } if ($val) { diff --git a/rt/html/Admin/Users/MyRT.html b/rt/html/Admin/Users/MyRT.html new file mode 100644 index 000000000..6eed0ab68 --- /dev/null +++ b/rt/html/Admin/Users/MyRT.html @@ -0,0 +1,132 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC +%# +%# +%# (Except where explicitly superseded by other copyright notices) +%# +%# +%# LICENSE: +%# +%# This work is made available to you under the terms of Version 2 of +%# the GNU General Public License. A copy of that license should have +%# been provided with this software, but in any event can be snarfed +%# from www.gnu.org. +%# +%# This work is distributed in the hope that it will be useful, but +%# WITHOUT ANY WARRANTY; without even the implied warranty of +%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +%# General Public License for more details. +%# +%# 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., 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: +%# +%# (The following paragraph is not intended to limit the rights granted +%# to you to modify and distribute this software under the terms of +%# the GNU General Public License and is only of importance to you if +%# you choose to contribute your changes and enhancements to the +%# community by submitting them to Best Practical Solutions, LLC.) +%# +%# By intentionally submitting any modifications, corrections or +%# derivatives to this work, or any other work intended for use with +%# Request Tracker, to Best Practical Solutions, LLC, you confirm that +%# you are the copyright holder for those contributions and you grant +%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable, +%# royalty-free, perpetual, license to use, copy, create derivative +%# works based on those contributions, and sublicense and distribute +%# those contributions and any derivatives thereof. +%# +%# END BPS TAGGED BLOCK }}} +<& /Admin/Elements/Header, Title => $title &> +<& /Admin/Elements/UserTabs, + id => $id, + UserObj => $UserObj, + current_tab => $current_tab, + Title => $title &> + +<& /Widgets/SelectionBox:header, nojs => 1 &> + +<& /Elements/ListActions, actions => \@actions &> + +
+ + + +
+ +
+ +% for my $pane (@panes) { +<&|/Widgets/TitleBox, title => loc('RT at a glance').': '.loc($pane->{Name}), bodyclass => "" &> +<& /Widgets/SelectionBox:show, self => $pane, nojs => 1 &> +
+% } + +<%init> +my $current_tab = 'Admin/Users/MyRT.html?id='.$id; +my $UserObj = new RT::User($session{'CurrentUser'}); +$UserObj->Load($id) || Abort("Couldn't load user '$id'"); +my $title = loc("RT at a glance for the user [_1]", $UserObj->Name); + +if ($ARGS{Reset}) { + $UserObj->SetPreferences('HomepageSettings', {}); +} + +my ($default_portlets) = RT::System->new($session{'CurrentUser'})->Attributes->Named('HomepageSettings'); +my $portlets = $UserObj->Preferences('HomepageSettings', $default_portlets ? $default_portlets->Content : {}); + +my %allowed_components = map {$_ => 1} @{$RT::HomepageComponents}; +my @items; + +push @items, map {["component-$_", $_]} sort keys %allowed_components; + +my $sys = RT::System->new( RT::CurrentUser->new($UserObj) ); +my @objs = ($sys); + +push @objs, RT::SavedSearches->new( RT::CurrentUser->new( $UserObj ) )->_PrivacyObjects; +my @actions; + +for my $object (@objs) { + for ($m->comp("/Search/Elements/SearchesForObject", Object => $object)) { + my ($desc, $search) = @$_; + my $SearchType = $search->Content->{'SearchType'} || 'Ticket'; + if ($object eq $sys && $SearchType eq 'Ticket') { + push @items, ["system-$desc", $desc]; + } + else { + my $oid = ref($object).'-'.$object->Id.'-SavedSearch-'.$search->Id; + my $type = ($SearchType eq 'Ticket') + ? 'Saved Search' : $SearchType; # loc + push @items, ["saved-$oid", loc($type).": $desc"]; + } + } +} + +my @panes = $m->comp( + '/Admin/Elements/ConfigureMyRT', + panes => ['body', 'summary'], + Action => "MyRT.html?id=$id", + items => \@items, + current_portlets => $portlets, + OnSave => sub { + my ( $conf, $pane ) = @_; + $UserObj->SetPreferences( 'HomepageSettings', $conf ); + push @actions, loc( 'Preferences [_1] for user [_2] .', $pane, $UserObj->Name ); + } +); + +$m->comp( '/Widgets/SelectionBox:process', %ARGS, self => $_, nojs => 1 ) + for @panes; + + +<%ARGS> +$id => undef + diff --git a/rt/html/Admin/Users/index.html b/rt/html/Admin/Users/index.html index 1bbe867f7..bc47d4fef 100644 --- a/rt/html/Admin/Users/index.html +++ b/rt/html/Admin/Users/index.html @@ -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: @@ -52,26 +54,26 @@

<&|/l&>Select a user:

+ %if (my $ids = join(',', @ids)) { -(<&|/l&>Download as a tab-delimited file)
+(<&|/l&>Download as a tab-delimited file)
%} -

-
+

+ -<&|/l&>Find people whose <& /Elements/SelectUsers &>
- <&|/l&>Include disabled users in search. -
-
-
+<&|/l&>Find people whose <& /Elements/SelectUsers &>
+ <&|/l&>Include disabled users in search. +
+
+ <%INIT> my ($user, $caption); -- cgit v1.2.1