[Rt-commit] rt branch, admin_ui, updated. 0a6e0da1124734384b4b075f28fde0f8bb7807dd

sunnavy at bestpractical.com sunnavy at bestpractical.com
Thu Jan 21 08:53:00 EST 2010


The branch, admin_ui has been updated
       via  0a6e0da1124734384b4b075f28fde0f8bb7807dd (commit)
      from  732b91dfab0b4f3b66710af82d6f4b0776324de5 (commit)

Summary of changes:
 share/html/Prefs/MyRT.html          |  156 ------------------
 share/html/Prefs/Other.html         |   93 -----------
 share/html/Prefs/Quicksearch.html   |   98 ------------
 share/html/Prefs/Search.html        |  111 -------------
 share/html/Prefs/SearchOptions.html |  111 -------------
 share/html/User/Prefs.html          |  297 -----------------------------------
 6 files changed, 0 insertions(+), 866 deletions(-)
 delete mode 100644 share/html/Prefs/MyRT.html
 delete mode 100644 share/html/Prefs/Other.html
 delete mode 100644 share/html/Prefs/Quicksearch.html
 delete mode 100644 share/html/Prefs/Search.html
 delete mode 100644 share/html/Prefs/SearchOptions.html
 delete mode 100755 share/html/User/Prefs.html

- Log -----------------------------------------------------------------
commit 0a6e0da1124734384b4b075f28fde0f8bb7807dd
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Thu Jan 21 21:52:51 2010 +0800

    remove /Prefs and /User/

diff --git a/share/html/Prefs/MyRT.html b/share/html/Prefs/MyRT.html
deleted file mode 100644
index 7c72810..0000000
--- a/share/html/Prefs/MyRT.html
+++ /dev/null
@@ -1,156 +0,0 @@
-%# BEGIN BPS TAGGED BLOCK {{{
-%# 
-%# COPYRIGHT:
-%# 
-%# This software is Copyright (c) 1996-2008 Best Practical Solutions, LLC
-%#                                          <jesse at bestpractical.com>
-%# 
-%# (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/licenses/old-licenses/gpl-2.0.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 }}}
-<&| /_elements/wrapper, title => $title &>
-<& /Elements/Tabs,
-    current_tab => 'Prefs/MyRT.html',
-    title => $title,
-    searches => \@sys_searches
-&>
-<& /Elements/ListActions, actions => \@results &>
-
-<form method="post" action="MyRT.html">
-<input type="hidden" name="reset" value="1" />
-<input type="submit" class="button" value="<% _('Reset to default') %>">
-</form>
-
-<br />
-
-% for my $pane ( @panes ) {
-<&|/Widgets/TitleBox,
-    title => _('RT at a glance') .': '. _( $pane->{name} ),
-    bodyclass => ""
-&>
-<& /Widgets/SelectionBox:show, self => $pane, nojs => 1 &>
-</&>
-% }
-
-<&|/Widgets/TitleBox, title => _('Options'), bodyclass => "" &>
-<form method="post" action="MyRT.html">
-<&|/l&>Rows per box</&>:
-<input name="summary_rows" value="<% $ARGS{summary_rows} %>" />
-<input type="submit" class="button" name="update_summary_rows" value="<% _('Save') %>" />
-</form>
-</&>
-
-</&>
-<%INIT>
-my @results;
-my $title = _("Customize").' '._("RT at a glance");
-my $user = Jifty->web->current_user->user_object;
-
-if ( $ARGS{'update_summary_rows'} ) {
-    unless ( $ARGS{summary_rows} && int $ARGS{summary_rows} > 0 ) {
-        push @results, _("Illegal '%1' preference value.", _('summary rows'));
-        $ARGS{summary_rows} = 0;
-    }
-    else {
-        my ($ok, $msg) = $user->set_preferences( 'SummaryRows', int $ARGS{summary_rows} );
-        push @results, $ok ? _('Preferences saved for %1.', _('summary rows')) : $msg;
-    }
-}
-$ARGS{'summary_rows'} ||= $user->preferences('SummaryRows', RT->config->get('default_summary_rows'));
-
-if ($ARGS{reset}) {
-    my ($ok, $msg) = $user->set_preferences('HomepageSettings', {});
-    push @results, $ok ? _('Preferences saved.') : $msg;
-    Jifty->web->session->remove('my_rt_portlets');
-}
-
-unless (Jifty->web->session->get('my_rt_portlets')) {
-    my ($default_portlets) = RT::System->new()->attributes->named('HomepageSettings');
-    my $portlets = $default_portlets ? $default_portlets->content : {};
-    Jifty->web->session->set('my_rt_portlets', $user->preferences('HomepageSettings', $portlets) );
-}
-my $portlets = Jifty->web->session->get('my_rt_portlets');
-
-my %seen;
-my @items = map ["component-$_", $_], grep !$seen{$_}++, @{RT->config->get('homepage_components')};
-
-my $sys = RT::System->new();
-my @objs = ($sys);
-
-push @objs, RT::SavedSearches->new()->_privacy_objects
-    if Jifty->web->current_user->has_right( right  => 'LoadSavedSearch',
-                                          object => RT->system );
-
-my @sys_searches;
-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];
-            push @sys_searches, [$desc, $search];
-        }
-        else {
-            my $oid = ref($object).'-'.$object->id.'-SavedSearch-'.$search->id;
-            my $type = ($SearchType eq 'Ticket')
-                ? 'Saved Search' : $SearchType; # loc
-            push @items, ["saved-$oid", _($type).": $desc"];
-        }
-    }
-}
-
-my @panes = $m->comp(
-    '/Admin/Elements/ConfigureMyRT',
-    panes  => ['body', 'summary'],
-    action => 'MyRT.html',
-    items => \@items,
-    current_portlets => $portlets,
-    on_save => sub  {
-        my ( $conf, $pane ) = @_;
-        my ($ok, $msg) = $user->set_preferences( 'HomepageSettings', $conf );
-        push @results, $ok ? _('Preferences saved for %1.', $pane) : $msg;
-        Jifty->web->session->remove('my_rt_portlets');
-    }
-);
-
-$m->comp( '/Widgets/SelectionBox:process', %ARGS, self => $_, nojs => 1 )
-    for @panes;
-
-</%INIT>
diff --git a/share/html/Prefs/Other.html b/share/html/Prefs/Other.html
deleted file mode 100644
index b3421a7..0000000
--- a/share/html/Prefs/Other.html
+++ /dev/null
@@ -1,93 +0,0 @@
-%# BEGIN BPS TAGGED BLOCK {{{
-%# 
-%# COPYRIGHT:
-%# 
-%# This software is Copyright (c) 1996-2008 Best Practical Solutions, LLC
-%#                                          <jesse at bestpractical.com>
-%# 
-%# (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/licenses/old-licenses/gpl-2.0.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 }}}
-<&| /_elements/wrapper, title => $title &>
-<& /Elements/Tabs,
-    current_tab => 'Prefs/Other.html',
-    title => $title,
-&>
-<& /Elements/ListActions, actions => \@results &>
-
-<% Jifty->web->form->start %>
-% for my $section ( keys %fields ) {
-<h2><% $section %></h2>
-% for my $field ( @{$fields{$section}} ) {
-<% $action->form_field( $field ) %>
-% }
-% }
-<% Jifty->web->form->submit( label => _('Save Changes') ) %>
-<% Jifty->web->form->end %>
-
-<form method="post" action="Other.html">
-% if ( RT->config->get('gnupg')->{'enable'} ) {
-<&|/Widgets/TitleBox, title => _( 'Cryptography' ) &>
-<&|/l&>Preferred key</&>: <& /Elements/GnuPG/SelectKeyForEncryption, email => $user_object->email, default => $user_object->preferred_key &>
-</&>
-% }
-
-<& /Elements/Submit, name => 'update', label => _('Save Changes') &>
-</form>
-</&>
-<%INIT>
-my @results;
-my $title = _("Settings");
-my $action = Jifty->web->new_action( class => 'UserSettings' );
-my %fields = RT::Action::UserSettings->fields;
-
-my $user_object = Jifty->web->current_user->user_object;
-
-if ((defined $preferred_key) && $preferred_key ne $user_object->first_attribute('preferred_key')) {
-    my ($code, $msg) = $user_object->set_attribute(name => 'preferred_key', content => $preferred_key);
-    push @results, _('Preferred Key: %1', _($msg));
-}
-
-</%INIT>
-<%ARGS>
-$update => 0,
-$user   => undef,
-$preferred_key => undef,
-</%ARGS>
diff --git a/share/html/Prefs/Quicksearch.html b/share/html/Prefs/Quicksearch.html
deleted file mode 100644
index 8298067..0000000
--- a/share/html/Prefs/Quicksearch.html
+++ /dev/null
@@ -1,98 +0,0 @@
-%# BEGIN BPS TAGGED BLOCK {{{
-%# 
-%# COPYRIGHT:
-%# 
-%# This software is Copyright (c) 1996-2008 Best Practical Solutions, LLC
-%#                                          <jesse at bestpractical.com>
-%# 
-%# (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/licenses/old-licenses/gpl-2.0.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 }}}
-<&| /_elements/wrapper, title => $title &>
-<& /Elements/Tabs,
-    current_tab => 'Prefs/MyRT.html',
-    current_subtab => 'Prefs/Quicksearch.html',
-    title => $title
-&>
-<& /Elements/ListActions, actions => \@actions &>
-<h1><&|/l&>Select queues to be displayed on the "RT at a glance" page</&></h1>
-<form method="post" action="Quicksearch.html" name="preferences">
-<ul>
-% for my $queue (@queues) {
-<li><input type="checkbox" class="checkbox" name="Want-<%$queue->name%>" value="1"
-% unless ($unwanted->{$queue->name}) {
-checked="checked"
-% }
-/><%$queue->name%>: <%$queue->description%></li>
-% }
-</ul>
-<& /Elements/Submit, caption => _("Save Changes"), label => _('Save'), name => 'save'&>
-
-</form>
-
-</&>
-<%INIT>
-my @actions;
-my $title = _("Customize").' '._("Quick search");
-# The queue list is not loaded from cache, so it might be a bit inconsistent
-my $user = Jifty->web->current_user->user_object;
-my $unwanted = $user->preferences('QuickSearch', {});
-my $Queues = RT::Model::QueueCollection->new( current_user => Jifty->web->current_user );
-$Queues->find_all_rows;
-my @queues = grep {$_->current_user_has_right('ShowTicket')} @{$Queues->items_array_ref};
-
-if ($ARGS{'save'}) {
-    for my $queue (@queues) {
-        if ($ARGS{"Want-".$queue->name}) {
-	    delete $unwanted->{$queue->name};
-	}
-        else {
-	    ++$unwanted->{$queue->name};
-        }
-    }
-
-    my ($ok, $msg) = $user->set_preferences('QuickSearch', $unwanted);
-    push @actions, $ok ? _('Preferences saved.') : $msg;
-
-    # Let QueueSummary rebuild the cache
-    Jifty->web->session->remove('quick_search_queues');
-}
-
-</%INIT>
diff --git a/share/html/Prefs/Search.html b/share/html/Prefs/Search.html
deleted file mode 100644
index f010026..0000000
--- a/share/html/Prefs/Search.html
+++ /dev/null
@@ -1,111 +0,0 @@
-%# BEGIN BPS TAGGED BLOCK {{{
-%# 
-%# COPYRIGHT:
-%# 
-%# This software is Copyright (c) 1996-2008 Best Practical Solutions, LLC
-%#                                          <jesse at bestpractical.com>
-%# 
-%# (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/licenses/old-licenses/gpl-2.0.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 }}}
-<&| /_elements/wrapper, title => $title &>
-<& /Elements/Tabs,
-    current_tab => 'Prefs/MyRT.html',
-#    current_subtab => 'Prefs/Search.html?name='.$m->comp('/Elements/QueryString', name => $ARGS{name}),
-    current_subtab => 'Prefs/Search.html?name='.$ARGS{name},
-    title => $title
-&>
-<& /Elements/ListActions, actions => \@actions &>
-% if (Jifty->web->current_user->has_right( object=> RT->system, right => 'SuperUser')) {
-<p>
-  <&|/l&>You can also edit the predefined search itself</&>:
-  <a href="<% RT->config->get('web_path').'/Search/Build.html?'.
-	  $m->comp('/Elements/QueryString',
-		   saved_search_load => 'RT::System-1-SavedSearch-'.$id) %>"><% $search->name %></a>
-</p>
-% }
-
-<form method="post" action="Search.html" name="build_query">
-<input type="hidden" name="name" value="<%$ARGS{name}%>" class="hidden" />
-<input type="hidden" name="format" value="<%$ARGS{format}%>" class="hidden" />
-
-<& /Search/Elements/DisplayOptions, %$SearchArg, %ARGS,
-   available_columns => $AvailableColumns, current_format => $current_format &>
-<& /Elements/Submit, caption => _("Save Changes"), label => _('Save'), name => 'save'&>
-
-</form>
-
-</&>
-<%INIT>
-my @actions;
-my $title = _("Customize").' ';
-
-my @fields = qw(format order order_by rows_per_page);
-$ARGS{name} ||= '';
-my ($class, $id) = ( $ARGS{name} =~ m/^(.*)-(\d+)$/ );
-
-abort('No search specified')
-    unless defined $class and $class eq 'RT::Model::Attribute';
-
-my $search = $class->new();
-$search->load_by_id ($id);
-$title .= _($search->description, _('"N"'));
-my $user = Jifty->web->current_user->user_object;
-my $SearchArg = $user->preferences($search, $search->content);
-$ARGS{order}       = (ref $ARGS{order}   ? join('|',grep {/\S/} @{$ARGS{order}})   : $ARGS{order});
-$ARGS{order_by}     = (ref $ARGS{order_by} ? join('|',grep {/\S/} @{$ARGS{order_by}}) : $ARGS{order_by});
-for (@fields) {
-    $ARGS{$_} = $SearchArg->{$_} unless defined $ARGS{$_};
-}
-$ARGS{'order'} = join '|', grep defined && /\S/, (ref $ARGS{'order'})? @{$ARGS{'order'}}: $ARGS{'order'};
-$ARGS{'order_by'} = join '|', grep defined && /\S/, (ref $ARGS{'order_by'})? @{$ARGS{'order_by'}}: $ARGS{'order_by'};
-
-my ( $AvailableColumns, $current_format );
-( $ARGS{format}, $AvailableColumns, $current_format ) = RT::Interface::Web::QueryBuilder->build_format_string(
-    queues => {}, %ARGS
-);
-
-if ($ARGS{'save'}) {
-    my $hash = {map { $_ => $ARGS{$_}} @fields};
-    my ($ok, $msg) = $user->set_preferences($search, $hash);
-    push @actions, $ok ? _('Preferences saved.') : $msg;
-}
-
-</%INIT>
diff --git a/share/html/Prefs/SearchOptions.html b/share/html/Prefs/SearchOptions.html
deleted file mode 100644
index 913fa9d..0000000
--- a/share/html/Prefs/SearchOptions.html
+++ /dev/null
@@ -1,111 +0,0 @@
-%# BEGIN BPS TAGGED BLOCK {{{
-%# 
-%# COPYRIGHT:
-%# 
-%# This software is Copyright (c) 1996-2008 Best Practical Solutions, LLC
-%#                                          <jesse at bestpractical.com>
-%# 
-%# (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/licenses/old-licenses/gpl-2.0.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 }}}
-<&| /_elements/wrapper, title => _("Search Preferences") &>
-<& /Elements/Tabs,
-    current_tab => "Prefs/SearchOptions.html",
-    title => _("Search Preferences")
-&>
-<& /Elements/ListActions, actions => \@actions &>
-
-<form method="post" action="SearchOptions.html">
-<input type="hidden" class="hidden" name="format" value="<%$format%>" />
-    <& /Search/Elements/DisplayOptions, %ARGS, 
-            format=> $format, 
-            available_columns => $AvailableColumns,  
-            current_format => $current_format, 
-            rows_per_page => $rows_per_page, 
-            order_by => $order_by, 
-            order => $order &>
-
-<& /Elements/Submit, name => 'save_preferences', label => _('Save Changes') &>
-</form>
-</&>
-<%INIT>
-my @actions;
-
-# {{{ If we're saving search preferences, do that now
-$order = join '|', grep defined && /\S/, (ref $order)? @{$order}: $order;
-$order_by = join '|', grep defined && /\S/, (ref $order_by)? @{$order_by}: $order_by;
-
-$order       = (ref $order   ? join('|',grep {/\S/} @{$order})   : $order);
-$order_by     = (ref $order_by ? join('|',grep {/\S/} @{$order_by}) : $order_by);
-if ($ARGS{'save_preferences'}) {
-    my ($ok, $msg) = Jifty->web->current_user->user_object->set_preferences("SearchDisplay",
-    {
-       format      => $format,
-       order       => $order,
-       order_by     => $order_by,
-       rows_per_page => $rows_per_page,
-    });
-    push @actions, $ok ? _("Preferences saved.") : $msg;
-}
-
-# }}}
-
-# Read from user preferences
-my $prefs = Jifty->web->current_user->user_object->preferences("SearchDisplay") || {};
-
-$format      ||= $prefs->{'format'};
-$order       ||= ($prefs->{'order'} || 'ASC');
-$order_by     ||= ($prefs->{'order_by'} || 'id');
-($rows_per_page =  defined( $prefs->{'rows_per_page'} ) ? $prefs->{'rows_per_page'}  : 50) unless defined ($rows_per_page);
-
-my ( $AvailableColumns, $current_format );
-( $format, $AvailableColumns, $current_format ) = RT::Interface::Web::QueryBuilder->build_format_string(
-    %ARGS, format => $format
-);
-</%INIT>
-
-<%ARGS>
-$format => undef
-$description => undef
-$order => undef
-$order_by => undef
-$rows_per_page => undef
-</%ARGS>
-
diff --git a/share/html/User/Prefs.html b/share/html/User/Prefs.html
deleted file mode 100755
index 61a9c6f..0000000
--- a/share/html/User/Prefs.html
+++ /dev/null
@@ -1,297 +0,0 @@
-%# BEGIN BPS TAGGED BLOCK {{{
-%# 
-%# COPYRIGHT:
-%# 
-%# This software is Copyright (c) 1996-2008 Best Practical Solutions, LLC
-%#                                          <jesse at bestpractical.com>
-%# 
-%# (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/licenses/old-licenses/gpl-2.0.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 }}}
-<&| /_elements/wrapper, title=>_("Preferences") &>
-<& /Elements/Tabs,
-    current_tab => 'User/Prefs.html', 
-    title=>_("Preferences") &>
-
-<& /Elements/ListActions, actions => \@results &>
-
-<form action="<%RT->config->get('web_path')%>/User/Prefs.html" method="post">
-<input type="hidden" class="hidden" name="id" value="<%$user_object->id%>" />
-
-<table width="100%" border="0">
-<tr>
-
-<td valign="top" class="boxcontainer">
-<&| /Widgets/TitleBox, title => _('Identity'), id => "user-prefs-identity" &>
-
-<input type="hidden" class="hidden" name="name" value="<%$user_object->name%>" />
-<table cellspacing="0" cellpadding="0">
-  <tr>
-    <td class="label"><&|/l&>Email</&>: </td>
-    <td class="value"><input name="email" value="<%$user_object->email%>" /></td>
-  </tr>
-  <tr>
-    <td class="label"><&|/l&>Real name</&>:</td>
-    <td class="value"><input name="real_name" value="<%$user_object->real_name%>" /></td>  </tr>
-  <tr>
-    <td class="label"><&|/l&>nickname</&>:</td>
-    <td class="value"><input name="nickname" value="<%$user_object->nickname || ''%>" /></td>
-  </tr>
-  <tr>
-    <td class="label"><&|/l&>Language</&>:</td>
-    <td class="value"><& /Elements/SelectLang, name => 'lang', default => $user_object->lang &></td>
-  </tr>
-  <tr>
-    <td class="label"><&|/l&>Time Zone</&>:</td>
-    <td class="value"><& /Elements/SelectTimezone, name => 'time_zone', default => $user_object->time_zone &></td>
-  </tr>
-</table>
-</&>
-<&| /Widgets/TitleBox, title => _('Phone numbers'), id => "user-prefs-phone" &>
-<table cellspacing="0" cellpadding="0">
-  <tr>
-    <td class="label"><&|/l&>Residence</&>:</td>
-    <td class="value"><input name="home_phone" value="<%$user_object->home_phone || ''%>" size="13" /></td>
-  </tr>
-  <tr>
-    <td class="label"><&|/l&>Work</&>:</td>
-    <td class="value"><input name="work_phone" value="<%$user_object->work_phone || ''%>" size="13" /></td>
-  </tr>
-  <tr>
-    <td class="label"><&|/l&>Mobile</&>:</td>
-    <td class="value"><input name="mobile_phone" value="<%$user_object->mobile_phone || ''%>" size="13" /></td>
-  </tr>
-  <tr>
-    <td class="label"><&|/l&>Pager</&>:</td>
-    <td class="value"><input name="pager_phone" value="<%$user_object->pager_phone || ''%>" size="13" /></td>
-  </tr>
-</table>
-</&>
-% $m->callback( %ARGS, user_object => $user_object, callback_name => 'FormLeftColumn' );
-</td>
-<td valign="top" class="boxcontainer">
-% unless (RT->config->get('web_external_auth') and !RT->config->get('web_fallback_to_internal_auth')) {
-<&| /Widgets/TitleBox, title => _('password'), id => "user-prefs-password" &>
-<table>
-<tr>
-<td class="label">
-<&|/l&>New password</&>:
-</td>
-<td class="value">
-<input type="password" name="pass1" autocomplete="off"/>
-</td>
-</tr>
-<tr><td class="label">
-<&|/l&>Retype password</&>:
-</td>
-<td class="value">
-<input type="password" name="pass2" autocomplete="off" />
-</td>
-</tr>
-</table>
-</&>
-% }
-
-<&| /Widgets/TitleBox, title => _('Location'), id => "user-prefs-location" &>
-<table cellspacing="0" cellpadding="0">
-  <tr>
-    <td class="label"><&|/l&>organization</&>:</td>
-    <td class="value"><input name="organization" value="<%$user_object->organization || ''%>" /></td>
-  </tr>
-  <tr>
-    <td class="label"><&|/l&>Address1</&>:</td>
-    <td class="value"><input name="address1" value="<%$user_object->address1 || ''%>" /></td>
-  </tr>
-  <tr>
-    <td class="label"><&|/l&>Address2</&>:</td>
-    <td class="value"><input name="address2" value="<%$user_object->address2 || ''%>" /></td>
-  </tr>
-  <tr>
-    <td class="label"><&|/l&>City</&>:</td>
-    <td><input name="city" value="<%$user_object->city || ''%>" size="14" /></td>
-  </tr>
-  <tr>
-    <td class="label"><&|/l&>State</&>:</td>
-    <td class="value"><input name="state" value="<%$user_object->state || ''%>" size="3" /></td>
-  </tr>
-  <tr>
-    <td class="label"><&|/l&>Zip</&>:</td>
-    <td class="value"><input name="zip" value="<%$user_object->zip || ''%>" size="9" /></td>
-  </tr>
-  <tr>
-    <td class="label"><&|/l&>Country</&>:</td>
-    <td class="value"><input name="country" value="<%$user_object->country || ''%>" /></td>
-  </tr>
-</table>
-</&>
-% $m->callback( %ARGS, user_object => $user_object, callback_name => 'FormRightColumn' );
-</td>
-</tr>
-
-
-<tr><td colspan="2" valign="top" class="boxcontainer">
-%if ($user_object->privileged) {
-<br />
-<&| /Widgets/TitleBox, title => _('Signature') &>
-<textarea cols="80" rows="5" name="signature" class="signature" wrap="hard">
-<%$user_object->signature || ''%></textarea>
-</&>
-% }
-</td></tr>
-
-<tr><td colspan="2" valign="top" class="boxcontainer">
-<&| /Widgets/TitleBox, title => _('Secret authentication token'), id => "user-prefs-feeds" &>
-
-<&|/l&><p>All iCal feeds embed a secret token which authorizes you.  If the URL one of your iCal feeds got exposed to the outside world, you can get a new secret, <b>breaking all existing iCal feeds</b> below.</p></&>
-
-<& /Elements/Submit, label => _('Reset secret authentication token'), name => "reset_auth_token" &>
-</&>
-</td></tr>
-
-</table>
-
-% $m->callback( %ARGS, user_object => $user_object, callback_name => 'FormEnd' );
-
-<& /Elements/Submit, label => _('Save Preferences') &>
-</form>
-
-
-</&>
-<%INIT>
-
-my $user_object = RT::Model::User->new( current_user => Jifty->web->current_user );
-my ($title, $privilegedChecked, $enabled_checked, $disabled, $result, @results);
-
-my ($val, $msg);
-
-
-	$user_object->load($id) || $user_object->load($name) || abort("Couldn't load user '$name'");
-	$val = $user_object->id();
-    
-
-
-
-
-
-# If we have a user to modify, lets try. 
-if ($user_object->id) {
-    
-    my @fields = qw(name comments Signature email freeform_contact_info 
-		    organization real_name nickname lang email_encoding web_encoding 
-		    ExternalContactInfoId ContactInfoSystem gecos ExternalAuthId 
-		    auth_system HomePhone WorkPhone MobilePhone PagerPhone Address1
-		Address2 City State Zip Country lang time_zone
-		   );
-
-    $m->callback(
-        callback_name => 'UpdateLogic',
-        fields       => \@fields,
-        results      => \@results,
-        user_object      => $user_object,
-        args_ref      => \%ARGS,
-    );
-    
-    my @fieldresults = update_record_object ( attributes_ref => \@fields,
-					    object => $user_object,
-					    args_ref => \%ARGS );
-    push (@results, at fieldresults);
-
-
-# Deal with special fields: privileged, enabled, and Password
-if  ( ($set_privileged) and ( $privileged != $user_object->privileged) ) {
-my  ($code, $msg) = $user_object->set_privileged($privileged);
-     push @results, _('privileged status: %1', _($msg));
-}
-
-#TODO: make this report errors properly
-if ((defined $pass1) and ($pass1 ne '') and ($pass1 eq $pass2) and (!$user_object->password_is($pass1))) {
-    my ($code, $msg);
-    ($code, $msg) = $user_object->set_password($pass1);
-    push @results, _('password: %1', _($msg));
-} elsif ( $pass1 && ($pass1 ne $pass2)) {
-    push @results, _("passwords do not match. Your password has not been changed");
-}
-
-    if ( $ARGS{'reset_auth_token'} ) {
-        my ($status, $msg) = $user_object->generate_auth_token;
-        push @results, $msg;
-    }
-}
-
-
-</%INIT>
-
-
-<%ARGS>
-$id => Jifty->web->current_user->id
-$name  => undef
-$comments  => undef
-$signature  => undef
-$email  => undef
-$freeform_contact_info => undef
-$organization  => undef
-$real_name  => undef
-$nickname  => undef
-$privileged => undef
-$set_privileged => undef
-$enabled => undef
-$set_enabled => undef
-$lang  => undef
-$email_encoding  => undef
-$web_encoding => undef
-$external_contact_info_id  => undef
-$contact_info_system  => undef
-$gecos => undef
-$external_auth_id  => undef
-$auth_system  => undef
-$home_phone => undef
-$work_phone  => undef
-$mobile_phone  => undef
-$pager_phone  => undef
-$address1 => undef
-$address2  => undef
-$city  => undef
-$state  => undef
-$zip  => undef
-$country => undef
-$pass1 => undef
-$pass2=> undef
-$create=> undef
-</%ARGS>

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


More information about the Rt-commit mailing list