summaryrefslogtreecommitdiff
path: root/rt/html
diff options
context:
space:
mode:
Diffstat (limited to 'rt/html')
-rw-r--r--rt/html/Admin/CustomFields/GroupRights.html170
-rw-r--r--rt/html/Admin/CustomFields/Modify.html212
-rw-r--r--rt/html/Admin/CustomFields/Objects.html145
-rw-r--r--rt/html/Admin/CustomFields/UserRights.html168
-rw-r--r--rt/html/Admin/CustomFields/index.html76
-rw-r--r--rt/html/Admin/Elements/AddCustomFieldValue12
-rw-r--r--rt/html/Admin/Elements/CreateUserCalled6
-rw-r--r--rt/html/Admin/Elements/CustomFieldTabs116
-rw-r--r--rt/html/Admin/Elements/EditCustomField6
-rw-r--r--rt/html/Admin/Elements/EditCustomFieldValues50
-rw-r--r--rt/html/Admin/Elements/EditCustomFields222
-rw-r--r--rt/html/Admin/Elements/EditQueueWatchers9
-rw-r--r--rt/html/Admin/Elements/EditScrip6
-rw-r--r--rt/html/Admin/Elements/EditScrips10
-rw-r--r--rt/html/Admin/Elements/EditTemplates8
-rw-r--r--rt/html/Admin/Elements/EditUserComments6
-rwxr-xr-xrt/html/Admin/Elements/GlobalCustomFieldTabs93
-rw-r--r--rt/html/Admin/Elements/GroupTabs10
-rw-r--r--rt/html/Admin/Elements/Header8
-rw-r--r--rt/html/Admin/Elements/ListGlobalCustomFields6
-rw-r--r--rt/html/Admin/Elements/ListGlobalScrips36
-rw-r--r--rt/html/Admin/Elements/ModifyTemplate6
-rw-r--r--rt/html/Admin/Elements/ObjectCustomFields109
-rw-r--r--rt/html/Admin/Elements/PickCustomFields96
-rw-r--r--rt/html/Admin/Elements/PickObjects80
-rw-r--r--rt/html/Admin/Elements/QueueRightsForUser8
-rw-r--r--rt/html/Admin/Elements/QueueTabs17
-rw-r--r--rt/html/Admin/Elements/SelectCustomFieldLookupType58
-rw-r--r--rt/html/Admin/Elements/SelectCustomFieldType12
-rw-r--r--rt/html/Admin/Elements/SelectGroups6
-rw-r--r--rt/html/Admin/Elements/SelectModifyGroup6
-rw-r--r--rt/html/Admin/Elements/SelectModifyQueue6
-rw-r--r--rt/html/Admin/Elements/SelectModifyUser6
-rw-r--r--rt/html/Admin/Elements/SelectNewGroupMembers6
-rw-r--r--rt/html/Admin/Elements/SelectRights19
-rw-r--r--rt/html/Admin/Elements/SelectScrip6
-rw-r--r--rt/html/Admin/Elements/SelectScripAction10
-rw-r--r--rt/html/Admin/Elements/SelectScripCondition10
-rw-r--r--rt/html/Admin/Elements/SelectSingleOrMultiple6
-rw-r--r--rt/html/Admin/Elements/SelectStage11
-rw-r--r--rt/html/Admin/Elements/SelectTemplate6
-rw-r--r--rt/html/Admin/Elements/SelectUsers6
-rw-r--r--rt/html/Admin/Elements/SystemTabs8
-rw-r--r--rt/html/Admin/Elements/Tabs13
-rwxr-xr-xrt/html/Admin/Elements/ToolTabs6
-rw-r--r--rt/html/Admin/Elements/UserTabs75
-rw-r--r--rt/html/Admin/Global/CustomField.html (renamed from rt/html/Elements/EditCustomFieldFreeform)58
-rw-r--r--rt/html/Admin/Global/CustomFields.html (renamed from rt/html/Admin/Groups/History.html)35
-rw-r--r--rt/html/Admin/Global/CustomFields/Groups.html11
-rwxr-xr-xrt/html/Admin/Global/CustomFields/Queue-Tickets.html11
-rwxr-xr-xrt/html/Admin/Global/CustomFields/Queue-Transactions.html11
-rw-r--r--rt/html/Admin/Global/CustomFields/Users.html11
-rw-r--r--rt/html/Admin/Global/CustomFields/index.html91
-rw-r--r--rt/html/Admin/Global/GroupRights.html6
-rw-r--r--rt/html/Admin/Global/Scrip.html6
-rw-r--r--rt/html/Admin/Global/Scrips.html6
-rw-r--r--rt/html/Admin/Global/Template.html6
-rw-r--r--rt/html/Admin/Global/Templates.html8
-rw-r--r--rt/html/Admin/Global/UserRights.html6
-rw-r--r--rt/html/Admin/Global/index.html10
-rw-r--r--rt/html/Admin/Groups/CustomFields.html46
-rw-r--r--rt/html/Admin/Groups/GroupRights.html6
-rw-r--r--rt/html/Admin/Groups/Members.html10
-rw-r--r--rt/html/Admin/Groups/Modify.html26
-rw-r--r--rt/html/Admin/Groups/UserRights.html6
-rw-r--r--rt/html/Admin/Groups/index.html54
-rw-r--r--rt/html/Admin/Queues/CustomField.html8
-rw-r--r--rt/html/Admin/Queues/CustomFields.html35
-rw-r--r--rt/html/Admin/Queues/GroupRights.html6
-rw-r--r--rt/html/Admin/Queues/Modify.html12
-rw-r--r--rt/html/Admin/Queues/People.html8
-rw-r--r--rt/html/Admin/Queues/Scrip.html6
-rw-r--r--rt/html/Admin/Queues/Scrips.html6
-rw-r--r--rt/html/Admin/Queues/Template.html6
-rw-r--r--rt/html/Admin/Queues/Templates.html6
-rw-r--r--rt/html/Admin/Queues/UserRights.html6
-rw-r--r--rt/html/Admin/Queues/index.html15
-rw-r--r--rt/html/Admin/Tools/Configuration.html8
-rw-r--r--rt/html/Admin/Tools/index.html6
-rw-r--r--rt/html/Admin/Users/CustomFields.html69
-rw-r--r--rt/html/Admin/Users/History.html66
-rw-r--r--rt/html/Admin/Users/Memberships.html65
-rw-r--r--rt/html/Admin/Users/Modify.html174
-rw-r--r--rt/html/Admin/Users/index.html54
-rw-r--r--rt/html/Admin/autohandler51
-rw-r--r--rt/html/Admin/index.html69
-rw-r--r--rt/html/Approvals/Display.html6
-rw-r--r--rt/html/Approvals/Elements/Approve6
-rw-r--r--rt/html/Approvals/Elements/PendingMyApproval6
-rw-r--r--rt/html/Approvals/Elements/ShowDependency6
-rw-r--r--rt/html/Approvals/Elements/Tabs6
-rw-r--r--rt/html/Approvals/index.html6
-rw-r--r--rt/html/Download/CustomFieldValue/dhandler75
-rw-r--r--rt/html/Download/Tabular/dhandler74
-rw-r--r--rt/html/Elements/BevelBoxRaisedEnd6
-rw-r--r--rt/html/Elements/BevelBoxRaisedStart6
-rw-r--r--rt/html/Elements/Callback56
-rw-r--r--rt/html/Elements/Checkbox8
-rw-r--r--rt/html/Elements/CollectionAsTable/Header100
-rw-r--r--rt/html/Elements/CollectionAsTable/ParseFormat59
-rw-r--r--rt/html/Elements/CollectionAsTable/Row99
-rw-r--r--rt/html/Elements/CreateTicket8
-rw-r--r--rt/html/Elements/EditCustomField89
-rw-r--r--rt/html/Elements/EditCustomFieldBinary60
-rw-r--r--rt/html/Elements/EditCustomFieldImage60
-rw-r--r--rt/html/Elements/EditCustomFieldSelect71
-rw-r--r--rt/html/Elements/EditCustomFieldText65
-rw-r--r--rt/html/Elements/EditCustomFieldWikitext65
-rwxr-xr-xrt/html/Elements/EditLinks25
-rw-r--r--rt/html/Elements/Error12
-rw-r--r--rt/html/Elements/Footer17
-rw-r--r--rt/html/Elements/GotoTicket6
-rw-r--r--rt/html/Elements/Header19
-rw-r--r--rt/html/Elements/ListActions6
-rw-r--r--rt/html/Elements/Login8
-rw-r--r--rt/html/Elements/Menu13
-rw-r--r--rt/html/Elements/MessageBox8
-rw-r--r--rt/html/Elements/MyRequests15
-rw-r--r--rt/html/Elements/MyTickets15
-rw-r--r--rt/html/Elements/PageLayout13
-rw-r--r--rt/html/Elements/QueryString6
-rw-r--r--rt/html/Elements/QuickCreate6
-rw-r--r--rt/html/Elements/Quicksearch44
-rw-r--r--rt/html/Elements/RT__Ticket/ColumnMap268
-rw-r--r--rt/html/Elements/Refresh6
-rw-r--r--rt/html/Elements/ScrubHTML6
-rw-r--r--rt/html/Elements/Section6
-rw-r--r--rt/html/Elements/SelectAttachmentField6
-rw-r--r--rt/html/Elements/SelectBoolean6
-rw-r--r--rt/html/Elements/SelectCustomFieldOperator6
-rw-r--r--rt/html/Elements/SelectCustomFieldValue6
-rw-r--r--rt/html/Elements/SelectDate6
-rw-r--r--rt/html/Elements/SelectDateRelation6
-rw-r--r--rt/html/Elements/SelectDateType6
-rw-r--r--rt/html/Elements/SelectEqualityOperator8
-rw-r--r--rt/html/Elements/SelectGroups19
-rw-r--r--rt/html/Elements/SelectLang6
-rw-r--r--rt/html/Elements/SelectLinkType6
-rw-r--r--rt/html/Elements/SelectMatch6
-rw-r--r--rt/html/Elements/SelectNewTicketQueue10
-rw-r--r--rt/html/Elements/SelectOwner65
-rw-r--r--rt/html/Elements/SelectQueue9
-rw-r--r--rt/html/Elements/SelectResultsPerPage6
-rw-r--r--rt/html/Elements/SelectSortOrder6
-rw-r--r--rt/html/Elements/SelectStatus8
-rw-r--r--rt/html/Elements/SelectTicketSortBy6
-rw-r--r--rt/html/Elements/SelectTicketTypes6
-rw-r--r--rt/html/Elements/SelectUsers21
-rw-r--r--rt/html/Elements/SelectWatcherType6
-rw-r--r--rt/html/Elements/SetupSessionCookie21
-rw-r--r--rt/html/Elements/ShowCustomFieldBinary49
-rw-r--r--rt/html/Elements/ShowCustomFieldImage51
-rw-r--r--rt/html/Elements/ShowCustomFieldWikitext55
-rw-r--r--rt/html/Elements/ShowCustomFields77
-rw-r--r--rt/html/Elements/ShowLink6
-rwxr-xr-xrt/html/Elements/ShowLinks6
-rw-r--r--rt/html/Elements/ShowMemberships86
-rw-r--r--rt/html/Elements/SimpleSearch6
-rw-r--r--rt/html/Elements/Submit37
-rw-r--r--rt/html/Elements/Tabs30
-rw-r--r--rt/html/Elements/TicketList115
-rw-r--r--rt/html/Elements/TitleBox6
-rw-r--r--rt/html/Elements/TitleBoxEnd9
-rw-r--r--rt/html/Elements/TitleBoxStart8
-rw-r--r--rt/html/NoAuth/Logout.html6
-rw-r--r--rt/html/NoAuth/Reminder.html6
-rw-r--r--rt/html/NoAuth/images/autohandler7
-rw-r--r--rt/html/NoAuth/images/back_home.gifbin0 -> 330 bytes
-rw-r--r--rt/html/NoAuth/images/head_requestracker.gifbin0 -> 1233 bytes
-rw-r--r--rt/html/NoAuth/images/rt.jpgbin0 -> 917 bytes
-rw-r--r--rt/html/NoAuth/images/spacer.gifbin0 -> 43 bytes
-rw-r--r--rt/html/NoAuth/images/squares_blue.gifbin0 -> 219 bytes
-rw-r--r--rt/html/NoAuth/webrt.css282
-rw-r--r--rt/html/REST/1.0/Forms/queue/default6
-rw-r--r--rt/html/REST/1.0/Forms/queue/ns6
-rw-r--r--rt/html/REST/1.0/Forms/ticket/attachments8
-rw-r--r--rt/html/REST/1.0/Forms/ticket/default6
-rw-r--r--rt/html/REST/1.0/Forms/ticket/history8
-rw-r--r--rt/html/REST/1.0/Forms/ticket/links6
-rw-r--r--rt/html/REST/1.0/Forms/user/default6
-rw-r--r--rt/html/REST/1.0/Forms/user/ns6
-rw-r--r--rt/html/REST/1.0/NoAuth/mail-gateway11
-rw-r--r--rt/html/REST/1.0/autohandler8
-rw-r--r--rt/html/REST/1.0/dhandler6
-rw-r--r--rt/html/REST/1.0/logout6
-rw-r--r--rt/html/REST/1.0/search/dhandler6
-rw-r--r--rt/html/REST/1.0/search/ticket8
-rw-r--r--rt/html/REST/1.0/ticket/comment6
-rw-r--r--rt/html/REST/1.0/ticket/link6
-rw-r--r--rt/html/REST/1.0/ticket/merge6
-rw-r--r--rt/html/Search/Build.html746
-rw-r--r--rt/html/Search/Bulk.html75
-rwxr-xr-xrt/html/Search/Edit.html6
-rw-r--r--rt/html/Search/Elements/BuildFormatString196
-rw-r--r--rt/html/Search/Elements/DisplayOptions17
-rw-r--r--rt/html/Search/Elements/EditFormat60
-rw-r--r--rt/html/Search/Elements/EditQuery65
-rw-r--r--rt/html/Search/Elements/EditSearches18
-rw-r--r--rt/html/Search/Elements/NewListActions6
-rw-r--r--rt/html/Search/Elements/PickBasics189
-rw-r--r--rt/html/Search/Elements/PickCFs31
-rw-r--r--rt/html/Search/Elements/PickCriteria20
-rw-r--r--rt/html/Search/Elements/SearchPrivacy6
-rw-r--r--rt/html/Search/Elements/SelectAndOr12
-rw-r--r--rt/html/Search/Elements/SelectGroup65
-rw-r--r--rt/html/Search/Elements/SelectLinks8
-rw-r--r--rt/html/Search/Elements/SelectPersonType22
-rw-r--r--rt/html/Search/Elements/SelectSearchObject6
-rw-r--r--rt/html/Search/Elements/SelectSearchesForObjects9
-rwxr-xr-xrt/html/Search/Results.html30
-rw-r--r--rt/html/Search/Results.rdf6
-rw-r--r--rt/html/Search/Results.tsv9
-rw-r--r--rt/html/SelfService/Attachment/dhandler6
-rw-r--r--rt/html/SelfService/Closed.html8
-rw-r--r--rt/html/SelfService/Create.html47
-rwxr-xr-xrt/html/SelfService/CreateTicketInQueue.html61
-rw-r--r--rt/html/SelfService/Display.html183
-rw-r--r--rt/html/SelfService/Elements/GotoTicket6
-rw-r--r--rt/html/SelfService/Elements/Header6
-rw-r--r--rt/html/SelfService/Elements/MyRequests8
-rw-r--r--rt/html/SelfService/Elements/Tabs18
-rw-r--r--rt/html/SelfService/Error.html6
-rw-r--r--rt/html/SelfService/Prefs.html6
-rw-r--r--rt/html/SelfService/Update.html75
-rw-r--r--rt/html/SelfService/index.html6
-rw-r--r--rt/html/Ticket/Attachment/dhandler6
-rw-r--r--rt/html/Ticket/Create.html22
-rw-r--r--rt/html/Ticket/Display.html14
-rw-r--r--rt/html/Ticket/Elements/AddCustomers13
-rw-r--r--rt/html/Ticket/Elements/AddWatchers6
-rw-r--r--rt/html/Ticket/Elements/BulkLinks6
-rw-r--r--rt/html/Ticket/Elements/EditBasics8
-rw-r--r--rt/html/Ticket/Elements/EditCustomField67
-rw-r--r--rt/html/Ticket/Elements/EditCustomFields20
-rw-r--r--rt/html/Ticket/Elements/EditCustomers2
-rw-r--r--rt/html/Ticket/Elements/EditDates6
-rw-r--r--rt/html/Ticket/Elements/EditPeople8
-rw-r--r--rt/html/Ticket/Elements/EditWatchers8
-rwxr-xr-xrt/html/Ticket/Elements/FindAttachments19
-rwxr-xr-xrt/html/Ticket/Elements/LoadTextAttachments14
-rwxr-xr-xrt/html/Ticket/Elements/PreviewScrips8
-rw-r--r--rt/html/Ticket/Elements/ShowAttachments12
-rw-r--r--rt/html/Ticket/Elements/ShowBasics6
-rw-r--r--rt/html/Ticket/Elements/ShowCustomFields27
-rw-r--r--rt/html/Ticket/Elements/ShowCustomers2
-rw-r--r--rt/html/Ticket/Elements/ShowDates6
-rw-r--r--rt/html/Ticket/Elements/ShowDependencies6
-rw-r--r--rt/html/Ticket/Elements/ShowGroupMembers6
-rw-r--r--rt/html/Ticket/Elements/ShowHistory19
-rw-r--r--rt/html/Ticket/Elements/ShowMemberOf8
-rw-r--r--rt/html/Ticket/Elements/ShowMembers6
-rw-r--r--rt/html/Ticket/Elements/ShowMessageHeaders6
-rw-r--r--rt/html/Ticket/Elements/ShowMessageStanza8
-rw-r--r--rt/html/Ticket/Elements/ShowPeople8
-rw-r--r--rt/html/Ticket/Elements/ShowReferences10
-rw-r--r--rt/html/Ticket/Elements/ShowRequestor11
-rw-r--r--rt/html/Ticket/Elements/ShowSummary8
-rw-r--r--rt/html/Ticket/Elements/ShowTransaction13
-rw-r--r--rt/html/Ticket/Elements/ShowTransactionAttachments49
-rw-r--r--rt/html/Ticket/Elements/ShowUserEntry6
-rw-r--r--rt/html/Ticket/Elements/Tabs13
-rw-r--r--rt/html/Ticket/History.html6
-rw-r--r--rt/html/Ticket/Modify.html12
-rw-r--r--rt/html/Ticket/ModifyAll.html36
-rw-r--r--rt/html/Ticket/ModifyDates.html6
-rw-r--r--rt/html/Ticket/ModifyLinks.html6
-rw-r--r--rt/html/Ticket/ModifyPeople.html6
-rw-r--r--rt/html/Ticket/ShowEmailRecord.html6
-rw-r--r--rt/html/Ticket/Update.html29
-rw-r--r--rt/html/Tools/Elements/Tabs6
-rw-r--r--rt/html/Tools/MyDay.html8
-rw-r--r--rt/html/Tools/Offline.html6
-rw-r--r--rt/html/User/Delegation.html6
-rw-r--r--rt/html/User/Elements/DelegateRights8
-rw-r--r--rt/html/User/Elements/GroupTabs6
-rw-r--r--rt/html/User/Elements/Tabs6
-rw-r--r--rt/html/User/Groups/Members.html10
-rw-r--r--rt/html/User/Groups/Modify.html8
-rw-r--r--rt/html/User/Groups/index.html6
-rw-r--r--rt/html/User/Prefs.html13
-rw-r--r--rt/html/autohandler24
-rw-r--r--rt/html/index.html6
-rw-r--r--rt/html/l6
283 files changed, 2513 insertions, 5919 deletions
diff --git a/rt/html/Admin/CustomFields/GroupRights.html b/rt/html/Admin/CustomFields/GroupRights.html
deleted file mode 100644
index 380fee4..0000000
--- a/rt/html/Admin/CustomFields/GroupRights.html
+++ /dev/null
@@ -1,170 +0,0 @@
-%# BEGIN BPS TAGGED BLOCK {{{
-%#
-%# COPYRIGHT:
-%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
-%# <jesse@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., 675 Mass Ave, Cambridge, MA 02139, USA.
-%#
-%#
-%# 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/CustomFieldTabs,
- id => $id,
- current_tab => "Admin/CustomFields/GroupRights.html?id=".$id,
- Title => $title
-&>
-<& /Elements/ListActions, actions => \@results &>
-
- <FORM METHOD=POST ACTION="GroupRights.html">
- <INPUT TYPE=HIDDEN NAME=id VALUE="<% $CustomFieldObj->id %>">
-
-
-<h1><&|/l&>System groups</&></h1>
-<TABLE>
-% $Groups = RT::Groups->new($session{'CurrentUser'});
-% $Groups->LimitToSystemInternalGroups();
-% while (my $Group = $Groups->Next()) {
- <TR ALIGN=RIGHT>
- <TD VALIGN=TOP>
- <% loc($Group->Type) %>
- </TD>
- <TD>
- <& /Admin/Elements/SelectRights, PrincipalId => $Group->PrincipalId,
- Object => $CustomFieldObj &>
- </TD>
- </TR>
-% }
-</TABLE>
-<h1><&|/l&>User defined groups</&></h1>
-<TABLE>
-% $Groups = RT::Groups->new($session{'CurrentUser'});
-% $Groups->LimitToUserDefinedGroups();
-% while (my $Group = $Groups->Next()) {
- <TR ALIGN=RIGHT>
- <TD VALIGN=TOP>
- <% $Group->Name %>
- </TD>
- <TD>
- <& /Admin/Elements/SelectRights, PrincipalId => $Group->PrincipalId,
- Object => $CustomFieldObj &>
- </TD>
- </TR>
-% }
-</TABLE>
-
- <& /Elements/Submit, Caption => loc("Be sure to save your changes"), Reset => 1 &>
-
- </FORM>
-
-<%INIT>
-
-
-
-
-
-
-if (!defined $id) {
- $m->comp("/Elements/Error", Why => loc("No CustomField defined"));
-}
-
-my $CustomFieldObj = RT::CustomField->new($session{'CurrentUser'});
-$CustomFieldObj->Load($id) || $m->comp("/Elements/Error", Why => loc("Couldn't load CustomField [_1]",$id));
-
-my $Groups;
-
- my ( $ACL, @results );
-
- foreach my $arg (keys %ARGS) {
- if ($arg =~ /GrantRight-(\d+)-(.*?)-(\d+)$/) {
- my $principal_id = $1;
- my $object_type = $2;
- my $object_id = $3;
- my $rights = $ARGS{$arg};
-
- my $principal = RT::Principal->new($session{'CurrentUser'});
- $principal->Load($principal_id);
- my $obj;
-
- if ($object_type eq 'RT::CustomField') {
- $obj = RT::CustomField->new($session{'CurrentUser'});
- $obj->Load($object_id);
- } else {
- push (@results, loc("System Error").
- loc("Rights could not be granted for [_1]", $object_type));
- next;
- }
-
- my @rights = ref($ARGS{$arg}) eq 'ARRAY' ? @{$ARGS{$arg}} : ($ARGS{$arg});
- foreach my $right (@rights) {
- next unless ($right);
- my ($val, $msg) = $principal->GrantRight(Object => $obj, Right => $right);
- push (@results, $msg);
- }
- }
- elsif ($arg =~ /RevokeRight-(\d+)-(.*?)-(\d+)-(.*?)$/) {
- my $principal_id = $1;
- my $object_type = $2;
- my $object_id = $3;
- my $right = $4;
-
- my $principal = RT::Principal->new($session{'CurrentUser'});
- $principal->Load($principal_id);
- next unless ($right);
- my $obj;
-
- if ($object_type eq 'RT::CustomField') {
- $obj = RT::CustomField->new($session{'CurrentUser'});
- $obj->Load($object_id);
- } else {
- push (@results, loc("System Error").
- loc("Rights could not be revoked for [_1]", $object_type));
- next;
- }
- my ($val, $msg) = $principal->RevokeRight(Object => $obj, Right => $right);
- push (@results, $msg);
- }
-}
-
-my $title = loc('Modify group rights for custom field [_1]', $CustomFieldObj->Name);
-
-</%INIT>
-
-<%ARGS>
-$id => undef
-</%ARGS>
diff --git a/rt/html/Admin/CustomFields/Modify.html b/rt/html/Admin/CustomFields/Modify.html
deleted file mode 100644
index 4c3c921..0000000
--- a/rt/html/Admin/CustomFields/Modify.html
+++ /dev/null
@@ -1,212 +0,0 @@
-%# BEGIN BPS TAGGED BLOCK {{{
-%#
-%# COPYRIGHT:
-%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
-%# <jesse@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., 675 Mass Ave, Cambridge, MA 02139, USA.
-%#
-%#
-%# 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/CustomFieldTabs,
- id => $CustomFieldObj->Id ,
- current_tab => $current_tab,
- Title => $title &>
-<& /Elements/ListActions, actions => \@results &>
-
-
-<FORM METHOD="POST" ACTION="Modify.html" NAME="ModifyCustomField">
-<INPUT TYPE=HIDDEN NAME="id" VALUE="<%$id %>">
-<table>
-<tr>
-<td class="label"><&|/l&>Name</&></td>
-<td><input name="Name" VALUE="<%$CustomFieldObj->Name%>" SIZE=20></td></tr>
-<tr>
-<td class="label"><&|/l&>Description</&></td>
-<td><input name="Description" VALUE="<%$CustomFieldObj->Description%>" SIZE=80></td>
-</tr>
-
-<tr>
-<td class="label"><&|/l&>Type</&></td>
-<td><& /Admin/Elements/SelectCustomFieldType,
- Name => "TypeComposite",
- Default => $CustomFieldObj->TypeComposite, &>
-</td>
-</tr>
-<tr>
-<td class="label"><&|/l&>Applies to</&></td>
-<td><& /Admin/Elements/SelectCustomFieldLookupType,
- Name => "LookupType",
- Default => $CustomFieldObj->LookupType, &>
-</td>
-</tr>
-<tr>
-<td class="label">&nbsp;</td>
-<td>
-<INPUT TYPE=HIDDEN NAME="SetEnabled" VALUE="1">
-<INPUT TYPE=CHECKBOX NAME="Enabled" VALUE="1" <%$EnabledChecked%>> <&|/l&>Enabled (Unchecking this box disables this custom field)</&>
-</td>
-</tr>
-</table>
-<BR>
-% if ($CustomFieldObj->Id && $CustomFieldObj->Type =~ /^Select/i) {
-<H2><&|/l&>Values</&></H2>
-<div>
-<& /Admin/Elements/EditCustomFieldValues, CustomField => $CustomFieldObj &>
-<& /Admin/Elements/AddCustomFieldValue, CustomField => $CustomFieldObj &>
-</div>
-% }
-<&/Elements/Submit&>
-</FORM>
-
-
-
-<%INIT>
-
-
-
-my $CustomFieldObj = RT::CustomField->new( $session{'CurrentUser'} );
-my ( $title, @results, $EnabledChecked, $Disabled);
-$EnabledChecked = "CHECKED";
-
-if ( !$id ) {
- $title = loc("Create a CustomField");
- $id = 'new';
-}
-else {
-
- if ( $id eq 'new' ) {
- my ( $val, $msg ) = $CustomFieldObj->Create(Name => $Name,
- TypeComposite => $TypeComposite,
- LookupType => $LookupType,
- Description => $Description,);
- $m->comp("/Elements/Error", Why => loc( "Could not create CustomField", $msg ) ) unless ($val);
- push @results, $msg;
- $title = loc( 'Created CustomField [_1]', $CustomFieldObj->Name() );
- }
- else {
- $CustomFieldObj->Load($id) || $m->comp("/Elements/Error", Why => loc('No CustomField') );
- $title = loc( 'Editing CustomField [_1]', $CustomFieldObj->Name() );
-
- my @attribs = qw( Name TypeComposite LookupType Description);
- my @aresults = UpdateRecordObject( AttributesRef => \@attribs,
- Object => $CustomFieldObj,
- ARGSRef => \%ARGS );
-
- push @results, @aresults;
-
- #we're asking about enabled on the web page but really care about disabled.
- if ($Enabled == 1) {
- $Disabled = 0;
- }
- else {
- $Disabled = 1;
- }
- if ( ($SetEnabled) and ( $Disabled != $CustomFieldObj->Disabled) ) {
- my ($code, $msg) = $CustomFieldObj->SetDisabled($Disabled);
- push @results, loc('Enabled status: [_1]', loc_fuzzy($msg));
- }
-
- if ($CustomFieldObj->Disabled()) {
- $EnabledChecked ="";
- }
- }
-
- $id = $CustomFieldObj->id;
-}
-
-
-
-
-my $paramtag = "CustomField-".$CustomFieldObj->Id."-Value-";
-# Delete any fields that want to be deleted
-foreach my $key (keys %ARGS) {
-
- next unless ($key =~ /^Delete-$paramtag(\d+)$/);
- my ($val, $msg) = $CustomFieldObj->DeleteValue($1);
- push (@results, $msg);
-
-
-}
-# Update any existing values
-my $values = $CustomFieldObj->ValuesObj;
-while (my $value = $values->Next) {
- foreach my $attr qw(Name Description SortOrder) {
- my $param = $paramtag.$value->Id."-".$attr;
-
- if ( $ARGS{$param} && ($value->$attr() ne $ARGS{$param})) {
- my $mutator = "Set$attr";
- my ($id, $msg) = $value->$mutator($ARGS{$param});
- push (@results, $msg);
- }
- }
-
-
-}
-
-
-
-# Add any new values
-if ($ARGS{$paramtag."new-Name"}) {
- my ($id, $msg) = $CustomFieldObj->AddValue ( Name => $ARGS{$paramtag."new-Name"},
- Description => $ARGS{$paramtag."new-Description"},
- SortOrder => $ARGS{$paramtag."new-SortOrder"});
- push (@results, $msg);
-}
-
-my $current_tab;
-if ($ARGS{'Create'}){
- $current_tab = "Admin/CustomFields/Modify.html?Create=1";
-} else {
- $current_tab = "Admin/CustomFields/Modify.html?id=".$id;
- }
-
-
-</%INIT>
-<%ARGS>
-$id => undef
-$TypeComposite => undef
-$LookupType => undef
-$MaxValues => undef
-$SortOrder => undef
-$Description => undef
-$Name => undef
-$SetEnabled => undef
-$Enabled => undef
-</%ARGS>
diff --git a/rt/html/Admin/CustomFields/Objects.html b/rt/html/Admin/CustomFields/Objects.html
deleted file mode 100644
index 8f9e365..0000000
--- a/rt/html/Admin/CustomFields/Objects.html
+++ /dev/null
@@ -1,145 +0,0 @@
-%# BEGIN BPS TAGGED BLOCK {{{
-%#
-%# COPYRIGHT:
-%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
-%# <jesse@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., 675 Mass Ave, Cambridge, MA 02139, USA.
-%#
-%#
-%# 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/CustomFieldTabs,
- id => $id,
- current_tab => "Admin/CustomFields/Objects.html?id=".$id,
- Title => $title
- &>
-
-<& /Elements/ListActions, actions => \@results &>
-
-<FORM ACTION="Objects.html" METHOD=POST>
-<INPUT TYPE=HIDDEN NAME="id" VALUE="<% $id %>">
-<INPUT TYPE=HIDDEN NAME="UpdateObjs" VALUE="1">
-
-<h2><&|/l&>Selected objects</&></h2>
-<& /Admin/Elements/PickObjects, Objects => \@AssignedObjs, id => $id, Checked => 1 &>
-<h2><&|/l&>Unselected objects</&></h2>
-<& /Admin/Elements/PickObjects, Objects => \@UnassignedObjs, id => $id &>
-
-<& /Elements/Submit, CheckAll => 1, ClearAll => 1 &>
-</FORM>
-
-<%INIT>
-my $CF = RT::CustomField->new($session{'CurrentUser'});
-$CF->Load($id) or Abort(loc("Could not load CustomField [_1]"), $id);
-my $LookupType = $CF->LookupType;
-$LookupType =~ /^(.*?)-/ ||
- Abort(loc("Object of type [_1] cannot take custom fields", $LookupType));
-
-my $Class = $1;
-my $CollectionClass;
-if (UNIVERSAL::can($Class.'Collection', 'new') ) {
-$CollectionClass = $Class.'Collection';
-
-} elsif (UNIVERSAL::can($Class.'es', 'new') ) {
- $CollectionClass = $Class.'es';
-
-} elsif (UNIVERSAL::can($Class.'s', 'new') ) {
- $CollectionClass = $Class.'s';
-
-} else {
- Abort(loc("Can't find a collection class for '[_1]'", $Class));
-}
-
-
-my $title = loc('Modify associated objects for [_1]', $CF->Name);
-
-my $Objects = $CollectionClass->new($session{'CurrentUser'});
-my (@results);
-my (@AssignedObjs, @UnassignedObjs);
-
-$Objects->UnLimit;
-$Objects->OrderBy( FIELD => 'Name' );
-
-
-my $ObjectCFs;
-$ObjectCFs = RT::ObjectCustomFields->new($session{'CurrentUser'});
-$ObjectCFs->UnLimit;
-$ObjectCFs->LimitToCustomField($id);
-
-my %seen;
-while (my $OCF = $ObjectCFs->Next) {
- $seen{$OCF->ObjectId}++;
-}
-
-while (my $obj = $Objects->Next) {
- my $obj_id = $obj->Id;
-
- if ($UpdateObjs) {
- # Go through and delete all the custom field relationships that this object
- # no longer has
- my $key = "Object-$obj_id-CF-$id";
- if ($ARGS{$key}) {
- if (!$seen{$obj_id}) {
- my ($val, $msg) = $CF->AddToObject($obj);
- push (@results, $msg);
- push @UnassignedObjs, $obj if !$val;
- }
- }
- else {
- push @UnassignedObjs, $obj;
- if ($seen{$obj_id}) {
- my ($val, $msg) = $CF->RemoveFromObject($obj);
- push (@results, $msg);
- pop @UnassignedObjs if !$val;
- }
- }
- }
- elsif (!$seen{$obj_id}) {
- push @UnassignedObjs, $obj;
- }
- next if @UnassignedObjs and $UnassignedObjs[-1] == $obj;
- push @AssignedObjs, $obj;
-}
-
-</%INIT>
-<%ARGS>
-$id => undef
-$FindDisabledObjects => 0
-$UpdateObjs => 0
-</%ARGS>
diff --git a/rt/html/Admin/CustomFields/UserRights.html b/rt/html/Admin/CustomFields/UserRights.html
deleted file mode 100644
index e2df3a0..0000000
--- a/rt/html/Admin/CustomFields/UserRights.html
+++ /dev/null
@@ -1,168 +0,0 @@
-%# BEGIN BPS TAGGED BLOCK {{{
-%#
-%# COPYRIGHT:
-%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
-%# <jesse@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., 675 Mass Ave, Cambridge, MA 02139, USA.
-%#
-%#
-%# 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/CustomFieldTabs, id => $id,
-current_tab => "Admin/CustomFields/UserRights.html?id=".$id,
-Title => $title, &>
-<& /Elements/ListActions, actions => \@results &>
-
- <FORM METHOD=POST ACTION="UserRights.html">
- <INPUT TYPE=HIDDEN NAME=id VALUE="<% $CustomFieldObj->id %>">
-
-
-<TABLE>
-
-% while (my $Member = $Users->Next()) {
-% my $UserObj = $Member->MemberObj->Object();
-% my $group = RT::Group->new($session{'CurrentUser'});
-% $group->LoadACLEquivalenceGroup($Member->MemberObj);
- <TR ALIGN=RIGHT>
- <TD VALIGN=TOP>
- <% $UserObj->Name %>
- </TD>
- <TD>
- <& /Admin/Elements/SelectRights, PrincipalId=> $group->PrincipalId,
- Object => $CustomFieldObj &>
- </TD>
- </TR>
-% }
- </TABLE>
-
- <& /Elements/Submit, Caption => loc("Be sure to save your changes"), Reset => 1 &>
-
- </FORM>
-
-<%INIT>
-
- #Update the acls.
- my @results;
-foreach my $arg (keys %ARGS) {
- if ($arg =~ /GrantRight-(\d+)-(.*?)-(\d+)$/) {
- my $principal_id = $1;
- my $object_type = $2;
- my $object_id = $3;
- my $rights = $ARGS{$arg};
-
- my $principal = RT::Principal->new($session{'CurrentUser'});
- $principal->Load($principal_id);
- my $obj;
-
- if ($object_type eq 'RT::CustomField') {
- $obj = RT::CustomField->new($session{'CurrentUser'});
- $obj->Load($object_id);
-
- } else {
- push (@results, loc("System Error").
- loc("Rights could not be granted for [_1]",
-$object_type));
- next;
- }
-
- my @rights = ref($ARGS{$arg}) eq 'ARRAY' ? @{$ARGS{$arg}} :
-($ARGS{$arg});
- foreach my $right (@rights) {
- next unless ($right);
- my ($val, $msg) = $principal->GrantRight(Object => $obj, Right
-=> $right);
- push (@results, $msg);
- }
- }
- elsif ($arg =~ /RevokeRight-(\d+)-(.*?)-(\d+)-(.*?)$/) {
- my $principal_id = $1;
- my $object_type = $2;
- my $object_id = $3;
- my $right = $4;
-
- my $principal = RT::Principal->new($session{'CurrentUser'});
- $principal->Load($principal_id);
- next unless ($right);
- my $obj;
-
- if ($object_type eq 'RT::CustomField') {
- $obj = RT::CustomField->new($session{'CurrentUser'});
- $obj->Load($object_id);
- } else {
- push (@results, loc("System Error").
- loc("Rights could not be revoked for [_1]",
-$object_type));
- next;
- }
- my ($val, $msg) = $principal->RevokeRight(Object => $obj, Right =>
-$right);
- push (@results, $msg);
- }
-}
-
-
-# {{{ Deal with setting up the display of current rights.
-
-
-
-if (!defined $id) {
- $m->comp("/Elements/Error", Why => loc("No Class defined"));
-}
-
-my $CustomFieldObj = RT::CustomField->new($session{'CurrentUser'});
-$CustomFieldObj->Load($id) || $m->comp("/Elements/Error", Why => loc("Couldn't load Class [_1]",$id));
-
-# Find out which users we want to display ACL selects for
-my $Privileged = RT::Group->new($session{'CurrentUser'});
-$Privileged->LoadSystemInternalGroup('Privileged');
-my $Users = $Privileged->MembersObj();
-
-
-my $title = loc('Modify user rights for custom field [_1]', $CustomFieldObj->Name);
-
-# }}}
-
-</%INIT>
-
-<%ARGS>
-$id => undef
-$UserString => undef
-$UserOp => undef
-$UserField => undef
-</%ARGS>
diff --git a/rt/html/Admin/CustomFields/index.html b/rt/html/Admin/CustomFields/index.html
deleted file mode 100644
index 9854fb0..0000000
--- a/rt/html/Admin/CustomFields/index.html
+++ /dev/null
@@ -1,76 +0,0 @@
-%# BEGIN BPS TAGGED BLOCK {{{
-%#
-%# COPYRIGHT:
-%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
-%# <jesse@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., 675 Mass Ave, Cambridge, MA 02139, USA.
-%#
-%#
-%# 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 => loc('Select a Custom Field') &>
-<& /Admin/Elements/CustomFieldTabs,
- current_tab => 'Admin/CustomFields/',
- Title => loc('Select a Custom Field') &>
-
-% my $prev_lookup = '';
-% while (my $CustomFieldObj = $CustomFields->Next) {
-% $CustomFieldObj->CurrentUserHasRight('AdminCustomField') or next;
-% my $lookup = $CustomFieldObj->FriendlyLookupType;
-% if ($lookup ne $prev_lookup) {
-% if ($prev_lookup) {
-</UL>
-% }
-<H2><% loc("Custom Fields for [_1]", $lookup) %></H2>
-<UL>
-% $prev_lookup = $lookup;
-% }
-%
-<LI>
-<A HREF="Modify.html?id=<%$CustomFieldObj->id()%>"><%$CustomFieldObj->Name%>: <%$CustomFieldObj->Description%></a>
-</LI>
-% }
-% if ($prev_lookup) {
-</UL>
-% }
-
-<%INIT>
-my $CustomFields = RT::CustomFields->new($session{'CurrentUser'});
-$CustomFields->UnLimit();
-$CustomFields->OrderByCols( { FIELD => 'LookupType' }, { FIELD => 'Name' } );
-</%INIT>
diff --git a/rt/html/Admin/Elements/AddCustomFieldValue b/rt/html/Admin/Elements/AddCustomFieldValue
index 3e3f414..0e59fe3 100644
--- a/rt/html/Admin/Elements/AddCustomFieldValue
+++ b/rt/html/Admin/Elements/AddCustomFieldValue
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,20 +42,20 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<b><&|/l&>Add Value</&></b></b></b></b>
<TABLE BORDER="0">
<TR><TD><small>
<&|/l&>Sort</&>:<br>
-<input size=3 name="CustomField-<%$CustomField->Id%>-Value-new-SortOrder" >
+<input name="CustomField-<% $CustomField->Id %>-AddValue-SortOrder" size="5">
</TD>
<TD><small>
<&|/l&>Name</&>:<br>
-<input type="text" size=30 name="CustomField-<%$CustomField->Id%>-Value-new-Name" >
+<input size=20 name="CustomField-<% $CustomField->Id %>-AddValue-Name">
</TD>
<TD><small>
<&|/l&>Description</&>:<br>
-<input type="text" size=50 name="CustomField-<%$CustomField->Id%>-Value-new-Description">
+<input size="60" name="CustomField-<% $CustomField->Id %>-AddValue-Description">
</TD></TR>
</TABLE>
diff --git a/rt/html/Admin/Elements/CreateUserCalled b/rt/html/Admin/Elements/CreateUserCalled
index 0dc6ac7..01fa9fe 100644
--- a/rt/html/Admin/Elements/CreateUserCalled
+++ b/rt/html/Admin/Elements/CreateUserCalled
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<FORM METHOD=get ACTION="<% $RT::WebPath %>/Admin/Users/Create.html">
<&|/l&>New user called</&> <INPUT NAME="Name" size=10><input type=submit value="<&|/l&>Create</&>">
</form>
diff --git a/rt/html/Admin/Elements/CustomFieldTabs b/rt/html/Admin/Elements/CustomFieldTabs
deleted file mode 100644
index d7acf33..0000000
--- a/rt/html/Admin/Elements/CustomFieldTabs
+++ /dev/null
@@ -1,116 +0,0 @@
-%# BEGIN BPS TAGGED BLOCK {{{
-%#
-%# COPYRIGHT:
-%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
-%# <jesse@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., 675 Mass Ave, Cambridge, MA 02139, USA.
-%#
-%#
-%# 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/Tabs,
- current_tab => 'Admin/CustomFields/',
- subtabs => $tabs,
- current_subtab => $current_tab,
- Title => $Title &>
-<%INIT>
-my $tabs;
-
-if ($id) {
- my $cf = RT::CustomField->new( $session{'CurrentUser'} );
- $cf->Load($id);
- $tabs = {
- this => {
- title => $cf->Name,
- path => "Admin/CustomFields/Modify.html?id=" . $id,
- current_subtab => $current_tab,
-
- subtabs => {
-
- C => { title => loc('Basics'),
- path => "Admin/CustomFields/Modify.html?id=" . $id,
- },
- F => { title => loc('Group Rights'),
- path => "Admin/CustomFields/GroupRights.html?id="
- . $id, },
- G => {
- title => loc('User Rights'),
- path => "Admin/CustomFields/UserRights.html?id=" . $id,
- },
-
- } }
-
- };
-
-
- if ($cf->LookupType =~ /^RT::Queue/io) {
- $tabs->{'this'}->{subtabs}->{D} = {
- title => loc('Applies to'),
- path => "Admin/CustomFields/Objects.html?id=" . $id,
- };
- }
-}
-
-if ($session{'CurrentUser'}->HasRight( Object => $RT::System, Right => 'AdminCustomField')) {
- $tabs->{"A"} = { title => loc('Select custom field'),
- path => "Admin/CustomFields/",
- };
- $tabs->{"B"} = { title => loc('New custom field'),
- path => "Admin/CustomFields/Modify.html?Create=1",
- separator => 1,
- };
-}
-
- # Now let callbacks add their extra tabs
- $m->comp('/Elements/Callback', tabs => $tabs, %ARGS);
-
-foreach my $tab (sort keys %{$tabs->{'this'}->{'subtabs'}}) {
- if ($tabs->{'this'}->{'subtabs'}->{$tab}->{'path'} eq $current_tab) {
- $tabs->{'this'}->{'subtabs'}->{$tab}->{'subtabs'} = $subtabs;
- $tabs->{'this'}->{'subtabs'}->{$tab}->{'current_subtab'} = $current_subtab;
- }
-}
-if( $id ) { $current_tab = "Admin/CustomFields/Modify.html?id=" . $id }
-</%INIT>
-<%ARGS>
-$Title => undef
-$id => undef
-$current_tab => undef
-$subtabs => undef
-$current_subtab => undef
-</%ARGS>
diff --git a/rt/html/Admin/Elements/EditCustomField b/rt/html/Admin/Elements/EditCustomField
index d8c5b29..5657d43 100644
--- a/rt/html/Admin/Elements/EditCustomField
+++ b/rt/html/Admin/Elements/EditCustomField
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<& /Elements/ListActions, actions => \@results &>
diff --git a/rt/html/Admin/Elements/EditCustomFieldValues b/rt/html/Admin/Elements/EditCustomFieldValues
index 9cc3858..79b6501 100644
--- a/rt/html/Admin/Elements/EditCustomFieldValues
+++ b/rt/html/Admin/Elements/EditCustomFieldValues
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,42 +42,22 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
-% if (!$values->Count) {
-<p><em><&|/l&>(no values)</&></em></p>
-% return;
-% }
+%# }}} END BPS TAGGED BLOCK
<i><&|/l&>(Check box to delete)</&></i>
-<table>
-<tr>
-<td>&nbsp;</td>
-<td><&|/l&>Sort</&></td>
-<td><&|/l&>Name</&></td>
-<td><&|/l&>Description</&></td>
-</tr>
-% while (my $value = $values->Next) {
-<tr>
-<td>
-<input type="checkbox" name="Delete-CustomField-<%$CustomField->Id%>-Value-<%$value->Id%>">
-</td>
-<td>
-<input size=3 name="CustomField-<%$CustomField->Id%>-Value-<%$value->Id%>-SortOrder" value="<%$value->SortOrder%>">
-</td>
-<td>
-<input type="text" size=30 name="CustomField-<%$CustomField->Id%>-Value-<%$value->Id%>-Name" value="<%$value->Name%>">
-</td>
-<td>
-<font size="-1">
-<input type="text" size=50 name="CustomField-<%$CustomField->Id%>-Value-<%$value->Id%>-Description" value="<%$value->Description%>">
-</font>
-</td>
-</tr>
+<ul>
+% while (my $v = $values->Next) {
+<li>
+<INPUT TYPE="text" SIZE="2" NAME="CustomField-<%$CustomField->Id%>-SortOrder<%$v->Id()%>" VALUE="<%$v->SortOrder()%>">
+<input type="checkbox" name="CustomField-<%$CustomField->Id%>-DeleteValue" value="<%$v->id%>">
+<%$v->Name%>
+% if ($v->Description) {
+<i>(<%$v->Description%>)</i>
+% }
+</li>
% }
-</table>
+</ul>
<%init>
-
-my $values = $CustomField->ValuesObj();
-
+my $values = $CustomField->Values();
</%init>
<%args>
$CustomField => undef
diff --git a/rt/html/Admin/Elements/EditCustomFields b/rt/html/Admin/Elements/EditCustomFields
index 1cd3df5..d901b21 100644
--- a/rt/html/Admin/Elements/EditCustomFields
+++ b/rt/html/Admin/Elements/EditCustomFields
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,64 +42,95 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
-<& /Elements/ListActions, actions => \@results &>
-
-<FORM ACTION="<%$RT::WebPath%><% $m->request_comp->path |n %>" METHOD="POST" NAME="EditCustomFields">
-<INPUT TYPE=HIDDEN NAME="id" VALUE="<% $Object->Id %>"/>
-<INPUT TYPE=HIDDEN NAME="ObjectType" VALUE="<% $ObjectType %>"/>
-<INPUT TYPE=HIDDEN NAME="SubType" VALUE="<% $SubType %>"/>
-<INPUT TYPE=HIDDEN NAME="UpdateCFs" VALUE="1"/>
-
-% if ($Object->Id) {
-<h2><&|/l&>Global Custom Fields</&></h2>
-<& PickCustomFields, CustomFields => \@GlobalCFs, ReadOnly => 1, id => $id, SubType => $SubType &>
+%# }}} END BPS TAGGED BLOCK
+<& /Elements/ListActions, actions => \@actions &>
+
+<TABLE>
+<TR>
+<TD VALIGN=TOP>
+<h2><%$caption%></h2>
+</TD></TR></TABLE>
+% if ($CustomFields->Count == 0 ) {
+<P><i><&|/l&>(No custom fields)</&></i></P>
+% } else {
+<TABLE cellspacing=0 cellpadding=2>
+% my $count;
+% while (my $CustomFieldObj = $CustomFields->Next) {
+<TR>
+ <TD valign="TOP">
+% if ($CustomFieldObj->Name) {
+ <A HREF="CustomField.html?Queue=<%$id%>&CustomField=<%$CustomFieldObj->id()%>"><b><%$CustomFieldObj->Name%></b></a><br>
+% } else {
+ <A HREF="CustomField.html?Queue=<%$id%>&CustomField=<%$CustomFieldObj->id()%>"><i>(<%loc("no name")%>)</i></a><br>
+% }
+ <%$CustomFieldObj->Description%>
+ </TD>
+ <TD valign="TOP">
+ <i><% $CustomFieldObj->FriendlyType %></i>
+ </TD>
+% # show 'move up' unless it's the first item
+% if ($count++) {
+ <TD valign="TOP">
+ <a href="CustomFields.html?id=<%$id%>&CustomField=<%$CustomFieldObj->id%>&Move=-1"><&|/l&>Move up</&></a>
+% } else {
+ <TD valign="TOP" ALIGN=RIGHT>
+% }
+
+% # show 'move down' unless it's the last item
+% if (!$CustomFields->IsLast) {
+% $m->print(' | ') if $count > 1;
+ <a href="CustomFields.html?id=<%$id%>&CustomField=<%$CustomFieldObj->id%>&Move=1"><&|/l&>Move down</&></a>
+% }
+</TD>
+</TR>
% }
-<h2><&|/l&>Selected Custom Fields</&></h2>
-<& PickCustomFields, CustomFields => [$ObjectCFs->CustomFields], id => $id, Checked => 1, SubType => $SubType &>
-<h2><&|/l&>Unselected Custom Fields</&></h2>
-<& PickCustomFields, CustomFields => \@UnassignedCFs, id => $id, SubType => $SubType &>
-<& /Elements/Submit, CheckAll => 1, ClearAll => 1 &>
+</TABLE>
+% }
+<FORM METHOD=GET ACTION="CustomFields.html">
+% if ($id) {
+<INPUT TYPE="Hidden" NAME="id" VALUE="<%$id%>">
+% }
+<input type="checkbox" name="FindDisabledCustomFields"> <&|/l&>Include disabled custom fields in listing.</&>
+<input type=submit value="<&|/l&>Go!</&>">
</FORM>
<%INIT>
my $CustomFields = RT::CustomFields->new($session{'CurrentUser'});
-my @results;
-my (@GlobalCFs, @UnassignedCFs);
+my $QueueObj = RT::Queue->new($session{'CurrentUser'});
+my $caption;
-my $id = $Object->Id;
-if ($id and !$Object->CurrentUserHasRight('AssignCustomFields')) {
- $m->out('<P><i>', loc('(No custom fields)'), '</i></P>');
- return;
+if ($id) {
+ $QueueObj->Load($id);
}
-my $lookup = $ObjectType;
-$lookup .= "-$SubType" if $SubType;
-
-$CustomFields->LimitToLookupType($lookup);
-$CustomFields->OrderBy( FIELD => 'Name' );
-
-
-my ($GlobalCFs, $ObjectCFs);
-$ObjectCFs = RT::ObjectCustomFields->new($session{'CurrentUser'});
-$ObjectCFs->UnLimit;
-$ObjectCFs->LimitToObjectId($id);
-$ObjectCFs->LimitToLookupType($lookup);
+if ($QueueObj->id) {
+ $CustomFields->LimitToQueue($id);
+}
+else {
+ $CustomFields->LimitToGlobal();
+}
+
+if ($FindDisabledCustomFields) {
+ $caption = loc("All Custom Fields");
+ $CustomFields->{'find_disabled_rows'} = 1;
+} else {
+ $caption = loc("Enabled Custom Fields");
+}
# {{{ deal with moving sortorder of custom fields
if ($CustomField and $Move) {
- my $SourceObj = RT::ObjectCustomField->new($session{'CurrentUser'});
- $SourceObj->LoadByCols( ObjectId => $id, CustomField => $CustomField );
+ my $SourceObj = RT::CustomField->new($session{'CurrentUser'});
+ $SourceObj->Load($CustomField) || Abort(loc('No CustomField'));
my $TargetObj;
my $target_order = $SourceObj->SortOrder + $Move;
- while (my $ObjectCF = $ObjectCFs->Next) {
- my $this_order = $ObjectCF->SortOrder;
+ while (my $CustomFieldObj = $CustomFields->Next) {
+ my $this_order = $CustomFieldObj->SortOrder;
# if we have an exact match, finish the loop now
- ($TargetObj = $ObjectCF, last) if $this_order == $target_order;
+ ($TargetObj = $CustomFieldObj, last) if $this_order == $target_order;
# otherwise, we need to apropos toward the general direction
# ... first, check the sign is correct
@@ -113,7 +144,7 @@ if ($CustomField and $Move) {
next if $orig_delta < $this_delta;
}
- $TargetObj = $ObjectCF;
+ $TargetObj = $CustomFieldObj;
}
if ($TargetObj) {
@@ -122,68 +153,83 @@ if ($CustomField and $Move) {
$TargetObj->SetSortOrder($s);
$SourceObj->SetSortOrder($t);
# because order changed, we must redo search for subsequent uses
+ $CustomFields->RedoSearch;
}
- $ObjectCFs->GotoFirstItem;
+ $CustomFields->GotoFirstItem;
}
# }}}
-if ($id) {
- $GlobalCFs = RT::ObjectCustomFields->new($session{'CurrentUser'});
- $GlobalCFs->LimitToObjectId(0);
- $GlobalCFs->LimitToLookupType($lookup);
-}
-
-while (my $cf = $CustomFields->Next) {
- my $cf_id = $cf->Id;
-
- if ($GlobalCFs and $GlobalCFs->HasEntryForCustomField($cf_id)) {
- push @GlobalCFs, $cf;
- next;
+# {{{ now process the 'copy queue' action
+my @actions;
+if ($Source and $Source ne $id) {
+ my $SourceQueue = RT::Queue->new($session{'CurrentUser'});
+ $SourceQueue->Load($Source) || Abort(loc("Couldn't load queue"));
+ my $SourceCustomFields = RT::CustomFields->new($session{'CurrentUser'});
+ $SourceCustomFields->LimitToQueue($SourceQueue->id);
+
+ # delete old fields
+ foreach my $CustomFieldObj ( @{$CustomFields->ItemsArrayRef} ) {
+ $CustomFieldObj->Delete;
}
- if ($UpdateCFs) {
- # Go through and delete all the custom field relationships that this object
- # no longer has
- my $key = "Object-$id-CF-$cf_id";
- if ($ARGS{$key}) {
- if (!$ObjectCFs->HasEntryForCustomField($cf_id)) {
- my ($val, $msg) = $cf->AddToObject($Object);
- push (@results, $msg);
- push @UnassignedCFs, $cf if !$val;
- }
- }
- else {
- push @UnassignedCFs, $cf;
- if ($ObjectCFs->HasEntryForCustomField($cf_id)) {
- my ($val, $msg) = $cf->RemoveFromObject($Object);
- push (@results, $msg);
- pop @UnassignedCFs if !$val;
- }
+ # add new fields
+ while (my $SourceCustomFieldObj = $SourceCustomFields->Next) {
+ my $CustomFieldObj = RT::CustomField->new($session{'CurrentUser'});
+ my ($val, $msg) = $CustomFieldObj->Create(
+ id => $SourceCustomFieldObj->id,
+ Queue => $id,
+ Name => $SourceCustomFieldObj->Name,
+ Type => $SourceCustomFieldObj->Type,
+ Description => $SourceCustomFieldObj->Description,
+ );
+ Abort(loc("Could not create CustomField") . ": $msg") unless ($val);
+ push @actions, $msg;
+
+ $CustomFieldObj->SetSortOrder($SourceCustomFieldObj->SortOrder);
+
+ # add new values
+ my $values = $SourceCustomFieldObj->Values();
+ while (my $v = $values->Next) {
+ my ( $addval, $addmsg ) = $CustomFieldObj->AddValue(
+ Name => $v->Name,
+ Description => $v->Description,
+ SortOrder => $v->SortOrder
+ );
}
}
- elsif (!$ObjectCFs->HasEntryForCustomField($cf_id)) {
- push @UnassignedCFs, $cf;
- }
- else {
- }
+
+ # because content changed, we must redo search for subsequent uses
+ $CustomFields->RedoSearch;
+ $CustomFields->GotoFirstItem;
}
+# }}}
-# redo search...
-$ObjectCFs = RT::ObjectCustomFields->new($session{'CurrentUser'});
-$ObjectCFs->UnLimit;
-$ObjectCFs->LimitToObjectId($id);
-$ObjectCFs->LimitToLookupType($lookup);
+# {{{ deal with deleting existing custom fields
+foreach my $key (keys %ARGS) {
+ # {{{ if we're trying to delete the custom field
+ if ($key =~ /^DeleteCustomField-(\d+)/) {
+ my $id = $1;
+ my $CustomFieldObj = RT::CustomField->new($session{'CurrentUser'});
+ $CustomFieldObj->Load($id);
+ my ($retval, $msg) = $CustomFieldObj->Delete;
+ if ($retval) {
+ push @actions, loc("Custom field deleted");
+ }
+ else {
+ push @actions, $msg;
+ }
+ }
+ # }}}
+}
+# }}}
</%INIT>
<%ARGS>
+$id => 0
$title => undef
$Move => undef
$Source => undef
$CustomField => undef
$FindDisabledCustomFields => undef
-$UpdateCFs => 0
-$Object
-$ObjectType
-$SubType => ''
</%ARGS>
diff --git a/rt/html/Admin/Elements/EditQueueWatchers b/rt/html/Admin/Elements/EditQueueWatchers
index c93bf81..f6559e7 100644
--- a/rt/html/Admin/Elements/EditQueueWatchers
+++ b/rt/html/Admin/Elements/EditQueueWatchers
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
%if ($Members->Count == 0 ) {
<ul>
<li><i><&|/l&>none</&></i>
@@ -51,7 +51,8 @@
<ul>
% while (my $watcher=$Members->Next) {
<li>
-<INPUT TYPE=CHECKBOX NAME="Queue-<%$QueueObj->Id%>-DeleteWatcher-Type-<%$Watchers->Type%>-Principal-<%$watcher->MemberId%>" value="1"
+<INPUT TYPE=CHECKBOX
+ NAME="Queue-<%$QueueObj->Id%>-DeleteWatcher-Type-<%$Watchers->Type%>-Principal-<%$watcher->MemberId%>"
UNCHECKED>
% if ($watcher->MemberObj->IsUser) {
<a href="<%$RT::WebPath%>/Admin/Users/Modify.html?id=<%$watcher->MemberObj->ObjectId%>">
diff --git a/rt/html/Admin/Elements/EditScrip b/rt/html/Admin/Elements/EditScrip
index 907ae9a..4207114 100644
--- a/rt/html/Admin/Elements/EditScrip
+++ b/rt/html/Admin/Elements/EditScrip
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<& /Elements/ListActions, actions => \@actions &>
diff --git a/rt/html/Admin/Elements/EditScrips b/rt/html/Admin/Elements/EditScrips
index 9526118..8959f6c 100644
--- a/rt/html/Admin/Elements/EditScrips
+++ b/rt/html/Admin/Elements/EditScrips
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,13 +42,13 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<& /Elements/ListActions, actions => \@actions &>
<form action="Scrips.html" method="post">
<input type="hidden" name="id" value="<%$id%>">
-<h2><&|/l&>Current Scrips</&></h2>
+<P><&|/l&>Current Scrips</&>:</P>
% if ($Scrips->Count == 0 ) {
<P><i><&|/l&>(No scrips)</&></i></P>
% } else {
@@ -58,7 +58,7 @@
% while (my $scrip = $Scrips->Next ) {
<TR>
<TD>
-<input type="checkbox" name="DeleteScrip-<%$scrip->Id%>" value="1">
+<input type="checkbox" name="DeleteScrip-<%$scrip->Id%>">
</TD>
<TD>
<a href="Scrip.html?id=<%$scrip->Id%>&Queue=<%$id%>"><% $scrip->Description || "<i>(".loc('no value').")</i>" |n %></a><br>
diff --git a/rt/html/Admin/Elements/EditTemplates b/rt/html/Admin/Elements/EditTemplates
index 207ffd0..6ac56c2 100644
--- a/rt/html/Admin/Elements/EditTemplates
+++ b/rt/html/Admin/Elements/EditTemplates
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<& /Elements/ListActions, actions => \@actions &>
<FORM METHOD=GET ACTION="Templates.html">
@@ -63,7 +63,7 @@
% while (my $TemplateObj = $Templates->Next) {
<TR>
<TD>
-<input type="checkbox" name="DeleteTemplate-<%$TemplateObj->Id%>" value="1">
+<input type="checkbox" name="DeleteTemplate-<%$TemplateObj->Id%>">
</TD>
<TD>
<A HREF="Template.html?Queue=<%$id%>&Template=<%$TemplateObj->id()%>">
diff --git a/rt/html/Admin/Elements/EditUserComments b/rt/html/Admin/Elements/EditUserComments
index fb96dc0..bc23f77 100644
--- a/rt/html/Admin/Elements/EditUserComments
+++ b/rt/html/Admin/Elements/EditUserComments
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<& /Elements/Header, Title => "Comments about $name" &>
<&|/l&>These comments aren't generally visible to the user</&>:<br>
<input type="hidden" name="id" value="<%$id%>">
diff --git a/rt/html/Admin/Elements/GlobalCustomFieldTabs b/rt/html/Admin/Elements/GlobalCustomFieldTabs
deleted file mode 100755
index 8d4eaca..0000000
--- a/rt/html/Admin/Elements/GlobalCustomFieldTabs
+++ /dev/null
@@ -1,93 +0,0 @@
-%# BEGIN BPS TAGGED BLOCK {{{
-%#
-%# COPYRIGHT:
-%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
-%# <jesse@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., 675 Mass Ave, Cambridge, MA 02139, USA.
-%#
-%#
-%# 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/SystemTabs, subtabs => $tabs,
- current_tab => 'Admin/Global/CustomFields/index.html',
- current_subtab => $current_tab,
- Title => $Title &>
-<%INIT>
-
-
- my $tabs = {
-
- A => { title => loc('Users'),
- text => loc('Modify scrips which apply to all queues'),
- path => 'Admin/Global/CustomFields/Users.html',
- },
- B => { title => loc('Groups'),
- text => loc('Edit system templates'),
- path => 'Admin/Global/CustomFields/Groups.html',
- },
-
- F => { title => loc('Tickets'),
- text => loc('Modify global custom fields'),
- path => 'Admin/Global/CustomFields/Queue-Tickets.html',
- },
-
- G => { title => loc('Ticket Transactions'),
- text => loc('Modify global group rights'),
- path => 'Admin/Global/CustomFields/Queue-Transactions.html',
- },
-
-};
- # Now let callbacks add their extra tabs
- $m->comp('/Elements/Callback', tabs => $tabs, %ARGS);
-
- foreach my $tab (sort keys %{$tabs}) {
- if ($tabs->{$tab}->{'path'} eq $current_tab) {
- $tabs->{$tab}->{"subtabs"} = $subtabs;
- $tabs->{$tab}->{"current_subtab"} = $current_subtab;
- }
- }
-</%INIT>
-
-
-<%ARGS>
-$id => undef
-$current_tab => undef
-$subtabs => undef
-$current_subtab => undef
-$Title => undef
-</%ARGS>
diff --git a/rt/html/Admin/Elements/GroupTabs b/rt/html/Admin/Elements/GroupTabs
index 60edda4..de39ec1 100644
--- a/rt/html/Admin/Elements/GroupTabs
+++ b/rt/html/Admin/Elements/GroupTabs
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<& /Admin/Elements/Tabs,
subtabs => $tabs,
current_tab => 'Admin/Groups/',
@@ -67,8 +67,6 @@ $tabs->{"this"} = { class => "currentnav",
path => "Admin/Groups/GroupRights.html?id=" . $GroupObj->id, },
G => { title => loc('User Rights'),
path => "Admin/Groups/UserRights.html?id=" . $GroupObj->id, },
- H => { title => loc('History'),
- path => "Admin/Groups/History.html?id=" . $GroupObj->id },
}
}
}
@@ -76,7 +74,7 @@ $tabs->{"A"} = { title => loc('Select group'),
path => "Admin/Groups/", };
$tabs->{"B"} = { title => loc('New group'),
path => "Admin/Groups/Modify.html?Create=1",
- separator => 1, };
+ separator => 1, };
# Now let callbacks add their extra tabs
$m->comp( '/Elements/Callback', tabs => $tabs, %ARGS );
diff --git a/rt/html/Admin/Elements/Header b/rt/html/Admin/Elements/Header
index b809080..69a3ccd 100644
--- a/rt/html/Admin/Elements/Header
+++ b/rt/html/Admin/Elements/Header
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,8 +42,8 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
-<& /Elements/Header, %ARGS &>
+%# }}} END BPS TAGGED BLOCK
+<& /Elements/Header, Title => $Title &>
<%ARGS>
$Title => undef
diff --git a/rt/html/Admin/Elements/ListGlobalCustomFields b/rt/html/Admin/Elements/ListGlobalCustomFields
index 3df9d62..abca290 100644
--- a/rt/html/Admin/Elements/ListGlobalCustomFields
+++ b/rt/html/Admin/Elements/ListGlobalCustomFields
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
% my $count = 0;
% while (my $CustomFieldObj = $CustomFields->Next) {
% $count++;
diff --git a/rt/html/Admin/Elements/ListGlobalScrips b/rt/html/Admin/Elements/ListGlobalScrips
index 2e37912..cb3f89a 100644
--- a/rt/html/Admin/Elements/ListGlobalScrips
+++ b/rt/html/Admin/Elements/ListGlobalScrips
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,32 +42,16 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
-
-% if ($Scrips->Count == 0) {
-
-<P><i><&|/l&>(No scrips)</&></i></P>
-
-% } else {
-
-<UL>
-
+%# }}} END BPS TAGGED BLOCK
+% my $count = 0;
% while (my $scrip = $Scrips->Next ) {
-<LI>
-<a href="<%$RT::WebPath%>/Admin/Global/Scrip.html?id=<%$scrip->Id%>&Queue=<%0%>">
-% if ($scrip->Description) {
-<% $scrip->Description %>
-% } else {
-<i>(<&|/l, $scrip->Id&>Scrip #[_1]</&>)</i>
-% }
-</a><br>
-<small><&|/l, loc($scrip->ConditionObj->Name), loc($scrip->ActionObj->Name), loc($scrip->TemplateObj->Name) &>[_1] [_2] with template [_3]</&></small>
-</LI>
+% $count++;
+<font size="-1"><&|/l, loc($scrip->ConditionObj->Name), loc($scrip->ActionObj->Name), loc($scrip->TemplateObj->Name) &>[_1] [_2] with template [_3]</&></font>
+<BR>
+% }
+% if (!$count) {
+<font size="-1"><&|/l&>(No scrips)</&></font>
% }
-
-</UL>
-
-% }
<%init>
my $Scrips = new RT::Scrips ($session{'CurrentUser'});
diff --git a/rt/html/Admin/Elements/ModifyTemplate b/rt/html/Admin/Elements/ModifyTemplate
index 6749f3e..acd87a7 100644
--- a/rt/html/Admin/Elements/ModifyTemplate
+++ b/rt/html/Admin/Elements/ModifyTemplate
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<TABLE>
<TR>
<TD ALIGN=RIGHT>
diff --git a/rt/html/Admin/Elements/ObjectCustomFields b/rt/html/Admin/Elements/ObjectCustomFields
deleted file mode 100644
index a87e157..0000000
--- a/rt/html/Admin/Elements/ObjectCustomFields
+++ /dev/null
@@ -1,109 +0,0 @@
-%# BEGIN BPS TAGGED BLOCK {{{
-%#
-%# COPYRIGHT:
-%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
-%# <jesse@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., 675 Mass Ave, Cambridge, MA 02139, USA.
-%#
-%#
-%# 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 &>
-<& $ObjectTabs,
-$id ? (
- id => $Object->id,
- current_tab => "Admin/$Types/CustomFields.html?$sub_type_url&id=".$id,
- current_subtab => "Admin/$Types/CustomFields.html?$sub_type_url&id=".$id,
- "${Type}Obj" => $Object,
-) : (
- current_tab => "Admin/Global/CustomFields/${QualifiedType}s.html",
-),
- Title => $title
- &>
-
-<& /Admin/Elements/EditCustomFields, %ARGS, title => $title, Object => $Object &>
-<%INIT>
-# XXX TODO: Validate here?
-#$ObjectType =~ /^RT::(Queue|User|Group)$/
-# or Abort(loc("Object of type [_1] cannot take custom fields", $ObjectType));
-
-
-
-my $Type = $1;
-my $Types = $Type.'s';
-my $ObjectTabs;
-my $Object = $ObjectType->new($session{'CurrentUser'});
-
-
-my $QualifiedType;
-my $FriendlySubTypes;
-if ($SubType =~/^RT::(.*)$/) {
- $FriendlySubTypes = RT::CustomField->new($session{'CurrentUser'})->FriendlyLookupType($Object->CustomFieldLookupType);
- $QualifiedType = "$Type-$1";
-} else {
- $QualifiedType = $Type;
-}
-
-if ($id) {
- $Object->Load($id) || Abort(loc("Couldn't load object [_1]", $id));
- $ObjectTabs = "/Admin/Elements/${Type}Tabs";
-} else {
- $ObjectTabs = "/Admin/Elements/GlobalCustomFieldTabs";
-
-}
-
-my $title;
-if ($id) {
-$title = loc('Edit Custom Fields for [_1]', $Object->Name);
-}
-elsif ($SubType) {
-
- $title= loc("Modify Custom Fields which apply to [_1] for all [_2]", loc(lc($FriendlySubTypes)), loc(lc($Types)));
-} else {
- $title =loc("Modify Custom Fields which apply to all [_1]", loc(lc($Types)));
-
-}
-my $sub_type_url;
-$sub_type_url = "SubType=$SubType" if $SubType;
-
-</%INIT>
-<%ARGS>
-$id => undef
-$ObjectType
-$SubType => undef
-</%ARGS>
diff --git a/rt/html/Admin/Elements/PickCustomFields b/rt/html/Admin/Elements/PickCustomFields
deleted file mode 100644
index c2a30f9..0000000
--- a/rt/html/Admin/Elements/PickCustomFields
+++ /dev/null
@@ -1,96 +0,0 @@
-%# BEGIN BPS TAGGED BLOCK {{{
-%#
-%# COPYRIGHT:
-%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
-%# <jesse@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., 675 Mass Ave, Cambridge, MA 02139, USA.
-%#
-%#
-%# 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 }}}
-% if (@CustomFields == 0) {
-<p><i><&|/l&>(None)</&></i></p>
-% } else {
-<TABLE cellspacing=0 cellpadding=2>
-% my $count;
-% foreach my $CustomFieldObj (@CustomFields) {
-<TR>
-% if (!$ReadOnly) {
- <TD valign="TOP">
-<input type="checkbox" name="Object-<%$id%>-CF-<%$CustomFieldObj->Id%>" value="1" <% $Checked ? 'CHECKED' : '' %>
->
- </TD>
-% }
- <TD valign="TOP">
- <A HREF="<%$RT::WebPath%>/Admin/CustomFields/Modify.html?id=<%$CustomFieldObj->id()%>">
-% if ($CustomFieldObj->Name) {
-<b><%$CustomFieldObj->Name%></b>
-% } else {
-<i>(<&|/l&>no name</&>)</i>
-% }
-</a><br>
- <%$CustomFieldObj->Description%>
- </TD>
- <TD valign="TOP">
- <i><% $CustomFieldObj->FriendlyTypeComposite %></i>
- </TD>
-% # show 'move up' unless it's the first item
-% if ($count++ and $Checked) {
- <TD valign="TOP">
- [<a href="<%$RT::WebPath%><% $m->request_comp->path |n %>?id=<%$id%>&SubType=<%$SubType%>&CustomField=<%$CustomFieldObj->id%>&Move=-1"><&|/l&>Move up</&></a>]
-% } else {
- <TD valign="TOP" ALIGN=RIGHT>
-% }
-
-% # show 'move down' unless it's the last item
-% if ($count != @CustomFields and $Checked) {
-% $m->print(' | ') if $count > 1;
- [<a href="<%$RT::WebPath%><% $m->request_comp->path |n %>?id=<%$id%>&SubType=<%$SubType%>&CustomField=<%$CustomFieldObj->id%>&Move=1"><&|/l&>Move down</&></a>]
-% }
- </TD>
-</TR>
-% }
-</TABLE>
-% }
-<%ARGS>
-@CustomFields
-$id
-$ReadOnly => 0
-$Checked => 0
-$SubType
-</%ARGS>
diff --git a/rt/html/Admin/Elements/PickObjects b/rt/html/Admin/Elements/PickObjects
deleted file mode 100644
index b07a882..0000000
--- a/rt/html/Admin/Elements/PickObjects
+++ /dev/null
@@ -1,80 +0,0 @@
-%# BEGIN BPS TAGGED BLOCK {{{
-%#
-%# COPYRIGHT:
-%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
-%# <jesse@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., 675 Mass Ave, Cambridge, MA 02139, USA.
-%#
-%#
-%# 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 }}}
-% if (@Objects == 0) {
-<P><i><&|/l&>(None)</&></i></P>
-% } else {
-<TABLE cellspacing=0 cellpadding=2>
-% my $count;
-% foreach my $Object (@Objects) {
-<TR>
-% if (!$ReadOnly) {
- <TD valign="TOP">
-<input type="checkbox" name="Object-<%$Object->id%>-CF-<%$id%>" value="1" <% $Checked ? 'CHECKED' : ''%>
->
- </TD>
-% }
- <TD valign="TOP">
-% if ($Object->Name) {
- <b><%$Object->Name%></b><br>
-% } else {
- <i>(<%loc("no name")%>)</i><br>
-% }
- <%$Object->can('Description') && $Object->Description%>
- </TD>
-%# <TD valign="TOP">
-%# <i><% $CustomFieldObj->FriendlyTypeComposite %></i>
-%# </TD>
- </TD>
-</TR>
-% }
-</TABLE>
-% }
-<%ARGS>
-@Objects
-$id
-$ReadOnly => 0
-$Checked => 0
-</%ARGS>
diff --git a/rt/html/Admin/Elements/QueueRightsForUser b/rt/html/Admin/Elements/QueueRightsForUser
index 01f294a..57b5fd8 100644
--- a/rt/html/Admin/Elements/QueueRightsForUser
+++ b/rt/html/Admin/Elements/QueueRightsForUser
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,11 +42,11 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<UL>
%while(my $ACE = $ACL->Next) {
-<LI><checkbox name="delete_ace_<%$ACE->id%>" value="1"> <% loc($ACE->RightName) %> (<%$ACE->UserObj->RealName%>)
+<LI><checkbox name="delete_ace_<%$ACE->id%>"> <% loc($ACE->RightName) %> (<%$ACE->UserObj->RealName%>)
%}
</UL>
diff --git a/rt/html/Admin/Elements/QueueTabs b/rt/html/Admin/Elements/QueueTabs
index 93522d0..0eec1fc 100644
--- a/rt/html/Admin/Elements/QueueTabs
+++ b/rt/html/Admin/Elements/QueueTabs
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<& /Admin/Elements/Tabs,
subtabs => $tabs,
current_tab => 'Admin/Queues/',
@@ -71,12 +71,8 @@ if ($id) {
path => "Admin/Queues/Templates.html?id=".$id,
},
- G1 => { title => loc('Ticket Custom Fields'),
- path => 'Admin/Queues/CustomFields.html?SubType=RT::Ticket&id='.$id,
- },
-
- G2 => { title => loc('Transaction Custom Fields'),
- path => 'Admin/Queues/CustomFields.html?SubType=RT::Ticket-RT::Transaction&id='.$id,
+ G => { title => loc('Custom Fields'),
+ path => 'Admin/Queues/CustomFields.html?id='.$id,
},
H => { title => loc('Group Rights'),
@@ -94,7 +90,8 @@ if ($session{'CurrentUser'}->HasRight( Object => $RT::System, Right => 'AdminQue
};
$tabs->{"B"} = { title => loc('New queue'),
path => "Admin/Queues/Modify.html?Create=1",
- separator => 1, };
+ separator => 1,
+ };
}
# Now let callbacks add their extra tabs
diff --git a/rt/html/Admin/Elements/SelectCustomFieldLookupType b/rt/html/Admin/Elements/SelectCustomFieldLookupType
deleted file mode 100644
index ec9f740..0000000
--- a/rt/html/Admin/Elements/SelectCustomFieldLookupType
+++ /dev/null
@@ -1,58 +0,0 @@
-%# BEGIN BPS TAGGED BLOCK {{{
-%#
-%# COPYRIGHT:
-%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
-%# <jesse@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., 675 Mass Ave, Cambridge, MA 02139, USA.
-%#
-%#
-%# 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 }}}
-<SELECT NAME ="<%$Name%>">
-%for my $option ($cf->LookupTypes) {
-<OPTION VALUE="<%$option%>" <%$option eq $Default && "SELECTED"%>><% $cf->FriendlyLookupType($option) %></OPTION>
-%}
-</SELECT>
-<%INIT>
-my $cf = RT::CustomField->new($session{'CurrentUser'});
-
-</%INIT>
-<%ARGS>
-$Default=>undef
-$Name => 'LookupType'
-</%ARGS>
diff --git a/rt/html/Admin/Elements/SelectCustomFieldType b/rt/html/Admin/Elements/SelectCustomFieldType
index 3f25b8e..76606c4 100644
--- a/rt/html/Admin/Elements/SelectCustomFieldType
+++ b/rt/html/Admin/Elements/SelectCustomFieldType
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,10 +42,10 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<SELECT NAME ="<%$Name%>">
-%for my $option ($cf->TypeComposites) {
-<OPTION VALUE="<%$option%>" <%$option eq $Default && "SELECTED"%>><% $cf->FriendlyTypeComposite($option) %></OPTION>
+%for my $option ($cf->Types) {
+<OPTION VALUE="<%$option%>" <%$option eq $Default && "SELECTED"%>><% $cf->FriendlyType($option) %></OPTION>
%}
</SELECT>
<%INIT>
@@ -54,5 +54,5 @@ my $cf = RT::CustomField->new($session{'CurrentUser'});
</%INIT>
<%ARGS>
$Default=>undef
-$Name => 'TypeComposite'
+$Name => 'Type'
</%ARGS>
diff --git a/rt/html/Admin/Elements/SelectGroups b/rt/html/Admin/Elements/SelectGroups
index 92bd475..175ce06 100644
--- a/rt/html/Admin/Elements/SelectGroups
+++ b/rt/html/Admin/Elements/SelectGroups
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<SELECT MULTIPLE NAME="<%$Name%>" SIZE=10>
%while (my $group = $groups->Next) {
<OPTION VALUE="<%$group->id%>"><%$group->Name%>
diff --git a/rt/html/Admin/Elements/SelectModifyGroup b/rt/html/Admin/Elements/SelectModifyGroup
index 272e1f0..b33eaea 100644
--- a/rt/html/Admin/Elements/SelectModifyGroup
+++ b/rt/html/Admin/Elements/SelectModifyGroup
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
%while ( $Group = $Groups->Next) {
<A HREF="Modify.html?id=<%$Group->id%>"><%$Group->id%>: <%$Group->Name%></a><BR>
%}
diff --git a/rt/html/Admin/Elements/SelectModifyQueue b/rt/html/Admin/Elements/SelectModifyQueue
index 3a30d09..2ca6bd8 100644
--- a/rt/html/Admin/Elements/SelectModifyQueue
+++ b/rt/html/Admin/Elements/SelectModifyQueue
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
%while ( $queue = $queues->Next) {
<A HREF="Modify.html?id=<%$queue->id%>"><%$queue->id%>: <%$queue->Name%></a><BR>
%}
diff --git a/rt/html/Admin/Elements/SelectModifyUser b/rt/html/Admin/Elements/SelectModifyUser
index fc6c012..97411c9 100644
--- a/rt/html/Admin/Elements/SelectModifyUser
+++ b/rt/html/Admin/Elements/SelectModifyUser
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
%while ( $user = $users->Next) {
<A HREF="Modify.html?id=<%$user->id%>"><%$user->id%>: <%$user->Name%></a><BR>
%}
diff --git a/rt/html/Admin/Elements/SelectNewGroupMembers b/rt/html/Admin/Elements/SelectNewGroupMembers
index 95056ae..90f9a0b 100644
--- a/rt/html/Admin/Elements/SelectNewGroupMembers
+++ b/rt/html/Admin/Elements/SelectNewGroupMembers
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
% if ($Show ne 'Groups') {
<b><&|/l&>Users</&></b>
<SELECT MULTIPLE NAME="<%$Name%>Users" SIZE=10>
diff --git a/rt/html/Admin/Elements/SelectRights b/rt/html/Admin/Elements/SelectRights
index 3e61d50..61a9e42 100644
--- a/rt/html/Admin/Elements/SelectRights
+++ b/rt/html/Admin/Elements/SelectRights
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,30 +42,27 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<INPUT TYPE=HIDDEN NAME="CheckACL" VALUE="<%$ACLDesc%>">
<TABLE BORDER=0>
<TR>
<TD valign=top width="180" align="left">
-% my %current_rights;
<h3><&|/l&>Current rights</&></h3>
-% if ($ACLObj->Count() == 0) {
-<i><&|/l&>No rights granted.</&></i> <BR>
-% } else {
+% if ($ACLObj->Count() > 0) {
<i>(<&|/l&>Check box to revoke right</&>)</i> <BR>
+% } else {
+<i><&|/l&>No rights granted.</&></i> <BR>
+% }
% while (my $right = $ACLObj->Next()) {
% if ($right->RightName) {
-% $current_rights{$right->RightName} = 1;
<input type=checkbox value="<%$right->Id%>" name="RevokeRight-<%$ACLDesc%>-<%$right->RightName%>"> <% loc($right->RightName) %><br>
% }
% }
-% }
</TD>
<TD valign=top>
<h3><&|/l&>New rights</&></h3>
<SELECT SIZE=5 MULTIPLE NAME="GrantRight-<%$ACLDesc%>">
% foreach $right (sort keys %Rights) {
-% next if $current_rights{$right};
<OPTION VALUE="<%$right%>"
><% loc($right) %></OPTION>
% }
@@ -103,7 +100,7 @@
}
else {
- %Rights = ( loc('System Error') => loc("No rights found") );
+ %Rights = { loc('System Error') => loc("No rights found")};
}
$ACLDesc = "$PrincipalId-".ref($Object)."-".$Object->Id;
diff --git a/rt/html/Admin/Elements/SelectScrip b/rt/html/Admin/Elements/SelectScrip
index a9e9796..7fce6d5 100644
--- a/rt/html/Admin/Elements/SelectScrip
+++ b/rt/html/Admin/Elements/SelectScrip
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<SELECT NAME=<%$Name%>>
<OPTION VALUE=""
<% $Default eq undef && 'SELECTED' %>
diff --git a/rt/html/Admin/Elements/SelectScripAction b/rt/html/Admin/Elements/SelectScripAction
index 8d88d64..17cd6a1 100644
--- a/rt/html/Admin/Elements/SelectScripAction
+++ b/rt/html/Admin/Elements/SelectScripAction
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,14 +42,14 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<SELECT NAME=<%$Name%>>
<OPTION VALUE=""
-<% ! defined $Default && 'SELECTED' %>
+<% $Default eq undef && 'SELECTED' %>
>-</OPTION>
%while (my $ScripAction = $ScripActions->Next) {
<OPTION VALUE=<%$ScripAction->Id%>
-<% defined $Default && $ScripAction->Id == $Default && 'SELECTED' %>
+<% $ScripAction->Id == $Default && 'SELECTED' %>
><% loc($ScripAction->Name) %>
</OPTION>
%}
diff --git a/rt/html/Admin/Elements/SelectScripCondition b/rt/html/Admin/Elements/SelectScripCondition
index faa99fd..021132b 100644
--- a/rt/html/Admin/Elements/SelectScripCondition
+++ b/rt/html/Admin/Elements/SelectScripCondition
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,14 +42,14 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<SELECT NAME=<%$Name%>>
<OPTION VALUE=""
-<% ! defined $Default && 'SELECTED' %>
+<% $Default eq undef && 'SELECTED' %>
>-</OPTION>
%while (my $ScripCondition = $ScripConditions->Next) {
<OPTION VALUE=<%$ScripCondition->Id%>
-<% defined $Default && $ScripCondition->Id == $Default && 'SELECTED' %>
+<% $ScripCondition->Id == $Default && 'SELECTED' %>
><% loc($ScripCondition->Name) %>
</OPTION>
%}
diff --git a/rt/html/Admin/Elements/SelectSingleOrMultiple b/rt/html/Admin/Elements/SelectSingleOrMultiple
index 5716950..9b19826 100644
--- a/rt/html/Admin/Elements/SelectSingleOrMultiple
+++ b/rt/html/Admin/Elements/SelectSingleOrMultiple
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<select name="<%$Name%>">
<option value="1" <%$SingleDefault%>><&|/l&>Single</&></option>
<option value="0" <%$MultipleDefault%>><&|/l&>Multiple</&></option>
diff --git a/rt/html/Admin/Elements/SelectStage b/rt/html/Admin/Elements/SelectStage
index 0fbf5c6..0472d2f 100644
--- a/rt/html/Admin/Elements/SelectStage
+++ b/rt/html/Admin/Elements/SelectStage
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,9 +42,9 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<SELECT NAME=<%$Name%>>
-% foreach my $stage (@stages) {
+% foreach my $stage (qw(TransactionCreate TransactionBatch Disabled)) {
<OPTION VALUE=<%$stage%>
<% ($stage eq $Default) && 'SELECTED' %>
><% loc($stage) %>
@@ -54,9 +54,6 @@
if ($Default eq '') {
$Default = 'TransactionCreate';
}
-my @stages = 'TransactionCreate';
-push @stages, 'TransactionBatch' if $RT::UseTransactionBatch;
-push @stages, 'Disabled';
</%INIT>
<%ARGS>
$Default => 'TransactionCreate'
diff --git a/rt/html/Admin/Elements/SelectTemplate b/rt/html/Admin/Elements/SelectTemplate
index 7d83b67..f489483 100644
--- a/rt/html/Admin/Elements/SelectTemplate
+++ b/rt/html/Admin/Elements/SelectTemplate
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<SELECT NAME=<%$Name%>>
<OPTION VALUE=""
<% $Default eq 'none' && 'SELECTED' %>
diff --git a/rt/html/Admin/Elements/SelectUsers b/rt/html/Admin/Elements/SelectUsers
index a88aa8f..31ac3e4 100644
--- a/rt/html/Admin/Elements/SelectUsers
+++ b/rt/html/Admin/Elements/SelectUsers
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<SELECT MULTIPLE NAME="<%$Name%>" SIZE=10>
%while (my $user = $users->Next) {
<OPTION VALUE="<%$user->id%>"><%$user->Name%>
diff --git a/rt/html/Admin/Elements/SystemTabs b/rt/html/Admin/Elements/SystemTabs
index 646f552..4409695 100644
--- a/rt/html/Admin/Elements/SystemTabs
+++ b/rt/html/Admin/Elements/SystemTabs
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<& /Admin/Elements/Tabs, subtabs => $tabs,
current_tab => 'Admin/Global/',
current_subtab => $current_tab,
@@ -59,7 +59,7 @@
},
F => { title => loc('Custom Fields'),
- path => 'Admin/Global/CustomFields/index.html',
+ path => 'Admin/Global/CustomFields.html',
},
G => { title => loc('Group Rights'),
diff --git a/rt/html/Admin/Elements/Tabs b/rt/html/Admin/Elements/Tabs
index f90a629..39eaa72 100644
--- a/rt/html/Admin/Elements/Tabs
+++ b/rt/html/Admin/Elements/Tabs
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<& /Elements/Tabs,
tabs => $tabs,
current_toptab => 'Admin/',
@@ -59,13 +59,10 @@
C => { title => loc('Queues'),
path => 'Admin/Queues/',
},
- D => { 'title' => loc('Custom Fields'),
- path => 'Admin/CustomFields/',
- },
- E => { 'title' => loc('Global'),
+ D => { 'title' => loc('Global'),
path => 'Admin/Global/',
},
- F => { 'title' => loc('Tools'),
+ E => { 'title' => loc('Tools'),
path => 'Admin/Tools/',
},
};
diff --git a/rt/html/Admin/Elements/ToolTabs b/rt/html/Admin/Elements/ToolTabs
index 773b810..606bd12 100755
--- a/rt/html/Admin/Elements/ToolTabs
+++ b/rt/html/Admin/Elements/ToolTabs
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<& /Admin/Elements/Tabs, subtabs => $tabs,
current_tab => 'Admin/Tools/',
current_subtab => $current_tab,
diff --git a/rt/html/Admin/Elements/UserTabs b/rt/html/Admin/Elements/UserTabs
index 0ffd29b..671bd6d 100644
--- a/rt/html/Admin/Elements/UserTabs
+++ b/rt/html/Admin/Elements/UserTabs
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,61 +42,52 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
-<& /Admin/Elements/Tabs,
+%# }}} END BPS TAGGED BLOCK
+<& /Admin/Elements/Tabs,
subtabs => $tabs,
- current_tab => 'Admin/Users/',
- current_subtab => $current_tab,
+ current_tab => 'Admin/Users/',
+ current_subtab => $current_tab,
Title => $Title &>
<%INIT>
my $tabs;
if ($id) {
-$tabs->{'this'} = { title => eval { $UserObj->Name },
-
+ $tabs->{'this'} = {
+ title => eval { $UserObj->Name },
path => "Admin/Users/Modify.html?id=".$id,
-subtabs => {
- Basics => { title => loc('Basics'),
+ current_subtab => $current_tab,
+ subtabs => {
+ A => { title => loc('Basics'),
path => "Admin/Users/Modify.html?id=".$id
},
- Memberships => { title => loc('Memberships'),
- path => "Admin/Users/Memberships.html?id=".$id
- },
- History => { title => loc('History'),
- path => "Admin/Users/History.html?id=".$id
- },
-# Scrips => { title => loc('Rights'),
-# path => "Admin/Users/Rights.html?id=".$id
-# }
-
+ }
}
}
-}
-if ($session{'CurrentUser'}->HasRight( Object => $RT::System, Right => 'AdminUsers')) {
- $tabs->{"A"} = { title => loc('Select user'),
- path => "Admin/Users/",
- };
- $tabs->{"B"} = { title => loc('New user'),
- path => "Admin/Users/Modify.html?Create=1",
+
+if ( $session{'CurrentUser'}->HasRight( Object => $RT::System, Right => 'AdminUsers') ) {
+ $tabs->{"A"} = {
+ title => loc('Select user'),
+ path => "Admin/Users/",
+ };
+ $tabs->{"B"} = {
+ title => loc('New user'),
+ path => "Admin/Users/Modify.html?Create=1",
separator => 1,
};
}
- # Now let callbacks add their extra tabs
- $m->comp('/Elements/Callback', tabs => $tabs, %ARGS);
-
-#foreach my $tab ( sort keys %{$tabs} ) {
-# if ( $tabs->{$tab}->{'path'} eq $current_subtab ) {
-# $tabs->{$tab}->{"current_subtab"} = $current_subtab;
-# }
-#}
-foreach my $tab ( sort keys %{$tabs->{'this'}->{'subtabs'}} ) {
- if ( $tabs->{'this'}->{'subtabs'}->{$tab}->{'path'} eq $current_tab ) {
- $tabs->{'this'}->{'subtabs'}->{$tab}->{"subtabs"} = $subtabs;
- $tabs->{'this'}->{'subtabs'}->{$tab}->{"current_subtab"} = $current_subtab;
- }
-}
-$tabs->{'this'}->{"current_subtab"} = $current_tab;
+# Now let callbacks add their extra tabs
+$m->comp('/Elements/Callback', tabs => $tabs, %ARGS);
+
+foreach my $tab ( sort keys %{$tabs->{'this'}->{'subtabs'}} ) {
+ if ( $tabs->{'this'}->{'subtabs'}->{$tab}->{'path'} eq $current_tab ) {
+ $tabs->{'this'}->{"current_subtab"} = $current_tab;
+ $tabs->{'this'}->{'subtabs'}->{$tab}->{"current_subtab"} = $current_subtab;
+ $tabs->{'this'}->{'subtabs'}->{$tab}->{"subtabs"} = $subtabs;
+ }
+}
+
$current_tab = "Admin/Users/Modify.html?id=".$id if $id;
+
</%INIT>
<%ARGS>
$UserObj => undef
diff --git a/rt/html/Elements/EditCustomFieldFreeform b/rt/html/Admin/Global/CustomField.html
index c097ee0..3871d89 100644
--- a/rt/html/Elements/EditCustomFieldFreeform
+++ b/rt/html/Admin/Global/CustomField.html
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,27 +42,45 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
-% if ($Multiple) {
-<textarea cols=<%$Cols%> rows=<%$Rows%> name="<%$NamePrefix%><%$CustomField->Id%>-Values"><%$Default%></textarea>
-% } else {
-<input name="<%$NamePrefix%><%$CustomField->Id%>-Value" size="<%$Cols%>" value="<%$Default ? $Default : ''%>">
-% }
+%# }}} END BPS TAGGED BLOCK
+<& /Admin/Elements/Header, Title => $title &>
+<& /Admin/Elements/SystemTabs,
+ current_tab => 'Admin/Global/CustomFields.html',
+ current_subtab => $current_subtab,
+ subtabs => $subtabs,
+ Title => $title &>
+
+<& /Admin/Elements/EditCustomField, title => $title, %ARGS &>
+
<%INIT>
-if ($Multiple and $Values) {
- $Default = '';
- while (my $value = $Values->Next ) {
- $Default .= $value->Content."\n";
- }
+my ($title, $current_subtab);
+
+my $subtabs = {
+ A => { title => loc('Select custom field'),
+ path => "Admin/Global/CustomFields.html"
+ },
+ B => { title => loc('New custom field'),
+ path => "Admin/Global/CustomField.html?create=1&Queue=0",
+ separator => 1,
+ }
+ };
+if ( $ARGS{'create'} ) {
+ $current_subtab = "Admin/Global/CustomField.html?create=1&Queue=0";
+ $title = loc('Create a CustomField which applies to all queues');
+}
+else {
+ $current_subtab =
+ "Admin/Global/CustomField.html?CustomField=" . $CustomField . "&Queue=0";
+ $title = loc('Modify a CustomField which applies to all queues');
+ $subtabs->{"C"} = {
+ title => loc( 'Custom Field #[_1]', $CustomField ),
+ path => "Admin/Global/CustomField.html?CustomField=" . $CustomField . "&Queue=0"
+ };
}
</%INIT>
<%ARGS>
-$Object => undef
$CustomField => undef
-$NamePrefix => undef
-$Default => undef
-$Values => undef
-$Multiple => undef
-$Cols
-$Rows
</%ARGS>
+<%ATTR>
+AutoFlush => 0
+</%ATTR>
diff --git a/rt/html/Admin/Groups/History.html b/rt/html/Admin/Global/CustomFields.html
index 40dab46..5930402 100644
--- a/rt/html/Admin/Groups/History.html
+++ b/rt/html/Admin/Global/CustomFields.html
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,24 +42,27 @@
%# 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/GroupTabs,
- id => $id,
- GroupObj => $GroupObj,
- current_subtab => $current_tab,
+%# }}} END BPS TAGGED BLOCK
+<& /Admin/Elements/Header, Title => $title &>
+<& /Admin/Elements/SystemTabs,
+ current_tab => 'Admin/Global/CustomFields.html',
+ current_subtab => 'Admin/Global/CustomFields.html',
+ subtabs => $subtabs,
Title => $title &>
-<& /Ticket/Elements/ShowHistory,
- Ticket => $GroupObj,
- ShowHeaderModes => 0,
-&>
+<& /Admin/Elements/EditCustomFields, title => $title, %ARGS &>
<%INIT>
-my $current_tab = 'Admin/Groups/History.html?id='.$id;
-my $GroupObj = new RT::Group($session{'CurrentUser'});
-$GroupObj->Load($id) || Abort("Couldn't load group '$id'");
-my $title = loc("History of the group [_1]", $GroupObj->Name);
+my $subtabs = {
+ A => { title => loc('Select custom field'),
+ path => "Admin/Global/CustomFields.html"
+ },
+ B => { title => loc('New custom field'),
+ path => "Admin/Global/CustomField.html?create=1&Queue=0",
+ separator => 1,
+ }
+ };
+my $title = loc("Modify Custom Fields which apply to all queues");
</%INIT>
<%ARGS>
$id => undef
diff --git a/rt/html/Admin/Global/CustomFields/Groups.html b/rt/html/Admin/Global/CustomFields/Groups.html
deleted file mode 100644
index bffde01..0000000
--- a/rt/html/Admin/Global/CustomFields/Groups.html
+++ /dev/null
@@ -1,11 +0,0 @@
-<& /Admin/Elements/Header, Title => $title &>
-<& /Admin/Elements/GlobalCustomFieldTabs,
- current_tab => "Admin/Global/CustomFields/Groups.html",
- current_subtab => "Admin/Global/CustomFields/Groups.html",
- Title => $title
- &>
- <& /Admin/Elements/EditCustomFields, %ARGS, title => $title, ObjectType => 'RT::Group', Object=> $object &>
-<%INIT>
- my $title = loc( 'Edit Custom Fields for all groups');
- my $object = RT::Group->new($session{'CurrentUser'});
-</%INIT>
diff --git a/rt/html/Admin/Global/CustomFields/Queue-Tickets.html b/rt/html/Admin/Global/CustomFields/Queue-Tickets.html
deleted file mode 100755
index 396559a..0000000
--- a/rt/html/Admin/Global/CustomFields/Queue-Tickets.html
+++ /dev/null
@@ -1,11 +0,0 @@
-<& /Admin/Elements/Header, Title => $title &>
-<& /Admin/Elements/GlobalCustomFieldTabs,
- current_tab => "Admin/Global/CustomFields/Queue-Tickets.html",
- current_subtab => "Admin/Global/CustomFields/Queue-Tickets.html",
- Title => $title
- &>
- <& /Admin/Elements/EditCustomFields, %ARGS, title => $title, ObjectType => 'RT::Queue', Object=> $object, SubType => 'RT::Ticket' &>
-<%INIT>
- my $title = loc( 'Edit Custom Fields for tickets in all queues');
- my $object = RT::Queue->new($session{'CurrentUser'});
-</%INIT>
diff --git a/rt/html/Admin/Global/CustomFields/Queue-Transactions.html b/rt/html/Admin/Global/CustomFields/Queue-Transactions.html
deleted file mode 100755
index 63b4cfe..0000000
--- a/rt/html/Admin/Global/CustomFields/Queue-Transactions.html
+++ /dev/null
@@ -1,11 +0,0 @@
-<& /Admin/Elements/Header, Title => $title &>
-<& /Admin/Elements/GlobalCustomFieldTabs,
- current_tab => "Admin/Global/CustomFields/Queue-Transactions.html",
- current_subtab => "Admin/Global/CustomFields/Queue-Transactions.html",
- Title => $title
- &>
- <& /Admin/Elements/EditCustomFields, %ARGS, title => $title, ObjectType => 'RT::Queue', Object=> $object, SubType => 'RT::Ticket-RT::Transaction' &>
-<%INIT>
- my $title = loc( 'Edit Custom Fields for tickets in all queues');
- my $object = RT::Queue->new($session{'CurrentUser'});
-</%INIT>
diff --git a/rt/html/Admin/Global/CustomFields/Users.html b/rt/html/Admin/Global/CustomFields/Users.html
deleted file mode 100644
index 6b79743..0000000
--- a/rt/html/Admin/Global/CustomFields/Users.html
+++ /dev/null
@@ -1,11 +0,0 @@
-<& /Admin/Elements/Header, Title => $title &>
-<& /Admin/Elements/GlobalCustomFieldTabs,
- current_tab => "Admin/Global/CustomFields/Users.html",
- current_subtab => "Admin/Global/CustomFields/Users.html",
- Title => $title
- &>
- <& /Admin/Elements/EditCustomFields, %ARGS, title => $title, ObjectType => 'RT::User', Object=> $object &>
-<%INIT>
- my $title = loc( 'Edit Custom Fields for all users');
- my $object = RT::User->new($session{'CurrentUser'});
-</%INIT>
diff --git a/rt/html/Admin/Global/CustomFields/index.html b/rt/html/Admin/Global/CustomFields/index.html
deleted file mode 100644
index 9cdcfd5..0000000
--- a/rt/html/Admin/Global/CustomFields/index.html
+++ /dev/null
@@ -1,91 +0,0 @@
-%# BEGIN BPS TAGGED BLOCK {{{
-%#
-%# COPYRIGHT:
-%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
-%# <jesse@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., 675 Mass Ave, Cambridge, MA 02139, USA.
-%#
-%#
-%# 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/Callback, tabs => $tabs, %ARGS &>
-<& /Admin/Elements/Header, Title => $title &>
-<& /Admin/Elements/GlobalCustomFieldTabs, Title => $title &>
-
-<ul>
-% foreach my $key (sort keys %$tabs) {
-<li><font size="+2"><a href="<% $tabs->{$key}{path} %>"><% $tabs->{$key}{title} %></a></font><br>
-<% $tabs->{$key}{text} %>
-</li>
-% }
-</ul>
-
-<%INIT>
-my $title = loc("Global custom field configuration");
-
-my $tabs = {
-
- A => {
- title => loc('Users'),
- text => loc('Select custom fields for all users'),
- path => 'Users.html',
- },
- B => {
- title => loc('Groups'),
- text => loc('Select custom fields for all user groups'),
- path => 'Groups.html',
- },
-
- F => {
- title => loc('Tickets'),
- text => loc('Select custom fields for tickets in all queues'),
- path => 'Queue-Tickets.html',
- },
-
- G => {
- title => loc('Ticket Transactions'),
- text =>
- loc('Select custom fields for transactions on tickets in all queues'),
- path => 'Queue-Transactions.html',
- },
-
-};
-
-
-$m->comp('/Elements/Callback', tabs => $tabs);
-</%INIT>
diff --git a/rt/html/Admin/Global/GroupRights.html b/rt/html/Admin/Global/GroupRights.html
index 8d71432..68718b9 100644
--- a/rt/html/Admin/Global/GroupRights.html
+++ b/rt/html/Admin/Global/GroupRights.html
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<& /Admin/Elements/Header, Title => loc('Modify global group rights') &>
<& /Admin/Elements/SystemTabs,
current_tab => 'Admin/Global/GroupRights.html',
diff --git a/rt/html/Admin/Global/Scrip.html b/rt/html/Admin/Global/Scrip.html
index 4e0c1f4..2e63fe7 100644
--- a/rt/html/Admin/Global/Scrip.html
+++ b/rt/html/Admin/Global/Scrip.html
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<& /Admin/Elements/Header, Title => $title &>
<& /Admin/Elements/SystemTabs,
current_tab => 'Admin/Global/Scrips.html',
diff --git a/rt/html/Admin/Global/Scrips.html b/rt/html/Admin/Global/Scrips.html
index dcfa6ff..37bd2c7 100644
--- a/rt/html/Admin/Global/Scrips.html
+++ b/rt/html/Admin/Global/Scrips.html
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<& /Admin/Elements/Header, Title => $title &>
<& /Admin/Elements/SystemTabs,
current_tab => 'Admin/Global/Scrips.html',
diff --git a/rt/html/Admin/Global/Template.html b/rt/html/Admin/Global/Template.html
index 17da59b..a289eb6 100644
--- a/rt/html/Admin/Global/Template.html
+++ b/rt/html/Admin/Global/Template.html
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<& /Admin/Elements/Header, Title => loc("Modify template [_1]", $TemplateObj->id) &>
<& /Admin/Elements/SystemTabs,
current_tab => 'Admin/Global/Templates.html',
diff --git a/rt/html/Admin/Global/Templates.html b/rt/html/Admin/Global/Templates.html
index 387326c..da3395a 100644
--- a/rt/html/Admin/Global/Templates.html
+++ b/rt/html/Admin/Global/Templates.html
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,8 +42,8 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
-<& /Admin/Elements/Header, Title => $title, FeedURI => 'templates' &>
+%# }}} END BPS TAGGED BLOCK
+<& /Admin/Elements/Header, Title => $title &>
<& /Admin/Elements/SystemTabs,
current_tab => 'Admin/Global/Templates.html',
current_subtab => 'Admin/Global/Templates.html',
diff --git a/rt/html/Admin/Global/UserRights.html b/rt/html/Admin/Global/UserRights.html
index 14a4de3..a65e7c2 100644
--- a/rt/html/Admin/Global/UserRights.html
+++ b/rt/html/Admin/Global/UserRights.html
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<& /Admin/Elements/Header, Title => loc('Modify global user rights') &>
<& /Admin/Elements/SystemTabs,
current_tab => 'Admin/Global/UserRights.html',
diff --git a/rt/html/Admin/Global/index.html b/rt/html/Admin/Global/index.html
index af7a9dd..3a70e7c 100644
--- a/rt/html/Admin/Global/index.html
+++ b/rt/html/Admin/Global/index.html
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<& /Elements/Callback, tabs => $tabs, %ARGS &>
<& /Admin/Elements/Header, Title => loc('Admin/Global configuration') &>
<& /Admin/Elements/SystemTabs,
@@ -69,8 +69,8 @@
},
F => { title => loc('Custom Fields'),
- text => loc('Modify global custom fields'),
- path => 'CustomFields/index.html',
+ text => loc('Modify Custom Fields which apply to all queues'),
+ path => 'CustomFields.html',
},
G => { title => loc('Group Rights'),
diff --git a/rt/html/Admin/Groups/CustomFields.html b/rt/html/Admin/Groups/CustomFields.html
deleted file mode 100644
index c2336b0..0000000
--- a/rt/html/Admin/Groups/CustomFields.html
+++ /dev/null
@@ -1,46 +0,0 @@
-%# BEGIN BPS TAGGED BLOCK {{{
-%#
-%# COPYRIGHT:
-%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
-%# <jesse@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., 675 Mass Ave, Cambridge, MA 02139, USA.
-%#
-%#
-%# 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/ObjectCustomFields, %ARGS, ObjectType => 'RT::Group' &>
diff --git a/rt/html/Admin/Groups/GroupRights.html b/rt/html/Admin/Groups/GroupRights.html
index d95bdae..55e2a65 100644
--- a/rt/html/Admin/Groups/GroupRights.html
+++ b/rt/html/Admin/Groups/GroupRights.html
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<& /Admin/Elements/Header, Title => loc('Modify group rights for group [_1]', $GroupObj->Name) &>
<& /Admin/Elements/GroupTabs,
GroupObj => $GroupObj,
diff --git a/rt/html/Admin/Groups/Members.html b/rt/html/Admin/Groups/Members.html
index fd25b2d..779df95 100644
--- a/rt/html/Admin/Groups/Members.html
+++ b/rt/html/Admin/Groups/Members.html
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<& /Admin/Elements/Header, Title => "RT/Admin/Edit the group ". $Group->Name &>
<& /Admin/Elements/GroupTabs, GroupObj => $Group,
current_tab => 'Admin/Groups/Members.html?id='.$id,
@@ -78,7 +78,7 @@
% $UserMembers->LimitToUsers();
<UL>
% while (my $member = $UserMembers->Next()) {
-<LI><INPUT TYPE=CHECKBOX Name="DeleteMember-<%$member->MemberId%>" value="1">
+<LI><INPUT TYPE=CHECKBOX Name="DeleteMember-<%$member->MemberId%>">
<%$member->MemberObj->Object->Name%> (<%$member->MemberObj->Object->RealName%>)
% }
</ul>
@@ -87,7 +87,7 @@
% my $GroupMembers = $Group->MembersObj;
% $GroupMembers->LimitToGroups();
% while (my $member = $GroupMembers->Next()) {
-<LI><INPUT TYPE=CHECKBOX Name="DeleteMember-<%$member->MemberId%>" value="1">
+<LI><INPUT TYPE=CHECKBOX Name="DeleteMember-<%$member->MemberId%>">
<%$member->MemberObj->Object->Name%>
% }
% }
diff --git a/rt/html/Admin/Groups/Modify.html b/rt/html/Admin/Groups/Modify.html
index 94c0203..0140a57 100644
--- a/rt/html/Admin/Groups/Modify.html
+++ b/rt/html/Admin/Groups/Modify.html
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<& /Admin/Elements/Header, Title => $title &>
<& /Admin/Elements/GroupTabs,
@@ -53,7 +53,7 @@
-<FORM ACTION="<%$RT::WebPath%>/Admin/Groups/Modify.html" METHOD=POST ENCTYPE="multipart/form-data">
+<FORM ACTION="<%$RT::WebPath%>/Admin/Groups/Modify.html" METHOD=POST>
%unless ($Group->Id) {
<INPUT TYPE=HIDDEN NAME=id VALUE="new">
@@ -65,27 +65,16 @@
<&|/l&>Name</&>:
</TD>
<TD><INPUT name="Name" value="<%$Group->Name%>"></TD>
-</TR>
-<TR>
+</TR><TR>
<TD ALIGN=RIGHT>
<&|/l&>Description</&>:</TD><TD COLSPAN=3><INPUT name="Description" value="<%$Group->Description%>" size=60></TD>
-</TR>
-% my $CFs = $Group->CustomFields;
-% while (my $CF = $CFs->Next) {
-<TR VALIGN="TOP"><TD ALIGN="RIGHT">
-<% $CF->Name %>:
-</TD><TD>
-<& /Elements/EditCustomField, CustomField => $CF, Object => $Group &>
-</TD></TR>
-% }
-<TR>
+</TR><TR>
<TD COLSPAN=2>
<INPUT TYPE=HIDDEN NAME="SetEnabled" VALUE="1">
<INPUT TYPE=CHECKBOX NAME="Enabled" VALUE="1" <%$EnabledChecked%>> <&|/l&>Enabled (Unchecking this box disables this group)</&><BR>
</TR>
-<& /Elements/Callback, GroupObj => $Group, results => \@results, %ARGS &>
</TABLE>
-<& /Elements/Submit, Label => loc('Save Changes'), Reset => 1 &>
+<& /Elements/Submit, Label => loc('Create'), Reset => 1 &>
</form>
<%INIT>
@@ -135,7 +124,6 @@ if ($id) {
Object => $Group,
ARGSRef => \%ARGS );
push (@results,@fieldresults);
- push @results, ProcessObjectCustomFieldUpdates( ARGSRef => \%ARGS, Object => $Group );
}
#we're asking about enabled on the web page but really care about disabled.
diff --git a/rt/html/Admin/Groups/UserRights.html b/rt/html/Admin/Groups/UserRights.html
index 5237b15..3f17baa 100644
--- a/rt/html/Admin/Groups/UserRights.html
+++ b/rt/html/Admin/Groups/UserRights.html
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<& /Admin/Elements/Header, Title => loc('Modify user rights for group [_1]', $GroupObj->Name) &>
<& /Admin/Elements/GroupTabs,
GroupObj => $GroupObj,
diff --git a/rt/html/Admin/Groups/index.html b/rt/html/Admin/Groups/index.html
index 0734406..7c2cd50 100644
--- a/rt/html/Admin/Groups/index.html
+++ b/rt/html/Admin/Groups/index.html
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,66 +42,36 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<& /Admin/Elements/Header, Title => $title &>
<& /Admin/Elements/GroupTabs, current_tab => 'Admin/Groups/',
current_subtab => 'Admin/Groups/',
Title => $title &>
-<%$caption%>:<BR> <UL>
-%if ($Groups->Count == 0) {
-<LI> <i><&|/l&>No groups matching search criteria found.</&></i>
-% }
-%my @ids;
+
+
+<UL>
%while ( my $Group = $Groups->Next) {
-% push @ids, $Group->Id;
<LI><A HREF="Modify.html?id=<%$Group->id%>"><%$Group->Name || loc('(empty)')%></a><BR>
%}
</UL>
-%if (my $ids = join(',', @ids)) {
-<em>(<a href="<%$RT::WebPath%>/Download/Tabular/Group/<% $ids %>/Groups.tsv"><&|/l&>Download as a tab-delimited file</&></a>)</em><br>
-%}
<br><br>
<FORM METHOD=POST ACTION="<% $RT::WebPath %>/Admin/Groups/index.html">
-<input type="checkbox" name="FindDisabledGroups" value="1"> <&|/l&>Include disabled groups in listing.</&>
+<input type="checkbox" name="FindDisabledGroups"> <&|/l&>Include disabled groups in listing.</&>
<BR>
<div align=right><input type=submit value="<&|/l&>Go!</&>"></div>
</FORM>
-<br><br>
-<FORM METHOD=POST ACTION="<% $RT::WebPath %>/Admin/Groups/index.html">
-<&|/l&>Find groups whose</&> <& /Elements/SelectGroups &><BR>
-<div align=right><input type=submit value="<&|/l&>Go!</&>"></div>
-</FORM>
<%INIT>
my $Groups = RT::Groups->new($session{'CurrentUser'});
+
+if ($FindDisabledGroups) {
+ $Groups->{'find_disabled_rows'} = 1;
+}
+
$Groups->LimitToUserDefinedGroups();
my $title = loc('Select a group');
-my $caption;
-if (length $GroupString) {
- $caption = loc("Groups matching search criteria");
- if ($GroupField =~ /^CustomField-(\d+)/) {
- $Groups->LimitCustomField(
- CUSTOMFIELD => $1,
- OPERATOR => $GroupOp,
- VALUE => $GroupString,
- );
- }
- else {
- $Groups->Limit(
- FIELD => $GroupField,
- OPERATOR => $GroupOp,
- VALUE => $GroupString,
- );
- }
-}
-else {
- $caption = loc("User-defined groups");
-}
</%INIT>
<%ARGS>
-$GroupString => undef
-$GroupOp => '='
-$GroupField => 'Name'
$FindDisabledGroups => 0
</%ARGS>
diff --git a/rt/html/Admin/Queues/CustomField.html b/rt/html/Admin/Queues/CustomField.html
index 5beba58..a865dba 100644
--- a/rt/html/Admin/Queues/CustomField.html
+++ b/rt/html/Admin/Queues/CustomField.html
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<& /Admin/Elements/Header, Title => $title &>
<& /Admin/Elements/QueueTabs, id => $QueueObj->Id,
QueueObj => $QueueObj,
@@ -78,7 +78,7 @@ my $subtabs = {
</%INIT>
<%ARGS>
$CustomField => undef
-$Queue => 0
+$Queue => undef
</%ARGS>
<%ATTR>
AutoFlush => 0
diff --git a/rt/html/Admin/Queues/CustomFields.html b/rt/html/Admin/Queues/CustomFields.html
index 4d7e088..507c02d 100644
--- a/rt/html/Admin/Queues/CustomFields.html
+++ b/rt/html/Admin/Queues/CustomFields.html
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,29 +42,30 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<& /Admin/Elements/Header, Title => $title &>
-<& /Admin/Elements/QueueTabs,
- id => $Object->id,
- current_tab => "Admin/Queues/CustomFields.html?SubType=$SubType&id=$id",
- current_subtab => "Admin/Queues/CustomFields.html?SubType=$SubType&id=$id",
- QueueObj => $Object,
+<& /Admin/Elements/QueueTabs, id => $Queue->id,
+ current_tab => 'Admin/Queues/CustomFields.html?id='.$id,
+ QueueObj => $Queue,
+ subtabs => $subtabs,
Title => $title
&>
- <& /Admin/Elements/EditCustomFields, %ARGS, title => $title, Object => $Object, ObjectType => 'RT::Queue' &>
+<& /Admin/Elements/EditCustomFields, title => $title, %ARGS &>
<%INIT>
-my $Object = RT::Queue->new( $session{'CurrentUser'} );
+my $Queue = new RT::Queue($session{'CurrentUser'});
+$Queue->Load($id) || Abort(loc("Couldn't load queue", $id));
-$Object->Load($id) || Abort( loc( "Couldn't load object [_1]", $id ) );
-my $FriendlySubTypes =
- RT::CustomField->new( $session{'CurrentUser'} )
- ->FriendlyLookupType( $Object->CustomFieldLookupType );
-
-my $title = loc( 'Edit Custom Fields for [_1]', $Object->Name );
+my $CustomFields = RT::CustomFields->new($RT::SystemUser);
+$CustomFields->LimitToQueue($Queue->Id);
+my $subtabs = {
+ A => { title => loc('New custom field'),
+ path => "Admin/Queues/CustomField.html?create=1&Queue=".$id,
+ }
+ };
+my $title= loc('Edit Custom Fields for [_1]', $Queue->Name);
</%INIT>
<%ARGS>
$id => undef
-$SubType => 'RT::Queue-RT::Ticket'
</%ARGS>
diff --git a/rt/html/Admin/Queues/GroupRights.html b/rt/html/Admin/Queues/GroupRights.html
index c5a12bf..5e0d5b9 100644
--- a/rt/html/Admin/Queues/GroupRights.html
+++ b/rt/html/Admin/Queues/GroupRights.html
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<& /Admin/Elements/Header, Title => loc('Modify group rights for queue [_1]', $QueueObj->Name) &>
<& /Admin/Elements/QueueTabs, id => $id,
QueueObj => $QueueObj,
diff --git a/rt/html/Admin/Queues/Modify.html b/rt/html/Admin/Queues/Modify.html
index 5517a80..717a83a 100644
--- a/rt/html/Admin/Queues/Modify.html
+++ b/rt/html/Admin/Queues/Modify.html
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<& /Admin/Elements/Header, Title => $title &>
<& /Admin/Elements/QueueTabs, id => $QueueObj->id,
QueueObj => $QueueObj,
@@ -72,13 +72,13 @@
<&|/l&>Reply Address</&>:
</TD><TD>
<INPUT name="CorrespondAddress" value="<% ($Create) ? "" : $QueueObj->CorrespondAddress %>">
-<BR><font size="-1"><i><&|/l , $RT::CorrespondAddress&>(If left blank, will default to [_1])</&></i></font>
+<BR><font size="-1"><i><&|/l , $RT::CorrespondAddress&>(If left blank, will default to [_1]</&></i></font>
</TD>
<TD ALIGN=RIGHT>
<&|/l&>Comment Address</&>: </TD><TD>
<INPUT NAME="CommentAddress" value="<% ($Create) ? "" : $QueueObj->CommentAddress %>">
-<BR><font size="-1"><i><&|/l , $RT::CommentAddress&>(If left blank, will default to [_1])</&></i></font>
+<BR><font size="-1"><i><&|/l , $RT::CommentAddress&>(If left blank, will default to [_1]</&></i></font>
</TD>
</TR><TR>
@@ -159,7 +159,7 @@ my @attribs= qw(Description CorrespondAddress CommentAddress Name
}
if ( ($SetEnabled) and ( $Disabled != $QueueObj->Disabled) ) {
my ($code, $msg) = $QueueObj->SetDisabled($Disabled);
- push @results, loc('Enabled status: [_1]', loc_fuzzy($msg));
+ push @results, loc('Enabled status [_1]', loc_fuzzy($msg));
}
if ($QueueObj->Disabled()) {
diff --git a/rt/html/Admin/Queues/People.html b/rt/html/Admin/Queues/People.html
index e29b9d3..1a5caee 100644
--- a/rt/html/Admin/Queues/People.html
+++ b/rt/html/Admin/Queues/People.html
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<& /Elements/Header, Title => loc('Modify people related to queue [_1]', $QueueObj->Name) &>
<& /Admin/Elements/QueueTabs, id => $id,
QueueObj => $QueueObj,
@@ -79,7 +79,7 @@
<& /Elements/SelectUsers &>
<input type=submit name="OnlySearchForPeople" value="<&|/l&>Go!</&>">
<BR>
-<&|/l&>Find groups whose</&><BR>
+<&|/l&>Find group whose</&><BR>
<& /Elements/SelectGroups &>
<input type=submit name="OnlySearchForGroup" value="<&|/l&>Go!</&>">
diff --git a/rt/html/Admin/Queues/Scrip.html b/rt/html/Admin/Queues/Scrip.html
index 1223fbf..be9226f 100644
--- a/rt/html/Admin/Queues/Scrip.html
+++ b/rt/html/Admin/Queues/Scrip.html
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<& /Admin/Elements/Header, Title => $title &>
<& /Admin/Elements/QueueTabs, id => $QueueObj->Id,
QueueObj => $QueueObj,
diff --git a/rt/html/Admin/Queues/Scrips.html b/rt/html/Admin/Queues/Scrips.html
index e7092fb..5d10e44 100644
--- a/rt/html/Admin/Queues/Scrips.html
+++ b/rt/html/Admin/Queues/Scrips.html
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<& /Admin/Elements/Header, Title => $title &>
<& /Admin/Elements/QueueTabs, id => $QueueObj->id,
QueueObj => $QueueObj,
diff --git a/rt/html/Admin/Queues/Template.html b/rt/html/Admin/Queues/Template.html
index c60a909..066e7dd 100644
--- a/rt/html/Admin/Queues/Template.html
+++ b/rt/html/Admin/Queues/Template.html
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<& /Admin/Elements/Header, Title => $title &>
<& /Admin/Elements/QueueTabs, id => $Queue,
QueueObj => $QueueObj,
diff --git a/rt/html/Admin/Queues/Templates.html b/rt/html/Admin/Queues/Templates.html
index 888fdbc..e921848 100644
--- a/rt/html/Admin/Queues/Templates.html
+++ b/rt/html/Admin/Queues/Templates.html
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<& /Admin/Elements/Header, Title => $title &>
<& /Admin/Elements/QueueTabs, id => $QueueObj->id,
current_tab => 'Admin/Queues/Templates.html?id='.$id,
diff --git a/rt/html/Admin/Queues/UserRights.html b/rt/html/Admin/Queues/UserRights.html
index 399992a..6aaaab9 100644
--- a/rt/html/Admin/Queues/UserRights.html
+++ b/rt/html/Admin/Queues/UserRights.html
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<& /Admin/Elements/Header, Title => loc('Modify user rights for queue [_1]', $QueueObj->Name) &>
<& /Admin/Elements/QueueTabs, id => $id,
QueueObj => $QueueObj,
diff --git a/rt/html/Admin/Queues/index.html b/rt/html/Admin/Queues/index.html
index 28adf53..80998bd 100644
--- a/rt/html/Admin/Queues/index.html
+++ b/rt/html/Admin/Queues/index.html
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<& /Admin/Elements/Header, Title => loc("Admin queues") &>
<& /Admin/Elements/QueueTabs, current_tab => 'Admin/Queues/',
current_subtab => 'Admin/Queues/',
@@ -50,19 +50,18 @@
-<h1><%$caption%></h1>
-<p><&|/l&>Select a queue</&>:</p>
+<%$caption%>:<BR>
<UL>
%if ($queues->Count == 0) {
-<li><i><&|/l&>No queues matching search criteria found.</&></i></li>
+<LI> <i><&|/l&>No queues matching search criteria found.</&></i>
% }
%while ( $queue = $queues->Next) {
-<li><A HREF="Modify.html?id=<%$queue->id%>"><%$queue->Name%></a></li>
+<LI><A HREF="Modify.html?id=<%$queue->id%>"><%$queue->Name%></a></LI>
%}
</UL>
<BR>
<FORM METHOD=POST ACTION="<% $RT::WebPath %>/Admin/Queues/index.html">
-<input type="checkbox" name="FindDisabledQueues" value="1"> <&|/l&>Include disabled queues in listing.</&>
+<input type="checkbox" name="FindDisabledQueues"> <&|/l&>Include disabled queues in listing.</&>
<div align=right><input type=submit value="<&|/l&>Go!</&>"></div>
</FORM>
diff --git a/rt/html/Admin/Tools/Configuration.html b/rt/html/Admin/Tools/Configuration.html
index bc5ca69..24d9b73 100644
--- a/rt/html/Admin/Tools/Configuration.html
+++ b/rt/html/Admin/Tools/Configuration.html
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<%init>
require Module::Versions::Report;
my $title = loc('System Configuration');
@@ -80,7 +80,7 @@ unless ($session{'CurrentUser'}->HasRight( Object=> $RT::System, Right => 'Super
% next if (ref ${'RT::'.$key} );
<tr><td>RT::<%$key%></td>
<td>
-% if ($key =~ /Password(?!Length)/i) {
+% if ($key =~ /Password/i) {
<i>Password not printed</i>
% } else {
<%${'RT::'.$key} %>
diff --git a/rt/html/Admin/Tools/index.html b/rt/html/Admin/Tools/index.html
index 49cfac3..c9a5873 100644
--- a/rt/html/Admin/Tools/index.html
+++ b/rt/html/Admin/Tools/index.html
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<%init>
my $title = loc('System Tools');
</%init>
diff --git a/rt/html/Admin/Users/CustomFields.html b/rt/html/Admin/Users/CustomFields.html
deleted file mode 100644
index 5662c6c..0000000
--- a/rt/html/Admin/Users/CustomFields.html
+++ /dev/null
@@ -1,69 +0,0 @@
-%# BEGIN BPS TAGGED BLOCK {{{
-%#
-%# COPYRIGHT:
-%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
-%# <jesse@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., 675 Mass Ave, Cambridge, MA 02139, USA.
-%#
-%#
-%# 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 => $Object->id,
- current_tab => "Admin/Users/CustomFields.html?$id=".$id,
- current_subtab => "Admin/Users/CustomFields.html?id=".$id,
- UserObj => $Object,
- Title => $title
- &>
-
- <& /Admin/Elements/EditCustomFields, %ARGS, title => $title, Object => $Object, ObjectType => 'RT::User' &>
-<%INIT>
-my $Object = RT::User->new( $session{'CurrentUser'} );
-
-$Object->Load($id) || Abort( loc( "Couldn't load object [_1]", $id ) );
-my $FriendlySubTypes =
- RT::CustomField->new( $session{'CurrentUser'} )
- ->FriendlyLookupType( $Object->CustomFieldLookupType );
-
-my $title = loc( 'Edit Custom Fields for [_1]', $Object->Name );
-
-</%INIT>
-<%ARGS>
-$id => undef
-</%ARGS>
diff --git a/rt/html/Admin/Users/History.html b/rt/html/Admin/Users/History.html
deleted file mode 100644
index 024a90b..0000000
--- a/rt/html/Admin/Users/History.html
+++ /dev/null
@@ -1,66 +0,0 @@
-%# BEGIN BPS TAGGED BLOCK {{{
-%#
-%# COPYRIGHT:
-%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
-%# <jesse@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., 675 Mass Ave, Cambridge, MA 02139, USA.
-%#
-%#
-%# 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 &>
-
-<& /Ticket/Elements/ShowHistory,
- Ticket => $UserObj,
- ShowHeaderModes => 0,
-&>
-
-<%INIT>
-my $current_tab = 'Admin/Users/History.html?id='.$id;
-my $UserObj = new RT::User($session{'CurrentUser'});
-$UserObj->Load($id) || Abort("Couldn't load user '$id'");
-my $title = loc("History of the user [_1]", $UserObj->Name);
-</%INIT>
-<%ARGS>
-$id => undef
-</%ARGS>
diff --git a/rt/html/Admin/Users/Memberships.html b/rt/html/Admin/Users/Memberships.html
deleted file mode 100644
index 3e63239..0000000
--- a/rt/html/Admin/Users/Memberships.html
+++ /dev/null
@@ -1,65 +0,0 @@
-%# BEGIN BPS TAGGED BLOCK {{{
-%#
-%# COPYRIGHT:
-%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
-%# <jesse@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., 675 Mass Ave, Cambridge, MA 02139, USA.
-%#
-%#
-%# 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 &>
-
-<h2><&|/l&>Groups</&></h2>
-
-<& /Elements/ShowMemberships, UserObj => $UserObj &>
-
-<%INIT>
-my $UserObj = RT::User->new($session{'CurrentUser'});
-$UserObj->Load($id) || Abort("Couldn't load user '$id'");
-my $title = loc("Memberships of the user [_1]", $UserObj->Name);
-my $current_tab = 'Admin/Users/Memberships.html?id='.$id;
-</%INIT>
-<%ARGS>
-$id => undef
-</%ARGS>
diff --git a/rt/html/Admin/Users/Modify.html b/rt/html/Admin/Users/Modify.html
index 8a24f9c..efa1f80 100644
--- a/rt/html/Admin/Users/Modify.html
+++ b/rt/html/Admin/Users/Modify.html
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<& /Admin/Elements/Header, Title => $title &>
<& /Admin/Elements/UserTabs,
id => $id,
@@ -52,7 +52,7 @@
<& /Elements/ListActions, actions => \@results &>
-<FORM ACTION="<%$RT::WebPath%>/Admin/Users/Modify.html" METHOD=POST ENCTYPE="multipart/form-data">
+<FORM ACTION="<%$RT::WebPath%>/Admin/Users/Modify.html" METHOD=POST>
%if ($Create) {
<INPUT TYPE=HIDDEN NAME=id VALUE="new">
% } else {
@@ -91,11 +91,6 @@
<input name="Gecos" value="<%$UserObj->Gecos%>">
</TD></TR>
<TR><TD ALIGN="RIGHT">
-<&|/l&>Language</&>:
-</TD><TD>
-<& /Elements/SelectLang, Name => 'Lang', Default => $UserObj->Lang &>
-</TD></TR>
-<TR><TD ALIGN="RIGHT">
<&|/l&>Extra info</&>:
</TD><TD>
<textarea name="FreeformContactInfo" cols=20 rows=5><%$UserObj->FreeformContactInfo%></TEXTAREA>
@@ -204,30 +199,17 @@
<TR>
</TR>
</TABLE>
-<BR>
-<& /Elements/TitleBoxStart, title => loc('Custom Fields') &>
-<TABLE>
-% my $CFs = $UserObj->CustomFields;
-% while (my $CF = $CFs->Next) {
-<TR VALIGN="TOP"><TD ALIGN="RIGHT">
-<% $CF->Name %>:
-</TD><TD>
-<& /Elements/EditCustomField, %ARGS, Object => $UserObj, CustomField => $CF &>
-</TD></TR>
-% }
-<TR>
-</TR>
-</TABLE>
-<& /Elements/TitleBoxEnd &>
<TR>
<TD colspan="2">
<& /Elements/TitleBoxStart, title => loc('Comments about this user') &>
-<TEXTAREA class="comments" name="Comments" COLS=80 ROWS=5 WRAP=VIRTUAL><%$UserObj->Comments%></TEXTAREA>
+<TEXTAREA name="Comments" COLS=80 ROWS=5 WRAP=VIRTUAL><%$UserObj->Comments%>
+</TEXTAREA>
<& /Elements/TitleBoxEnd &>
%if ($UserObj->Privileged) {
<BR>
<& /Elements/TitleBoxStart, title => loc('Signature') &>
-<TEXTAREA class="signature" COLS=80 ROWS=5 name="Signature" WRAP=HARD><%$UserObj->Signature%></TEXTAREA>
+<TEXTAREA COLS=80 ROWS=5 name="Signature" WRAP=HARD>
+<%$UserObj->Signature%></TEXTAREA>
<& /Elements/TitleBoxEnd &>
% }
@@ -254,44 +236,46 @@ else {
$current_tab = 'Admin/Users/Modify.html?id='.$id;
if ($id eq 'new') {
- ( $val, $msg ) = $UserObj->Create(
- Name => $Name,
- EmailAddress => $ARGS{'EmailAddress'},
- Name => $ARGS{'Name'},
- Comments => $ARGS{'Comments'},
- Signature => $ARGS{'Signature'},
- EmailAddress => $ARGS{'EmailAddress'},
- FreeformContactInfo => $ARGS{'FreeformContactInfo'},
- Organization => $ARGS{'Organization'},
- RealName => $ARGS{'RealName'},
- NickName => $ARGS{'NickName'},
- Lang => $ARGS{'Lang'},
- EmailEncoding => $ARGS{'EmailEncoding'},
- WebEncoding => $ARGS{'WebEncoding'},
- ExternalContactInfoId => $ARGS{'ExternalContactInfoId'},
- ContactInfoSystem => $ARGS{'ContactInfoSystem'},
- Gecos => $ARGS{'Gecos'},
- ExternalAuthId => $ARGS{'ExternalAuthId'},
- AuthSystem => $ARGS{'AuthSystem'},
- HomePhone => $ARGS{'HomePhone'},
- WorkPhone => $ARGS{'WorkPhone'},
- MobilePhone => $ARGS{'MobilePhone'},
- PagerPhone => $ARGS{'PagerPhone'},
- Address1 => $ARGS{'Address1'},
- Address2 => $ARGS{'Address2'},
- City => $ARGS{'City'},
- State => $ARGS{'State'},
- Zip => $ARGS{'Zip'},
- Country => $ARGS{'Country'},
- Privileged => $ARGS{'Privileged'},
- Disabled => ($ARGS{'Enabled'} ? 0 : 1)
- );
-
+ ( $val, $msg ) = $UserObj->Create(
+ Name => $Name,
+ EmailAddress => $ARGS{'EmailAddress'},
+ Name => $ARGS{'Name'},
+ Comments => $ARGS{'Comments'},
+ Signature => $ARGS{'Signature'},
+ EmailAddress => $ARGS{'EmailAddress'},
+ FreeformContactInfo => $ARGS{'FreeformContactInfo'},
+ Organization => $ARGS{'Organization'},
+ RealName => $ARGS{'RealName'},
+ NickName => $ARGS{'NickName'},
+ Lang => $ARGS{'Lang'},
+ EmailEncoding => $ARGS{'EmailEncoding'},
+ WebEncoding => $ARGS{'WebEncoding'},
+ ExternalContactInfoId => $ARGS{'ExternalContactInfoId'},
+ ContactInfoSystem => $ARGS{'ContactInfoSystem'},
+ Gecos => $ARGS{'Gecos'},
+ ExternalAuthId => $ARGS{'ExternalAuthId'},
+ AuthSystem => $ARGS{'AuthSystem'},
+ HomePhone => $ARGS{'HomePhone'},
+ WorkPhone => $ARGS{'WorkPhone'},
+ MobilePhone => $ARGS{'MobilePhone'},
+ PagerPhone => $ARGS{'PagerPhone'},
+ Address1 => $ARGS{'Address1'},
+ Address2 => $ARGS{'Address2'},
+ City => $ARGS{'City'},
+ State => $ARGS{'State'},
+ Zip => $ARGS{'Zip'},
+ Country => $ARGS{'Country'},
+ Privileged => $ARGS{'Privileged'},
+ Disabled => ($ARGS{'Enabled'} ? 0 : 1)
+ );
if ($val) {
push @results, $msg;
} else {
push @results, loc('User could not be created: [_1]', $msg);
- }
+ }
+
+ # set the id, so the the menu will have the right info
+ $id = $UserObj->Id;
} else {
$UserObj->Load($id) || $UserObj->Load($Name) || Abort("Couldn't load user '$Name'");
$val = $UserObj->Id();
@@ -299,13 +283,14 @@ else {
if ($val) {
$title = loc("Modify the user [_1]", $UserObj->Name);
- }
+ }
# If the create failed
else {
$title = loc("Create a new user");
$Create = 1;
- }
+ }
+
}
@@ -313,55 +298,49 @@ else {
# If we have a user to modify, lets try.
if ($UserObj->Id && $id ne 'new') {
-
+
my @fields = qw(Name Comments Signature EmailAddress FreeformContactInfo
Organization RealName NickName Lang EmailEncoding WebEncoding
ExternalContactInfoId ContactInfoSystem Gecos ExternalAuthId
AuthSystem HomePhone WorkPhone MobilePhone PagerPhone Address1
- Address2 City State Zip Country
+ Address2 City State Zip Country
);
-
+
my @fieldresults = UpdateRecordObject ( AttributesRef => \@fields,
Object => $UserObj,
ARGSRef => \%ARGS );
push (@results,@fieldresults);
- push @results, ProcessObjectCustomFieldUpdates( ARGSRef => \%ARGS, Object => $UserObj );
- # {{{ Deal with special fields: Privileged, Enabled
- if ( $SetPrivileged and $Privileged != $UserObj->Privileged ) {
- my ($code, $msg) = $UserObj->SetPrivileged($Privileged);
- push @results, loc('Privileged status: [_1]', loc_fuzzy($msg));
- }
-
- #we're asking about enabled on the web page but really care about disabled.
- $Disabled = $Enabled ? 0 : 1;
+# {{{ Deal with special fields: Privileged, Enabled and Password
+if ( ($SetPrivileged) and ( $Privileged != $UserObj->Privileged) ) {
+my ($code, $msg) = $UserObj->SetPrivileged($Privileged);
+ push @results, loc('Privileged status: [_1]', loc_fuzzy($msg));
+}
- if ( ($SetEnabled) and ( $Disabled != $UserObj->Disabled) ) {
- my ($code, $msg) = $UserObj->SetDisabled($Disabled);
- push @results, loc('Enabled status [_1]', loc_fuzzy($msg));
- }
+#we're asking about enabled on the web page but really care about disabled.
+if ($Enabled == 1) {
+ $Disabled = 0;
+}
+else {
+ $Disabled = 1;
+}
+if ( ($SetEnabled) and ( $Disabled != $UserObj->Disabled) ) {
+ my ($code, $msg) = $UserObj->SetDisabled($Disabled);
+ push @results, loc('Enabled status [_1]', loc_fuzzy($msg));
+}
- # }}}
+#TODO: make this report errors properly
+if ((defined $Pass1) and ($Pass1 ne '') and ($Pass1 eq $Pass2) and (!$UserObj->IsPassword($Pass1))) {
+ my ($code, $msg);
+ ($code, $msg) = $UserObj->SetPassword($Pass1);
+ push @results, loc('Password: [_1]', loc_fuzzy($msg));
+} elsif ( $Pass1 && ($Pass1 ne $Pass2)) {
+ push @results, loc("Passwords do not match.");
}
-if ( $UserObj->Id ) {
- my $password_not_set;
- # Deal with Password field
- if ( !$Pass1 and !$Pass2 ) {
- $password_not_set = 1;
- } elsif ( $Pass1 ne $Pass2 ) {
- $password_not_set = 1;
- push @results, loc("Passwords do not match.");
- } elsif ( $Pass1 eq $Pass2 and !$UserObj->IsPassword($Pass1) ) {
- my ($code, $msg) = $UserObj->SetPassword($Pass1);
- push @results, loc_fuzzy($msg);
- $password_not_set = 1 unless $code;
- }
- if ($id eq 'new' and $password_not_set) {
- push @results, loc("A password was not set, so user won't be able to login.");
- }
+# }}}
}
@@ -375,11 +354,6 @@ if ($UserObj->Privileged()) {
}
# }}}
-
-# set the id, so the the menu will have the right info, this needs to
-# be done here to avoid creating and then modifying a user
-$id = $UserObj->Id;
-
</%INIT>
diff --git a/rt/html/Admin/Users/index.html b/rt/html/Admin/Users/index.html
index 1bbe867..f4cf2f0 100644
--- a/rt/html/Admin/Users/index.html
+++ b/rt/html/Admin/Users/index.html
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,33 +42,30 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<& /Admin/Elements/Header, Title => loc('Select a user') &>
<& /Admin/Elements/UserTabs, current_tab => 'Admin/Users/',
current_subtab => 'Admin/Users/',
Title => loc('Select a user') &>
-<h1><%$caption%></h1>
-<p><&|/l&>Select a user</&>:</p>
-<ul>
+
+
+
+<%$caption%>:<BR>
+<UL>
%if ($users->Count == 0) {
-<li><i><&|/l&>No users matching search criteria found.</&></i></li>
+<LI> <i><&|/l&>No users matching search criteria found.</&></i>
% }
-%my @ids;
%while ( $user = $users->Next) {
-% push @ids, $user->Id;
<LI><A HREF="Modify.html?id=<%$user->id%>"><%$user->Name || loc('(no name listed)')%></a></LI>
%}
-</UL>
-%if (my $ids = join(',', @ids)) {
-<em>(<a href="<%$RT::WebPath%>/Download/Tabular/User/<% $ids %>/Users.tsv"><&|/l&>Download as a tab-delimited file</&></a>)</em><br>
-%}
+</UL>
<br><br>
<FORM METHOD=POST ACTION="<% $RT::WebPath %>/Admin/Users/index.html">
<&|/l&>Find people whose</&> <& /Elements/SelectUsers &><BR>
-<input type="checkbox" name="FindDisabledUsers" value="1"> <&|/l&>Include disabled users in search.</&>
+<input type="checkbox" name="FindDisabledUsers"> <&|/l&>Include disabled users in search.</&>
<BR>
<div align=right><input type=submit value="<&|/l&>Go!</&>"></div>
</FORM>
@@ -81,26 +78,19 @@ if ($FindDisabledUsers) {
$users->{'find_disabled_rows'} = 1;
}
-if (length $UserString) {
- $caption = loc("Users matching search criteria");
- if ($UserField =~ /^CustomField-(\d+)/) {
- $users->LimitCustomField(
- CUSTOMFIELD => $1,
- OPERATOR => $UserOp,
- VALUE => $UserString,
- );
- }
- else {
- $users->Limit(
- FIELD => $UserField,
- OPERATOR => $UserOp,
- VALUE => $UserString,
- );
- }
+unless (defined $UserString) {
+ $users->LimitToPrivileged();
+ $caption = loc("Privileged users");
}
else {
- $caption = loc("Privileged users");
- $users->LimitToPrivileged;
+ $caption = loc("Users matching search criteria");
+
+ if ($UserString) {
+ $users->Limit( FIELD => $UserField,
+ OPERATOR => $UserOp,
+ VALUE => $UserString);
+
+}
}
</%INIT>
<%ARGS>
diff --git a/rt/html/Admin/autohandler b/rt/html/Admin/autohandler
deleted file mode 100644
index def6101..0000000
--- a/rt/html/Admin/autohandler
+++ /dev/null
@@ -1,51 +0,0 @@
-%# BEGIN BPS TAGGED BLOCK {{{
-%#
-%# COPYRIGHT:
-%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
-%# <jesse@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., 675 Mass Ave, Cambridge, MA 02139, USA.
-%#
-%#
-%# 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 }}}
-<%init>
-$m->call_next(%ARGS) if $session{'CurrentUser'}->UserObj->HasRight(
- Right => 'ShowConfigTab',
- Object => $RT::System,
-);
-</%init> \ No newline at end of file
diff --git a/rt/html/Admin/index.html b/rt/html/Admin/index.html
index 01ba24d..5aec88b 100644
--- a/rt/html/Admin/index.html
+++ b/rt/html/Admin/index.html
@@ -1,11 +1,11 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
-%# (Except where explicitly superseded by other copyright notices),
+%# (Except where explicitly superseded by other copyright notices)
%#
%#
%# LICENSE:
@@ -31,7 +31,7 @@
%# 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.),
+%# 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
@@ -42,58 +42,21 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<& /Admin/Elements/Header, Title => loc('RT Administration') &>
<& /Admin/Elements/Tabs, Title => loc('RT Administration') &>
<ul>
-% foreach my $key (sort keys %$tabs) {
-<li><font size="+2"><a href="<%$RT::WebPath%>/<%$tabs->{$key}->{'path'}|n %>"><%$tabs->{$key} ->{'title'}%></a></font><br>
-<%$tabs->{$key}->{description}%>
+<li><font size="+2"><a href="Users/"><&|/l&>Users</&></a></font><br>
+<&|/l&>Manage users and passwords</&>
+</li>
+<li><font size="+2"><a href="Groups/"><&|/l&>Groups</&></a></font><br>
+<&|/l&>Manage groups and group membership</&>
+</li>
+<li><font size="+2"><a href="Queues/"><&|/l&>Queues</&></a></font><br>
+<&|/l&>Manage queues and queue-specific properties</&>
+</li>
+<li><font size="+2"><a href="Global/"><&|/l&>Global</&></a></font><br>
+<&|/l&>Manage properties and configuration which apply to all queues</&>
</li>
-%}
</ul>
-<%init>
-
-
-
-my $tabs = {
- A => {
- title => loc('Users'),
- path => 'Admin/Users/index.html',
- description => loc('Manage users and passwords'),
- },
- B => {
- title => loc('Groups'),
- path => 'Admin/Groups/index.html',
- description => loc('Manage groups and group membership'),
- },
- C => {
- title => loc('Queues'),
- path => 'Admin/Queues/index.html',
- description => loc('Manage queues and queue-specific properties'),
- },
- D => {
- 'title' => loc('Custom Fields'),
- description => loc('Manage custom fields and custom field values'),
- path => 'Admin/CustomFields/index.html',
- },
- E => {
- 'title' => loc('Global'),
- path => 'Admin/Global/index.html',
- description =>
- loc('Manage properties and configuration which apply to all queues'),
- },
- F => {
- 'title' => loc('Tools'),
- path => 'Admin/Tools/index.html',
- description => loc('Use other RT administrative tools')
- },
-};
-
- $m->comp('/Elements/Callback', tabs => $tabs, %ARGS);
-
-
-
-
-</%init>
diff --git a/rt/html/Approvals/Display.html b/rt/html/Approvals/Display.html
index d9d6df5..8b5a6c3 100644
--- a/rt/html/Approvals/Display.html
+++ b/rt/html/Approvals/Display.html
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<& /Elements/Header, Title => $title &>
<& Elements/Tabs,
diff --git a/rt/html/Approvals/Elements/Approve b/rt/html/Approvals/Elements/Approve
index bf786fb..f4f015f 100644
--- a/rt/html/Approvals/Elements/Approve
+++ b/rt/html/Approvals/Elements/Approve
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<tr bgcolor="#b9b9ff">
<td colspan=2><font size="3">
<a href="<%$RT::WebPath%>/Approvals/Display.html?id=<%$ticket->Id%>"><% loc("#[_1]: [_2]", $ticket->Id, $ticket->Subject) %></a> (<%loc($ticket->Status)%>)</font></td>
diff --git a/rt/html/Approvals/Elements/PendingMyApproval b/rt/html/Approvals/Elements/PendingMyApproval
index f13ddf0..abc76cc 100644
--- a/rt/html/Approvals/Elements/PendingMyApproval
+++ b/rt/html/Approvals/Elements/PendingMyApproval
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<table width="100%">
% my ($i, $class);
% my %done;
diff --git a/rt/html/Approvals/Elements/ShowDependency b/rt/html/Approvals/Elements/ShowDependency
index e8d0b00..b867096 100644
--- a/rt/html/Approvals/Elements/ShowDependency
+++ b/rt/html/Approvals/Elements/ShowDependency
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
% my $approving = $Ticket->DependedOnBy();
% if ($approving->Count) {
<h3><&|/l&>Tickets which depend on this approval:</&></h3>
diff --git a/rt/html/Approvals/Elements/Tabs b/rt/html/Approvals/Elements/Tabs
index 03bdc26..99cdec8 100644
--- a/rt/html/Approvals/Elements/Tabs
+++ b/rt/html/Approvals/Elements/Tabs
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<& /Elements/Tabs,
tabs => $tabs,
current_toptab => 'Approvals/',
diff --git a/rt/html/Approvals/index.html b/rt/html/Approvals/index.html
index 88c277c..93d979a 100644
--- a/rt/html/Approvals/index.html
+++ b/rt/html/Approvals/index.html
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<& /Elements/Header, Title => loc("My approvals") &>
<& /Approvals/Elements/Tabs, Title => loc("My approvals") &>
diff --git a/rt/html/Download/CustomFieldValue/dhandler b/rt/html/Download/CustomFieldValue/dhandler
deleted file mode 100644
index 5219680..0000000
--- a/rt/html/Download/CustomFieldValue/dhandler
+++ /dev/null
@@ -1,75 +0,0 @@
-%# BEGIN BPS TAGGED BLOCK {{{
-%#
-%# COPYRIGHT:
-%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
-%# <jesse@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., 675 Mass Ave, Cambridge, MA 02139, USA.
-%#
-%#
-%# 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 }}}
-<%perl>
-my $id;
-my $arg = $m->dhandler_arg; # get rest of path
-if ($arg =~ /^(\d+)\//) {
- $id = $1;
-}
-else {
- Abort("Corrupted customfieldvalue URL.");
-}
-my $OCFV = RT::ObjectCustomFieldValue->new($session{'CurrentUser'});
-$OCFV->Load($id) || Abort("OCFV '$id' could not be loaded");
-
-unless ($OCFV->id) {
- Abort("Bad OCFV id. Couldn't find OCFV '$id'\n");
-}
-
-my $content_type = $OCFV->ContentType || 'text/plain';
-
-unless ($RT::TrustHTMLAttachments) {
- $content_type = 'text/plain' if ($content_type =~ /^text\/html/i);
-}
-
-$r->content_type( $content_type );
-$m->clear_buffer();
-$m->out($OCFV->LargeContent);
-$m->abort;
-</%perl>
-<%attr>
-AutoFlush => 0
-</%attr>
diff --git a/rt/html/Download/Tabular/dhandler b/rt/html/Download/Tabular/dhandler
deleted file mode 100644
index 3965a99..0000000
--- a/rt/html/Download/Tabular/dhandler
+++ /dev/null
@@ -1,74 +0,0 @@
-%# BEGIN BPS TAGGED BLOCK {{{
-%#
-%# COPYRIGHT:
-%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
-%# <jesse@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., 675 Mass Ave, Cambridge, MA 02139, USA.
-%#
-%#
-%# 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 }}}
-<%perl>
-my ($class, $filename, @ids);
-my $arg = $m->dhandler_arg; # get rest of path
-if ($arg =~ /^(\w+)\/([,\d]+)(?:\/([^\/]+))?/) {
- $class = "RT::$1";
- $filename = $3 || "$1s.tsv";
- @ids = sort split(/,+/, $2);
-}
-else {
- Abort("Corrupted tabular URL.");
-}
-
-my @cols = $class->BasicColumns or return;
-
-#$r->content_type( 'application/octet-stream' );
-$r->content_type( 'text/plain' );
-$r->headers_out->{'Content-Disposition'} = "attachment; filename=$filename";
-$m->clear_buffer();
-$m->out(join("\t", "Id", map $_->[1], @cols), "\n");
-foreach my $id (@ids) {
- my $obj = $class->new;
- $obj->Load($id) or next;
- $m->out(join("\t", map $obj->$_, "Id", map $_->[0], @cols), "\n");
-}
-$m->abort;
-</%perl>
-<%attr>
-AutoFlush => 0
-</%attr>
diff --git a/rt/html/Elements/BevelBoxRaisedEnd b/rt/html/Elements/BevelBoxRaisedEnd
index e1d1edb..f1c794b 100644
--- a/rt/html/Elements/BevelBoxRaisedEnd
+++ b/rt/html/Elements/BevelBoxRaisedEnd
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
</TD>
</TR>
</table>
diff --git a/rt/html/Elements/BevelBoxRaisedStart b/rt/html/Elements/BevelBoxRaisedStart
index 6c5a613..ca504e4 100644
--- a/rt/html/Elements/BevelBoxRaisedStart
+++ b/rt/html/Elements/BevelBoxRaisedStart
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<table cellspacing=0 cellpadding=0 width=100% height=100%>
<TR>
<TD width=100% height=100%>
diff --git a/rt/html/Elements/Callback b/rt/html/Elements/Callback
index 937e923..cbec188 100644
--- a/rt/html/Elements/Callback
+++ b/rt/html/Elements/Callback
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,45 +42,43 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<%once>
-my %cache;
+my (%cache, $check);
</%once>
<%init>
+# checks for inode change time for each callback directory
+my $new_check = join(
+ $;, map { $_->[1] => (stat("$_->[1]/Callbacks"))[10] } $m->interp->resolver->comp_root_array
+) or return;
+
$Page = $m->callers(1)->path unless ($Page);
-my $CacheKey = "Callback--$Page--$_CallbackName";
-my $callbacks = $cache{$CacheKey} || $m->notes($CacheKey);
+my $callbacks;
+if ($new_check eq $check) {
+ $callbacks = $cache{$Page,$_CallbackName};
+}
+else {
+ $check = $new_check;
+}
if (!$callbacks) {
- my $path = "/Callbacks/*$Page/$_CallbackName";
+ my $path = "/Callbacks/*$Page/$_CallbackName";
+ $callbacks = [ $m->interp->resolver->glob_path($path) ];
+ @$callbacks = grep !/^\.|~$/, @$callbacks; #skip backup files
+
+ #skip files without a package
+ my $invalid_base = "/Callbacks/$Page/$_CallbackName";
+ @$callbacks = grep !/^$invalid_base$/, @$callbacks;
+
+
- # Due to API changes after Mason 1.28, we have to check for which
- # version we're running when getting the component roots
- my @roots = map { $_->[1] }
- $HTML::Mason::VERSION <= 1.28
- ? $m->interp->resolver->comp_root_array
- : $m->interp->comp_root_array;
-
- my %seen;
-
- for my $root (@roots) {
- push @$callbacks,
- # Skip backup files, files without a leading package name,
- # and files we've already seen
- grep { !/^\.|~$/
- and $_ ne "/Callbacks/$Page/$_CallbackName"
- and not $seen{$_}++ }
- $m->interp->resolver->glob_path($path, $root);
- }
-
- $m->notes($CacheKey => $callbacks);
- $cache{$Page,$_CallbackName} = $callbacks if !$RT::DevelMode;
+ $cache{$Page,$_CallbackName} = $callbacks;
}
my @rv;
foreach my $comp (sort @$callbacks) {
- push @rv, $m->comp($comp, %ARGS);
+ push @rv, $m->comp($comp, %ARGS) if $m->comp_exists($comp);
}
return @rv;
</%init>
diff --git a/rt/html/Elements/Checkbox b/rt/html/Elements/Checkbox
index f2256fb..146de6a 100644
--- a/rt/html/Elements/Checkbox
+++ b/rt/html/Elements/Checkbox
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,8 +42,8 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
-<INPUT TYPE="Checkbox" NAME="<%$Name%>" value="1" <%$IsChecked%>>
+%# }}} END BPS TAGGED BLOCK
+<INPUT TYPE="Checkbox" NAME ="<%$Name%>" <%$IsChecked%>>
<%ARGS>
$Name => undef
diff --git a/rt/html/Elements/CollectionAsTable/Header b/rt/html/Elements/CollectionAsTable/Header
index 9ed4be8..2d1574d 100644
--- a/rt/html/Elements/CollectionAsTable/Header
+++ b/rt/html/Elements/CollectionAsTable/Header
@@ -1,14 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# BEGIN LICENSE BLOCK;
%#
-%# COPYRIGHT:
-%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
-%# <jesse@bestpractical.com>
+%# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com>
%#
-%# (Except where explicitly superseded by other copyright notices)
-%#
-%#
-%# LICENSE:
+%# (Except where explictly superceded by other copyright notices)
%#
%# 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
@@ -20,32 +14,16 @@
%# 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., 675 Mass Ave, Cambridge, MA 02139, USA.
-%#
-%#
-%# CONTRIBUTION SUBMISSION POLICY:
+%# Unless otherwise specified, all modifications, corrections or
+%# extensions to this work which alter its source code become the
+%# property of Best Practical Solutions, LLC when submitted for
+%# inclusion in the work.
%#
-%# (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 }}}
+%# END LICENSE BLOCK
+
<%ARGS>
@Format => undef
-$FormatString => undef
$AllowSorting => undef
$Order=>undef
$BaseURL => undef
@@ -54,63 +32,53 @@ $Rows => undef
$Page => undef
$maxitems => undef
</%ARGS>
-<TR class="collection-as-table">
+<TR>
<%perl>
-my %generic_query_args = ( Query => $Query, Rows => $Rows, Page => $Page, Format => $FormatString );
+my %generic_query_args = ( Query => $Query, Rows => $Rows, Page => $Page );
my $item = 0;
+$$maxitems = 0;
foreach my $col (@Format) {
$item++;
+ $$maxitems = $item if $item > $$maxitems;
if ( $col->{title} eq 'NEWLINE' ) {
- while ( $item < $maxitems ) {
- $m->out(qq{<th class="collection-as-table">&nbsp;</th>\n});
- $item++;
- }
-
- $item = 0;
- $m->out(qq{</TR>\n<TR class="collection-as-table">});
+ $m->out('</TR> <TR>');
+ $item = 0;
}
else {
- $m->out('<TH class="collection-as-table">');
+ $m->out('<TH align="center">');
my $title = $col->{title};
$title =~ s/^__(.*)__$/$1/o;
- $title = (
- $m->comp(
- '/Elements/RT__Ticket/ColumnMap',
- Name => $title,
- Attr => 'title'
- )
- || $title
- );
- if (
- $AllowSorting
+ $title = ( $m->comp('/Elements/RT__Ticket/ColumnMap',
+ Name => $title,
+ Attr => 'title'
+ )
+ || $title
+ );
+ if ( $AllowSorting
&& $col->{'attribute'}
- && $m->comp(
- '/Elements/RT__Ticket/ColumnMap',
- Name => $col->{'attribute'},
- Attr => 'attribute'
- )
- )
+ && $m->comp('/Elements/RT__Ticket/ColumnMap',
+ Name => $col->{'attribute'},
+ Attr => 'attribute' )
+ )
{
$m->out(
- '<a href="' . $BaseURL
+ '<a href="' . $BaseURL
. $m->comp(
'/Elements/QueryString',
%generic_query_args,
OrderBy => (
- $m->comp(
- '/Elements/RT__Ticket/ColumnMap',
- Name => $col->{'attribute'},
- Attr => 'attribute'
- )
+ $m->comp('/Elements/RT__Ticket/ColumnMap',
+ Name => $col->{'attribute'},
+ Attr => 'attribute'
+ )
|| $col->{'attribute'}
),
Order => ( $ARGS{'Order'} eq 'ASC' ? 'DESC' : 'ASC' )
- )
- . '">'
- . loc($title) . '</a>'
+ ).
+ '">' . loc($title) . '</a>'
);
}
else {
diff --git a/rt/html/Elements/CollectionAsTable/ParseFormat b/rt/html/Elements/CollectionAsTable/ParseFormat
index 57434ef..c7b709b 100644
--- a/rt/html/Elements/CollectionAsTable/ParseFormat
+++ b/rt/html/Elements/CollectionAsTable/ParseFormat
@@ -1,14 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# BEGIN LICENSE BLOCK;
%#
-%# COPYRIGHT:
-%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
-%# <jesse@bestpractical.com>
+%# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com>
%#
-%# (Except where explicitly superseded by other copyright notices)
-%#
-%#
-%# LICENSE:
+%# (Except where explictly superceded by other copyright notices)
%#
%# 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
@@ -20,59 +14,44 @@
%# 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., 675 Mass Ave, Cambridge, MA 02139, USA.
-%#
-%#
-%# CONTRIBUTION SUBMISSION POLICY:
+%# Unless otherwise specified, all modifications, corrections or
+%# extensions to this work which alter its source code become the
+%# property of Best Practical Solutions, LLC when submitted for
+%# inclusion in the work.
%#
-%# (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 }}}
+%# END LICENSE BLOCK
+
<%ARGS>
$Format
</%ARGS>
<%init>
-use Regexp::Common;
+use Regexp::Common qw(delimited);
my @Columns;
+#my $quoted = qr[$RE{delimited}{-delim=>qq{\'\"}}|(?:\{|\}|\w|\.)+];
+my $justquoted = qr[$RE{delimited}{-delim=>qq{\'\"}}];
+#my $quoted = $RE{quoted}{-esc};
+my $word = qr [(?:\{|\}|\w|\.)+];
-while ($Format =~ /($RE{delimited}{-delim=>qq{\'"}}|[{}\w.]+)/go) {
+while ($Format =~ /($justquoted|$word)/igx) {
my $col = $1;
- if ($col =~ /^$RE{quoted}$/o) {
+ if ($col =~ /^$RE{quoted}{-esc}$/) {
substr($col,0,1) = "";
substr($col,-1,1) = "";
}
my $colref;
-
- if ( $col =~ s!/STYLE:([^/]+)!!io ) {
+ if ( $col =~ s/\/STYLE:(.*?)$//io ) {
$colref->{'style'} = $1;
}
- if ( $col =~ s!/CLASS:([^/]+)!!io ) {
+ if ( $col =~ s/\/CLASS:(.*?)$//io ) {
$colref->{'class'} = $1;
}
- if ( $col =~ s!/TITLE:([^/]+)!!io ) {
+ if ( $col =~ s/\/TITLE:(.*?)$//io ) {
$colref->{'title'} = $1;
}
- if ( $col =~ s!/ALIGN:([^\/]+)!!io ) {
- $colref->{'align'} = $1;
- }
if ( $col =~ /__(.*?)__/gio ) {
my @subcols;
while ( $col =~ s/^(.*?)__(.*?)__//o ) {
diff --git a/rt/html/Elements/CollectionAsTable/Row b/rt/html/Elements/CollectionAsTable/Row
index 3316bc0..701966f 100644
--- a/rt/html/Elements/CollectionAsTable/Row
+++ b/rt/html/Elements/CollectionAsTable/Row
@@ -1,14 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# BEGIN LICENSE BLOCK;
%#
-%# COPYRIGHT:
-%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
-%# <jesse@bestpractical.com>
+%# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com>
%#
-%# (Except where explicitly superseded by other copyright notices)
-%#
-%#
-%# LICENSE:
+%# (Except where explictly superceded by other copyright notices)
%#
%# 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
@@ -20,29 +14,14 @@
%# 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., 675 Mass Ave, Cambridge, MA 02139, USA.
-%#
-%#
-%# 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.)
+%# Unless otherwise specified, all modifications, corrections or
+%# extensions to this work which alter its source code become the
+%# property of Best Practical Solutions, LLC when submitted for
+%# inclusion in the work.
%#
-%# 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 }}}
+%# END LICENSE BLOCK
+
<%ARGS>
$i => undef
@Format => undef
@@ -53,56 +32,42 @@ $Warning => undef
</%ARGS>
<%PERL>
-$m->out('<TR class="' . ( $Warning ? 'warnline' : $i % 2 ? 'oddline' : 'evenline' ) . '" >' );
+$m->out( '<TR class="' . ( $Warning ? 'warnline' : $i % 2 ? 'oddline' : 'evenline' ) . '" >' );
my $item;
foreach my $column (@Format) {
if ( $column->{title} eq 'NEWLINE' ) {
- while ( $item < $maxitems ) {
- $m->out(qq{<td class="collection-as-table">&nbsp;</td>\n});
- $item++;
- }
- $item = 0;
+ while ($item < $maxitems) {
+ $m->out("<td>&nbsp;</td>\n");
+ $item++;
+ }
+ $item = 0;
$m->out('</TR>');
- $m->out('<TR class="'
- . ( $Warning ? 'warnline' : $i % 2 ? 'oddline' : 'evenline' )
- . '" >' );
+ $m->out( '<TR class="' .
+ ( $Warning ? 'warnline' : $i % 2 ? 'oddline' : 'evenline' ) . '" >' );
next;
}
$item++;
- $m->out('<td class="collection-as-table" ');
- $m->out( 'align="' . $column->{align} . '"' ) if ( $column->{align} );
- $m->out('>');
+ $m->out('<td align="left">');
foreach my $subcol ( @{ $column->{output} } ) {
if ( $subcol =~ /^__(.*?)__$/o ) {
- my $col = $1;
- my $value = $m->comp(
- '/Elements/RT__Ticket/ColumnMap',
- Name => $col,
- Attr => 'value'
- );
- my @out;
-
- if ( $value && ref($value) ) {
-
- # All HTML snippets are returned by the callback function
- # as scalar references. Data fetched from the objects are
- # plain scalars, and needs to be escaped properly.
- @out =
- map {
- ref($_) ? $$_ : $m->interp->apply_escapes( $_ => 'h' )
- } &{$value}( $record, $i )
- ;
- }
- else {
+ my $col = $1;
+ my $value = $m->comp('/Elements/RT__Ticket/ColumnMap', Name => $col, Attr => 'value');
- # Simple value; just escape it.
- @out = $m->interp->apply_escapes( $value => 'h' );
+ if ( $value && ref($value)) {
+ # All HTML snippets are returned by the callback function
+ # as scalar references. Data fetched from the objects are
+ # plain scalars, and needs to be escaped properly.
+ $m->out(
+ map { ref($_) ? $$_ : $m->interp->apply_escapes( $_ => 'h' ) }
+ &{ $value } ( $record, $i )
+ );
+ } else {
+ # Simple value; just escape it.
+ $m->out( $m->interp->apply_escapes( $value => 'h' ) );
}
- s/\n/<br>/gs for @out;
- $m->out( @out );
}
else {
- $m->out($subcol);
+ $m->out( Encode::decode_utf8($subcol) );
}
}
$m->out('</td>');
diff --git a/rt/html/Elements/CreateTicket b/rt/html/Elements/CreateTicket
index bd60bbd..70c94e7 100644
--- a/rt/html/Elements/CreateTicket
+++ b/rt/html/Elements/CreateTicket
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
-<FORM ACTION="<% $RT::WebPath %>/Ticket/Create.html" NAME="CreateTicketInQueue">
+%# }}} END BPS TAGGED BLOCK
+<FORM ACTION="<% $RT::WebPath%>/Ticket/Create.html">
<&|/l, $m->scomp('/Elements/SelectNewTicketQueue')&><input type="submit" value="New ticket in">&nbsp;[_1]</&>
</FORM>
diff --git a/rt/html/Elements/EditCustomField b/rt/html/Elements/EditCustomField
deleted file mode 100644
index d2398c9..0000000
--- a/rt/html/Elements/EditCustomField
+++ /dev/null
@@ -1,89 +0,0 @@
-%# BEGIN BPS TAGGED BLOCK {{{
-%#
-%# COPYRIGHT:
-%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
-%# <jesse@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., 675 Mass Ave, Cambridge, MA 02139, USA.
-%#
-%#
-%# 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 }}}
-<%INIT>
-my $Values;
-if ($Object) {
- $Values = $Object->CustomFieldValues($CustomField->id);
- $Values->Columns( qw( id CustomField ObjectType ObjectId Disabled Content ContentType ContentEncoding ) );
- $NamePrefix ||= join('-', 'Object', ref($Object), $Object->Id, 'CustomField', '');
-}
-my $Type = $CustomField->Type;
-
-return unless ($Type); # if we can't see the type, all hell will break loose.
-
-my $MaxValues = $CustomField->MaxValues;
-if ($MaxValues == 1 and $Object and $Values) {
- # what exactly is this doing? Without the "unless" it breaks RTFM
- # transaction extraction into articles.
- $Default = ($Values->First ? $Values->First->Content : '') unless $Default;
- $Values->GotoFirstItem;
-}
-# The "Magic" hidden input causes RT to know that we were trying to edit the field, even if
-# we don't see a value later, since browsers aren't compelled to submit empty form fields
-$m->out("\n".'<input type="hidden" name="'.$NamePrefix.$CustomField->Id.'-Values-Magic" value="1">'."\n");
-
-return $m->comp(
- "EditCustomField$Type",
- %ARGS,
- Rows => $Rows,
- Cols => $Cols,
- Default => $Default,
- Object => $Object,
- Values => $Values,
- MaxValues => $MaxValues,
- Multiple => ($MaxValues != 1),
- NamePrefix => $NamePrefix,
- CustomField => $CustomField,
-);
-</%INIT>
-<%ARGS>
-$Object => undef
-$CustomField => undef
-$NamePrefix => undef
-$Rows => 5
-$Cols => 15
-$Default => undef
-</%ARGS>
diff --git a/rt/html/Elements/EditCustomFieldBinary b/rt/html/Elements/EditCustomFieldBinary
deleted file mode 100644
index 0028256..0000000
--- a/rt/html/Elements/EditCustomFieldBinary
+++ /dev/null
@@ -1,60 +0,0 @@
-%# BEGIN BPS TAGGED BLOCK {{{
-%#
-%# COPYRIGHT:
-%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
-%# <jesse@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., 675 Mass Ave, Cambridge, MA 02139, USA.
-%#
-%#
-%# 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 }}}
-% while ($Values and my $value = $Values->Next ) {
-%# XXX - let user download the file(s) here?
-<input type="checkbox" name="<%$NamePrefix%><%$CustomField->Id%>-DeleteValueIds" value="<% $value->Id %>"><a href="<%$RT::WebPath%>/Download/CustomFieldValue/<% $value->Id %>/<% $value->Content %>"><% $value->Content %></a><br>
-% }
-% if (!$MaxValues or !$Values or $Values->Count < $MaxValues) {
-<input type="file" name="<%$NamePrefix%><%$CustomField->Id%>-Upload">
-% }
-<%ARGS>
-$Object => undef
-$CustomField => undef
-$NamePrefix => undef
-$Default => undef
-$Values => undef
-$MaxValues => undef
-</%ARGS>
diff --git a/rt/html/Elements/EditCustomFieldImage b/rt/html/Elements/EditCustomFieldImage
deleted file mode 100644
index b378cea..0000000
--- a/rt/html/Elements/EditCustomFieldImage
+++ /dev/null
@@ -1,60 +0,0 @@
-%# BEGIN BPS TAGGED BLOCK {{{
-%#
-%# COPYRIGHT:
-%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
-%# <jesse@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., 675 Mass Ave, Cambridge, MA 02139, USA.
-%#
-%#
-%# 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 }}}
-% while ($Values and my $value = $Values->Next ) {
-<input type="checkbox" name="<%$NamePrefix%><%$CustomField->Id%>-DeleteValueIds" value="<% $value->Id %>"><& ShowCustomFieldImage, Object => $value &>
-<br>
-% }
-% if (!$MaxValues or !$Values or $Values->Count < $MaxValues) {
-<input type="file" name="<%$NamePrefix%><%$CustomField->Id%>-Upload">
-% }
-<%ARGS>
-$Object => undef
-$CustomField => undef
-$NamePrefix => undef
-$Default => undef
-$Values => undef
-$MaxValues => undef
-</%ARGS>
diff --git a/rt/html/Elements/EditCustomFieldSelect b/rt/html/Elements/EditCustomFieldSelect
deleted file mode 100644
index db33a68..0000000
--- a/rt/html/Elements/EditCustomFieldSelect
+++ /dev/null
@@ -1,71 +0,0 @@
-%# BEGIN BPS TAGGED BLOCK {{{
-%#
-%# COPYRIGHT:
-%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
-%# <jesse@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., 675 Mass Ave, Cambridge, MA 02139, USA.
-%#
-%#
-%# 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 }}}
- <select name="<%$NamePrefix%><%$CustomField->Id%>-Values"
- size="<%$Rows%>"
- <% $Multiple && 'MULTIPLE' %>>
-% my $selected;
-% my $CFVs = $CustomField->Values;
-% while ($CFVs and my $value = $CFVs->Next ) {
- <option value="<%$value->Name%>"
-% if ($Values) {
- <% $Values->HasEntry($value->Name) && ($selected = 1) && 'SELECTED' %>
-% } elsif ($Default) {
- <% ($Default eq $value->Name) && ($selected = 1) && 'SELECTED' %>
-% }
- ><% $value->Name%></option>
-% }
- <option value="" <% !$selected && 'SELECTED' %>><&|/l&>(no value)</&></option>
- </select>
-<%ARGS>
-$Object => undef
-$CustomField => undef
-$NamePrefix => undef
-$Default => undef
-$Values => undef
-$Multiple => 0
-$Cols
-$Rows
-</%ARGS>
diff --git a/rt/html/Elements/EditCustomFieldText b/rt/html/Elements/EditCustomFieldText
deleted file mode 100644
index 1aac328..0000000
--- a/rt/html/Elements/EditCustomFieldText
+++ /dev/null
@@ -1,65 +0,0 @@
-%# BEGIN BPS TAGGED BLOCK {{{
-%#
-%# COPYRIGHT:
-%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
-%# <jesse@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., 675 Mass Ave, Cambridge, MA 02139, USA.
-%#
-%#
-%# 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 }}}
-% while ($Values and my $value = $Values->Next ) {
-<textarea cols=<%$Cols%> rows=<%$Rows%> name="<%$NamePrefix%><%$CustomField->Id%>-Values"><% $value->Content %></textarea><br>
-% }
-% if (!$MaxValues or !$Values or $Values->Count < $MaxValues) {
-<textarea cols=<%$Cols%> rows=<%$Rows%> name="<%$NamePrefix%><%$CustomField->Id%>-Values"><% $Default %></textarea>
-% }
-<%INIT>
-# XXX - MultiValue textarea is for now outlawed.
-$MaxValues = 1;
-</%INIT>
-<%ARGS>
-$Object => undef
-$CustomField => undef
-$NamePrefix => undef
-$Default => undef
-$Values => undef
-$MaxValues => undef
-$Cols
-$Rows
-</%ARGS>
diff --git a/rt/html/Elements/EditCustomFieldWikitext b/rt/html/Elements/EditCustomFieldWikitext
deleted file mode 100644
index 1aac328..0000000
--- a/rt/html/Elements/EditCustomFieldWikitext
+++ /dev/null
@@ -1,65 +0,0 @@
-%# BEGIN BPS TAGGED BLOCK {{{
-%#
-%# COPYRIGHT:
-%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
-%# <jesse@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., 675 Mass Ave, Cambridge, MA 02139, USA.
-%#
-%#
-%# 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 }}}
-% while ($Values and my $value = $Values->Next ) {
-<textarea cols=<%$Cols%> rows=<%$Rows%> name="<%$NamePrefix%><%$CustomField->Id%>-Values"><% $value->Content %></textarea><br>
-% }
-% if (!$MaxValues or !$Values or $Values->Count < $MaxValues) {
-<textarea cols=<%$Cols%> rows=<%$Rows%> name="<%$NamePrefix%><%$CustomField->Id%>-Values"><% $Default %></textarea>
-% }
-<%INIT>
-# XXX - MultiValue textarea is for now outlawed.
-$MaxValues = 1;
-</%INIT>
-<%ARGS>
-$Object => undef
-$CustomField => undef
-$NamePrefix => undef
-$Default => undef
-$Values => undef
-$MaxValues => undef
-$Cols
-$Rows
-</%ARGS>
diff --git a/rt/html/Elements/EditLinks b/rt/html/Elements/EditLinks
index 68c08dd..b66291f 100755
--- a/rt/html/Elements/EditLinks
+++ b/rt/html/Elements/EditLinks
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<TABLE width=100%>
<TR>
<TD VALIGN=TOP WIDTH=50%>
@@ -57,7 +57,7 @@
<td class="labeltop"><&|/l&>Depends on</&>:</td>
<td class="value">
% while (my $link = $Object->DependsOn->Next) {
- <INPUT TYPE=CHECKBOX NAME="DeleteLink--<%$link->Type%>-<%$link->Target%>" value="1">
+ <INPUT TYPE=CHECKBOX NAME="DeleteLink--<%$link->Type%>-<%$link->Target%>">
<& ShowLink, URI => $link->TargetURI &><br>
% }
</td>
@@ -67,7 +67,7 @@
<td class="value">
% while (my $link = $Object->DependedOnBy->Next) {
% my $member = $link->BaseObj;
- <INPUT TYPE=CHECKBOX NAME="DeleteLink-<%$link->Base%>-<%$link->Type%>-" value="1">
+ <INPUT TYPE=CHECKBOX NAME="DeleteLink-<%$link->Base%>-<%$link->Type%>-">
<& ShowLink, URI => $link->BaseURI &><br>
% }
</td>
@@ -76,7 +76,7 @@
<td class="labeltop"><&|/l&>Parents</&>:</td>
<td class="value">
% while (my $link = $Object->MemberOf->Next) {
- <INPUT TYPE=CHECKBOX NAME="DeleteLink--<%$link->Type%>-<%$link->Target%>" value="1">
+ <INPUT TYPE=CHECKBOX NAME="DeleteLink--<%$link->Type%>-<%$link->Target%>">
<& ShowLink, URI => $link->TargetURI &><br>
% }
</td>
@@ -85,7 +85,7 @@
<td class="labeltop"><&|/l&>Children</&>:</td>
<td class="value">
% while (my $link = $Object->Members->Next) {
- <INPUT TYPE=CHECKBOX NAME="DeleteLink-<%$link->Base%>-<%$link->Type%>-" value="1">
+ <INPUT TYPE=CHECKBOX NAME="DeleteLink-<%$link->Base%>-<%$link->Type%>-">
<& ShowLink, URI => $link->BaseURI &><br>
% }
</td>
@@ -94,7 +94,7 @@
<td class="labeltop"><&|/l&>Refers to</&>:</td>
<td class="value">
% while (my $link = $Object->RefersTo->Next) {
- <INPUT TYPE=CHECKBOX NAME="DeleteLink--<%$link->Type%>-<%$link->Target%>" value="1">
+ <INPUT TYPE=CHECKBOX NAME="DeleteLink--<%$link->Type%>-<%$link->Target%>">
<& ShowLink, URI => $link->TargetURI &><br>
%}
</td>
@@ -103,7 +103,7 @@
<td class="labeltop"><&|/l&>Referred to by</&>:</td>
<td class="value">
% while (my $link = $Object->ReferredToBy->Next) {
- <INPUT TYPE=CHECKBOX NAME="DeleteLink-<%$link->Base%>-<%$link->Type%>-" value="1">
+ <INPUT TYPE=CHECKBOX NAME="DeleteLink-<%$link->Base%>-<%$link->Type%>-">
<& ShowLink, URI => $link->BaseURI &><br>
% }
</td>
@@ -114,12 +114,9 @@
<TD VALIGN=TOP>
<h3><&|/l&>New Links</&></h3>
% if (ref($Object) eq 'RT::Ticket') {
-<i><&|/l&>Enter tickets or URIs to link tickets to. Separate multiple entries with spaces.</&>
-<& /Elements/Callback, _CallbackName => 'ExtraLinkInstructions' &>
-</i><br>
+<i><&|/l&>Enter tickets or URIs to link tickets to. Separate multiple entries with spaces.</&></i><br>
% } elsif (ref($Object) eq 'RT::Queue') {
-<i><&|/l&>Enter queues or URIs to link queues to. Separate multiple entries with spaces.</&>
-</i><br>
+<i><&|/l&>Enter queues or URIs to link queues to. Separate multiple entries with spaces.</&></i><br>
% } else {
<i><&|/l&>Enter objects or URIs to link objects to. Separate multiple entries with spaces.</&></i><br>
% }
diff --git a/rt/html/Elements/Error b/rt/html/Elements/Error
index bc5a188..3aa77a5 100644
--- a/rt/html/Elements/Error
+++ b/rt/html/Elements/Error
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<& /Elements/Callback, %ARGS, error => $error &>
<& /Elements/Header, Code => $Code, Why => $Why &>
<& /Elements/Tabs &>
@@ -53,11 +53,9 @@
<%$Details%>
</font>
<& /Elements/TitleBoxEnd &>
+</body>
+</HTML>
-<%cleanup>
-$m->comp('/Elements/Footer');
-$m->abort();
-</%cleanup>
<%args>
$Code => undef
diff --git a/rt/html/Elements/Footer b/rt/html/Elements/Footer
index 78a116f..12432ca 100644
--- a/rt/html/Elements/Footer
+++ b/rt/html/Elements/Footer
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
% if ($Menu) {
</td>
</tr>
@@ -52,13 +52,21 @@
<& /Elements/Callback, %ARGS &>
<!--
<div class="bpscredits">
-<&|/l, '&#187;&#124;&#171;', $RT::VERSION, '2005', '<a href="http://www.bestpractical.com?rt='.$RT::VERSION.'">Best Practical Solutions, LLC</a>', &>[_1] RT [_2] Copyright 1996-[_3] [_4].</&><br>
+<&|/l, '&#187;&#124;&#171;',
+ $RT::VERSION,
+ '2004',
+ '<a href="http://www.bestpractical.com?rt='.$RT::VERSION.'">Best Practical Solutions, LLC</a>',
+&>[_1] RT [_2] Copyright 1996-[_3] [_4].</&><br>
% if (!$Menu) {
<&|/l&>Distributed under version 2 <a href="http://www.gnu.org/copyleft/gpl.html"> of the GNU GPL.</a></&><br>
<&|/l, '<a href="mailto:sales@bestpractical.com">sales@bestpractical.com</a>' &>To inquire about support, training, custom development or licensing, please contact [_1].</&><br>
% }
</div>
-->
+% if ($Debug) {
+<HR>
+<b><&|/l&>Time to display</&>: <%Time::HiRes::tv_interval( $m->{'rt_base_time'} )%></b>
+% }
% if ($Debug >= 2 ) {
% require Data::Dumper;
% my $d = Data::Dumper->new([\%ARGS], [qw(%ARGS)]);
@@ -66,7 +74,6 @@
<%$d->Dump() %>
</pre>
% }
-<div class="page-stats"><&|/l&>Time to display</&>: <%Time::HiRes::tv_interval( $m->{'rt_base_time'} )%></div>
% if ($Menu) {
</TD>
</TR>
diff --git a/rt/html/Elements/GotoTicket b/rt/html/Elements/GotoTicket
index 869d57e..393b28f 100644
--- a/rt/html/Elements/GotoTicket
+++ b/rt/html/Elements/GotoTicket
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,5 +42,5 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<FORM ACTION="<%$RT::WebPath%>/Ticket/Display.html"><input type=submit value="<&|/l&>Goto ticket</&>">&nbsp;<input size=5 name=id accesskey="0"></FORM>
diff --git a/rt/html/Elements/Header b/rt/html/Elements/Header
index a2563fe..27658df 100644
--- a/rt/html/Elements/Header
+++ b/rt/html/Elements/Header
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
%#<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<HTML>
<HEAD>
@@ -77,17 +77,15 @@ ONLOAD="
>
<table width="100%" border="0" cellspacing="0" cellpadding="0" bgcolor="#FFFFFF">
<tr>
- <td colspan=2 rowspan=2><img border=0 alt="freeside" src="<%$RT::WebImagesURL%>/small-logo.png" width="92" height="62"></td>
- <td align="left" rowspan=2><font size=6><% &RT::URI::freeside::FreesideGetConfig('company_name') %> Ticketing</font></td>
+ <td rowspan=2><img border=0 alt="freeside" src="<%$RT::WebImagesURL%>/small-logo.png" width="92" height="62"></td>
+ <td align="left" rowspan=2><font size=6><% FS::Conf->new->config('company_name') %> Ticketing</font></td>
<td align="right" valign="top">
% if ($session{'CurrentUser'} && $session{'CurrentUser'}->Id && $LoggedIn) {
<SPAN STYLE="display: none"><A HREF="#skipnav"><&|/l&>Skip Menu</&></A> |</SPAN>
-%if ($session{'CurrentUser'}->HasRight( Right => 'ModifySelf', Object => $RT::System )) {
<A HREF="<%$RT::WebPath%><% $Prefs %>" ><&|/l&>Preferences</&></A>
-% }
<& /Elements/Callback, %ARGS &>
% unless ($RT::WebExternalAuth and !$RT::WebFallbackToInternalAuth) {
-| <A HREF="<%$RT::WebPath%>/NoAuth/Logout.html<%$URL ? "?URL=".$URL : ''%>"><&|/l&>Logout</&></a>
+| <A HREF="<%$RT::WebPath%>/NoAuth/Logout.html<%$URL && "?URL=".$URL%>"><&|/l&>Logout</&></a>
% }
<BR>
<&|/l, "<b>".$session{'CurrentUser'}->Name."</b>" &>Logged in as [_1]</&>
@@ -104,7 +102,7 @@ ONLOAD="
<tr>
<td align=right>
<FONT SIZE="-3">
- <A HREF="http://www.sisd.com/freeside">Freeside</A>&nbsp;v<% &RT::URI::freeside::FreesideVersion() %><BR>
+ <A HREF="http://www.sisd.com/freeside">Freeside</A>&nbsp;v<% $FS::VERSION %><BR>
<A HREF="../docs/">Documentation</A><BR>
</FONT>
</td>
@@ -126,13 +124,12 @@ ONLOAD="
$r->headers_out->{'Pragma'} = 'no-cache';
$r->headers_out->{'Cache-control'} = 'no-cache';
-require RT::URI::freeside;
</%INIT>
<%ARGS>
$Prefs => '/User/Prefs.html'
$Focus => 'focus'
-$Title => 'RT'
+$Title => undef
$Code => undef
$Refresh => 0
$Why => undef
diff --git a/rt/html/Elements/ListActions b/rt/html/Elements/ListActions
index 8433d17..344fe9e 100644
--- a/rt/html/Elements/ListActions
+++ b/rt/html/Elements/ListActions
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
% if ($actions[0] ) {
<& /Elements/TitleBoxStart, title => loc('Results') &>
<UL>
diff --git a/rt/html/Elements/Login b/rt/html/Elements/Login
index 1d4bfd5..25ded9f 100644
--- a/rt/html/Elements/Login
+++ b/rt/html/Elements/Login
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<%INIT>
if ($m->request_comp->path =~ '^/REST/\d+\.\d+/') {
$r->content_type("text/plain");
@@ -67,7 +67,7 @@ if ($m->request_comp->path =~ '^/REST/\d+\.\d+/') {
contentbg=>"#cccccc" &>
% unless ($RT::WebExternalAuth and !$RT::WebFallbackToInternalAuth) {
-<FORM id="login" name="login" METHOD=POST ACTION="<% (UNIVERSAL::can($r, 'uri') && ($r->uri) =~ m!.*/(.*)!) %>" >
+<FORM METHOD=POST ACTION="<% (UNIVERSAL::can($r, 'uri') && ($r->uri) =~ m!.*/(.*)!) %>" >
<TABLE BORDER=0 WIDTH=100%>
<TR ALIGN=RIGHT>
<TD ALIGN=RIGHT><&|/l&>Username</&>:</TD><TD ALIGN=LEFT><input name=user value="<%$user%>"></TD></TR>
diff --git a/rt/html/Elements/Menu b/rt/html/Elements/Menu
index 398e3ab..0e57585 100644
--- a/rt/html/Elements/Menu
+++ b/rt/html/Elements/Menu
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
%# font size depends on level
% if ($level ge 3) {
% $size = $basesize-(6);
@@ -69,17 +69,16 @@
% }
% my $style="";
% if ($sep) {
-% $style="minor";
+% $style="border-top: solid #999 1px; padding-top: .1em; margin-top: .5em;";
% } elsif ($level == 0 ) {
-% $style="major";
+% $style="border-bottom: solid white 1px; padding-top: .25em; padding-bottom: .5em;" ;
% }
% if ($toptabs->{$tab}->{'separator'}) {
% $sep=1;
% } else {
% $sep=0;
% }
-% my $url = $toptabs->{$tab}->{'path'} =~ /^https?:/i ? $toptabs->{$tab}->{'path'} : $RT::WebPath . "/" . $toptabs->{$tab}->{'path'};
-<li class="<%$class%>-<%$level%>-<%$style%>"><A HREF="<% $url %>" class="<%$class%>-<%$level%>"
+<li style="<%$style%>"><A HREF="<%$RT::WebPath%>/<%$toptabs->{$tab}->{'path'}%>" style="font-size: <%$size%>;" class="<%$class%>"
<%($class eq 'currenttopnav') ? "name='focus'" : ""|n %>
<% !$level && "accesskey='".$accesskey++."'" |n%>><% $toptabs->{$tab}->{'title'}%></A>
%# Second-level items
diff --git a/rt/html/Elements/MessageBox b/rt/html/Elements/MessageBox
index dd48bec..5faa957 100644
--- a/rt/html/Elements/MessageBox
+++ b/rt/html/Elements/MessageBox
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,8 +42,8 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
-<textarea class="messagebox" COLS=<%$Width%> ROWS=<%$Height%> WRAP=<%$Wrap%> NAME="<%$Name%>"><& /Elements/Callback, %ARGS &><% $Default %><%$message%><%$IncludeSignature ? $signature : ''%></textarea>
+%# }}} END BPS TAGGED BLOCK
+<TEXTAREA COLS=<%$Width%> ROWS=<%$Height%> WRAP=<%$Wrap%> NAME="<%$Name%>"><& /Elements/Callback, %ARGS &><% $Default %><%$message%><%$IncludeSignature ? $signature : ''%></TEXTAREA>
<%INIT>
my ($message);
diff --git a/rt/html/Elements/MyRequests b/rt/html/Elements/MyRequests
index 172b4a4..4e1bf3e 100644
--- a/rt/html/Elements/MyRequests
+++ b/rt/html/Elements/MyRequests
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<&|/Elements/TitleBox,
title => loc("[_1] newest unowned tickets", $rows),
title_href => "Search/Results.html".$QueryString &>
@@ -61,10 +61,9 @@ my $rows = $RT::MyRequestsLength;
my $Query = "Owner = 'Nobody' AND ( Status = 'new' OR Status = 'open')";
-my $QueryString = "";
-$QueryString = '?' . $m->comp('/Elements/QueryString',
- Query => $Query,
- Order => 'DESC',
- OrderBy => 'Priority') if ($Query);
+my $QueryString = '?' . $m->comp('/Elements/QueryString',
+ Query => $Query,
+ Order => 'DESC',
+ OrderBy => 'Priority') if ($Query);
</%init>
diff --git a/rt/html/Elements/MyTickets b/rt/html/Elements/MyTickets
index cf5225a..9f30a89 100644
--- a/rt/html/Elements/MyTickets
+++ b/rt/html/Elements/MyTickets
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<&|/Elements/TitleBox,
title => loc('[_1] highest priority tickets I own', $rows),
title_href => "Search/Results.html".$QueryString &>
@@ -61,11 +61,10 @@ my $rows = $RT::MyTicketsLength;
my $Query = " Owner = '".$session{'CurrentUser'}->Id."' AND ( Status = 'new' OR Status = 'open')";
-my $QueryString = "";
-$QueryString = '?' . $m->comp('/Elements/QueryString',
- Query => $Query,
- Order => 'DESC',
- OrderBy => 'Priority') if ($Query);
+my $QueryString = '?' . $m->comp('/Elements/QueryString',
+ Query => $Query,
+ Order => 'DESC',
+ OrderBy => 'Priority') if ($Query);
</%init>
diff --git a/rt/html/Elements/PageLayout b/rt/html/Elements/PageLayout
index 94bdbe1..41eae78 100644
--- a/rt/html/Elements/PageLayout
+++ b/rt/html/Elements/PageLayout
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<table class="lightgray" border=0 cellspacing=0 cellpadding=0 width="100%">
<th class="lightgray" align="left" width=42%><span class="rtname"><%$AppName%></span>
</th>
@@ -76,7 +76,7 @@
% if ($actions->{"$action"}->{'html'}) {
% push @actions, $actions->{"$action"}->{'html'};
% } else {
-% push @actions, qq|<a class="nav" href="|.$RT::WebPath."/".$actions->{$action}->{'path'}.qq|">|.$actions->{$action}->{'title'}."</a>";
+% push @actions, "<A class='nav' HREF=\"".$RT::WebPath."/".$actions->{$action}->{'path'}."\">".$actions->{$action}->{'title'}."</A>";
% }
% }
%#<% join(" | ", @actions) | n %>
@@ -94,12 +94,11 @@
</tr>
<TR valign="top">
<TD valign="top" width="100%" height="100%" class="mainbody" >
-<& /Elements/Callback, _CallbackName => 'BeforeBody', %ARGS &>
-%$m->flush_buffer(); # we've got the page laid out, let's flush the buffer;
+
<%INIT>
foreach my $tab (sort keys %{$toptabs}) {
- if ($current_toptab && $toptabs->{$tab}->{'path'} eq $current_toptab) {
+ if ($toptabs->{$tab}->{'path'} eq $current_toptab) {
$toptabs->{$tab}->{"subtabs"} = $tabs;
$toptabs->{$tab}->{"current_subtab"} = $current_tab;
}
diff --git a/rt/html/Elements/QueryString b/rt/html/Elements/QueryString
index 7d41f15..cbec29a 100644
--- a/rt/html/Elements/QueryString
+++ b/rt/html/Elements/QueryString
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<%init>
my @params;
while ( (my $key, my $value) = each %ARGS ){
diff --git a/rt/html/Elements/QuickCreate b/rt/html/Elements/QuickCreate
index 0d2489c..10cfbd3 100644
--- a/rt/html/Elements/QuickCreate
+++ b/rt/html/Elements/QuickCreate
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<& /Elements/TitleBoxStart, title => loc('Quick ticket creation') &>
<form method="post" action="<%$RT::WebPath%>/index.html">
<input type="hidden" name="QuickCreate" value="1">
diff --git a/rt/html/Elements/Quicksearch b/rt/html/Elements/Quicksearch
index d54f72e..103c760 100644
--- a/rt/html/Elements/Quicksearch
+++ b/rt/html/Elements/Quicksearch
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,40 +42,42 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<& /Elements/TitleBoxStart, title => loc("Quick search"), bodyclass => "" &>
<TABLE BORDER=0 cellspacing=0 cellpadding=1 WIDTH=100%>
<tr>
- <th class="collection-as-table" align=left><&|/l&>Queue</&></th>
- <th class="collection-as-table" align=right><&|/l&>New</&></th>
- <th class="collection-as-table" align=right><&|/l&>Open</&></th>
+ <th align=left><&|/l&>Queue</&></th>
+ <th align=right><font size=-1><&|/l&>New</&></font></th>
+ <th align=right><font size=-1><&|/l&>Open</&></font></th>
</tr>
<%PERL>
my $i;
while (my $queue = $Queues->Next) {
- next unless ($queue->CurrentUserHasRight('ShowTicket'));
+ my $new_q = "Queue = '".$queue->Name."' AND Status = 'new'";
+ my $open_q = "Queue = '".$queue->Name."' AND Status = 'open'";
+ my $all_q = "Queue = '".$queue->Name."' AND (Status = 'open' OR Status = 'new')";
- my $name = $queue->Name;
- $name =~ s|(['\\])|\\$1|g;
-
- my $new_q = "Queue = '$name' AND Status = 'new'";
- my $open_q = "Queue = '$name' AND Status = 'open'";
- my $all_q = "Queue = '$name' AND (Status = 'open' OR Status = 'new')";
- $Tickets->FromSQL($open_q);
- my $open = $Tickets->Count();
+ $Tickets->ClearRestrictions;
+ $Tickets->LimitStatus(VALUE => "open");
+ $Tickets->LimitQueue(VALUE => $queue->Name, OPERATOR => '=');
+ my $open = $Tickets->Count();
+
+ $Tickets->ClearRestrictions;
+ $Tickets->LimitStatus(VALUE => "new");
+ $Tickets->LimitQueue(VALUE => $queue->Name, OPERATOR => '=');
+ my $new = $Tickets->Count();
+
- $Tickets->FromSQL($new_q);
- my $new = $Tickets->Count();
- $i++;
</%PERL>
+% $i++;
<TR class="<% $i%2 ? 'oddline' : 'evenline'%>" >
-<td><A HREF="<% $RT::WebPath%>/Search/Results.html?Query=<%$all_q |nu%>&Rows=50" TITLE="<% $queue->Description %>"><%$queue->Name%></a></TD>
-<td align="right"><A HREF="<% $RT::WebPath%>/Search/Results.html?Query=<%$new_q |nu%>&Rows=50"><%$new%></a></TD>
-<td align="right"><A HREF="<% $RT::WebPath%>/Search/Results.html?Query=<%$open_q |nu%>&Rows=50"><%$open%></a></TD>
+<td><A HREF="<% $RT::WebPath%>/Search/Results.html?Query=<%$all_q%>&Rows=50" TITLE="<% $queue->Description %>"><%$queue->Name%></a></TD>
+<td align="right"><A HREF="<% $RT::WebPath%>/Search/Results.html?Query=<%$new_q%>&Rows=50"><%$new%></a></TD>
+<td align="right"><A HREF="<% $RT::WebPath%>/Search/Results.html?Query=<%$open_q%>&Rows=50"><%$open%></a></TD>
</TR>
% }
</TABLE>
diff --git a/rt/html/Elements/RT__Ticket/ColumnMap b/rt/html/Elements/RT__Ticket/ColumnMap
index dade914..a6d387c 100644
--- a/rt/html/Elements/RT__Ticket/ColumnMap
+++ b/rt/html/Elements/RT__Ticket/ColumnMap
@@ -1,14 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# BEGIN LICENSE BLOCK;
%#
-%# COPYRIGHT:
-%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
-%# <jesse@bestpractical.com>
+%# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com>
%#
-%# (Except where explicitly superseded by other copyright notices)
-%#
-%#
-%# LICENSE:
+%# (Except where explictly superceded by other copyright notices)
%#
%# 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
@@ -20,37 +14,25 @@
%# 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., 675 Mass Ave, Cambridge, MA 02139, USA.
-%#
+%# Unless otherwise specified, all modifications, corrections or
+%# extensions to this work which alter its source code become the
+%# property of Best Practical Solutions, LLC when submitted for
+%# inclusion in the work.
%#
-%# 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 }}}
+%# END LICENSE BLOCK
+
<%ARGS>
$Name => undef
$Attr => undef
</%ARGS>
+<%perl>
+return ColumnMap($Name, $Attr);
+</%perl>
-<%ONCE>
-our ( $COLUMN_MAP );
+<%INIT>
+our ( $COLUMN_MAP, $CUSTOM_FIELD_MAP );
sub ColumnMap {
my $name = shift;
@@ -63,52 +45,46 @@ sub ColumnMap {
# now, let's deal with harder things, like Custom Fields
- elsif ( $name =~ /^(?:CF|CustomField)\.\{(.+)\}$/ ) {
+ elsif ( $name =~ /^(?:CF|CustomField).(.*)$/ ) {
my $field = $1;
+ my $cf;
+ if ( $CUSTOM_FIELD_MAP->{$field} ) {
+ $cf = $CUSTOM_FIELD_MAP->{$field};
+ }
+ else {
+
+ $cf = RT::CustomField->new( $session{'CurrentUser'} );
+
+ if ( $field =~ /^(.+?)\.{(.+)}$/ ) {
+ $cf->LoadByNameAndQueue( Queue => $1, Name => $2 );
+ }
+ else {
+ $field = $1 if $field =~ /^{(.+)}$/; # trim { }
+ $cf->LoadByNameAndQueue( Queue => "0", Name => $field );
+ }
+ $CUSTOM_FIELD_MAP->{$field} = $cf if ( $cf->id );
+ }
+
+ unless ( $cf->id ) {
+ return undef;
+ }
if ( $attr eq 'attribute' ) {
return (undef);
}
elsif ( $attr eq 'title' ) {
- return ( $field );
+ return ( $cf->Name );
}
elsif ( $attr eq 'value' ) {
- # Display custom field contents, separated by newlines.
- # For Image custom fields we also show a thumbnail here.
- return sub {
- my $values = $_[0]->CustomFieldValues($field);
- return map {
- (
- ($_->CustomFieldObj->Type eq 'Image')
- ? \($m->scomp( '/Elements/ShowCustomFieldImage', Object => $_ ))
- : $_->Content
- ),
- \'<br>',
- } @{ $values->ItemsArrayRef }
- };
+ my $value = eval "sub {
+ my \$values = \$_[0]->CustomFieldValues('" . $cf->id . "');
+ return ( join( ', ', map { \$_->Content } \@{ \$values->ItemsArrayRef } ))
+ }" || die $@;
+ return ($value);
}
}
}
-sub LinkCallback {
- my $method = shift;
-
- my $mode = $RT::Ticket::LINKTYPEMAP{$method}{Mode};
- my $type = $RT::Ticket::LINKTYPEMAP{$method}{Type};
- my $mode_uri = $mode.'URI';
- my $local_type = 'Local'.$mode;
-
- return sub {
- map {
- \'<A HREF="',
- $_->$mode_uri->Resolver->HREF,
- \'">',
- ( $_->$mode_uri->IsLocal ? $_->$local_type : $_->$mode ),
- \'</A><BR>',
- } @{ $_[0]->Links($mode,$type)->ItemsArrayRef }
- }
-}
-
$COLUMN_MAP = {
QueueName => {
attribute => 'Queue',
@@ -127,7 +103,7 @@ $COLUMN_MAP = {
},
Status => {
attribute => 'Status',
- value => sub { return loc($_[0]->Status) }
+ value => sub { return $_[0]->Status }
},
Subject => {
attribute => 'Subject',
@@ -143,10 +119,10 @@ $COLUMN_MAP = {
if ( $Ticket->HasUnresolvedDependencies( Type => 'approval' )
or $Ticket->HasUnresolvedDependencies( Type => 'code' ) )
{
- return \'<em>', loc('(pending approval)'), \'</em>';
+ return "<em>" . loc('(pending approval)') . "</em>";
}
else {
- return \'<em>', loc('(pending other Collection)'), \'</em>';
+ return "<em>" . loc('(pending other Collection)') . "</em>";
}
}
else {
@@ -161,12 +137,10 @@ $COLUMN_MAP = {
},
InitialPriority => {
attribute => 'InitialPriority',
- name => 'Initial Priority',
value => sub { return $_[0]->InitialPriority }
},
FinalPriority => {
attribute => 'FinalPriority',
- name => 'Final Priority',
value => sub { return $_[0]->FinalPriority }
},
EffectiveId => {
@@ -179,17 +153,14 @@ $COLUMN_MAP = {
},
TimeWorked => {
attribute => 'TimeWorked',
- title => 'Time Worked',
value => sub { return $_[0]->TimeWorked }
},
TimeLeft => {
attribute => 'TimeLeft',
- title => 'Time Left',
value => sub { return $_[0]->TimeLeft }
},
TimeEstimated => {
attribute => 'TimeEstimated',
- title => 'Time Estimated',
value => sub { return $_[0]->TimeEstimated }
},
Requestors => {
@@ -217,7 +188,7 @@ $COLUMN_MAP = {
value => sub { return $_[0]->CreatedObj->AgeAsString }
},
LastUpdatedRelative => {
- title => 'Last Updated',
+ title => 'LastUpdated',
attribute => 'LastUpdated',
value => sub { return $_[0]->LastUpdatedObj->AgeAsString }
},
@@ -232,7 +203,7 @@ $COLUMN_MAP = {
value => sub {
my $date = $_[0]->DueObj;
if ($date && $date->Unix > 0 && $date->Unix < time()) {
- return (\'<span class="overdue">' , $date->AgeAsString , \'</span>');
+ return '<span class="overdue">' . $date->AgeAsString . '</span>';
} else {
return $date->AgeAsString;
}
@@ -257,17 +228,14 @@ $COLUMN_MAP = {
},
CreatedBy => {
attribute => 'CreatedBy',
- title => 'Created By',
value => sub { return $_[0]->CreatorObj->Name }
},
LastUpdated => {
attribute => 'LastUpdated',
- title => 'Last Updated',
value => sub { return $_[0]->LastUpdatedObj->AsString }
},
LastUpdatedBy => {
attribute => 'LastUpdatedBy',
- title => 'Last Updated By',
value => sub { return $_[0]->LastUpdatedByObj->Name }
},
Told => {
@@ -283,18 +251,144 @@ $COLUMN_MAP = {
value => sub { return $_[0]->ResolvedObj->AsString }
},
- # Everything from LINKTYPEMAP
- (map {
- $_ => { value => LinkCallback( $_ ) }
- } keys %RT::Ticket::LINKTYPEMAP),
+ DependedOnBy => {
+ value => sub {
+ my $links = $_[0]->DependedOnBy;
+ return (
+ join(
+ "<br>",
+ map {
+ '<A HREF="'
+ . $_->BaseURI->Resolver->HREF . '">'
+ . ( $_->BaseIsLocal ? $_->LocalBase : $_->Base )
+ . '</A>'
+ } @{ $links->ItemsArrayRef }
+ )
+ );
+ }
+ },
+ Members => {
+ value => sub {
+ my $links = $_[0]->Members;
+ return (
+ join(
+ "<br>",
+ map {
+ '<A HREF="'
+ . $_->BaseURI->Resolver->HREF . '">'
+ . ( $_->BaseIsLocal ? $_->LocalBase : $_->Base )
+ . '</A>'
+ } @{ $links->ItemsArrayRef }
+ )
+ );
+ }
+ },
+ Children => {
+ value => sub {
+ my $links = $_[0]->Members;
+ return (
+ join(
+ "<br>",
+ map {
+ '<A HREF="'
+ . $_->BaseURI->Resolver->HREF . '">'
+ . ( $_->BaseIsLocal ? $_->LocalBase : $_->Base )
+ . '</A>'
+ } @{ $links->ItemsArrayRef }
+ )
+ );
+ }
+ },
+ ReferredToBy => {
+ value => sub {
+ my $links = $_[0]->ReferredToBy;
+ return (
+ join(
+ "<br>",
+ map {
+ '<A HREF="'
+ . $_->BaseURI->Resolver->HREF . '">'
+ . ( $_->BaseIsLocal ? $_->LocalBase : $_->Base )
+ . '</A>'
+ } @{ $links->ItemsArrayRef }
+ )
+ );
+ }
+ },
+
+ DependsOn => {
+ value => sub {
+ my $links = $_[0]->DependsOn;
+ return (
+ join(
+ "<br>",
+ map {
+ '<A HREF="'
+ . $_->TargetURI->Resolver->HREF . '">'
+ . ( $_->TargetIsLocal ? $_->LocalTarget : $_->Target )
+ . '</A>'
+ } @{ $links->ItemsArrayRef }
+ )
+ );
+ }
+ },
+ MemberOf => {
+ value => sub {
+ my $links = $_[0]->MemberOf;
+ return (
+ join(
+ "<br>",
+ map {
+ '<A HREF="'
+ . $_->TargetURI->Resolver->HREF . '">'
+ . ( $_->TargetIsLocal ? $_->LocalTarget : $_->Target )
+ . '</A>'
+ } @{ $links->ItemsArrayRef }
+ )
+ );
+ }
+ },
+ Parents => {
+ value => sub {
+ my $links = $_[0]->MemberOf;
+ return (
+ join(
+ "<br>",
+ map {
+ '<A HREF="'
+ . $_->TargetURI->Resolver->HREF . '">'
+ . ( $_->TargetIsLocal ? $_->LocalTarget : $_->Target )
+ . '</A>'
+ } @{ $links->ItemsArrayRef }
+ )
+ );
+ }
+ },
+ RefersTo => {
+ value => sub {
+ my $links = $_[0]->RefersTo;
+ return (
+ join(
+ "<br>",
+ map {
+ '<A HREF="'
+ . $_->TargetURI->Resolver->HREF . '">'
+ . ( $_->TargetIsLocal ? $_->LocalTarget : $_->Target )
+ . '</A>'
+ } @{ $links->ItemsArrayRef }
+ )
+ );
+ }
+ },
'_CLASS' => {
value => sub { return $_[1] % 2 ? 'oddline' : 'evenline' }
},
};
-</%ONCE>
-<%init>
+
+
+
+# }}}
$m->comp( '/Elements/Callback', COLUMN_MAP => $COLUMN_MAP, _CallbackName => 'ColumnMap');
-return ColumnMap($Name, $Attr);
-</%init>
+</%INIT>
diff --git a/rt/html/Elements/Refresh b/rt/html/Elements/Refresh
index 9f241d2..3cfb7c6 100644
--- a/rt/html/Elements/Refresh
+++ b/rt/html/Elements/Refresh
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<SELECT NAME="<%$Name%>">
<OPTION VALUE="-1"
%unless ($Default) {
diff --git a/rt/html/Elements/ScrubHTML b/rt/html/Elements/ScrubHTML
index 94a7299..57495bc 100644
--- a/rt/html/Elements/ScrubHTML
+++ b/rt/html/Elements/ScrubHTML
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<%init>
my $scrubber = HTML::Scrubber->new();
diff --git a/rt/html/Elements/Section b/rt/html/Elements/Section
index afbb9cf..5bf7270 100644
--- a/rt/html/Elements/Section
+++ b/rt/html/Elements/Section
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<TABLE WIDTH=100%>
<TR>
<TD>
diff --git a/rt/html/Elements/SelectAttachmentField b/rt/html/Elements/SelectAttachmentField
index ea1528c..cd16bba 100644
--- a/rt/html/Elements/SelectAttachmentField
+++ b/rt/html/Elements/SelectAttachmentField
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<SELECT NAME="<%$Name%>">
<OPTION VALUE="Subject"><&|/l&>Subject</&></OPTION>
<OPTION VALUE="Content"><&|/l&>Content</&></OPTION>
diff --git a/rt/html/Elements/SelectBoolean b/rt/html/Elements/SelectBoolean
index a3f08fd..d176060 100644
--- a/rt/html/Elements/SelectBoolean
+++ b/rt/html/Elements/SelectBoolean
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<SELECT NAME ="<%$Name%>">
<OPTION VALUE="<%$TrueVal%>" <%$TrueDefault%>><%$True%></OPTION>
<OPTION VALUE="<%$FalseVal%>" <%$FalseDefault%>><%$False%></OPTION>
diff --git a/rt/html/Elements/SelectCustomFieldOperator b/rt/html/Elements/SelectCustomFieldOperator
index 8f7ea61..2264f2d 100644
--- a/rt/html/Elements/SelectCustomFieldOperator
+++ b/rt/html/Elements/SelectCustomFieldOperator
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<SELECT NAME ="<%$Name%>">
% while (my $option = shift @Options) {
% my $value = shift @Values;
diff --git a/rt/html/Elements/SelectCustomFieldValue b/rt/html/Elements/SelectCustomFieldValue
index 27d6c49..de9f540 100644
--- a/rt/html/Elements/SelectCustomFieldValue
+++ b/rt/html/Elements/SelectCustomFieldValue
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<& /Elements/Callback, %ARGS &>
% if ($CustomField->Type =~ /Select/i) {
% my $values = $CustomField->Values;
diff --git a/rt/html/Elements/SelectDate b/rt/html/Elements/SelectDate
index d381579..aaf2534 100644
--- a/rt/html/Elements/SelectDate
+++ b/rt/html/Elements/SelectDate
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<INPUT NAME="<%$Name%>" VALUE="<%$Default%>" size=<%$Size%>>
<%init>
diff --git a/rt/html/Elements/SelectDateRelation b/rt/html/Elements/SelectDateRelation
index ccf0c11..b3f3868 100644
--- a/rt/html/Elements/SelectDateRelation
+++ b/rt/html/Elements/SelectDateRelation
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<SELECT NAME ="<%$Name%>">
<OPTION VALUE="&lt;"><%$Before%></OPTION>
<OPTION VALUE="="><%$On%></OPTION>
diff --git a/rt/html/Elements/SelectDateType b/rt/html/Elements/SelectDateType
index 7b3f099..79bc994 100644
--- a/rt/html/Elements/SelectDateType
+++ b/rt/html/Elements/SelectDateType
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<SELECT NAME="<%$Name%>">
<OPTION VALUE="Created"><&|/l&>Created</&></OPTION>
<OPTION VALUE="Started"><&|/l&>Started</&></OPTION>
diff --git a/rt/html/Elements/SelectEqualityOperator b/rt/html/Elements/SelectEqualityOperator
index 0f8deea..5e5d1a4 100644
--- a/rt/html/Elements/SelectEqualityOperator
+++ b/rt/html/Elements/SelectEqualityOperator
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<SELECT NAME ="<%$Name%>">
% while (my $option = shift @Options) {
% my $value = shift @Values;
@@ -58,5 +58,5 @@ SELECTED
$Name => undef
@Options => (loc('less than'), loc('equal to'), loc('greater than'), loc('not equal to'))
@Values => qw(< = > !=)
-$Default =>''
+$Default => undef
</%ARGS>
diff --git a/rt/html/Elements/SelectGroups b/rt/html/Elements/SelectGroups
index bc37fd6..f6f9dae 100644
--- a/rt/html/Elements/SelectGroups
+++ b/rt/html/Elements/SelectGroups
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,19 +42,10 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<select name="GroupField">
-% foreach my $col (RT::Group->BasicColumns) {
-<option value="<% $col->[0] %>"><% loc($col->[1]) %>
-% }
-% while (my $CF = $CFs->Next) {
-<option value="CustomField-<% $CF->Id %>"><&|/l&>CustomField</&>: <% $CF->Name %>
-% }
+<option value="Name"><&|/l&>Name</&>
+<option value="Description"><&|/l&>Description</&>
</select>
<& /Elements/SelectMatch, Name=> 'GroupOp' &>
<input size=8 name="GroupString">
-<%INIT>
-my $CFs = RT::CustomFields->new($session{'CurrentUser'});
-$CFs->LimitToChildType('RT::Group');
-$CFs->OrderBy( FIELD => 'Name' );
-</%INIT>
diff --git a/rt/html/Elements/SelectLang b/rt/html/Elements/SelectLang
index a439ea3..46d3784 100644
--- a/rt/html/Elements/SelectLang
+++ b/rt/html/Elements/SelectLang
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<SELECT NAME ="<%$Name%>">
% if ($ShowNullOption) {
<OPTION VALUE="">-</OPTION>
diff --git a/rt/html/Elements/SelectLinkType b/rt/html/Elements/SelectLinkType
index 28cb441..d782e08 100644
--- a/rt/html/Elements/SelectLinkType
+++ b/rt/html/Elements/SelectLinkType
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<SELECT NAME ="<%$Name%>">
<OPTION VALUE="MemberOf"><&|/l&>Member of</&></OPTION>
<OPTION VALUE="DependsOn"><&|/l&>Depends on</&></OPTION>
diff --git a/rt/html/Elements/SelectMatch b/rt/html/Elements/SelectMatch
index 60949d9..18a948d 100644
--- a/rt/html/Elements/SelectMatch
+++ b/rt/html/Elements/SelectMatch
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<SELECT NAME ="<%$Name%>">
<OPTION VALUE="LIKE" <%$LikeDefault%>><%$Like%></OPTION>
<OPTION VALUE="NOT LIKE" <%$NotLikeDefault%>><%$NotLike%></OPTION>
diff --git a/rt/html/Elements/SelectNewTicketQueue b/rt/html/Elements/SelectNewTicketQueue
index d47b58a..fefb1bc 100644
--- a/rt/html/Elements/SelectNewTicketQueue
+++ b/rt/html/Elements/SelectNewTicketQueue
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<LABEL ACCESSKEY="9">
<SELECT NAME ="<%$Name%>">
% foreach my $queue (@{$session{'create_in_queues'}}) {
@@ -76,6 +76,6 @@ while (my $queue=$q->Next) {
<%ARGS>
$Name => 'Queue'
-$Verbose => 0
-$Default => 0
+$Verbose => undef
+$Default => undef
</%ARGS>
diff --git a/rt/html/Elements/SelectOwner b/rt/html/Elements/SelectOwner
index 85843e5..2a818cd 100644
--- a/rt/html/Elements/SelectOwner
+++ b/rt/html/Elements/SelectOwner
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,67 +42,44 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<SELECT NAME="<%$Name%>">
%if ($DefaultValue) {
-<OPTION <% !$Default ? "SELECTED" : '' %> VALUE=""><%$DefaultLabel%></OPTION>
+<OPTION <% !$Default && "SELECTED" %> VALUE=""><%$DefaultLabel%></OPTION>
%}
-%foreach my $User ( @users) {
-<OPTION <% ($User->Id == $Default) ? "SELECTED" : ''%>
-%if ($ValueAttribute eq 'id') {
- value="<%$User->id%>"
-%} elsif ($ValueAttribute eq 'Name') {
- value="<%$User->Name%>"
-%}
-><%$User->Name()%></OPTION>
+<OPTION <% ($RT::Nobody->Id() == $Default) && "SELECTED" %> VALUE="<%$RT::Nobody->Id%>"><%$RT::Nobody->Name%></OPTION>
+%while ( my $User = $Users->Next()) {
+<OPTION <% ($User->Id == $Default) && "SELECTED" %> VALUE="<%$User->Id()%>"><%$User->Name()%></OPTION>
%}
</SELECT>
+
<%INIT>
-my @objects;
-my @users;
+my $Users = RT::Users->new($session{CurrentUser});
+my $object;
+
if ($TicketObj) {
- @objects = ($TicketObj);
+ $object = $TicketObj;
}
elsif ($QueueObj) {
- @objects = ($QueueObj);
-}
-elsif ($cfqueues) {
- @objects = keys %{$cfqueues};
+ $object = $QueueObj;
}
-else {
- # Let's check rights on an empty queue object. that will do a search for any queue.
- my $queue = RT::Queue->new($session{'CurrentUser'});
- push( @objects, $queue );
+if ($object) {
+ $Users->WhoHaveRight(Right => 'OwnTicket',
+ Object => $object,
+ IncludeSystemRights => 1,
+ IncludeSuperusers => 1);
+} else {
+ $Users->LimitToPrivileged;
}
-
-my %user_uniq_hash;
-
-
-foreach my $object (@objects) {
- my $Users = RT::Users->new($session{CurrentUser});
- $Users->WhoHaveRight(Right => 'OwnTicket', Object => $object, IncludeSystemRights => 1, IncludeSuperusers => 0);
- while (my $User = $Users->Next()) {
- next if ($User->id == $RT::Nobody->id); # skip nobody here, so we can make them first later
- $user_uniq_hash{$User->Id()} = $User;
- }
-}
-
-@users = sort { uc($a->Name) cmp uc($b->Name) } values %user_uniq_hash;
-unshift(@users, $RT::Nobody);
-
-
-
</%INIT>
<%ARGS>
$QueueObj => undef
$Name => undef
-$Default => 0
+$Default => undef
$User => undef
$TicketObj => undef
$DefaultValue => 1
$DefaultLabel => "-"
-$ValueAttribute => 'id'
-$cfqueues => undef
</%ARGS>
diff --git a/rt/html/Elements/SelectQueue b/rt/html/Elements/SelectQueue
index 56aede8..57d4236 100644
--- a/rt/html/Elements/SelectQueue
+++ b/rt/html/Elements/SelectQueue
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
% if ($Lite) {
% my $d = new RT::Queue($session{'CurrentUser'});
% $d->Load($Default);
@@ -53,7 +53,7 @@
<OPTION VALUE="">-</OPTION>
% }
% while (my $queue=$q->Next) {
-% if ($ShowAllQueues || $queue->CurrentUserHasRight($CheckQueueRight)) {
+% if ($ShowAllQueues || $queue->CurrentUserHasRight('CreateTicket')) {
<OPTION VALUE="<%($NamedValues ? $queue->Name : $queue->Id) %>" <%( $queue->Id eq $Default ? 'SELECTED' : '')%>><%$queue->Name%>
% if (($Verbose) and ($queue->Description) ){
(<%$queue->Description%>)
@@ -64,7 +64,6 @@
</SELECT>
% }
<%ARGS>
-$CheckQueueRight => 'CreateTicket'
$ShowNullOption => 1
$ShowAllQueues => 1
$Name => undef
diff --git a/rt/html/Elements/SelectResultsPerPage b/rt/html/Elements/SelectResultsPerPage
index 65ed536..82f7035 100644
--- a/rt/html/Elements/SelectResultsPerPage
+++ b/rt/html/Elements/SelectResultsPerPage
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
%# TODO: Better default handling
<SELECT NAME ="<%$Name%>">
diff --git a/rt/html/Elements/SelectSortOrder b/rt/html/Elements/SelectSortOrder
index f6dd70d..ea1a305 100644
--- a/rt/html/Elements/SelectSortOrder
+++ b/rt/html/Elements/SelectSortOrder
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<SELECT NAME="<%$Name%>">
%foreach my $order (@orders) {
<OPTION VALUE="<%$order%>" <%$order eq $Default && 'SELECTED' %>>
diff --git a/rt/html/Elements/SelectStatus b/rt/html/Elements/SelectStatus
index fa76a3e..694957a 100644
--- a/rt/html/Elements/SelectStatus
+++ b/rt/html/Elements/SelectStatus
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<SELECT NAME ="<%$Name%>">
%if ($DefaultValue) {
<OPTION <% !$Default && "SELECTED" %> VALUE=""><%$DefaultLabel%></OPTION>
@@ -58,7 +58,7 @@ my @status = $queue->StatusArray();
</%ONCE>
<%ARGS>
$Name => undef
-$Default => ''
+$Default => undef
$SkipDeleted => 0
$DefaultValue => 1
$DefaultLabel => "-"
diff --git a/rt/html/Elements/SelectTicketSortBy b/rt/html/Elements/SelectTicketSortBy
index 3e05dcc..bf4b0be 100644
--- a/rt/html/Elements/SelectTicketSortBy
+++ b/rt/html/Elements/SelectTicketSortBy
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<SELECT NAME="<%$Name%>">
% foreach my $field (@sortfields) {
<OPTION VALUE="<%$field%>" <% $field eq $Default && 'SELECTED'%>><% loc($field) %></OPTION>
diff --git a/rt/html/Elements/SelectTicketTypes b/rt/html/Elements/SelectTicketTypes
index a905f60..c6912c8 100644
--- a/rt/html/Elements/SelectTicketTypes
+++ b/rt/html/Elements/SelectTicketTypes
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<SELECT NAME="<%$Name%>">
%foreach (@Types) {
<OPTION VALUE="<% $_ %>" <% ($_ eq $Default) && "SELECTED" %>><&|/l&><% $_ %></&>
diff --git a/rt/html/Elements/SelectUsers b/rt/html/Elements/SelectUsers
index dfe816e..be2230a 100644
--- a/rt/html/Elements/SelectUsers
+++ b/rt/html/Elements/SelectUsers
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,19 +42,12 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<select name="UserField">
-% foreach my $col (RT::User->BasicColumns) {
-<option value="<% $col->[0] %>"><% loc($col->[1]) %>
-% }
-% while (my $CF = $CFs->Next) {
-<option value="CustomField-<% $CF->Id %>"><&|/l&>CustomField</&>: <% $CF->Name %>
-% }
+<option value="Name"><&|/l&>User Id</&>
+<option value="EmailAddress"><&|/l&>Email</&>
+<option value="RealName"><&|/l&>Name</&>
+<option value="Organization"><&|/l&>Organization</&>
</select>
<& /Elements/SelectMatch, Name=> 'UserOp' &>
<input size=8 name="UserString">
-<%INIT>
-my $CFs = RT::CustomFields->new($session{'CurrentUser'});
-$CFs->LimitToChildType('RT::User');
-$CFs->OrderBy( FIELD => 'Name' );
-</%INIT>
diff --git a/rt/html/Elements/SelectWatcherType b/rt/html/Elements/SelectWatcherType
index 6ba9c7a..bb098ab 100644
--- a/rt/html/Elements/SelectWatcherType
+++ b/rt/html/Elements/SelectWatcherType
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<SELECT NAME ="<%$Name%>">
% if ($AllowNull) {
<OPTION VALUE="">-</OPTION>
diff --git a/rt/html/Elements/SetupSessionCookie b/rt/html/Elements/SetupSessionCookie
index bd78613..e72f458 100644
--- a/rt/html/Elements/SetupSessionCookie
+++ b/rt/html/Elements/SetupSessionCookie
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<%init>
return if $m->is_subrequest; # avoid reentrancy, as suggested by masonbook
@@ -75,25 +75,18 @@ my $pm = "$session_class.pm"; $pm =~ s|::|/|g; require $pm;
# If the session is invalid, create a new session.
if ( $@ =~ /Object does not/i ) {
- tie %session, $session_class, undef, $backends{$RT::DatabaseType}
- ? {
+ tie %session, $session_class, undef,
+ $backends{$RT::DatabaseType} ? {
Handle => $RT::Handle->dbh,
LockHandle => $RT::Handle->dbh,
- }
- : {
+ } : {
Directory => $RT::MasonSessionDir,
LockDirectory => $RT::MasonSessionDir,
};
undef $cookies{$cookiename};
}
else {
- die loc("RT couldn't store your session.") . "\n"
- . loc(
-"This may mean that that the directory '[_1]' isn't writable or a database table is missing or corrupt.",
- $RT::MasonSessionDir
- )
- . "\n\n"
- . $@;
+ die "RT Couldn't write to session directory '$RT::MasonSessionDir': $@. Check that this dir ectory's permissions are correct.";
}
}
diff --git a/rt/html/Elements/ShowCustomFieldBinary b/rt/html/Elements/ShowCustomFieldBinary
deleted file mode 100644
index ea9e5ae..0000000
--- a/rt/html/Elements/ShowCustomFieldBinary
+++ /dev/null
@@ -1,49 +0,0 @@
-%# BEGIN BPS TAGGED BLOCK {{{
-%#
-%# COPYRIGHT:
-%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
-%# <jesse@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., 675 Mass Ave, Cambridge, MA 02139, USA.
-%#
-%#
-%# 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 }}}
-<a href="<%$RT::WebPath%>/Download/CustomFieldValue/<% $Object->Id %>/<% $Object->Content %>"><% $Object->Content %></a>
-<%ARGS>
-$Object => undef
-</%ARGS>
diff --git a/rt/html/Elements/ShowCustomFieldImage b/rt/html/Elements/ShowCustomFieldImage
deleted file mode 100644
index 7fa5e46..0000000
--- a/rt/html/Elements/ShowCustomFieldImage
+++ /dev/null
@@ -1,51 +0,0 @@
-%# BEGIN BPS TAGGED BLOCK {{{
-%#
-%# COPYRIGHT:
-%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
-%# <jesse@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., 675 Mass Ave, Cambridge, MA 02139, USA.
-%#
-%#
-%# 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 }}}
-% my $url = $RT::WebPath . "/Download/CustomFieldValue/".$Object->Id.'/'.$Object->Content;
-<a href="<% $url %>"><% $Object->Content %></a>
-<img type="<% $Object->ContentType %>" height=64 src="<% $url %>" align="middle">
-<%ARGS>
-$Object
-</%ARGS>
diff --git a/rt/html/Elements/ShowCustomFieldWikitext b/rt/html/Elements/ShowCustomFieldWikitext
deleted file mode 100644
index ab7c27b..0000000
--- a/rt/html/Elements/ShowCustomFieldWikitext
+++ /dev/null
@@ -1,55 +0,0 @@
-%# BEGIN BPS TAGGED BLOCK {{{
-%#
-%# COPYRIGHT:
-%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
-%# <jesse@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., 675 Mass Ave, Cambridge, MA 02139, USA.
-%#
-%#
-%# 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 }}}
-% my $content = $Object->LargeContent || $Object->Content;
-% $content = $m->comp('/Elements/ScrubHTML', Content => $content);
-% my $wiki_content = Text::WikiFormat::format( $content."\n" , {}, { extended => 1, absolute_links => 1 });
-<%$wiki_content|n%>
-<%init>
-use Text::WikiFormat;
-</%init>
-<%ARGS>
-$Object
-</%ARGS>
diff --git a/rt/html/Elements/ShowCustomFields b/rt/html/Elements/ShowCustomFields
deleted file mode 100644
index 7591fa3..0000000
--- a/rt/html/Elements/ShowCustomFields
+++ /dev/null
@@ -1,77 +0,0 @@
-%# BEGIN BPS TAGGED BLOCK {{{
-%#
-%# COPYRIGHT:
-%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
-%# <jesse@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., 675 Mass Ave, Cambridge, MA 02139, USA.
-%#
-%#
-%# 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 }}}
-<table>
-% my @entry_fields;
-% while (my $CustomField = $CustomFields->Next()) {
-% my $Values = $Object->CustomFieldValues($CustomField->Id);
- <tr>
- <td class="label"><%$CustomField->Name%>:</td>
- <td class="value">
-<ul>
-% while (my $Value = $Values->Next()) {
-<li>
-% my $comp = "ShowCustomField".$CustomField->Type;
-% if ($m->comp_exists($comp)) {
-<& $comp, Object => $Value &>
-% } else {
-<%$Value->Content%>
-% }
-</li>
-% }
-% unless ($Values->Count()) {
-<li><i><&|/l&>(no value)</&></i></li>
-% }
-</ul>
- </td>
- </tr>
-% }
-</table>
-<%INIT>
-my $CustomFields = $Object->CustomFields;
-</%INIT>
-<%ARGS>
-$Object => undef
-</%ARGS>
diff --git a/rt/html/Elements/ShowLink b/rt/html/Elements/ShowLink
index 5929a96..520d689 100644
--- a/rt/html/Elements/ShowLink
+++ b/rt/html/Elements/ShowLink
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<A href="<%$URI->Resolver->HREF%>">
% if ($URI->IsLocal) {
% my $member = $URI->Object;
diff --git a/rt/html/Elements/ShowLinks b/rt/html/Elements/ShowLinks
index c9279a5..2ba62b8 100755
--- a/rt/html/Elements/ShowLinks
+++ b/rt/html/Elements/ShowLinks
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<table>
<tr>
<td class="labeltop"><&|/l&>Depends on</&>:</td>
diff --git a/rt/html/Elements/ShowMemberships b/rt/html/Elements/ShowMemberships
deleted file mode 100644
index 3936d50..0000000
--- a/rt/html/Elements/ShowMemberships
+++ /dev/null
@@ -1,86 +0,0 @@
-%# BEGIN BPS TAGGED BLOCK {{{
-%#
-%# COPYRIGHT:
-%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
-%# <jesse@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., 675 Mass Ave, Cambridge, MA 02139, USA.
-%#
-%#
-%# 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 }}}
-<ul>
-% while ( my $GroupMember = $GroupMembers->Next ) {
-% my $Group = RT::Group->new($session{'CurrentUser'});
-% $Group->Load($GroupMember->GroupId) or next;
-% if ($Group->Domain eq 'UserDefined') {
-<li><a href="<%$RT::WebPath%>/Admin/Groups/Modify.html?id=<% $Group->Id %>"><% $Group->Name %></a></li>
-% } elsif ($Group->Domain eq 'SystemInternal') {
-<li><em><% loc($Group->Type) %></em></li>
-% }
-% }
-</ul>
-<%INIT>
-my $GroupMembers = RT::GroupMembers->new($session{'CurrentUser'});
-$GroupMembers->Limit( FIELD => 'MemberId', VALUE => $UserObj->Id );
-my $alias = $GroupMembers->Join(
- TYPE => 'left',
- ALIAS1 => 'main',
- FIELD1 => 'GroupId',
- TABLE2 => 'Groups',
- FIELD2 => 'id'
-);
-$GroupMembers->Limit(
- ALIAS => $alias,
- FIELD => 'Domain',
- OPERATOR => '=',
- VALUE => 'SystemInternal',
-);
-$GroupMembers->Limit(
- ALIAS => $alias,
- FIELD => 'Domain',
- OPERATOR => '=',
- VALUE => 'UserDefined',
-);
-$GroupMembers->OrderByCols(
- { ALIAS => $alias, FIELD => 'Domain' },
- { ALIAS => $alias, FIELD => 'Name' },
-);
-</%INIT>
-<%ARGS>
-$UserObj
-</%ARGS>
diff --git a/rt/html/Elements/SimpleSearch b/rt/html/Elements/SimpleSearch
index e76f801..213aa7e 100644
--- a/rt/html/Elements/SimpleSearch
+++ b/rt/html/Elements/SimpleSearch
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<form action="<% $RT::WebPath %>/index.html">
<input size="12" name="q" autocomplete="off" accesskey="0">
<input type="submit" value="<&|/l&>Search tickets</&>">&nbsp;
diff --git a/rt/html/Elements/Submit b/rt/html/Elements/Submit
index 9d8dca2..0b42aab 100644
--- a/rt/html/Elements/Submit
+++ b/rt/html/Elements/Submit
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,33 +42,16 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
-% if ($CheckAll or $ClearAll) {
-<script><!--
-function set_checkbox (obj, val) {
- var i;
- var myfield = obj.form.getElementsByTagName('input');
- for (i = 0; i < myfield.length; i++) {
- if (myfield[i].type == 'checkbox') {
- myfield[i].checked = val;
- }
- }
-}
---></script>
-% }
+%# }}} END BPS TAGGED BLOCK
<TABLE WIDTH=100% BGCOLOR="<%$color%>" CELLSPACING=0 BORDER=0 CELLPADDING=0 >
<TR>
-<TD>
-% if ($CheckAll) {
-<INPUT TYPE=BUTTON VALUE="<%$CheckAllLabel%>" ONCLICK="set_checkbox(this, true)">
-% }
-% if ($ClearAll) {
-<INPUT TYPE=BUTTON VALUE="<%$ClearAllLabel%>" ONCLICK="set_checkbox(this, false)">
-% }
% if ($Reset) {
+<TD>
+<FONT COLOR=#ffd800 >
<INPUT TYPE=RESET VALUE="<%$ResetLabel%>">
-%}
+</FONT>
</TD>
+%}
<TD>
&nbsp;
</TD>
@@ -91,15 +74,11 @@ NAME="<%$Name%>"
</TABLE>
<%ARGS>
$color => "#336699"
-$Caption => ''
+$Caption => undef
$AlternateCaption => undef
$AlternateLabel => undef
$Label => loc('Submit')
$Name => undef
-$CheckAll => undef
-$CheckAllLabel => loc('Check All')
-$ClearAll => undef
-$ClearAllLabel => loc('Clear All')
$Reset => undef
$ResetLabel => loc('Reset')
</%ARGS>
diff --git a/rt/html/Elements/Tabs b/rt/html/Elements/Tabs
index f5839a9..4fc229b 100644
--- a/rt/html/Elements/Tabs
+++ b/rt/html/Elements/Tabs
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<& /Elements/PageLayout,
current_toptab => $current_toptab,
current_tab => $current_tab,
@@ -64,7 +64,7 @@ my $basetopactions = {
};
my $basetabs = {
' A'=> { title => 'Billing Main',
- path => &RT::URI::freeside::FreesideURL(),
+ path => '../',
},
A => { #title => loc('Homepage'),
title => 'Ticketing Main',
@@ -76,33 +76,23 @@ my $basetabs = {
C => { title => loc('Tools'),
path => 'Tools/Offline.html'
},
+ E => { title => loc('Configuration'),
+ path => 'Admin/'
+ },
+ K => { title => loc('Preferences'),
+ path => 'User/Prefs.html'
+ },
P => { title => loc('Approval'),
path => 'Approvals/'
},
};
-if ($session{'CurrentUser'}->HasRight( Right => 'ShowConfigTab',
- Object => $RT::System )) {
- $basetabs->{E} = { title => loc('Configuration'),
- path => 'Admin/',
- };
-}
-
-if ($session{'CurrentUser'}->HasRight( Right => 'ModifySelf',
- Object => $RT::System )) {
- $basetabs->{K} = { title => loc('Preferences'),
- path => 'User/Prefs.html'
- };
-}
-
if (!defined $toptabs) {
$toptabs = $basetabs;
}
if (!defined $topactions) {
$topactions = $basetopactions;
}
-
- require RT::URI::freeside;
# Now let callbacks add their extra tabs
$m->comp('/Elements/Callback',
diff --git a/rt/html/Elements/TicketList b/rt/html/Elements/TicketList
index 1a53127..80d59f8 100644
--- a/rt/html/Elements/TicketList
+++ b/rt/html/Elements/TicketList
@@ -1,14 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# BEGIN LICENSE BLOCK;
%#
-%# COPYRIGHT:
-%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
-%# <jesse@bestpractical.com>
+%# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com>
%#
-%# (Except where explicitly superseded by other copyright notices)
-%#
-%#
-%# LICENSE:
+%# (Except where explictly superceded by other copyright notices)
%#
%# 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
@@ -20,35 +14,23 @@
%# 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., 675 Mass Ave, Cambridge, MA 02139, USA.
-%#
+%# Unless otherwise specified, all modifications, corrections or
+%# extensions to this work which alter its source code become the
+%# property of Best Practical Solutions, LLC when submitted for
+%# inclusion in the work.
%#
-%# 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 }}}
+%# END LICENSE BLOCK
+
+%# If you're having TicketList display a single record, you need
+%# to wrap the calls in your own table(s).
+% unless (defined $SingleRecord) {
<TABLE BORDER=0 cellspacing=0 cellpadding=1 WIDTH=100%>
+% }
% if ($ShowHeader) {
<& /Elements/CollectionAsTable/Header,
Format => \@Format,
- FormatString => $Format,
AllowSorting => $AllowSorting,
Order => $Order,
Query => $Query,
@@ -56,46 +38,42 @@
Page => $Page,
OrderBy => $OrderBy ,
BaseURL => $BaseURL,
- maxitems => $maxitems &>
+ maxitems => \$maxitems &>
% }
+% if (defined $SingleRecord) {
+<& /Elements/CollectionAsTable/Row, Format => \@Format, i => 0, record => $SingleRecord, maxitems => $maxitems &>
+% } else {
% my $i;
% while (my $record = $Collection->Next) {
% $i++;
-% # Every ten rows, flush the buffer and put something on the page.
-% $m->flush_buffer() unless ($i % 10);
<& /Elements/CollectionAsTable/Row, Format => \@Format, i => $i, record => $record, maxitems => $maxitems &>
% }
+% }
+% unless (defined $SingleRecord) {
</TABLE>
+% }
-% if ($Rows && $ShowNavigation) {
+% if ($ShowNavigation) {
<hr>
-% my $oddRows;
-% if (($TotalFound % $Rows) == 0) {
-% $oddRows = 0;
-% } else { $oddRows = 1; }
-<&|/l, $Page, int($TotalFound/$Rows)+$oddRows&>Page [_1] of [_2]</&>
+<&|/l, $Page, int($TotalFound/$Rows)+1&>Page [_1] of [_2]</&>
<%perl>
-my $prev = $m->comp(
- '/Elements/QueryString',
- Query => $Query,
- Format => $Format,
- Rows => $Rows,
- OrderBy => $OrderBy,
- Order => $Order,
- Page => ( $Page - 1 )
-);
-my $next = $m->comp(
- '/Elements/QueryString',
- Query => $Query,
- Format => $Format,
- Rows => $Rows,
- OrderBy => $OrderBy,
- Order => $Order,
- Page => ( $Page + 1 )
-);
+my $prev = $m->comp('/Elements/QueryString',
+ Query => $Query,
+ Format => $Format,
+ Rows => $Rows,
+ OrderBy => $OrderBy,
+ Order => $Order,
+ Page => ($Page-1));
+my $next = $m->comp('/Elements/QueryString',
+ Query => $Query,
+ Format => $Format,
+ Rows => $Rows,
+ OrderBy => $OrderBy,
+ Order => $Order,
+ Page => ($Page+1));
</%perl>
% if ($Page > 1) {
<A href="<%$BaseURL%><%$prev%>"><&|/l&>Previous Page</&></a>
@@ -105,12 +83,13 @@ my $next = $m->comp(
% }
% }
<%INIT>
-my $maxitems = 0;
+my $maxitems;
$Format ||= $RT::DefaultSearchResultFormat;
# Scrub the html of the format string to remove any potential nasties.
$Format = $m->comp('/Elements/ScrubHTML', Content => $Format);
+$Rows ||= '25'; # we need a positive value
unless ($Collection) {
$Collection = RT::Tickets->new($session{'CurrentUser'});
@@ -119,31 +98,19 @@ unless ($Collection) {
my (@Format) = $m->comp('/Elements/CollectionAsTable/ParseFormat', Format => $Format);
-# Find the maximum number of items in any row, so we can pad the table.
-my $item = 0;
-foreach my $col (@Format) {
- $item++;
- if ( $col->{title} eq 'NEWLINE' ) {
- $item = 0;
- }
- else {
- $maxitems = $item if $item > $maxitems;
- }
-}
-
-
$Collection->OrderBy(FIELD => $OrderBy, ORDER => $Order);
-$Collection->RowsPerPage($Rows) if ($Rows);
+$Collection->RowsPerPage($Rows);
$Collection->GotoPage($Page-1); # SB uses page 0 as the first page
my $TotalFound = $Collection->CountAll();
</%INIT>
<%ARGS>
$Query => undef
-$Rows => 50
+$Rows => 10
$Page => 1
$Title => 'Ticket Search'
$Collection => undef
+$SingleRecord => undef
$AllowSorting => undef
$Order => undef
$OrderBy => undef
diff --git a/rt/html/Elements/TitleBox b/rt/html/Elements/TitleBox
index 3c638e2..5913936 100644
--- a/rt/html/Elements/TitleBox
+++ b/rt/html/Elements/TitleBox
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,5 +42,5 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<& TitleBoxStart, %ARGS&><%$m->content|n%><& TitleBoxEnd&>
diff --git a/rt/html/Elements/TitleBoxEnd b/rt/html/Elements/TitleBoxEnd
index d791e3a..1c050bc 100644
--- a/rt/html/Elements/TitleBoxEnd
+++ b/rt/html/Elements/TitleBoxEnd
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,13 +42,10 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
</TD>
</TR>
</TABLE>
-% #Manually flush the content buffer after each titlebox is displayed
-% $m->flush_buffer();
-
<%ARGS>
$title => undef
$content => undef
diff --git a/rt/html/Elements/TitleBoxStart b/rt/html/Elements/TitleBoxStart
index 804e5cf..a0c7335 100644
--- a/rt/html/Elements/TitleBoxStart
+++ b/rt/html/Elements/TitleBoxStart
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<TABLE CLASS="box <%$class|n%>"
BGCOLOR="<%$color%>"
CELLSPACING=0
@@ -74,7 +74,7 @@ $class => undef
$bodyclass => undef
$title_href => undef
$title => undef
-$title_class => ''
+$title_class => undef
$titleright_href => undef
$titleright => undef
diff --git a/rt/html/NoAuth/Logout.html b/rt/html/NoAuth/Logout.html
index b6a238b..85fbc9e 100644
--- a/rt/html/NoAuth/Logout.html
+++ b/rt/html/NoAuth/Logout.html
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<HTML>
<HEAD>
<TITLE>RT: Logout</TITLE>
diff --git a/rt/html/NoAuth/Reminder.html b/rt/html/NoAuth/Reminder.html
index 0793f6c..90c282a 100644
--- a/rt/html/NoAuth/Reminder.html
+++ b/rt/html/NoAuth/Reminder.html
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<& /Elements/Header, title => loc('Password Reminder') &>
<&|/l&>Not yet implemented.</&>
diff --git a/rt/html/NoAuth/images/autohandler b/rt/html/NoAuth/images/autohandler
index 2e428c1..86f3b22 100644
--- a/rt/html/NoAuth/images/autohandler
+++ b/rt/html/NoAuth/images/autohandler
@@ -15,10 +15,7 @@ if ($file =~ /\.(gif|png|jpe?g)$/i) {
die unless (-f $file && -r $file);
$r->content_type($type);
open (FILE, "<$file") || die;
-{
- local $/ = \16384;
- $m->out($_) while (<FILE>);
- close(FILE);
-}
+$m->out($_) while (<FILE>);
+close(FILE);
$m->abort;
</%init>
diff --git a/rt/html/NoAuth/images/back_home.gif b/rt/html/NoAuth/images/back_home.gif
new file mode 100644
index 0000000..40b19c1
--- /dev/null
+++ b/rt/html/NoAuth/images/back_home.gif
Binary files differ
diff --git a/rt/html/NoAuth/images/head_requestracker.gif b/rt/html/NoAuth/images/head_requestracker.gif
new file mode 100644
index 0000000..73315e9
--- /dev/null
+++ b/rt/html/NoAuth/images/head_requestracker.gif
Binary files differ
diff --git a/rt/html/NoAuth/images/rt.jpg b/rt/html/NoAuth/images/rt.jpg
new file mode 100644
index 0000000..a137a93
--- /dev/null
+++ b/rt/html/NoAuth/images/rt.jpg
Binary files differ
diff --git a/rt/html/NoAuth/images/spacer.gif b/rt/html/NoAuth/images/spacer.gif
new file mode 100644
index 0000000..5bfd67a
--- /dev/null
+++ b/rt/html/NoAuth/images/spacer.gif
Binary files differ
diff --git a/rt/html/NoAuth/images/squares_blue.gif b/rt/html/NoAuth/images/squares_blue.gif
new file mode 100644
index 0000000..a28da5c
--- /dev/null
+++ b/rt/html/NoAuth/images/squares_blue.gif
Binary files differ
diff --git a/rt/html/NoAuth/webrt.css b/rt/html/NoAuth/webrt.css
index bc688ac..4f8d8ed 100644
--- a/rt/html/NoAuth/webrt.css
+++ b/rt/html/NoAuth/webrt.css
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
SPAN.nav { font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 12px;
%# color: #FFFFFF;
@@ -72,109 +72,6 @@ SPAN.nav { font-family: Verdana, Arial, Helvetica, sans-serif;
color: #000000;
text-decoration: none;
white-space: nowrap}
-
-%# .topnav is the original RT class for the sidebar navigation tabs.
-%# Font-sizing by level depth was originally hard-coded into Elements/Menu.
-%# This modification sets a different class name for each level, allowing
-%# style sheet control over the formats.
-
-a.topnav-0 { font-family: Verdana, sans-serif;
- font-size: 16px;
- font-weight: normal;
- color: #000000;
- text-decoration: none;
- white-space: nowrap}
-a.topnav-1 { font-family: Verdana, sans-serif;
- font-size: 14px;
- font-weight: normal;
- color: #000000;
- text-decoration: none;
- white-space: nowrap}
-a.topnav-2 { font-family: Verdana, sans-serif;
- font-size: 12px;
- font-weight: normal;
- color: #000000;
- text-decoration: none;
- white-space: nowrap}
-a.topnav-3 { font-family: Verdana, sans-serif;
- font-size: 11px;
- font-weight: normal;
- color: #000000;
- text-decoration: none;
- white-space: nowrap}
-a.topnav-4 { font-family: Verdana, sans-serif;
- font-size: 11px;
- font-weight: normal;
- color: #000000;
- text-decoration: none;
- white-space: nowrap}
-a.topnav-5 { font-family: Verdana, sans-serif;
- font-size: 11px;
- font-weight: normal;
- color: #000000;
- text-decoration: none;
- white-space: nowrap}
-li.topnav-0-minor {
- border-top: solid #777777 1px;
- padding-top: .1em;
- margin-top: .5em;
-}
-li.topnav-1-minor {
- border-top: solid #777777 1px;
- padding-top: .1em;
- margin-top: .5em;
-}
-li.topnav-2-minor {
- border-top: solid #777777 1px;
- padding-top: .1em;
- margin-top: .5em;
-}
-li.topnav-3-minor {
- border-top: solid #777777 1px;
- padding-top: .1em;
- margin-top: .5em;
-}
-li.topnav-4-minor {
- border-top: solid #777777 1px;
- padding-top: .1em;
- margin-top: .5em;
-}
-li.topnav-5-minor {
- border-top: solid #777777 1px;
- padding-top: .1em;
- margin-top: .5em;
-}
-li.topnav-0-major {
- border-bottom: solid black 1px;
- padding-top: .25em;
- padding-bottom: .5em;
-}
-li.topnav-1-major {
- border-bottom: solid black 1px;
- padding-top: .25em;
- padding-bottom: .5em;
-}
-li.topnav-2-major {
- border-bottom: solid black 1px;
- padding-top: .25em;
- padding-bottom: .5em;
-}
-li.topnav-3-major {
- border-bottom: solid black 1px;
- padding-top: .25em;
- padding-bottom: .5em;
-}
-li.topnav-4-major {
- border-bottom: solid black 1px;
- padding-top: .25em;
- padding-bottom: .5em;
-}
-li.topnav-5-major {
- border-bottom: solid black 1px;
- padding-top: .25em;
- padding-bottom: .5em;
-}
-
.currenttopnav { font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 16px;
font-weight: bold;
@@ -182,109 +79,6 @@ li.topnav-5-major {
color: #000000; background-color: #cccccc;
text-decoration: none;
white-space: nowrap}
-
-%# .currenttopnav is the original RT class for the sidebar navigation tabs.
-%# Font-sizing by level depth was originally hard-coded into Elements/Menu.
-%# This modification sets a different class name for each level, allowing
-%# style sheet control over the formats
-
-a.currenttopnav-0 { font-family: Verdana, sans-serif;
- font-size: 16px;
- font-weight: bold;
- color: #000000; background-color: #cccccc;
- text-decoration: none;
- white-space: nowrap}
-a.currenttopnav-1 { font-family: Verdana, sans-serif;
- font-size: 14px;
- font-weight: bold;
- color: #000000; background-color: #cccccc;
- text-decoration: none;
- white-space: nowrap}
-a.currenttopnav-2 { font-family: Verdana, sans-serif;
- font-size: 12px;
- font-weight: normal;
- color: #000000; background-color: #cccccc;
- text-decoration: none;
- white-space: nowrap}
-a.currenttopnav-3 { font-family: Verdana, sans-serif;
- font-size: 11px;
- font-weight: normal;
- color: #000000; background-color: #cccccc;
- text-decoration: none;
- white-space: nowrap}
-a.currenttopnav-4 { font-family: Verdana, sans-serif;
- font-size: 11px;
- font-weight: normal;
- color: #000000; background-color: #cccccc;
- text-decoration: none;
- white-space: nowrap}
-a.currenttopnav-5 { font-family: Verdana, sans-serif;
- font-size: 11px;
- font-weight: normal;
- color: #000000; background-color: #cccccc;
- text-decoration: none;
- white-space: nowrap}
-li.currenttopnav-0-minor {
- border-top: solid #999999 1px;
- padding-top: .1em;
- margin-top: .5em;
-}
-li.currenttopnav-1-minor {
- border-top: solid #777777 1px;
- padding-top: .1em;
- margin-top: .5em;
-}
-li.currenttopnav-2-minor {
- border-top: solid #777777 1px;
- padding-top: .1em;
- margin-top: .5em;
-}
-li.currenttopnav-3-minor {
- border-top: solid #777777 1px;
- padding-top: .1em;
- margin-top: .5em;
-}
-li.currenttopnav-4-minor {
- border-top: solid #777777 1px;
- padding-top: .1em;
- margin-top: .5em;
-}
-li.currenttopnav-5-minor {
- border-top: solid #777777 1px;
- padding-top: .1em;
- margin-top: .5em;
-}
-li.currenttopnav-0-major {
- border-bottom: solid black 1px;
- padding-top: .25em;
- padding-bottom: .5em;
-}
-li.currenttopnav-1-major {
- border-bottom: solid black 1px;
- padding-top: .25em;
- padding-bottom: .5em;
-}
-li.currenttopnav-2-major {
- border-bottom: solid black 1px;
- padding-top: .25em;
- padding-bottom: .5em;
-}
-li.currenttopnav-3-major {
- border-bottom: solid black 1px;
- padding-top: .25em;
- padding-bottom: .5em;
-}
-li.currenttopnav-4-major {
- border-bottom: solid black 1px;
- padding-top: .25em;
- padding-bottom: .5em;
-}
-li.currenttopnav-5-major {
- border-bottom: solid black 1px;
- padding-top: .25em;
- padding-bottom: .5em;
-}
-
.topactions { font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 10px;
color: #FFFFFF;
@@ -319,12 +113,12 @@ li.currenttopnav-5-major {
vertical-align: top;
text-align: left;
}
-%# Actually the "topactions" section
-.blueright { background-color: #4682B4;
+.blueright {
+ background-color: #4682B4;
+%# background-color: #eeeeee;
background-position: left top;
vertical-align: top;
text-align: right;
- padding-right: 1em;
}
.olddarkblue { background-color: #003399;
background-position: left top;
@@ -390,7 +184,7 @@ div.messagebody {
div.downloadattachment {
- font-size: 10px;
+ font size: 10px;
text-align: right;
}
@@ -595,21 +389,32 @@ SPAN.attribution {
SPAN.label { font-size: 0.8em;
}
-DIV.page-stats { font-size: 0.8em;
- color: #cccccc;
- text-align: right;
- }
-
-
BLOCKQUOTE {
font-style: italic;
+ /* color: #990; */
+}
+
+ADDRESS {
+ text-align: right;
+ font-weight: bold;
+ font-style: italic
+}
+
+BLOCKQUOTE P { /* Try to avoid space above the attribution */
+ margin-bottom: 0;
+}
+BLOCKQUOTE ADDRESS {
+ margin: 0;
}
+
.emphasized {
font-weight: bold
}
+P.map-also { font-style: italic; margin-left: 15%; text-align: right }
+
.oddline {
background-color : #ccccee;
}
@@ -625,43 +430,6 @@ ul.topnav {
margin-bottom:0;
}
-.menu-major-separator {
- border-bottom: solid white 1px;
- padding-top: .25em;
- padding-bottom: .5em;
-}
-
-.menu-minor-separator {
- border-top: solid #999999 1px;
- padding-top: .1em;
- margin-top: .5em;
-}
-
-TH.collection-as-table { text-align: center;
- font-size: 0.8em;
- padding-left: .5em;
- padding-right: .5em;
- color: #333333;
- background-color: #cccccc;
- white-space: nowrap;
- }
-
-TD.collection-as-table { text-align: left;
- padding-left: .5em;
- padding-right: .5em;
- }
-
-textarea.signature {
- width: 100%;
-}
-textarea.comments {
- width: 100%;
-}
-
-textarea.messagebox {
- width: 100%;
-}
-
%# Provide a callback for adding/modifying the style sheet.
%# http://www.w3.org/TR/REC-CSS1 - section 3.2, says:
%# "latter specified rule wins"
@@ -671,5 +439,5 @@ inherit => undef
</%flags>
<%init>
$r->content_type('text/css');
-#$r->headers_out->{'Expires'} = '+30m';
+$r->headers_out->{'Expires'} = '+30m';
</%init>
diff --git a/rt/html/REST/1.0/Forms/queue/default b/rt/html/REST/1.0/Forms/queue/default
index c87c33c..1041684 100644
--- a/rt/html/REST/1.0/Forms/queue/default
+++ b/rt/html/REST/1.0/Forms/queue/default
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
%# REST/1.0/Forms/queue/default
%#
<%ARGS>
diff --git a/rt/html/REST/1.0/Forms/queue/ns b/rt/html/REST/1.0/Forms/queue/ns
index b0ba003..bc722d8 100644
--- a/rt/html/REST/1.0/Forms/queue/ns
+++ b/rt/html/REST/1.0/Forms/queue/ns
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
%# REST/1.0/Forms/queue/ns
%#
<%ARGS>
diff --git a/rt/html/REST/1.0/Forms/ticket/attachments b/rt/html/REST/1.0/Forms/ticket/attachments
index ca75ce0..944e125 100644
--- a/rt/html/REST/1.0/Forms/ticket/attachments
+++ b/rt/html/REST/1.0/Forms/ticket/attachments
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
%# REST/1.0/Forms/ticket/attachments
%#
<%ARGS>
@@ -80,7 +80,7 @@ if ($aid) {
return [ "# Invalid attachment id: $aid", [], {}, 1 ];
}
if ($content) {
- $c = $attachment->OriginalContent;
+ $c = $attachment->Content;
} else {
my @data;
push @data, [ id => $attachment->Id ];
diff --git a/rt/html/REST/1.0/Forms/ticket/default b/rt/html/REST/1.0/Forms/ticket/default
index 78f6c95..d231f7b 100644
--- a/rt/html/REST/1.0/Forms/ticket/default
+++ b/rt/html/REST/1.0/Forms/ticket/default
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
%# REST/1.0/Forms/ticket/default
%#
<%ARGS>
diff --git a/rt/html/REST/1.0/Forms/ticket/history b/rt/html/REST/1.0/Forms/ticket/history
index 4663e97..f60615a 100644
--- a/rt/html/REST/1.0/Forms/ticket/history
+++ b/rt/html/REST/1.0/Forms/ticket/history
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
%# REST/1.0/Forms/ticket/history
%#
<%ARGS>
@@ -97,6 +97,8 @@ if ($tid) {
$t->Load($tid);
push @data, [ id => $t->Id ];
+ push @data, [ EffectiveTicket => $t->EffectiveTicket ]
+ if (!%$fields || exists $fields->{lc 'EffectiveTicket'});
push @data, [ Ticket => $t->Ticket ]
if (!%$fields || exists $fields->{lc 'Ticket'});
push @data, [ TimeTaken => $t->TimeTaken ]
diff --git a/rt/html/REST/1.0/Forms/ticket/links b/rt/html/REST/1.0/Forms/ticket/links
index 9f14da4..a3dab28 100644
--- a/rt/html/REST/1.0/Forms/ticket/links
+++ b/rt/html/REST/1.0/Forms/ticket/links
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
%# REST/1.0/Forms/ticket/links
%#
<%ARGS>
diff --git a/rt/html/REST/1.0/Forms/user/default b/rt/html/REST/1.0/Forms/user/default
index ad2ebd5..3694416 100644
--- a/rt/html/REST/1.0/Forms/user/default
+++ b/rt/html/REST/1.0/Forms/user/default
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
%# REST/1.0/Forms/user/default
%#
<%ARGS>
diff --git a/rt/html/REST/1.0/Forms/user/ns b/rt/html/REST/1.0/Forms/user/ns
index 4061563..8c7f16e 100644
--- a/rt/html/REST/1.0/Forms/user/ns
+++ b/rt/html/REST/1.0/Forms/user/ns
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
%# REST/1.0/Forms/user/ns
%#
<%ARGS>
diff --git a/rt/html/REST/1.0/NoAuth/mail-gateway b/rt/html/REST/1.0/NoAuth/mail-gateway
index 5252c19..09e3e3c 100644
--- a/rt/html/REST/1.0/NoAuth/mail-gateway
+++ b/rt/html/REST/1.0/NoAuth/mail-gateway
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,19 +42,18 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<%flags>
inherit => undef # inhibit UTF8 conversion done in /autohandler
</%flags>
<%ARGS>
+$message
$queue => 1
$action => "correspond"
$ticket => undef
</%ARGS>
<%init>
use RT::Interface::Email;
-$r->content_type('text/plain; charset=utf-8');
-$m->error_format('text');
my ( $status, $error, $Ticket ) = RT::Interface::Email::Gateway(\%ARGS);
if ($status == -75 ) {
$m->out("temporary failure - ". $error);
@@ -72,6 +71,4 @@ $m->out('Requestor: '. $Ticket->Requestors->MemberEmailAddressesAsString );
} else {
$m->out('not ok - '.$error);
}
-
-$m->abort();
</%init>
diff --git a/rt/html/REST/1.0/autohandler b/rt/html/REST/1.0/autohandler
index 8e3fb16..c952319 100644
--- a/rt/html/REST/1.0/autohandler
+++ b/rt/html/REST/1.0/autohandler
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,12 +42,12 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
%# REST/1.0/autohandler
%#
<%INIT>
use RT::Interface::REST;
-$r->content_type('text/plain; charset=utf-8');
+$r->content_type('text/plain');
$m->error_format('text');
$m->call_next();
$m->abort();
diff --git a/rt/html/REST/1.0/dhandler b/rt/html/REST/1.0/dhandler
index 6cf45b0..725a617 100644
--- a/rt/html/REST/1.0/dhandler
+++ b/rt/html/REST/1.0/dhandler
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
%# REST/1.0/dhandler
%#
<%ARGS>
diff --git a/rt/html/REST/1.0/logout b/rt/html/REST/1.0/logout
index 470cb09..9f04376 100644
--- a/rt/html/REST/1.0/logout
+++ b/rt/html/REST/1.0/logout
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<%PERL>
tied(%session)->delete if (defined %session);
</%PERL>
diff --git a/rt/html/REST/1.0/search/dhandler b/rt/html/REST/1.0/search/dhandler
index 1915a46..8c61f72 100644
--- a/rt/html/REST/1.0/search/dhandler
+++ b/rt/html/REST/1.0/search/dhandler
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
%# REST/1.0/search/dhandler
%#
<%INIT>
diff --git a/rt/html/REST/1.0/search/ticket b/rt/html/REST/1.0/search/ticket
index d0ab59e..6b52ac8 100644
--- a/rt/html/REST/1.0/search/ticket
+++ b/rt/html/REST/1.0/search/ticket
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
%# REST/1.0/search/ticket
%#
<%ARGS>
@@ -135,7 +135,7 @@ if ($n == 0 && $format ne "i") {
$output = form_compose(\@output) if @output;
OUTPUT:
-$m->out("RT/". $RT::VERSION . " " . $status ."\n\n");
+$m->out("RT/". $RT::VERSION . " " . $status);
$m->out($output );
</%INIT>
diff --git a/rt/html/REST/1.0/ticket/comment b/rt/html/REST/1.0/ticket/comment
index e27bfcc..4915c64 100644
--- a/rt/html/REST/1.0/ticket/comment
+++ b/rt/html/REST/1.0/ticket/comment
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
%# REST/1.0/ticket/comment
%#
<%ARGS>
diff --git a/rt/html/REST/1.0/ticket/link b/rt/html/REST/1.0/ticket/link
index 6556a5e..7507c07 100644
--- a/rt/html/REST/1.0/ticket/link
+++ b/rt/html/REST/1.0/ticket/link
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
%# REST/1.0/ticket/link
%#
<%ARGS>
diff --git a/rt/html/REST/1.0/ticket/merge b/rt/html/REST/1.0/ticket/merge
index 3db5211..7cc8b4b 100644
--- a/rt/html/REST/1.0/ticket/merge
+++ b/rt/html/REST/1.0/ticket/merge
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
%# REST/1.0/ticket/merge
%#
<%ARGS>
diff --git a/rt/html/Search/Build.html b/rt/html/Search/Build.html
index cb64626..bbf2a1d 100644
--- a/rt/html/Search/Build.html
+++ b/rt/html/Search/Build.html
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,27 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
-%#
-%# Data flow here:
-%# The page receives a Query from the previous page, and maybe arguments
-%# corresponding to actions. (If it doesn't get a Query argument, it pulls
-%# one out of the session hash. Also, it could be getting just a raw query from
-%# Build/Edit.html (Advanced).)
-%#
-%# After doing some stuff with default arguments and saved searches, the ParseQuery
-%# function (which is similar to, but not the same as, _parser in RT/Tickets_Overlay_SQL)
-%# converts the Query into a RT::Interface::Web::QueryBuilder::Tree. This mason file
-%# then adds stuff to or modifies the tree based on the actions that had been requested
-%# by clicking buttons. It then calls GetQueryAndOptionList on the tree to generate
-%# the SQL query (which is saved as a hidden input) and the option list for the Clauses
-%# box in the top right corner.
-%#
-%# Worthwhile refactoring: the tree manipulation code for the actions could use some cleaning
-%# up. The node-adding code is different in the "add" actions from in ParseQuery, which leads
-%# to things like ParseQuery correctly not quoting numbers in numerical fields, while the "add"
-%# action does quote it (this breaks SQLite).
-%#
+%# }}} END BPS TAGGED BLOCK
<& /Elements/Header, Title => $title &>
<& /Ticket/Elements/Tabs,
current_tab => "Search/Build.html".$QueryString,
@@ -78,28 +58,36 @@
<input type=hidden name=SearchId value="<%$SearchId%>">
<input type=hidden name=Query value="<%$Query%>">
<input type=hidden name=Format value="<%$Format%>">
-<table width=100% border="0" cellpadding="5">
-<tr valign="top">
-<td class="boxcontainer" rowspan="2" width="65%">
-<& Elements/PickCriteria, query => $Query, cfqueues => $queues &>
+<table width=100%>
+<tr>
+<td valign=top class="boxcontainer">
+<& Elements/PickCriteria, query => $Query, cfqueues => \%queues &>
<& /Elements/Submit, Caption => loc('Add additional criteria'), Label => loc('Add'), Name => 'AddClause'&>
-</td>
-<td>
-<& Elements/EditQuery,
- %ARGS,
- actions => \@actions,
- optionlist => $optionlist,
- Description => $Description &>
</td>
-</tr>
-
-<tr valign="top">
-<td>
+<td valign=top class="boxcontainer">
+<& /Elements/TitleBoxStart, title => loc("Query") . ": " .$Description &>
+<& Elements/NewListActions, actions => \@actions &>
+<select size="10" name="clauses" style="width: 100%">
+<%$optionlist|n%>
+</select>
+</td></tr><tr><td bgcolor="#dddddd" colspan="2">
+<center>
+<input type=submit name="Up" value="^">
+<input type=submit name="Down" value="v">
+<input type=submit name="Left" value="<">
+<input type=submit name="Right" value=">">
+<input type=submit name="DeleteClause" value="Delete">
+<br />
+<input type=submit name="Clear" value="Clear">
+<input type=submit name="Toggle" value="And/Or">
+%#<input type=submit name="EditQuery" value="Advanced">
+</center>
+<& /Elements/TitleBoxEnd &>
+<br>
<& Elements/EditSearches, CurrentSearch => $search_hash, Dirty => $dirty, SearchId => $SearchId &>
</td>
</tr>
-
<tr>
<td colspan=2 class="boxcontainer">
@@ -107,35 +95,27 @@
AvailableColumns => $AvailableColumns, CurrentFormat => $CurrentFormat, RowsPerPage => $RowsPerPage, OrderBy => $OrderBy, Order => $Order &>
</td>
</tr>
-<tr>
-<td colspan=2 class="boxcontainer">
-<& /Elements/Submit, Caption => loc("Do the Search"), Label => loc('Search'), Name => 'DoSearch'&>
-</td>
-</tr>
</table>
</FORM>
<%INIT>
-use RT::Interface::Web::QueryBuilder;
-use RT::Interface::Web::QueryBuilder::Tree;
+use Tree::Simple;
my $search_hash = {};
my $search;
my $title = loc("Query Builder");
# {{{ Clear out unwanted data
-if ( $NewQuery or $ARGS{'Delete'} ) {
-
+if ($NewQuery or $ARGS{'Delete'}) {
# Wipe all data-carrying variables clear if we want a new
# search, or we're deleting an old one..
- $Query = '';
- $Format = '';
+ $Query = '';
+ $Format = '';
$Description = '';
- $SearchId = '';
- $Order = '';
- $OrderBy = '';
+ $SearchId = '';
+ $Order = '';
+ $OrderBy = '';
$RowsPerPage = '';
-
# ($search hasn't been set yet; no need to clear)
# ..then wipe the session out..
@@ -144,7 +124,6 @@ if ( $NewQuery or $ARGS{'Delete'} ) {
# ..and the search results.
$session{'tickets'}->CleanSlate() if defined $session{'tickets'};
}
-
# }}}
# {{{ Attempt to load what we can from the session, set defaults
@@ -154,71 +133,61 @@ $search_hash = $session{'CurrentSearchHash'};
# These variables are what define a search_hash; this is also
# where we give sane defaults.
-$Query ||= $search_hash->{'Query'};
-$Format ||= $search_hash->{'Format'};
+$Query ||= $search_hash->{'Query'};
+$Format ||= $search_hash->{'Format'};
$Description ||= $search_hash->{'Description'};
-$SearchId ||= $search_hash->{'SearchId'} || 'new';
-$Order ||= $search_hash->{'Order'} || 'ASC';
-$OrderBy ||= $search_hash->{'OrderBy'} || 'id';
-$RowsPerPage = ( $search_hash->{'RowsPerPage'} || 50 )
- unless defined($RowsPerPage);
+$SearchId ||= $search_hash->{'SearchId'} || 'new';
+$Order ||= $search_hash->{'Order'} || 'ASC';
+$OrderBy ||= $search_hash->{'OrderBy'} || 'id';
+$RowsPerPage = ($search_hash->{'RowsPerPage'} || 50) unless defined ($RowsPerPage);
$search ||= $search_hash->{'Object'};
-
# }}}
my @actions = ();
+my %queues;
# Clean unwanted junk from the format
-$Format = $m->comp( '/Elements/ScrubHTML', Content => $Format ) if ($Format);
+$Format = $m->comp('/Elements/ScrubHTML', Content => $Format) if ($Format);
# {{{ If we're asked to delete the current search, make it go away and reset the search parameters
if ( $ARGS{'Delete'} ) {
-
# We set $SearchId to 'new' above already, so peek into the %ARGS
if ( $ARGS{'SearchId'} =~ /^(.*?)-(\d+)-SavedSearch-(\d+)$/ ) {
my $obj_type = $1;
my $obj_id = $2;
my $search_id = $3;
-
+
my $container_object;
- if ( $obj_type eq 'RT::User' && $obj_id == $session{'CurrentUser'}->Id )
- {
- $container_object = $session{'CurrentUser'}->UserObj;
+ if ( $obj_type eq 'RT::User' && $obj_id == $session{'CurrentUser'}->Id) {
+ $container_object = $session{'CurrentUser'}->UserObj;
}
- elsif ( $obj_type eq 'RT::Group' ) {
- $container_object = RT::Group->new( $session{'CurrentUser'} );
+ elsif ($obj_type eq 'RT::Group') {
+ $container_object = RT::Group->new($session{'CurrentUser'});
$container_object->Load($obj_id);
}
- if ( $container_object->id ) {
-
- # We have the object the entry is an attribute on; delete
- # the entry..
- $container_object->Attributes->DeleteEntry(
- Name => 'SavedSearch',
- id => $search_id
- );
- }
+ if ($container_object->id ) {
+ # We have the object the entry is an attribute on; delete
+ # the entry..
+ $container_object->Attributes->DeleteEntry( Name => 'SavedSearch', id => $search_id);
+ }
}
}
-
# }}}
# {{{ If the user wants to copy a search, uncouple from the one that this was based on, but don't erase the $Query or $Format
if ( $ARGS{'CopySearch'} ) {
- $SearchId = 'new';
- $search = undef;
- $Description = loc( "[_1] copy", $Description );
+ $SearchId = 'new';
+ $search = undef;
+ $Description = loc("[_1] copy", $Description);
}
-
# }}}
# {{{ if we're asked to revert the current search, we just want to load it
if ( $ARGS{'Revert'} ) {
$ARGS{'LoadSavedSearch'} = $SearchId;
}
-
# }}}
# {{{ if we're asked to load a search, load it.
@@ -227,18 +196,15 @@ if ( $ARGS{'LoadSavedSearch'} =~ /^(.*?)-(\d+)-SavedSearch-(\d+)$/ ) {
my $obj_type = $1;
my $obj_id = $2;
my $search_id = $3;
-
+
# We explicitly list out the available types (user and group) and
# don't trust user input here
- if ( ( $obj_type eq 'RT::User' )
- && ( $obj_id == $session{'CurrentUser'}->id ) )
- {
- $search =
- $session{'CurrentUser'}->UserObj->Attributes->WithId($search_id);
-
+ if ( ( $obj_type eq 'RT::User' ) && ( $obj_id == $session{'CurrentUser'}->id ) ) {
+ $search = $session{'CurrentUser'}->UserObj->Attributes->WithId($search_id);
+
}
- elsif ( $obj_type eq 'RT::Group' ) {
- my $group = RT::Group->new( $session{'CurrentUser'} );
+ elsif ($obj_type eq 'RT::Group') {
+ my $group = RT::Group->new($session{'CurrentUser'});
$group->Load($obj_id);
$search = $group->Attributes->WithId($search_id);
}
@@ -265,227 +231,260 @@ if ( $actions[0] ) {
$m->abort();
}
+my @options;
+my $optionlist;
$Query = "";
+%queues = ();
-my @options = $tree->GetDisplayedNodes;
+# Build the optionlist from the tree, so we can do additions and movements based on it
+$optionlist = build_array( \$Query, $ARGS{clauses}, $tree, \@options, \%queues );
-my @current_values = grep { defined } @options[@clauses];
+my $currentkey;
+$currentkey = $options[$ARGS{clauses}] if defined $ARGS{clauses};
# {{{ Try to find if we're adding a clause
foreach my $arg ( keys %ARGS ) {
- if (
- $arg =~ m/^ValueOf(.+)/
- && ( ref $ARGS{$arg} eq "ARRAY"
- ? grep { $_ ne "" } @{ $ARGS{$arg} }
- : $ARGS{$arg} ne "" )
- )
- {
-
- # We're adding a $1 clause
- my $field = $1;
- my ( $keyword, $op, $value );
-
- #figure out if it's a grouping
- if ( $ARGS{ $field . "Field" } ) {
- $keyword = $ARGS{ $field . "Field" };
- }
- else {
- $keyword = $field;
- }
-
- my ( @ops, @values );
- if ( ref $ARGS{ 'ValueOf' . $field } eq "ARRAY" ) {
-
- # we have many keys/values to iterate over, because there is
- # more than one CF with the same name.
- @ops = @{ $ARGS{ $field . 'Op' } };
- @values = @{ $ARGS{ 'ValueOf' . $field } };
- }
- else {
- @ops = ( $ARGS{ $field . 'Op' } );
- @values = ( $ARGS{ 'ValueOf' . $field } );
- }
- $RT::Logger->error("Bad Parameters passed into Query Builder")
- unless @ops == @values;
-
- for my $i ( 0 .. @ops - 1 ) {
- my ( $op, $value ) = ( $ops[$i], $values[$i] );
- next if $value eq "";
-
- if ( $value eq 'NULL' && $op =~ /=/ ) {
- if ( $op eq '=' ) {
- $op = "IS";
- }
- elsif ( $op eq '!=' ) {
- $op = "IS NOT";
- }
-
- # This isn't "right", but...
- # It has to be this way until #5182 is fixed
- $value = "'NULL'";
+ if ( $arg =~ m/ValueOf(.+)/ && $ARGS{$arg} ne "") {
+ # We're adding a $1 clause
+ my $field = $1;
+ my ($keyword, $op, $value);
+
+ #figure out if it's a grouping
+ if ( $ARGS{ $field . "Field" } ) {
+ $keyword = $ARGS{ $field . "Field" };
+ }
+ else {
+ $keyword = $field;
+ }
+
+ $value = $ARGS{'ValueOf' . $field};
+ $op = $ARGS{ $field . 'Op' };
+ if ( $value eq 'NULL' && $op =~ /=/) {
+ if ($op eq '=') {
+ $op = "IS";
+ } elsif ($op eq '!=') {
+ $op = "IS NOT";
}
- else {
- $value = "'$value'";
- }
-
- my $clause = {
- Key => $keyword,
- Op => $op,
- Value => $value
- };
- my $newnode = RT::Interface::Web::QueryBuilder::Tree->new($clause);
- if (@current_values) {
- foreach my $value (@current_values) {
- my $newindex = $value->getIndex() + 1;
- $value->insertSibling( $newindex, $newnode );
- $value = $newnode;
- }
- }
- else {
- $tree->getChild(0)->addChild($newnode);
- @current_values = $newnode;
- }
- $newnode->getParent()->setNodeValue( $ARGS{'AndOr'} );
+ # This isn't "right", but...
+ # It has to be this way until #5182 is fixed
+ $value = "'NULL'";
+ } else {
+ $value = "'$value'";
}
+
+ my $clause = {
+ Key => $keyword,
+ Op => $op,
+ Value => $value
+ };
+
+ my $newnode = Tree::Simple->new($clause);
+ if ($currentkey) {
+ my $newindex = $currentkey->getIndex() + 1;
+ if (!$currentkey->getParent->getParent()->isRoot()) {
+ }
+ $currentkey->insertSibling($newindex, $newnode);
+ $currentkey = $newnode;
+ }
+ else {
+ $tree->getChild(0)->addChild($newnode);
+ $currentkey = $newnode;
+ }
+ $newnode->getParent()->setNodeValue($ARGS{'AndOr'});
}
}
-
# }}}
# {{{ Move things around
if ( $ARGS{"Up"} ) {
- if (@current_values) {
- foreach my $value (@current_values) {
- my $index = $value->getIndex();
- if ( $value->getIndex() > 0 ) {
- my $parent = $value->getParent();
- $parent->removeChild($index);
- $parent->insertChild( $index - 1, $value );
- $value = $parent->getChild( $index - 1 );
- }
- else {
- push( @actions, [ loc("error: can't move up"), -1 ] );
- }
+ if ($currentkey) {
+ my $index = $currentkey->getIndex();
+ if ( $currentkey->getIndex() > 0 ) {
+ my $parent = $currentkey->getParent();
+ $parent->removeChild($index);
+ $parent->insertChild($index - 1, $currentkey);
+ $currentkey = $parent->getChild($index - 1);
+ }
+ else {
+ push( @actions, [ "error: can't move up", -1 ] );
}
}
else {
- push( @actions, [ loc("error: nothing to move"), -1 ] );
+ push( @actions, [ "error: nothing to move", -1 ] );
}
}
elsif ( $ARGS{"Down"} ) {
- if (@current_values) {
- foreach my $value (@current_values) {
- my $index = $value->getIndex();
- my $parent = $value->getParent();
- if ( $value->getIndex() < ( $parent->getChildCount - 1 ) ) {
- $parent->removeChild($index);
- $parent->insertChild( $index + 1, $value );
- $value = $parent->getChild( $index + 1 );
- }
- else {
- push( @actions, [ loc("error: can't move down"), -1 ] );
- }
+ if ($currentkey) {
+ my $index = $currentkey->getIndex();
+ my $parent = $currentkey->getParent();
+ if ( $currentkey->getIndex() < ($parent->getChildCount - 1) ) {
+ $parent->removeChild($index);
+ $parent->insertChild($index + 1, $currentkey);
+ $currentkey = $parent->getChild($index + 1);
+ }
+ else {
+ push( @actions, [ "error: can't move down", -1 ] );
}
}
else {
- push( @actions, [ loc("error: nothing to move"), -1 ] );
+ push( @actions, [ "error: nothing to move", -1 ] );
}
}
elsif ( $ARGS{"Left"} ) {
- if (@current_values) {
- foreach my $value (@current_values) {
- my $parent = $value->getParent();
- my $grandparent = $parent->getParent();
- if ( !$grandparent->isRoot ) {
- my $index = $parent->getIndex();
- $parent->removeChild($value);
- $grandparent->insertChild( $index, $value );
- if ( $parent->isLeaf() ) {
- $grandparent->removeChild($parent);
- }
- }
- else {
- push( @actions, [ loc("error: can't move left"), -1 ] );
- }
+ if ($currentkey) {
+ my $parent = $currentkey->getParent();
+ my $grandparent = $parent->getParent();
+ if (!$grandparent->isRoot) {
+ my $index = $parent->getIndex();
+ $parent->removeChild($currentkey);
+ $grandparent->insertChild($index, $currentkey);
+ if ($parent->isLeaf()) {
+ $grandparent->removeChild($parent);
+ }
+ }
+ else {
+ push( @actions, [ "error: can't move left", -1 ] );
}
}
else {
- push( @actions, [ loc("error: nothing to move"), -1 ] );
+ push( @actions, [ "error: nothing to move", -1 ] );
}
}
elsif ( $ARGS{"Right"} ) {
- if (@current_values) {
- foreach my $value (@current_values) {
- my $parent = $value->getParent();
- my $index = $value->getIndex();
- my $newparent;
- if ( $index > 0 ) {
- my $sibling = $parent->getChild( $index - 1 );
- if ( ref( $sibling->getNodeValue ) ) {
- $parent->removeChild($value);
- my $newtree = RT::Interface::Web::QueryBuilder::Tree->new( 'AND', $parent );
- $newtree->addChild($value);
- }
- else {
- $parent->removeChild($index);
- $sibling->addChild($value);
- }
- }
- else {
- $parent->removeChild($value);
- $newparent = RT::Interface::Web::QueryBuilder::Tree->new( 'AND', $parent );
- $newparent->addChild($value);
- }
- }
- }
- else {
- push( @actions, [ loc("error: nothing to move"), -1 ] );
+ if ($currentkey) {
+ my $parent = $currentkey->getParent();
+ my $index = $currentkey->getIndex();
+ my $newparent;
+ if ($index > 0 ) {
+ my $sibling = $parent->getChild($index - 1);
+ if (ref($sibling->getNodeValue)) {
+ $parent->removeChild($currentkey);
+ my $newtree = Tree::Simple->new('AND', $parent);
+ $newtree->addChild($currentkey);
+ } else {
+ $parent->removeChild($index);
+ $sibling->addChild($currentkey);
+ }
+ }
+ else {
+ $parent->removeChild($currentkey);
+ $newparent = Tree::Simple->new('AND', $parent);
+ $newparent->addChild($currentkey);
+ }
+ } else {
+ push( @actions, [ "error: nothing to move", -1 ] );
}
}
elsif ( $ARGS{"DeleteClause"} ) {
- if (@current_values) {
- $_->getParent()->removeChild($_) for @current_values;
+ if ($currentkey) {
+ $currentkey->getParent()->removeChild($currentkey);
}
else {
- push( @actions, [ loc("error: nothing to delete"), -1 ] );
+ push( @actions, [ "error: nothing to delete", -1 ] );
}
}
elsif ( $ARGS{"Toggle"} ) {
my $ea;
- if (@current_values) {
- foreach my $value (@current_values) {
- my $parent = $value->getParent();
-
- if ( $parent->getNodeValue eq 'AND' ) {
- $parent->setNodeValue('OR');
- }
- else {
- $parent->setNodeValue('AND');
- }
- }
+ if ($currentkey) {
+ my $value = $currentkey->getNodeValue();
+ my $parent = $currentkey->getParent();
+ my $parentvalue = $parent->getNodeValue();
+
+ if ( $parentvalue eq 'AND') {
+ $parent->setNodeValue('OR');
+ }
+ else {
+ $parent->setNodeValue('AND');
+ }
}
else {
- push( @actions, [ loc("error: nothing to toggle"), -1 ] );
+ push( @actions, [ "error: nothing to toggle", -1 ] );
}
}
-
-$tree->PruneChildlessAggregators;
-
+elsif ( $ARGS{"Clear"} ) {
+ $tree = Tree::Simple->new(Tree::Simple->ROOT);
+}
# }}}
# {{{ Rebuild $Query based on the additions / movements
-$Query = "";
-my $optionlist_arrayref;
-
-($Query, $optionlist_arrayref) = $tree->GetQueryAndOptionList(\@current_values);
-
-my $optionlist = join "\n", map { qq(<option value="$_->{INDEX}" $_->{SELECTED}>)
- . ("&nbsp;" x (5 * $_->{DEPTH}))
- . $m->interp->apply_escapes($_->{TEXT}, 'h') . qq(</option>) } @$optionlist_arrayref;
-
+$Query = "";
+@options = ();
+%queues = ();
+$optionlist = build_array( \$Query, $currentkey, $tree, \@options, \%queues );
+
+sub build_array {
+ my $Query = shift;
+ my $currentkey = shift;
+ my $tree = shift;
+ my ($keys, $queues) = @_;
+ my $i = 0;
+ my $optionlist;
+ my $depth = 0;
+ my %parens;
+
+ $tree->traverse( sub {
+ my ($_tree) = @_;
+
+ return if $_tree->getParent->isRoot();
+
+ push @$keys, $_tree;
+ my $clause = $_tree->getNodeValue();
+ my $str;
+ my $ea = $_tree->getParent()->getNodeValue();
+ if (ref($clause)) {
+ $str .= $ea . " " if $_tree->getIndex() > 0;
+ $str .= $clause->{Key} . " " . $clause->{Op} . " " . $clause->{Value};
+
+ if ( $clause->{Key} eq "Queue" ) {
+ $queues->{ $clause->{Value} } = 1;
+ }
+ } else {
+ $str = $ea if $_tree->getIndex() > 0;
+ }
+
+ my $selected;
+ if ($_tree == $currentkey) {
+ $selected = "SELECTED";
+ }
+ else {
+ $selected = "";
+ }
+
+ foreach my $p (keys %parens) {
+ if ($p > $_tree->getDepth) {
+ $$Query .= ')' x $parens{$p};
+ $parens{$p}--;
+ }
+ }
+
+ $optionlist .= "<option value=$i $selected>" .
+ ("&nbsp;" x 5 x ($_tree->getDepth() - 1)) . "$str</option>\n";
+ my $parent = $_tree->getParent();
+ if (!($parent->isRoot || $parent->getParent()->isRoot) &&
+ !ref($parent->getNodeValue())) {
+ if ( $_tree->getIndex() == 0) {
+ $$Query .= '(';
+ $parens{$_tree->getDepth}++;
+ }
+ }
+ $$Query .= " " . $str . " ";
+
+ if ($_tree->getDepth < $depth) {
+ $$Query .= ')';
+ $parens{$depth}--;
+ }
+
+ $i++;
+ });
+
+ foreach my $p (keys %parens) {
+ $$Query .= ") " x $parens{$p};
+ }
+ return $optionlist;
+}
use Regexp::Common qw /delimited/;
@@ -497,18 +496,18 @@ use constant PAREN => 8;
use constant KEYWORD => 16;
sub ParseQuery {
- my $string = shift;
- my $tree = shift;
+ my $string = shift;
+ my $tree = shift;
my @actions = shift;
- my $want = KEYWORD | PAREN;
- my $last = undef;
+ my $want = KEYWORD | PAREN;
+ my $last = undef;
my $depth = 1;
# make a tree root
- $$tree = RT::Interface::Web::QueryBuilder::Tree->new;
- my $root = RT::Interface::Web::QueryBuilder::Tree->new( 'AND', $$tree );
- my $lastnode = $root;
+ $$tree = Tree::Simple->new(Tree::Simple->ROOT);
+ my $root = Tree::Simple->new('AND', $$tree);
+ my $lastnode = $root;
my $parentnode = $root;
# get the FIELDS from Tickets_Overlay
@@ -522,20 +521,17 @@ sub ParseQuery {
my $re_aggreg = qr[(?i:AND|OR)];
my $re_value = qr[$RE{delimited}{-delim=>qq{\'\"}}|\d+];
my $re_keyword = qr[$RE{delimited}{-delim=>qq{\'\"}}|(?:\{|\}|\w|\.)+];
- my $re_op =
- qr[=|!=|>=|<=|>|<|(?i:IS NOT)|(?i:IS)|(?i:NOT LIKE)|(?i:LIKE)]
- ; # long to short
+ my $re_op = qr[=|!=|>=|<=|>|<|(?i:IS NOT)|(?i:IS)|(?i:NOT LIKE)|(?i:LIKE)] ; # long to short
my $re_paren = qr'\(|\)';
- # assume that $ea is AND if it is not set
+ # assume that $ea is AND if it's not set
my ( $ea, $key, $op, $value ) = ( "AND", "", "", "" );
# order of matches in the RE is important.. op should come early,
# because it has spaces in it. otherwise "NOT LIKE" might be parsed
# as a keyword or value.
- while (
- $string =~ /(
+ while ( $string =~ /(
$re_aggreg
|$re_op
|$re_keyword
@@ -560,15 +556,7 @@ sub ParseQuery {
# Error
# FIXME: I will only print out the highest $want value
my $token = $tokens[ ( ( log $want ) / ( log 2 ) ) ];
- push @actions,
- [
- loc(
-"current: $current, want $want, Error near ->$val<- expecting a "
- . $token
- . " in '$string'\n"
- ),
- -1
- ];
+ push @actions, [ "current: $current, want $want, Error near ->$val<- expecting a " . $token . " in '$string'\n", -1 ];
}
# State Machine:
@@ -577,21 +565,20 @@ sub ParseQuery {
# Parens are highest priority
if ( $current & PAREN ) {
if ( $val eq "(" ) {
- $depth++;
-
- # make a new node that the clauses can be children of
- $parentnode = RT::Interface::Web::QueryBuilder::Tree->new( $ea, $parentnode );
+ $depth++;
+ # make a new node that the clauses can be children of
+ $parentnode = Tree::Simple->new($ea, $parentnode);
}
else {
- $depth--;
- $parentnode = $parentnode->getParent();
- $lastnode = $parentnode;
+ $depth--;
+ $parentnode = $parentnode->getParent();
+ $lastnode = $parentnode;
}
$want = KEYWORD | PAREN | AGGREG;
}
elsif ( $current & AGGREG ) {
- $ea = $val;
+ $ea = $val;
$want = KEYWORD | PAREN;
}
elsif ( $current & KEYWORD ) {
@@ -629,27 +616,27 @@ sub ParseQuery {
$val = "'$val'";
}
- push @actions, [ loc("Unknown field: $key"), -1 ] unless $class;
+ push @actions, [ "Unknown field: $key", -1 ] unless $class;
$want = PAREN | AGGREG;
}
else {
- push @actions, [ loc("I'm lost"), -1 ];
+ push @actions, [ "I'm lost", -1 ];
}
if ( $current & VALUE ) {
- if ( $key =~ /^CF./ ) {
- $key = "'" . $key . "'";
- }
+ if ( $key =~ /^CF./ ) {
+ $key = "'" . $key . "'";
+ }
my $clause = {
Key => $key,
Op => $op,
Value => $val
};
- # explicity add a child to it
- $lastnode = RT::Interface::Web::QueryBuilder::Tree->new( $clause, $parentnode );
- $lastnode->getParent()->setNodeValue($ea);
+ # explicity add a child to it
+ $lastnode = Tree::Simple->new($clause, $parentnode);
+ $lastnode->getParent()->setNodeValue($ea);
( $ea, $key, $op, $value ) = ( "", "", "", "" );
}
@@ -657,14 +644,14 @@ sub ParseQuery {
$last = $current;
} # while
- push @actions, [ loc("Incomplete query"), -1 ]
+ push @actions, [ "Incomplete query", -1 ]
unless ( ( $want | PAREN ) || ( $want | KEYWORD ) );
- push @actions, [ loc("Incomplete Query"), -1 ]
+ push @actions, [ "Incomplete Query", -1 ]
unless ( $last && ( $last | PAREN ) || ( $last || VALUE ) );
# This will never happen, because the parser will complain
- push @actions, [ loc("Mismatched parentheses"), -1 ]
+ push @actions, [ "Mismatched parentheses", -1 ]
unless $depth == 1;
}
@@ -680,32 +667,24 @@ sub _match {
sub debug {
my $message = shift;
- $m->print( $message . "<br>" );
+ $m->print($message . "<br>");
}
# }}}
# }}}
-my $queues = $tree->GetReferencedQueues;
-
# {{{ Deal with format changes
-my ( $AvailableColumns, $CurrentFormat );
-( $Format, $AvailableColumns, $CurrentFormat ) = $m->comp(
- 'Elements/BuildFormatString',
- cfqueues => $queues,
- %ARGS, Format => $Format
-);
-
+my ($AvailableColumns, $CurrentFormat);
+($Format, $AvailableColumns, $CurrentFormat) = $m->comp('Elements/BuildFormatString', cfqueues => \%queues, %ARGS, Format => $Format);
# }}}
# {{{ if we're asked to save the current search, save it
if ( $ARGS{'Save'} ) {
- if ( $search && $search->id ) {
-
- # This search is based on a previously loaded search -- so
- # just update the current search object with new values
+ if ($search && $search->id) {
+ # This search is based on a previously loaded search -- so
+ # just update the current search object with new values
$search->SetSubValues(
Format => $Format,
Query => $Query,
@@ -713,102 +692,83 @@ if ( $ARGS{'Save'} ) {
OrderBy => $OrderBy,
RowsPerPage => $RowsPerPage,
);
- $search->SetDescription($Description);
+ $search->SetDescription( $Description );
}
elsif ( $SearchId eq 'new' && $ARGS{'Owner'} =~ /^(.*?)-(\d+)$/ ) {
+ # We're saving a new search
+ my $obj_type = $1;
+ my $obj_id = $2;
+
- # We're saving a new search
- my $obj_type = $1;
- my $obj_id = $2;
-
- # Find out if we're saving on the user, or a group
+ # Find out if we're saving on the user, or a group
my $container_object;
- if ( $obj_type eq 'RT::User' && $obj_id == $session{'CurrentUser'}->Id )
- {
+ if ( $obj_type eq 'RT::User' && $obj_id == $session{'CurrentUser'}->Id) {
$container_object = $session{'CurrentUser'}->UserObj;
}
- elsif ( $obj_type eq 'RT::Group' ) {
- $container_object = RT::Group->new( $session{'CurrentUser'} );
+ elsif ($obj_type eq 'RT::Group') {
+ $container_object = RT::Group->new($session{'CurrentUser'});
$container_object->Load($obj_id);
}
- if ( $container_object->id ) {
-
- # If we got one or the other, add the saerch
- my ( $search_id, $search_msg ) = $container_object->AddAttribute(
- Name => 'SavedSearch',
- Description => $Description,
- Content => {
- Format => $Format,
- Query => $Query,
- Order => $Order,
- OrderBy => $OrderBy,
- RowsPerPage => $RowsPerPage,
- }
- );
- $search =
- $session{'CurrentUser'}->UserObj->Attributes->WithId($search_id);
-
- # Build new SearchId
- $SearchId =
- ref( $session{'CurrentUser'}->UserObj ) . '-'
- . $session{'CurrentUser'}->UserObj->Id
- . '-SavedSearch-'
- . $search->Id;
- }
- unless ( $search->id ) {
- push @actions, [ loc("Can't find a saved search to work with"), 0 ];
+ if ($container_object->id ) {
+ # If we got one or the other, add the saerch
+ my ( $search_id, $search_msg ) = $container_object->AddAttribute(
+ Name => 'SavedSearch',
+ Description => $Description,
+ Content => {
+ Format => $Format,
+ Query => $Query,
+ Order => $Order,
+ OrderBy => $OrderBy,
+ RowsPerPage => $RowsPerPage,
+ }
+ );
+ $search = $session{'CurrentUser'}->UserObj->Attributes->WithId($search_id);
+ # Build new SearchId
+ $SearchId = ref( $session{'CurrentUser'}->UserObj ) . '-'
+ . $session{'CurrentUser'}->UserObj->Id . '-SavedSearch-' . $search->Id;
+ }
+ unless ($search->id) {
+ push @actions, [loc("Can't find a saved search to work with"), 0];
}
}
else {
- push @actions, [ loc("Can't save this search"), 0 ];
+ push @actions, [loc("Can't save this search"), 0];
}
}
-
# }}}
# {{{ If we're modifying an old query, check if it has changed
my $dirty = 0;
-$dirty = 1
- if defined $search
- and ($search->SubValue('Format') ne $Format
- or $search->SubValue('Query') ne $Query
- or $search->SubValue('Order') ne $Order
- or $search->SubValue('OrderBy') ne $OrderBy
- or $search->SubValue('RowsPerPage') ne $RowsPerPage );
-
+$dirty = 1 if defined $search and
+ ($search->SubValue('Format') ne $Format or
+ $search->SubValue('Query') ne $Query or
+ $search->SubValue('Order') ne $Order or
+ $search->SubValue('OrderBy') ne $OrderBy or
+ $search->SubValue('RowsPerPage') ne $RowsPerPage);
# }}}
# {{{ Push the updates into the session so we don't loose 'em
-$search_hash->{'SearchId'} = $SearchId;
-$search_hash->{'Format'} = $Format;
-$search_hash->{'Query'} = $Query;
+$search_hash->{'SearchId'} = $SearchId;
+$search_hash->{'Format'} = $Format;
+$search_hash->{'Query'} = $Query;
$search_hash->{'Description'} = $Description;
-$search_hash->{'Object'} = $search;
-$search_hash->{'Order'} = $Order;
-$search_hash->{'OrderBy'} = $OrderBy;
+$search_hash->{'Object'} = $search;
+$search_hash->{'Order'} = $Order;
+$search_hash->{'OrderBy'} = $OrderBy;
$search_hash->{'RowsPerPage'} = $RowsPerPage;
$session{'CurrentSearchHash'} = $search_hash;
-
# }}}
# {{{ Show the results, if we were asked.
if ( $ARGS{"DoSearch"} ) {
- $m->comp(
- "Results.html",
- Query => $Query,
- Format => $Format,
- Order => $Order,
- OrderBy => $OrderBy,
- Rows => $RowsPerPage
- );
+ $m->comp("Results.html" , Query => $Query, Format => $Format, Order => $Order, OrderBy => $OrderBy, Rows => $RowsPerPage);
$m->abort();
}
-
# }}}
# {{{ Build a querystring for the tabs
@@ -816,20 +776,14 @@ if ( $ARGS{"DoSearch"} ) {
my $QueryString;
if ($NewQuery) {
$QueryString = '?NewQuery=1';
+} else {
+ $QueryString = '?' . $m->comp('/Elements/QueryString',
+ Query => $Query,
+ Format => $Format,
+ Order => $Order,
+ OrderBy => $OrderBy,
+ Rows => $RowsPerPage) if ($Query);
}
-else {
- $QueryString = '?'
- . $m->comp(
- '/Elements/QueryString',
- Query => $Query,
- Format => $Format,
- Order => $Order,
- OrderBy => $OrderBy,
- Rows => $RowsPerPage
- )
- if ($Query);
-}
-
# }}}
</%INIT>
@@ -844,6 +798,4 @@ $Order => undef
$OrderBy => undef
$RowsPerPage => undef
$HideResults => 0
-@clauses => ()
</%ARGS>
-
diff --git a/rt/html/Search/Bulk.html b/rt/html/Search/Bulk.html
index f9eef26..f75934b 100644
--- a/rt/html/Search/Bulk.html
+++ b/rt/html/Search/Bulk.html
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,13 +42,13 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<& /Elements/Header, Title => loc("Bulk ticket update") &>
<& /Elements/Tabs, Title => loc("Bulk ticket update") &>
<& /Elements/ListActions, actions => \@results &>
-<FORM METHOD="POST" ACTION="<%$RT::WebPath%>/Search/Bulk.html" >
-<input type="hidden" name="Query" value="<%$ARGS{'Query'}%>">
+
+<FORM METHOD=POST>
<TABLE WIDTH=100% border=0 cellpadding=3 CELLSPACING=0>
<TR>
<TH><&|/l&>Update</&></TH>
@@ -75,7 +75,8 @@ while (my $Ticket = $Tickets->Next) {
}
</%PERL>
<TR bgcolor="<%$bgcolor%>">
-<TD><input type=checkbox name="UpdateTicket<%$Ticket->Id%>" value="1" CHECKED></TD>
+<TD><input type=checkbox name="UpdateTicket<%$Ticket->Id%>" CHECKED></TD>
+%# The ticket view is controlled by config.pm, WebOptions
%foreach my $col (@cols) {
<TD>
% if ($col eq 'id') {
@@ -152,26 +153,44 @@ while (my $Ticket = $Tickets->Next) {
</select>
</td></tr>
<tr><td align=right><&|/l&>Subject</&>:</td><td> <input name="UpdateSubject" size=60 value=""></td></tr>
-% while (my $CF = $TxnCFs->Next()) {
-<TR>
-<TD ALIGN=RIGHT><% $CF->Name %>:</TD>
-<TD><& /Elements/EditCustomField,
- CustomField => $CF,
- NamePrefix => "Object-RT::Transaction--CustomField-"
- &><em><% $CF->FriendlyType %></em></TD>
-</TD></TR>
-% } # end if while
<tr><td align=right><&|/l&>Attach</&>:</td><td><input name="UpdateAttachment" type="file"></td></tr>
<tr><td class=labeltop><&|/l&>Message</&>:</td><td>
<& /Elements/MessageBox, Name=>"UpdateContent"&>
</td></tr>
</table>
-<& /Elements/TitleBoxEnd &>
+<table>
+% foreach (keys %allcfs) {
+<tr><td class=label>
+% my $cf = $allcfs{$_};
+% my $pref;
+% if ($cf->Queue == 0) {
+% $pref = "[Global]";
+% } else {
+% $pref = "[Queue: " . $cfqnames{$_} . "]";
+% }
+<%$pref%> <b><% $cf->Name %></b><br>
+<% $cf->FriendlyType %>
+</td>
+<td>
+% if ($cf->Type ne "FreeformMultiple") {
+<& /Ticket/Elements/EditCustomField, CustomField => $cf &>
+% } else {
+Add Values<br>
+<textarea cols=15 rows=3 name="<%$cf->Id%>-Values"></textarea>
+</td><td>
+Delete Values<br>
+<textarea cols=15 rows=3 name="<%$cf->Id%>-DeleteValues"></textarea>
+% }
+</td>
+</tr>
+% }
+</table>
+<& /Elements/TitleBoxEnd &>
<& /Elements/TitleBoxStart, title => loc('Edit Links'), color => "#336633"&>
-<i><&|/l&>Enter tickets or URIs to link tickets to. Separate multiple entries with spaces.</&></i><br>
+<i><&|/l&>Enter tickets or URIs to link tickets to. Seperate multiple entries with spaces.</&></i><br>
<& /Ticket/Elements/BulkLinks &>
<& /Elements/TitleBoxEnd &>
@@ -204,7 +223,7 @@ while (my $Ticket = $Tickets->Next) {
unless ( exists $cfqs{$cfqid} ) {
$cfqs{$cfqid} = 1;
$count++;
- my $cfs = $cfq->TicketCustomFields;
+ my $cfs = $cfq->CustomFields;
while (my $cf = $cfs->Next) {
$allcfs{$cf->Id} = $cf;
$cfqnames{$cf->Id} = $cfqn;
@@ -226,11 +245,9 @@ if ($ARGS{'UpdateContent'} &&
#Iterate through each ticket we've been handed
my @linkresults;
-my %queues;
$Tickets->RedoSearch();
while (my $Ticket = $Tickets->Next) {
- $queues{$Ticket->QueueObj->Id}++;
$RT::Logger->debug( "Checking Ticket ".$Ticket->Id ."\n");
next unless ($ARGS{"UpdateTicket".$Ticket->Id});
$RT::Logger->debug ("Matched\n");
@@ -245,6 +262,16 @@ while (my $Ticket = $Tickets->Next) {
#Update the watchers
my @watchresults = ProcessTicketWatchers(TicketObj => $Ticket, ARGSRef => \%ARGS);
+ #Update custom fields
+ my $pat = "^(\\d+)-(.*)\$";
+ foreach (keys %ARGS) {
+ $ARGS{"Ticket-" . $Ticket->Id . "-CustomField-" . $1 . "-" . $2} = $ARGS{$_} if (/$pat/o);
+ }
+ my @cfresults = ProcessTicketCustomFieldUpdates(ARGSRef => \%ARGS);
+ foreach (keys %ARGS) {
+ delete $ARGS{"Ticket-" . $Ticket->Id . "-CustomField-" . $1 . "-" . $2} if (/$pat/o);
+ }
+
#Update the links
$ARGS{'id'} = $Ticket;
@@ -264,15 +291,11 @@ while (my $Ticket = $Tickets->Next) {
delete $ARGS{'MemberOf-'.$Ticket->Id};
delete $ARGS{$Ticket->Id.'-RefersTo'};
delete $ARGS{'RefersTo-'.$Ticket->Id};
- my @tempresults = (@watchresults, @basicresults, @dateresults,
- @updateresults, @linkresults);
+
+ my @tempresults = (@watchresults, @basicresults, @dateresults, @updateresults, @linkresults, @cfresults);
@tempresults = map { loc("Ticket [_1]: [_2]",$Ticket->Id,$_) } @tempresults;
@results = (@results, @tempresults);
}
-my $TxnCFs = RT::CustomFields->new($session{CurrentUser});
-$TxnCFs->LimitToLookupType("RT::Queue-RT::Ticket-RT::Transaction");
-$TxnCFs->LimitToGlobalOrObjectId(sort keys %queues);
-
</%INIT>
diff --git a/rt/html/Search/Edit.html b/rt/html/Search/Edit.html
index 16e8a0e..769d38d 100755
--- a/rt/html/Search/Edit.html
+++ b/rt/html/Search/Edit.html
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<& /Elements/Header, Title => $title&>
<& /Ticket/Elements/Tabs,
current_tab => "Search/Edit.html?".$QueryString,
diff --git a/rt/html/Search/Elements/BuildFormatString b/rt/html/Search/Elements/BuildFormatString
index 639e62c..e5e131b 100644
--- a/rt/html/Search/Elements/BuildFormatString
+++ b/rt/html/Search/Elements/BuildFormatString
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,76 +42,45 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<%args>
$Format => undef
%cfqueues => undef
-$Face => undef
-$Size => undef
-$Link => undef
-$Title => undef
-$AddCol => undef
-$RemoveCol => undef
-$ColUp => undef
-$ColDown => undef
-$SelectDisplayColumns => undef
-$CurrentDisplayColumns => undef
</%args>
<%init>
unless ($Format) {
$Format = $RT::DefaultSearchResultFormat;
}
-
-
-# All the things we can display in the format string by default
-my @fields = qw(
- id
- Status
- ExtendedStatus
- Subject
- QueueName
- OwnerName
- Priority
- InitialPriority
- FinalPriority
- Type
- TimeWorked
- TimeLeft
- TimeEstimated
- CreatedBy
- LastUpdatedBy
- Requestors
- Cc
- AdminCc
- Starts
- StartsRelative
- Started
- StartedRelative
- Created
- CreatedRelative
- LastUpdated
- LastUpdatedRelative
- Told
- ToldRelative
- Due
- DueRelative
- Resolved
- ResolvedRelative
- RefersTo
- ReferredToBy
- DependsOn
- DependedOnBy
- MemberOf
- Members
- Parents
- Children
- NEWLINE
+
+my @fields = (
+ "QueueName", "OwnerName",
+ "id", "Status",
+ "Subject", "ExtendedStatus",
+ "Priority", "InitialPriority",
+ "FinalPriority", "EffectiveId",
+ "Type", "TimeWorked",
+ "TimeLeft", "TimeEstimated",
+ "Requestors", "Cc",
+ "AdminCc", "StartsRelative",
+ "StartedRelative", "CreatedRelative",
+ "LastUpdatedRelative", "ToldRelative",
+ "DueRelative", "ResolvedRelative",
+ "Starts", "Started",
+ "Created", "CreatedBy",
+ "LastUpdated", "LastUpdatedBy",
+ "Told", "Due",
+ "Resolved", "NEWLINE",
+ "RefersTo", "ReferredToBy",
+ "DependsOn", "DependedOnBy",
+ "MemberOf", "Members",
+ "Parents", "Children",
+ "-",
);
my $CustomFields = RT::CustomFields->new( $session{'CurrentUser'});
-foreach my $id (keys %cfqueues) {
- # What does this _do_? What are the keys to cfqueues
+foreach (keys %cfqueues) {
+ my $id = $_;
$id =~ s/^.'*(.*).'*$/$1/;
# Gotta load up the $queue object, since queues get stored by name now.
my $queue = RT::Queue->new($session{'CurrentUser'});
@@ -148,8 +117,8 @@ foreach my $field (@format) {
push @seen, \%column;
}
-if ( $RemoveCol ) {
- my $index = $CurrentDisplayColumns;
+if ( $ARGS{"RemoveCol"} ) {
+ my $index = $ARGS{'CurrentDisplayColumns'};
my $column = $seen[$index];
if ($index) {
delete $seen[$index];
@@ -161,9 +130,9 @@ if ( $RemoveCol ) {
}
}
}
-elsif ( $AddCol ) {
- if ( defined $SelectDisplayColumns ) {
- my $selected = $SelectDisplayColumns;
+elsif ( $ARGS{"AddCol"} ) {
+ if ( defined $ARGS{'SelectDisplayColumns'} ) {
+ my $selected = $ARGS{'SelectDisplayColumns'};
my @columns;
if (ref($selected) eq 'ARRAY') {
@columns = @$selected;
@@ -172,71 +141,74 @@ elsif ( $AddCol ) {
}
foreach my $col (@columns) {
my %column = ();
- $column{Column} = $col;
-
- if ( $Face eq "Bold" ) {
- $column{Prefix} .= "<B>";
- $column{Suffix} .= "</B>";
- }
- if ( $Face eq "Italic" ) {
- $column{Prefix} .= "<I>";
- $column{Suffix} .= "</I>";
- }
- if ($Size) {
- $column{Prefix} .= "<" . $m->interp->apply_escapes( $Size, 'h' ) . ">";
- $column{Suffix} .= "</" . $m->interp->apply_escapes( $Size, 'h' ) . ">";
- }
- if ( $Link eq "Display" ) {
- $column{Prefix} .=
- "<A HREF=\"" . $RT::WebPath . "/Ticket/Display.html?id=__id__\">";
- $column{Suffix} .= "</a>";
- }
- elsif ( $Link eq "Take" ) {
- $column{Prefix} .= "<A HREF=\"" . $RT::WebPath
- . "/Ticket/Display.html?Action=Take&id=__id__\">";
- $column{Suffix} .= "</a>";
- }
-
- if ($Title) {
- $column{Suffix} .= "/TITLE:" . $m->interp->apply_escapes( $Title, 'h' );
+ $column{Column} = $fields[ $col ];
+
+ if ( $ARGS{Face} eq "Bold" ) {
+ $column{Prefix} .= "<B>";
+ }
+ if ( $ARGS{Face} eq "Italic" ) {
+ $column{Prefix} .= "<I>";
+ }
+ if ( $ARGS{Size} ) {
+ $column{Prefix} .= "<" . $ARGS{Size} . ">";
+ }
+ if ( $ARGS{Link} eq "Display" ) {
+ $column{Prefix} .= "<A HREF=\"".$RT::WebPath."/Ticket/Display.html?id=__id__\">";
+ }
+ elsif ( $ARGS{Link} eq "Take" ) {
+ $column{Prefix} .=
+ "<A HREF=\"".$RT::WebPath."/Ticket/Display.html?Action=Take&id=__id__\">";
+ }
+
+ my $suffix;
+ if ( $ARGS{'Link'} eq "Display" || $ARGS{'Link'} eq "Take" ) {
+ $column{Suffix} .= "</a>";
+ }
+ if ( $ARGS{Size} ) {
+ $column{Suffix} .= "</" . $ARGS{Size} . ">";
+ }
+ if ( $ARGS{Face} eq "Italic" ) {
+ $column{Suffix} .= "</I>";
+ }
+ if ( $ARGS{Face} eq "Bold" ) {
+ $column{Suffix} .= "</B>";
+ }
+ if ( $ARGS{Title} ) {
+ $column{Suffix} .= "/TITLE:" . $ARGS{Title};
+ }
+ push @seen, \%column;
+ }
}
- push @seen, \%column;
-}
-}
}
-elsif ( $ColUp ) {
- my $index = $CurrentDisplayColumns;
+elsif ( $ARGS{"ColUp"} ) {
+ my $index = $ARGS{'CurrentDisplayColumns'};
if ( defined $index && ( $index - 1 ) >= 0 ) {
my $column = $seen[$index];
$seen[$index] = $seen[ $index - 1 ];
$seen[ $index - 1 ] = $column;
- $CurrentDisplayColumns = $index - 1;
+ $ARGS{CurrentDisplayColumns} = $index - 1;
}
}
-elsif ( $ColDown ) {
- my $index = $CurrentDisplayColumns;
+elsif ( $ARGS{"ColDown"} ) {
+ my $index = $ARGS{'CurrentDisplayColumns'};
if ( defined $index && ( $index + 1 ) < scalar @seen ) {
my $column = $seen[$index];
$seen[$index] = $seen[ $index + 1 ];
$seen[ $index + 1 ] = $column;
- $CurrentDisplayColumns = $index + 1;
+ $ARGS{CurrentDisplayColumns} = $index + 1;
}
}
-
-my @format_string;
+$Format = "";
foreach my $field (@seen) {
next unless $field;
- my $row = "'" . $field->{Prefix};
- $row .= "__" . $m->interp->apply_escapes( $field->{Column}, 'h' ) . "__"
- unless ( $field->{Column} eq "<blank>" );
- $row .= $field->{Suffix} . "'";
- push( @format_string, $row );
+ $Format .= ", \n" if $Format;
+ $Format .= "'";
+ $Format .= $field->{Prefix};
+ $Format .= "__" . $field->{Column} . "__" if ( $field->{Column} ne "<blank>" ) ;
+ $Format .= $field->{Suffix};
+ $Format .= "'";
}
-
-$Format = join(",\n", @format_string);
-
-
return($Format, \@fields, \@seen);
</%init>
diff --git a/rt/html/Search/Elements/DisplayOptions b/rt/html/Search/Elements/DisplayOptions
index 43a9d99..330948d 100644
--- a/rt/html/Search/Elements/DisplayOptions
+++ b/rt/html/Search/Elements/DisplayOptions
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<& /Elements/TitleBoxStart, title => loc("Display Columns") &>
<table>
<tr>
@@ -54,15 +54,15 @@
<tr>
<td class=label>
<&|/l&>Order by</&>:
-</td><td class=value>
+</td><td class=label>
<select name="OrderBy">
% foreach my $field (keys %fields) {
% next unless $field;
<option value=<%$field%>
-% if ($field =~ /^$OrderBy$/i) {
+% if ($field eq $OrderBy) {
SELECTED
% }
-><&|/l&><%$field%></&></option>
+><%$field%></option>
% }
</select>
<select name="Order">
@@ -81,7 +81,7 @@ SELECTED
</tr>
<td class=label>
<&|/l&>Rows per page</&>:
-</td><td class="value">
+</td><td>
<& /Elements/SelectResultsPerPage,
Name => "RowsPerPage",
Default => $RowsPerPage &>
@@ -91,14 +91,13 @@ SELECTED
</td>
</tr>
</table>
+<& /Elements/Submit, Caption => "Do the Search", Label => loc('Search'), Name => 'DoSearch'&>
<& /Elements/TitleBoxEnd &>
<%INIT>
my $tickets = new RT::Tickets($session{'CurrentUser'});
my %fields = %{$tickets->FIELDS};
map { $fields{$_}->[0] =~ /^(?:ENUM|INT|DATE|STRING)$/ || delete $fields{$_} } keys %fields;
-delete $fields{'EffectiveId'};
-
</%INIT>
diff --git a/rt/html/Search/Elements/EditFormat b/rt/html/Search/Elements/EditFormat
index dc8720f..7d314ae 100644
--- a/rt/html/Search/Elements/EditFormat
+++ b/rt/html/Search/Elements/EditFormat
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,14 +42,14 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<table>
<tr>
<td>
-<&|/l&>Add Columns</&>:
+<&|/l&>Available Columns</&>:
</td>
<td>
-<&|/l&>Format</&>:
+Format:
</td>
<td></td>
<td>
@@ -58,42 +58,50 @@
<tr>
<td valign=top>
<select size="6" name="SelectDisplayColumns" multiple>
-% foreach my $field ( @$AvailableColumns) {
-<option value="<%$field%>"><% loc( $field) %></option>
-%# $m->comp( '/Elements/RT__Ticket/ColumnMap', Name => $field, Attr => 'title') ||
+% my $i = 0;
+% while ($i < scalar @$AvailableColumns) {
+% my $field = $AvailableColumns->[$i];
+% if ($field) {
+<option value=<%$i%>
+><%$field%></option>
+% }
+% $i++;
% }
</select>
</td>
<td>
-<&|/l&>Link</&>:
-<select name="Link">
+Link:
+<select name=Link>
<option value="None">-</option>
-<option value="Display"><&|/l&>Display</&></option>
-<option value="Take"><&|/l&>Take</&></option>
+<option value="Display">Display</option>
+<option value="Take">Take</option>
</select>
-<br><&|/l&>Title</&>: <input name="Title" size=10>
-<br><&|/l&>Size</&>:
-<select name="Size">
+<br>Title: <input name="Title" size=10>
+<br>Size:
+<select name=Size>
<option value="">-</option>
-<option value="Small"><&|/l&>Small</&></option>
-<option value="Large"><&|/l&>Large</&></option>
+<option value="Small">Small</option>
+<option value="Large">Large</option>
</select>
-<br><&|/l&>Style</&>:
-<select name="Face">
+<br>Face:
+<select name=Face>
<option value="">-</option>
-<option value="Bold"><&|/l&>Bold</&></option>
-<option value="Italic"><&|/l&>Italic</&></option>
+<option value="Bold">Bold</option>
+<option value="Italic">Italic</option>
</select>
</td>
<td>
<input type=submit name="AddCol" value="->">
</td>
<td valign=top>
-<select size=4 name="CurrentDisplayColumns">
-% my $i=0;
-% foreach my $field (@$CurrentFormat) {
-<option value="<%$i++%>><%$field->{Column}%>">
-<%loc( $field->{Column}) %></option>
+<select size=4 name="CurrentDisplayColumns" style="width : 100%">
+% $i = 0;
+% while ($i < scalar @$CurrentFormat) {
+% my $field = $CurrentFormat->[$i];
+% if ($field) {
+<option value=<%$i%>><%$field->{Column}%></option>
+% }
+% $i++;
% }
</select>
<br>
diff --git a/rt/html/Search/Elements/EditQuery b/rt/html/Search/Elements/EditQuery
deleted file mode 100644
index 783541a..0000000
--- a/rt/html/Search/Elements/EditQuery
+++ /dev/null
@@ -1,65 +0,0 @@
-%# BEGIN BPS TAGGED BLOCK {{{
-%#
-%# COPYRIGHT:
-%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
-%# <jesse@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., 675 Mass Ave, Cambridge, MA 02139, USA.
-%#
-%#
-%# 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 }}}
-<& NewListActions, actions => $actions &>
-<& /Elements/TitleBoxStart, title => join(': ', grep defined, loc("Query"), $Description) &>
-<select size="10" name="clauses" style="width: 100%" multiple>
-% $m->out($optionlist);
-</select>
-<p align="center">
-<input type=submit name="Up" value="^">
-<input type=submit name="Down" value="v">
-<input type=submit name="Left" value="<">
-<input type=submit name="Right" value=">">
-<input type=submit name="Toggle" value="<&|/l&>And/Or</&>">
-<input type=submit name="DeleteClause" value="<&|/l&>Delete</&>">
-%#<input type=submit name="EditQuery" value="Advanced">
-</p>
-<& /Elements/TitleBoxEnd &>
-<%ARGS>
-$Description
-$optionlist
-$actions
-</%ARGS>
diff --git a/rt/html/Search/Elements/EditSearches b/rt/html/Search/Elements/EditSearches
index bc6b80e..cd9f1ef 100644
--- a/rt/html/Search/Elements/EditSearches
+++ b/rt/html/Search/Elements/EditSearches
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,11 +42,8 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<& /Elements/TitleBoxStart, title => loc('Saved searches') &>
-%# Hide all the save functionality if the user shouldn't see it.
-% if ($session{'CurrentUser'}->HasRight( Right => 'CreateSavedSearch',
-% Object=> $RT::System )) {
<&|/l&>Privacy:</&>
% if ($CurrentSearch->{'Object'} && $CurrentSearch->{'Object'}->id) {
<& SearchPrivacy, Object => $CurrentSearch->{'Object'}->Object &><br>
@@ -55,14 +52,13 @@
% }
<&|/l&>Description</&>:<br>
<font size="-1"><input size="25" name="Description" value="<%$CurrentSearch->{'Description'}%>"></font>
-<nobr>
+<br>
% if ($SearchId ne 'new') {
% if ($Dirty) {
<input type="submit" name="Revert" value="<%loc('Revert')%>">
% }
<input type="submit" name="Delete" value="<%loc('Delete')%>">
<input type="submit" name="CopySearch" value="<%loc('Copy')%>">
-</nobr>
% }
@@ -70,18 +66,12 @@
<input type="submit" name="Save" value="<%loc('Save')%>">
% }
<hr>
-% }
<&|/l&>Load saved search:</&><br>
<& SelectSearchesForObjects, Name => 'LoadSavedSearch', Objects => \@Objects&>
<input value="<%loc('Load')%>" type="submit">
<& /Elements/TitleBoxEnd &>
<%init>
-
-unless ($session{'CurrentUser'}->HasRight( Right => 'LoadSavedSearch',
- Object=> $RT::System )) {
- return;
-}
my @Objects;
push @Objects, $session{CurrentUser}->UserObj;
diff --git a/rt/html/Search/Elements/NewListActions b/rt/html/Search/Elements/NewListActions
index eb82544..7b81d80 100644
--- a/rt/html/Search/Elements/NewListActions
+++ b/rt/html/Search/Elements/NewListActions
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
% if ($actions[0] ) {
<b><%loc('Results')%></b><br>
% foreach my $action (@actions) {
diff --git a/rt/html/Search/Elements/PickBasics b/rt/html/Search/Elements/PickBasics
index 8a48f6b..d7e1978 100644
--- a/rt/html/Search/Elements/PickBasics
+++ b/rt/html/Search/Elements/PickBasics
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,18 +42,11 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
-<tr>
-<td class="label">
-<&|/l&>id</&>
-</td><td>
-<& /Elements/SelectEqualityOperator, Name => "idOp" &>
-</td><td>
-<INPUT Name="ValueOfid" SIZE=5>
-</td>
-</tr>
-
+%# }}} END BPS TAGGED BLOCK
+<tr><td>
+% foreach my $field (@fields) {
<tr><td align=right>
+% if ($field eq "Attachment") {
<& /Elements/SelectAttachmentField, Name => 'AttachmentField' &>
</td><td>
<& /Elements/SelectBoolean, Name => "AttachmentOp",
@@ -64,26 +57,44 @@
&>
</td><td>
<Input Name="ValueOfAttachment" Size=20>
-</td>
-</tr>
-<tr>
-<td class="label">
-<&|/l&>Queue</&>
+% } elsif ($field eq "Dates") {
+<& /Elements/SelectDateType, Name=>"DateField" &>
</td><td>
-<& /Elements/SelectBoolean, Name => "QueueOp" ,
- True => loc("is"),
- False => loc("isn't"),
- TrueVal=> '=',
- FalseVal => '!=' &>
+<& /Elements/SelectDateRelation, Name=>"DateOp" &>
+</td><td>
+<& /Elements/SelectDate, Name => "ValueOfDate", ShowTime => 0, Default => '' &>
+% } elsif ($field eq "Links") {
+<& SelectLinks, Name=>"LinksField" &>
+</td><td>
+<& /Elements/SelectBoolean, Name => "LinksOp",
+ True => loc("is"),
+ False => loc("isn't"),
+ TrueVal=> '=',
+ FalseVal => '!='
+&>
+</td><td>
+<INPUT Name="ValueOfLinks" value="" SIZE=5>
+%} elsif ($field eq "Priority") {
+<SELECT NAME="PriorityField">
+<OPTION VALUE="Priority"><&|/l&>Priority</&></OPTION>
+<OPTION VALUE="InitialPriority"><&|/l&>Initial Priority</&></OPTION>
+<OPTION VALUE="FinalPriority"><&|/l&>Final Priority</&></OPTION>
+</SELECT>
+</td><td>
+<& /Elements/SelectEqualityOperator, Name => "PriorityOp" &>
+</td><td>
+<INPUT Name="ValueOfPriority" SIZE=5>
+%} elsif ($field =~ m/Time.*/) {
+<SELECT NAME="TimeField">
+<OPTION VALUE="TimeWorked"><&|/l&>Time Worked</&></OPTION>
+<OPTION VALUE="TimeEstimated"><&|/l&>Time Estimated</&></OPTION>
+<OPTION VALUE="TimeLeft"><&|/l&>Time Left</&></OPTION>
+</SELECT>
</td><td>
-<& /Elements/SelectQueue,
- Name => "ValueOfQueue",
- NamedValues => 1,
- CheckQueueRight => 'ShowTicket' &>
-</td>
-</tr>
-<tr>
-<td class="label">
+<& /Elements/SelectEqualityOperator, Name => "TimeOp" &>
+</td><td>
+<INPUT Name="ValueOfTime" SIZE=5>
+% } elsif ($field eq "Status") {
<&|/l&>Status</&>
</td><td>
<& /Elements/SelectBoolean, Name => "StatusOp",
@@ -94,9 +105,32 @@
&>
</td><td>
<& /Elements/SelectStatus, Name => "ValueOfStatus", SkipDeleted => 1 &>
-</td>
-</tr>
+%} elsif ($field =~ m/.*Priority/ || $field =~ m/Time.*/) {
+<&|/l&><%$field%></&>
+</td><td>
+<& /Elements/SelectEqualityOperator, Name => $field . "Op" &>
+</td><td>
+<INPUT Name="<%"ValueOf" . $field%>" SIZE=5>
+% } elsif ($field eq "Queue") {
+<&|/l&>Queue</&>
+</td><td>
+<& /Elements/SelectBoolean, Name => "QueueOp" ,
+ True => loc("is"),
+ False => loc("isn't"),
+ TrueVal=> '=',
+ FalseVal => '!=' &>
+</td><td>
+<& /Elements/SelectQueue, Name => "ValueOfQueue", NamedValues => 1 &>
+% } elsif ($field eq "id") {
+<&|/l&>Id</&>
+</td><td>
+<& /Elements/SelectEqualityOperator, Name => "idOp" &>
+</td><td>
+<INPUT Name="ValueOfid" SIZE=5>
+% } elsif ($field eq "People") {
+% foreach my $field (@people) {
<tr><td class="label">
+% if ($field eq "Actor") {
<SELECT NAME="ActorField">
<OPTION VALUE="Owner"><&|/l&>Owner</&></OPTION>
<OPTION VALUE="Creator"><&|/l&>Creator</&></OPTION>
@@ -108,80 +142,43 @@
FalseVal => '!='
&>
</td><td>
-<& /Elements/SelectOwner, Name => "ValueOfActor", ValueAttribute => 'Name' &>
-</td>
-</tr>
-<tr>
-<td class="label">
+<& /Elements/SelectOwner, Name => "ValueOfActor" &>
+% } elsif ($field eq 'Watcher') {
<& SelectPersonType, Name => 'WatcherField', Default => 'Requestor' &>
</td><td>
<& /Elements/SelectMatch, Name => "WatcherOp" &>
</td><td>
<Input Name="ValueOfWatcher" Size=20>
-</tr>
-<tr>
-<td class="label">
-<& SelectPersonType, Name => 'WatcherGroupField', Default => 'RequestorGroup', Suffix => 'Group' &>
-</td><td>
-<& /Elements/SelectBoolean, Name => "WatcherGroupOp",
- True=> loc('belongs to'),
- False=> loc('does not belong to'),
- TrueVal=> '=',
- FalseVal => '!='
-&>
-</td><td>
-<& SelectGroup, Name => 'ValueOfWatcherGroup' &>
-</td>
-</tr>
-<tr>
-<td class="label">
-<& /Elements/SelectDateType, Name=>"DateField" &>
-</td><td>
-<& /Elements/SelectDateRelation, Name=>"DateOp" &>
-</td><td>
-<& /Elements/SelectDate, Name => "ValueOfDate", ShowTime => 0, Default => '' &>
+% } else {
+<&|/l&><%$field%></&>
+<& /Elements/SelectMatch, Name => "$field" . "Op" &>
+<INPUT Name="<%"ValueOf" . $field%>" value=""SIZE=20>
+% }
</td></tr>
-<tr>
-<td class="label">
-<SELECT NAME="TimeField">
-<OPTION VALUE="TimeWorked"><&|/l&>Time Worked</&></OPTION>
-<OPTION VALUE="TimeEstimated"><&|/l&>Time Estimated</&></OPTION>
-<OPTION VALUE="TimeLeft"><&|/l&>Time Left</&></OPTION>
-</SELECT>
-</td><td>
-<& /Elements/SelectEqualityOperator, Name => "TimeOp" &>
+% }
+% } else {
+<&|/l&><%$field%></&>
</td><td>
-<INPUT Name="ValueOfTime" SIZE=5>
-</td>
-</tr>
-<tr>
-<td class="label">
-<SELECT NAME="PriorityField">
-<OPTION VALUE="Priority"><&|/l&>Priority</&></OPTION>
-<OPTION VALUE="InitialPriority"><&|/l&>Initial Priority</&></OPTION>
-<OPTION VALUE="FinalPriority"><&|/l&>Final Priority</&></OPTION>
-</SELECT>
-</td><td>
-<& /Elements/SelectEqualityOperator, Name => "PriorityOp" &>
+<& /Elements/SelectMatch, Name => "$field" . "Op" &>
</td><td>
-<INPUT Name="ValueOfPriority" SIZE=5>
-</td>
-</tr>
-<tr>
-<td class="label">
-<& SelectLinks, Name=>"LinksField" &>
-</td><td>
-<& /Elements/SelectBoolean, Name => "LinksOp",
- True => loc("is"),
- False => loc("isn't"),
- TrueVal=> '=',
- FalseVal => '!=' &>
-</td><td>
-<INPUT Name="ValueOfLinks" value="" SIZE=5>
+<INPUT Name="<%"ValueOf" . $field%>" value="" SIZE=20>
+% }
</td></tr>
+% }
+<& '/Elements/Callback', _CallbackName => 'EndOfList' &>
<%INIT>
+my @fields = ('Attachment',
+ 'Queue',
+ 'Status',
+ 'People',
+ 'Dates',
+ 'Time',
+ 'Priority',
+ 'Links',
+ 'id',
+ );
+
my @people = ('Actor',
'Watcher',
- 'WatcherGroup',
);
</%INIT>
diff --git a/rt/html/Search/Elements/PickCFs b/rt/html/Search/Elements/PickCFs
index 435a07a..fb143ba 100644
--- a/rt/html/Search/Elements/PickCFs
+++ b/rt/html/Search/Elements/PickCFs
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,17 +42,24 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
% while ( my $CustomField = $CustomFields->Next ) {
-% my $name = "'CF.{" . $CustomField->Name . "}'";
-<tr><td class="label">
+<tr><td class=label>
+
+% my $name;
+% if ($CustomField->QueueObj->id) {
+% $name = "'CF." . $CustomField->QueueObj->Name .
+% ".{" . $CustomField->Name . "}'";
+% } else {
+% $name = "'CF." . $CustomField->Name . "'";
+% }
<% $CustomField->Name %>
</td>
<td>
- <& /Elements/SelectCustomFieldOperator, Name => $name . "Op",
- True => loc("is"),
- False => loc("isn't"),
- TrueVal=> '=', FalseVal => '!=' &>
+<& /Elements/SelectCustomFieldOperator, Name => $name . "Op",
+ True => loc("is"),
+ False => loc("isn't"),
+ TrueVal=> '=', FalseVal => '!=' &>
</td>
<td>
<& /Elements/SelectCustomFieldValue, Name => "ValueOf" . $name,
@@ -60,11 +67,13 @@
&>
</td></tr>
% }
+
<%INIT>
my $CustomFields = RT::CustomFields->new( $session{'CurrentUser'});
-foreach my $id (keys %cfqueues) {
+foreach (keys %cfqueues) {
+ my $id = $_;
$id =~ s/^.'*(.*).'*$/$1/;
- # Gotta load up the $queue object, since queues get stored by name now. my $id
+ # Gotta load up the $queue object, since queues get stored by name now.
my $queue = RT::Queue->new($session{'CurrentUser'});
$queue->Load($id);
$CustomFields->LimitToQueue($queue->Id);
diff --git a/rt/html/Search/Elements/PickCriteria b/rt/html/Search/Elements/PickCriteria
index 1293444..344830e 100644
--- a/rt/html/Search/Elements/PickCriteria
+++ b/rt/html/Search/Elements/PickCriteria
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,32 +42,26 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<& /Elements/TitleBoxStart, title => loc('Add Criteria')&>
<table width=100% cellspacing=0 cellpadding=0 border=0>
<tr>
<td>
<table cellspacing=0 border=0>
<tr><td class=label>
- <&|/l&>Aggregator</&>:
+ Aggregator:
</td>
<td><& SelectAndOr, Name => "AndOr" &>
</td></tr>
</table>
</td></tr>
<tr>
- <td>
+ <td colspan=3>
<hr>
</td>
</tr>
- <tr>
- <td valign=top>
- <table cellspacing=0 border=0>
- <& PickBasics &>
- <& PickCFs, cfqueues => \%cfqueues &>
- </table>
- </td>
- </tr>
+ <& PickBasics &>
+ <& PickCFs, cfqueues => \%cfqueues &>
<tr><td>&nbsp;</td></tr>
</table>
diff --git a/rt/html/Search/Elements/SearchPrivacy b/rt/html/Search/Elements/SearchPrivacy
index 270e1ba..5f6f207 100644
--- a/rt/html/Search/Elements/SearchPrivacy
+++ b/rt/html/Search/Elements/SearchPrivacy
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<%args>
$Object => undef
</%args>
diff --git a/rt/html/Search/Elements/SelectAndOr b/rt/html/Search/Elements/SelectAndOr
index 2f3c704..11df03f 100644
--- a/rt/html/Search/Elements/SelectAndOr
+++ b/rt/html/Search/Elements/SelectAndOr
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,10 +42,10 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
-<input type=radio NAME="<%$Name%>" CHECKED VALUE="AND"><&|/l&>AND</&></input>
-<input type=radio NAME="<%$Name%>" VALUE="OR"><&|/l&>OR</&></input>
+%# }}} END BPS TAGGED BLOCK
+<input type=radio NAME="<%$Name%>" CHECKED VALUE="AND">AND</input>
+<input type=radio NAME="<%$Name%>" VALUE="OR">OR</input>
<%ARGS>
$Name => "Operator"
-</%ARGS>
+</%ARGS> \ No newline at end of file
diff --git a/rt/html/Search/Elements/SelectGroup b/rt/html/Search/Elements/SelectGroup
deleted file mode 100644
index edd5371..0000000
--- a/rt/html/Search/Elements/SelectGroup
+++ /dev/null
@@ -1,65 +0,0 @@
-%# BEGIN BPS TAGGED BLOCK {{{
-%#
-%# COPYRIGHT:
-%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
-%# <jesse@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., 675 Mass Ave, Cambridge, MA 02139, USA.
-%#
-%#
-%# 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 }}}
-<SELECT NAME="<%$Name%>">
-% if ($AllowNull) {
-<OPTION VALUE="">-</OPTION>
-% }
-%while (my $group = $groups->Next) {
-<OPTION VALUE="<%$group->id%>" <%$group->id eq $Default && "SELECTED"%>><%$group->Name%></OPTION>
-%}
-</SELECT>
-
-<%INIT>
-my $groups = new RT::Groups($session{'CurrentUser'});
-$groups->Limit(FIELD => 'Domain', OPERATOR => '=', VALUE => $Domain);
-
-</%INIT>
-<%ARGS>
-$AllowNull => 1
-$Default=> ''
-$Name => 'Group'
-$Domain => 'UserDefined';
-</%ARGS>
diff --git a/rt/html/Search/Elements/SelectLinks b/rt/html/Search/Elements/SelectLinks
index 00ec80b..b814e30 100644
--- a/rt/html/Search/Elements/SelectLinks
+++ b/rt/html/Search/Elements/SelectLinks
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<SELECT NAME="<%$Name%>">
% foreach (@fields) {
<OPTION VALUE="<%$_%>"><&|/l&><%$_%></&></OPTION>
@@ -56,7 +56,7 @@ $Name => 'LinksField'
my @fields = ('HasMember',
'MemberOf',
'DependsOn',
- 'DependedOnBy',
+ 'DependentOn',
'RefersTo',
'ReferredToBy',
'LinkedTo',
diff --git a/rt/html/Search/Elements/SelectPersonType b/rt/html/Search/Elements/SelectPersonType
index d4127c9..01f3893 100644
--- a/rt/html/Search/Elements/SelectPersonType
+++ b/rt/html/Search/Elements/SelectPersonType
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,20 +42,16 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<SELECT NAME ="<%$Name%>">
% if ($AllowNull) {
<OPTION VALUE="">-</OPTION>
% }
-% for my $option (@types) {
-% if ($Suffix) {
-<OPTION VALUE="<% $option %><% $Suffix %>" <%$option eq $Default && "SELECTED"%> ><%loc($option)%></OPTION>
-% next;
-% }
-% foreach my $subtype (@subtypes) {
-<OPTION VALUE="<%"$option.$subtype"%>" <%$option eq $Default && $subtype eq 'EmailAddress' && "SELECTED"%> ><% loc($option) %> <% loc($subtype) %></OPTION>
-% }
+%for my $option (@types) {
+%foreach my $subtype (@subtypes) {
+<OPTION VALUE="<%"$option.$subtype"%>" <%$option eq $Default && $subtype eq 'EmailAddress' && "SELECTED"%> ><%loc("[_1] [_2]",$option, $subtype)%></OPTION>
% }
+%}
</SELECT>
<%INIT>
@@ -63,9 +59,6 @@ my @types;
if ($Scope =~ 'queue') {
@types = qw(Cc AdminCc);
}
-elsif ($Suffix eq 'Group') {
- @types = qw(Requestor Cc AdminCc Watcher);
-}
else {
@types = qw(Requestor Cc AdminCc Watcher Owner);
}
@@ -75,7 +68,6 @@ my @subtypes = qw(EmailAddress Name RealName Nickname Organization Address1 Addr
</%INIT>
<%ARGS>
$AllowNull => 1
-$Suffix => ''
$Default=>undef
$Scope => 'ticket'
$Name => 'WatcherType'
diff --git a/rt/html/Search/Elements/SelectSearchObject b/rt/html/Search/Elements/SelectSearchObject
index e9df517..6eaa680 100644
--- a/rt/html/Search/Elements/SelectSearchObject
+++ b/rt/html/Search/Elements/SelectSearchObject
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<%args>
@Objects => undef
$Name => undef
diff --git a/rt/html/Search/Elements/SelectSearchesForObjects b/rt/html/Search/Elements/SelectSearchesForObjects
index e6be66a..3f0c458 100644
--- a/rt/html/Search/Elements/SelectSearchesForObjects
+++ b/rt/html/Search/Elements/SelectSearchesForObjects
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<%args>
@Objects => undef
$Name => undef
@@ -57,9 +57,6 @@ $Name => undef
% }
% my @searches = $object->Attributes->Named('SavedSearch');
% foreach my $search (@searches) {
-% # Skip it if it is not a ticket search.
-% next if ($search->SubValue('SearchType')
-% && $search->SubValue('SearchType') ne 'Ticket');
<option value="<%ref($object)%>-<%$object->id%>-SavedSearch-<%$search->Id%>"> -<%$search->Description||loc('Unnamed search')%></option>
% }
% }
diff --git a/rt/html/Search/Results.html b/rt/html/Search/Results.html
index 5849378..dfcc788 100755
--- a/rt/html/Search/Results.html
+++ b/rt/html/Search/Results.html
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<& /Elements/Header, Title => $title, Refresh => $session{'tickets_refresh_interval'} &>
<& /Ticket/Elements/Tabs,
current_tab => "Search/Results.html".$QueryString,
@@ -52,6 +52,7 @@
Rows => $Rows,
OrderBy => $OrderBy,
Order => $Order &>
+<hr>
<& /Elements/TicketList,
Query => $Query,
AllowSorting => 1,
@@ -80,26 +81,24 @@
<a href="<%$RT::WebPath%>/Search/Bulk.html<%$QueryString%>"><&|/l&>Update multiple tickets</&></a><br>
<a href="<%$RT::WebPath%>/Search/Results.html<%$QueryString%>"><&|/l&>Bookmarkable link</&></a><br>
<a href="<%$RT::WebPath%>/Search/Results.tsv<%$QueryString%>"><&|/l&>spreadsheet</&></a> |
-<a href="<%$RT::WebPath%>/Search/Results.rdf<%$ShortQueryString%>"><&|/l&>RSS</&></a> |
-<a href="<%$RT::WebPath%>/Tools/Offline.html<%$ShortQueryString%>"><&|/l&>Work offline</&></a><br>
+<a href="<%$RT::WebPath%>/Search/Results.rdf<%$QueryString%>"><&|/l&>RSS</&></a> |
+<a href="<%$RT::WebPath%>/Tools/Offline.html<%$QueryString%>"><&|/l&>Work offline</&></a><br>
<& /Elements/Callback, _CallbackName => 'SearchActions', QueryString => $QueryString&>
</div>
<%INIT>
my ($title, $ticketcount);
$session{'i'}++;
-$session{'tickets'} = RT::Tickets->new($session{'CurrentUser'}) ;
+$session{'tickets'} = RT::Tickets->new($session{'CurrentUser'}) unless ($session{'tickets'});
$session{'tickets'}->FromSQL($Query) if ($Query);
$session{'tickets'}->OrderBy(FIELD => $OrderBy, ORDER => $Order);
-
-$session{'CurrentSearchHash'} = {
- Format => $Format,
- Query => $Query,
- Order => $Order,
- OrderBy => $OrderBy,
- RowsPerPage => $Rows
- };
-
+if ($OrderBy ne $session{'CurrentSearchHash'}->{'OrderBy'}
+ or $Order ne $session{'CurrentSearchHash'}->{'Order'}) {
+ $session{'CurrentSearchHash'}->{'OrderBy'} = $OrderBy;
+ $session{'CurrentSearchHash'}->{'Order'} = $Order;
+ # Invalidate the ordering cache
+ undef $session{'tickets'}->{'items_array'};
+}
if ( $session{'tickets'}->Query()) {
@@ -117,7 +116,6 @@ my $QueryString = "?".$m->comp('/Elements/QueryString',
Order => $Order,
Page => $Page);
-my $ShortQueryString = "?".$m->comp('/Elements/QueryString', Query => $Query);
if ($ARGS{'TicketsRefreshInterval'}) {
$session{'tickets_refresh_interval'} = $ARGS{'TicketsRefreshInterval'};
diff --git a/rt/html/Search/Results.rdf b/rt/html/Search/Results.rdf
index ee71fea..8054c86 100644
--- a/rt/html/Search/Results.rdf
+++ b/rt/html/Search/Results.rdf
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<%INIT>
my $Tickets = RT::Tickets->new($session{'CurrentUser'});
diff --git a/rt/html/Search/Results.tsv b/rt/html/Search/Results.tsv
index 17aa88a..631e299 100644
--- a/rt/html/Search/Results.tsv
+++ b/rt/html/Search/Results.tsv
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<%INIT>
my $Tickets = RT::Tickets->new($session{'CurrentUser'});
@@ -84,8 +84,7 @@ my @attrs = qw( id QueueObj->Name Subject Status TimeEstimated TimeWorked TimeLe
my @header;
foreach my $attr (@attrs) {
my $label = $attr;
- $label =~ s'Obj-.(?:AsString|Name|ISO)''g;
- $label =~ s'-\>MemberEmailAddressesAsString''g;
+ $label =~ s'Obj-.(AsString|Name|ISO)''g;
push @header, $label;
}
foreach my $id (sort keys %known_cfs) {
diff --git a/rt/html/SelfService/Attachment/dhandler b/rt/html/SelfService/Attachment/dhandler
index f953c24..698e345 100644
--- a/rt/html/SelfService/Attachment/dhandler
+++ b/rt/html/SelfService/Attachment/dhandler
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<%init>
$m->comp('/Ticket/Attachment/dhandler', %ARGS);
$m->abort;
diff --git a/rt/html/SelfService/Closed.html b/rt/html/SelfService/Closed.html
index 2d49a68..515879e 100644
--- a/rt/html/SelfService/Closed.html
+++ b/rt/html/SelfService/Closed.html
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,8 +42,8 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
-<& /SelfService/Elements/Header, Title => loc('Closed tickets') &>
+%# }}} END BPS TAGGED BLOCK
+<& /SelfService/Elements/Header, Title => loc('Closed Tickets') &>
<& /SelfService/Elements/MyRequests, status => ['rejected', 'resolved'], friendly_status =>
loc('closed') &>
diff --git a/rt/html/SelfService/Create.html b/rt/html/SelfService/Create.html
index d60ae26..a2cfd9f 100644
--- a/rt/html/SelfService/Create.html
+++ b/rt/html/SelfService/Create.html
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<& Elements/Header, Title => loc("Create a ticket") &>
<FORM ACTION="Display.html" METHOD="POST" ENCTYPE="multipart/form-data">
@@ -50,49 +50,43 @@
<TABLE>
<TR>
-<TD class="label">
+<TD>
<&|/l&>Queue</&>:
-</td>
-<td class="value">
- <input type="hidden" name="Queue" value="<%$queue_obj->id%>">
- <b><%$queue_obj->Name%></b> (<%$queue_obj->Description%>)
+</TD>
+<TD>
+<& /Elements/SelectNewTicketQueue, Verbose => 'True' &>
</TD>
</TR>
<TR>
-<TD class="label">
+<TD>
<&|/l&>Requestors</&>:
</TD>
-<TD class="value">
+<TD>
<INPUT Name="Requestors" Value="<%$session{CurrentUser}->EmailAddress%>" SIZE=20>
</TD>
</TR>
<TR>
-<TD class="label">
+<TD>
<&|/l&>Cc</&>:
</TD>
-<TD class="value">
+<TD>
<INPUT NAME="Cc" SIZE=20>
</TD>
</TR>
<TR>
-<TD class="label">
+<TD>
<&|/l&>Subject</&>:
</TD>
-<TD class="value">
+<TD>
<INPUT Name="Subject" SIZE=60 MAXSIZE=100 value="">
</TD>
</TR>
-<tr>
- <td colspan="2">
- <& /Ticket/Elements/EditCustomFields, QueueObj => $queue_obj &>
- </td>
-</tr>
-<tr>
-<TD class="label">
+<TR>
+<TD>
<&|/l&>Attach file</&>:
</TD>
-<TD class="value">
-<INPUT Name="Attach" type="file">
+<TD>
+<INPUT Name="Attach" type=file>
</TD>
</TR>
<TR>
@@ -106,10 +100,3 @@
</FORM>
-<%args>
-$Queue => undef
-</%args>
-<%init>
-my $queue_obj = RT::Queue->new($session{'CurrentUser'});
-$queue_obj->Load($Queue);
-</%init>
diff --git a/rt/html/SelfService/CreateTicketInQueue.html b/rt/html/SelfService/CreateTicketInQueue.html
deleted file mode 100755
index 5e89736..0000000
--- a/rt/html/SelfService/CreateTicketInQueue.html
+++ /dev/null
@@ -1,61 +0,0 @@
-%# BEGIN BPS TAGGED BLOCK {{{
-%#
-%# COPYRIGHT:
-%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
-%# <jesse@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., 675 Mass Ave, Cambridge, MA 02139, USA.
-%#
-%#
-%# 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/Header, Title => loc("Create a ticket") &>
-
-<h1><&|/l&>Select a queue for your new ticket</&></h1>
-
-<dl>
-% while (my $queue = $queues->Next) {
-% next unless $queue->CurrentUserHasRight('CreateTicket');
-
-<dt><a href="<%$RT::WebPath%>/SelfService/Create.html?Queue=<%$queue->id%>"><%$queue->Name%></a></dt>
-<dd><%$queue->Description%></dd>
-% }
-</dl>
-<%init>
-my $queues = RT::Queues->new($session{'CurrentUser'});
-$queues->UnLimit;
-</%init>
diff --git a/rt/html/SelfService/Display.html b/rt/html/SelfService/Display.html
index f7140df..a94593e 100644
--- a/rt/html/SelfService/Display.html
+++ b/rt/html/SelfService/Display.html
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<& /SelfService/Elements/Header, Title => loc('#[_1]: [_2]', $Ticket->id, $Ticket->Subject) &>
<& /Elements/ListActions, actions => \@results &>
@@ -54,7 +54,6 @@
title_class=> 'inverse',
color => "#993333" &>
<& /Ticket/Elements/ShowBasics, Ticket => $Ticket &>
- <& /Ticket/Elements/ShowCustomFields, Ticket => $Ticket &>
<& /Elements/TitleBoxEnd &>
</TD>
<TD VALIGN=TOP WIDTH="50%" class="boxcontainer">
@@ -70,14 +69,7 @@
%#!!pape: selfservice_find_attachments.patch {{
-<& /Ticket/Elements/ShowHistory,
- Ticket => $Ticket,
- URIFile => "Display.html",
- ShowHeaders => $ARGS{'ShowHeaders'},
- AttachPath => "Attachment",
- Attachments => $attachments,
- UpdatePath => "Update.html"
-&>
+<& /Ticket/Elements/ShowHistory, Ticket => $Ticket, AttachPath => "Attachment", Attachments => $attachments, UpdatePath => "Update.html" &>
%#!!pape: selfservice_find_attachments.patch }}
@@ -93,30 +85,6 @@ my ( $field, @results );
my @id = ( ref $id eq 'ARRAY' ) ? @{$id} : ($id);
my $Ticket = new RT::Ticket( $session{'CurrentUser'} );
-
-# store the uploaded attachment in session
-if ( $ARGS{'Attach'} ) { # attachment?
- $session{'Attachments'} = {} unless defined $session{'Attachments'};
-
- my $subject = "$ARGS{'Attach'}";
-
- # since CGI.pm deutf8izes the magic field, we need to add it back.
- Encode::_utf8_on($subject);
-
- # strip leading directories
- $subject =~ s#^.*[\\/]##;
-
- my $attachment = MakeMIMEEntity(
- Subject => $subject,
- Body => "",
- AttachmentFieldName => 'Attach'
- );
-
- $session{'Attachments'} =
- { %{ $session{'Attachments'} || {} },
- $ARGS{'Attach'} => $attachment };
-}
-
if ( $id[0] eq 'new' ) {
# {{{ Create a new ticket
@@ -129,87 +97,108 @@ if ( $id[0] eq 'new' ) {
unless ( $Queue->CurrentUserHasRight('CreateTicket') ) {
$m->comp( 'Error.html',
- Why =>
- loc('You have no permission to create tickets in that queue.') );
+ Why =>
+ loc('You have no permission to create tickets in that queue.') );
$m->abort;
}
-
- ( $Ticket, @results ) =
- CreateTicket( Attachments => $session{'Attachments'}, %ARGS, Status => 'new' );
-
- unless ( $Ticket->id ) {
- $m->comp( 'Error.html', Why => join( "\n", @results ));
- $m->abort();
- }
-
- # }}}
-
- # delete temporary storage entry to make WebUI clean
- unless ( keys %{ $session{'Attachments'} } and $ARGS{'UpdateAttach'} ) {
- delete $session{'Attachments'};
- }
-
- # }}}
- }
- else {
- unless ( $Ticket->Load( $id[0] ) ) {
- $m->comp( 'Error.html',
- Why => loc( "Couldn't load ticket '[_1]'", $id ) );
- $m->abort();
- }
+ my @Requestors = split ( /\s*,\s*/, $ARGS{'Requestors'} );
+ my @Cc = split ( /\s*,\s*/, $ARGS{'Cc'} );
+
+ my $MIMEObj = MakeMIMEEntity( Subject => $ARGS{'Subject'},
+ From => $ARGS{'From'},
+ Cc => $ARGS{'Cc'},
+ Body => $ARGS{'Content'},
+ AttachmentFieldName => 'Attach' );
+
+ #TODO in Create_Details.html: priorities and due-date
+ my ( $id, $Trans, $ErrMsg ) = $Ticket->Create( Queue => $ARGS{Queue},
+ Requestor => \@Requestors,
+ Cc => \@Cc,
+ Subject => $ARGS{Subject},
+ MIMEObj => $MIMEObj );
+ unless ( $id && $Trans ) {
+ $m->comp( 'Error.html', Why => $ErrMsg );
+ $m->abort();
}
+ push ( @results, $ErrMsg );
+
# }}}
- unless ( $Ticket->CurrentUserHasRight('ShowTicket') ) {
+# delete temporary storage entry to make WebUI clean
+unless (keys %{$session{'Attachments'}} and $ARGS{'UpdateAttach'}) {
+ delete $session{'Attachments'};
+}
+# }}}
+}
+else {
+ unless ( $Ticket->Load( $id[0] ) ) {
$m->comp( 'Error.html',
- Why => loc("No permission to display that ticket") );
+ Why => loc( "Couldn't load ticket '[_1]'", $id ) );
$m->abort();
}
+}
- my ( $code, $msg );
+# }}}
- #Update the status
- if ( ( defined $ARGS{'Status'} )
- and $ARGS{'Status'}
- and ( $ARGS{'Status'} ne $Ticket->Status ) )
- {
- ( $code, $msg ) = $Ticket->SetStatus( $ARGS{'Status'} );
- push @results, "$msg";
- }
+unless ( $Ticket->CurrentUserHasRight('ShowTicket') ) {
+ $m->comp( 'Error.html',
+ Why => loc("No permission to display that ticket") );
+ $m->abort();
+}
- # }}}
+my ( $code, $msg );
- if (
- $session{'Attachments'}
- || ( $ARGS{'UpdateContent'} ne ''
- && $ARGS{'UpdateContent'} ne "-- \n"
- . $session{'CurrentUser'}->UserObj->Signature )
- )
- {
- $ARGS{UpdateAttachments} = $session{'Attachments'};
- }
- ProcessUpdateMessage(
- ARGSRef => \%ARGS,
- Actions => \@results,
- TicketObj => $Ticket
+#Update the status
+if ( ( defined $ARGS{'Status'} ) and $ARGS{'Status'}
+ and ( $ARGS{'Status'} ne $Ticket->Status ) ) {
+ ( $code, $msg ) = $Ticket->SetStatus( $ARGS{'Status'} );
+ push @results, "$msg";
+}
+
+# {{{ store the uploaded attachment in session
+if ($ARGS{'Attach'}) { # attachment?
+ $session{'Attachments'} = {} unless defined $session{'Attachments'};
+
+ my $subject = "$ARGS{'Attach'}";
+ # since CGI.pm deutf8izes the magic field, we need to add it back.
+ Encode::_utf8_on($subject);
+ # strip leading directories
+ $subject =~ s#^.*[\\/]##;
+
+ my $attachment = MakeMIMEEntity(
+ Subject => $subject,
+ Body => "",
+ AttachmentFieldName => 'Attach'
);
- # delete temporary storage entry to make WebUI clean
- unless ( keys %{ $session{'Attachments'} } and $ARGS{'UpdateAttach'} ) {
- delete $session{'Attachments'};
- }
+ $session{'Attachments'} = { %{$session{'Attachments'} || {}},
+ $ARGS{'Attach'} => $attachment };
+}
+# }}}
- my @cfupdates = ProcessObjectCustomFieldUpdates(Object => $Ticket, ARGSRef => \%ARGS);
- push (@results, @cfupdates);
+if ( $session{'Attachments'} ||
+ ( $ARGS{'UpdateContent'} ne ''
+ && $ARGS{'UpdateContent'} ne "-- \n"
+ . $session{'CurrentUser'}->UserObj->Signature )) {
+ $ARGS{UpdateAttachments} = $session{'Attachments'};
+}
+ProcessUpdateMessage( ARGSRef => \%ARGS,
+ Actions => \@results,
+ TicketObj => $Ticket );
- # }}}
+# delete temporary storage entry to make WebUI clean
+unless (keys %{$session{'Attachments'}} and $ARGS{'UpdateAttach'}) {
+ delete $session{'Attachments'};
+}
+# }}}
- my $Transactions = $Ticket->Transactions;
+my $Transactions = $Ticket->Transactions;
- my $attachments =
- $m->comp( '/Ticket/Elements/FindAttachments', Ticket => $Ticket );
+#!!pape: selfservice_find_attachments.patch {{
+my $attachments = $m->comp('/Ticket/Elements/FindAttachments', Ticket => $Ticket);
+#!!pape: selfservice_find_attachments.patch }}
</%INIT>
diff --git a/rt/html/SelfService/Elements/GotoTicket b/rt/html/SelfService/Elements/GotoTicket
index 50efaa2..265d698 100644
--- a/rt/html/SelfService/Elements/GotoTicket
+++ b/rt/html/SelfService/Elements/GotoTicket
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,5 +42,5 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<FORM ACTION="<%$RT::WebPath%>/SelfService/Display.html"><input type=submit value="<&|/l&>Goto ticket</&>">&nbsp;<input size=4 name=id></FORM>
diff --git a/rt/html/SelfService/Elements/Header b/rt/html/SelfService/Elements/Header
index c7e6a91..6fe2133 100644
--- a/rt/html/SelfService/Elements/Header
+++ b/rt/html/SelfService/Elements/Header
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,6 +42,6 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<& /Elements/Header, %ARGS, Prefs => '/SelfService/Prefs.html' &>
<& /SelfService/Elements/Tabs, %ARGS &>
diff --git a/rt/html/SelfService/Elements/MyRequests b/rt/html/SelfService/Elements/MyRequests
index 2df8ce8..026722a 100644
--- a/rt/html/SelfService/Elements/MyRequests
+++ b/rt/html/SelfService/Elements/MyRequests
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<& /Elements/TitleBoxStart, title => $title &>
<TABLE BORDER=0 cellspacing=1 cellpadding=1 BGCOLOR="#eeeeee" WIDTH=100%>
<TR>
@@ -57,7 +57,7 @@
<a href="<%$RT::WebPath%>/SelfService/Display.html?id=<%$Ticket->Id%>"><%$Ticket->Id%>: <%$Ticket->Subject%></a>
</TD>
<TD>
-<%loc($Ticket->Status)%>
+<%$Ticket->Status%>
</TD><TD>
<%$Ticket->OwnerObj->Name%>
</TR>
diff --git a/rt/html/SelfService/Elements/Tabs b/rt/html/SelfService/Elements/Tabs
index 802fd65..dbe2109 100644
--- a/rt/html/SelfService/Elements/Tabs
+++ b/rt/html/SelfService/Elements/Tabs
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<& /Elements/PageLayout,
current_toptab => $current_toptab,
current_tab => $current_tab,
@@ -67,16 +67,12 @@ my $tabs = { A => { title => loc('Open tickets'),
path => 'SelfService/Closed.html',
},
C => { title => loc('New ticket'),
- path => 'SelfService/CreateTicketInQueue.html'
+ path => 'SelfService/Create.html'
+ },
+ Z => { title => loc('Preferences'),
+ path => 'SelfService/Prefs.html'
}
};
-if ($session{'CurrentUser'}->HasRight( Right => 'ModifySelf',
- Object => $RT::System )) {
- $tabs->{Z} = { title => loc('Preferences'),
- path => 'SelfService/Prefs.html'
- };
-}
-
my $actions = {
B => { html => $m->scomp('GotoTicket')
}
diff --git a/rt/html/SelfService/Error.html b/rt/html/SelfService/Error.html
index 8ac9f81..b4cddee 100644
--- a/rt/html/SelfService/Error.html
+++ b/rt/html/SelfService/Error.html
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<& /SelfService/Elements/Header, Title => loc('Error') &>
<h2 class="title"><%loc('Error')%></h2>
<& /Elements/TitleBoxStart, title => $Title &>
diff --git a/rt/html/SelfService/Prefs.html b/rt/html/SelfService/Prefs.html
index 3913203..ce2165e 100644
--- a/rt/html/SelfService/Prefs.html
+++ b/rt/html/SelfService/Prefs.html
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<& /SelfService/Elements/Header, Title => loc('Preferences') &>
<& /Elements/ListActions, actions => \@results &>
diff --git a/rt/html/SelfService/Update.html b/rt/html/SelfService/Update.html
index 816a610..ef37684 100644
--- a/rt/html/SelfService/Update.html
+++ b/rt/html/SelfService/Update.html
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,62 +42,35 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
-<& /SelfService/Elements/Header,
- Title =>loc('Update ticket #[_1]', $Ticket->id)
-&>
+%# }}} END BPS TAGGED BLOCK
+<& /SelfService/Elements/Header, Title =>loc('Update ticket #[_1]', $Ticket->id) &>
<FORM ACTION="Display.html" METHOD=POST ENCTYPE="multipart/form-data">
<input type=hidden name="UpdateType" value="response">
-<input TYPE="hidden" NAME="id" VALUE="<%$Ticket->Id%>">
-<table>
- <tr>
- <td class="label">
- <&|/l&>Status</&>
- </td>
- <td class="value">
- <& /Elements/SelectStatus, Name=>"Status", DefaultLabel => loc("[_1] (Unchanged)",loc($DefaultStatus)) &>
- </td>
- </tr>
- <tr>
- <td class="label">
- <&|/l&>Subject</&>
- </td>
- <td class="value">
- <input name="UpdateSubject" size=60 value="<% $Ticket->Subject %>">
- </td>
- </tr>
-% if (exists $session{'Attachments'}) {
+<&|/l&>Status</&>: <& /Elements/SelectStatus, Name=>"Status", DefaultLabel => loc("[_1] (Unchanged)",$DefaultStatus) &><br>
+<&|/l&>Subject</&>: <input name="UpdateSubject" size=60 value="Re: <% $Ticket->Subject %>"> <br>
+<table>
<tr>
- <TD class="label">
- <&|/l&>Attached file</&>
- </TD>
- <TD COLSPAN=5 class="value">
- <&|/l&>Check box to delete</&><BR>
+% if (exists $session{'Attachments'}) {
+<TD>
+<&|/l&>Attached file</&>:
+</TD>
+<TD COLSPAN=5>
+<&|/l&>Check box to delete</&><BR>
% foreach my $attach_name (keys %{$session{'Attachments'}}) {
- <input type="checkbox" name="DeleteAttach-<%$attach_name%>" value="1"><%$attach_name%><BR>
+<input type="checkbox" name="DeleteAttach-<%$attach_name%>"><%$attach_name%><BR>
% } # end of foreach
- </TD>
+</TD>
</TR>
+<TR>
% } # end of if
-<tr>
- <td class"label">
- <&|/l&>Attach</&>
- </td>
- <td class="value">
- <input name="Attach" type="file">
- <input type="hidden" name="UpdateAttach" value="1">
- </td>
- </tr>
+<tr><td align=right><&|/l&>Attach</&>:</td><td><input name="Attach" type="file"><input type="hidden" name="UpdateAttach" value="1">
+</td></tr>
</table>
-<& /Ticket/Elements/EditCustomFields, TicketObj => $Ticket &>
-<& /Elements/MessageBox,
- Name => "UpdateContent",
- QuoteTransaction => $ARGS{QuoteTransaction}
- &>
- <br>
+<& /Elements/MessageBox, Name=>"UpdateContent", QuoteTransaction=>$ARGS{QuoteTransaction} &>
+ <INPUT TYPE=HIDDEN NAME=id VALUE="<%$Ticket->Id%>"><br>
<& /Elements/Submit &>
@@ -109,14 +82,14 @@
my $Ticket = LoadTicket($id);
-my $title = loc( "Update ticket #[_1]", $Ticket->id );
+my $title = loc("Update ticket #[_1]", $Ticket->id);
$DefaultStatus = $Ticket->Status() unless ($DefaultStatus);
-Abort( loc("No permission to view update ticket") )
- unless ( $Ticket->CurrentUserHasRight('ReplyToTicket')
- or $Ticket->CurrentUserHasRight('ModifyTicket') );
+Abort(loc("No permission to view update ticket"))
+ unless ( $Ticket->CurrentUserHasRight('ReplyToTicket') or
+ $Ticket->CurrentUserHasRight('ModifyTicket') );
</%INIT>
diff --git a/rt/html/SelfService/index.html b/rt/html/SelfService/index.html
index f3ccb85..234568c 100644
--- a/rt/html/SelfService/index.html
+++ b/rt/html/SelfService/index.html
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<& /SelfService/Elements/Header, Title => undef &>
<& /SelfService/Elements/MyRequests &>
diff --git a/rt/html/Ticket/Attachment/dhandler b/rt/html/Ticket/Attachment/dhandler
index 584fd72..27b88bd 100644
--- a/rt/html/Ticket/Attachment/dhandler
+++ b/rt/html/Ticket/Attachment/dhandler
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<%perl>
my ($ticket, $trans,$attach, $filename);
my $arg = $m->dhandler_arg; # get rest of path
diff --git a/rt/html/Ticket/Create.html b/rt/html/Ticket/Create.html
index b547242..fd2af45 100644
--- a/rt/html/Ticket/Create.html
+++ b/rt/html/Ticket/Create.html
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,12 +42,12 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<& /Elements/Header, Title => loc("Create a new ticket") &>
<& /Elements/Tabs,
current_toptab => "Ticket/Create.html",
Title => loc("Create a new ticket") &>
-<FORM ACTION="<%$RT::WebPath%>/Ticket/Create.html" METHOD="POST" ENCTYPE="multipart/form-data" NAME="TicketCreate">
+<FORM ACTION="<%$RT::WebPath%>/Ticket/Create.html" METHOD="POST" ENCTYPE="multipart/form-data">
<INPUT TYPE=HIDDEN Name="id" VALUE="new">
<A NAME="top">
@@ -113,15 +113,6 @@
<& /Ticket/Elements/EditCustomFields, QueueObj => $QueueObj &>
</TD>
</TR>
-% if ($TxnCFs->Count) {
-% while (my $CF = $TxnCFs->Next()) {
-<TR>
-<TD ALIGN=RIGHT><% $CF->Name %>:</TD>
-<TD><& /Elements/EditCustomField, CustomField => $CF, NamePrefix =>
- "Object-RT::Transaction--CustomField-" &><em><% $CF->FriendlyType %></em></TD>
-</TD></TR>
-% }
-% }
<TR>
% if (exists $session{'Attachments'}) {
<TD class=label>
@@ -130,7 +121,7 @@
<TD COLSPAN=5>
<&|/l&>Check box to delete</&><BR>
% foreach my $attach_name (keys %{$session{'Attachments'}}) {
-<input type="checkbox" name="DeleteAttach-<%$attach_name%>" value="1"><%$attach_name%><BR>
+<input type="checkbox" name="DeleteAttach-<%$attach_name%>"><%$attach_name%><BR>
% } # end of foreach
</TD>
</TR>
@@ -237,8 +228,7 @@ $ARGS{Due}%>"></TD></TR>
my $QueueObj = new RT::Queue($session{'CurrentUser'});
$QueueObj->Load($Queue) || Abort(loc("Queue could not be loaded."));
-my $CFs = $QueueObj->TicketCustomFields();
-my $TxnCFs = $QueueObj->TicketTransactionCustomFields();
+my $CFs = $QueueObj->CustomFields();
# if no due date has been set explicitly, then use the
# queue's default if it exists
diff --git a/rt/html/Ticket/Display.html b/rt/html/Ticket/Display.html
index dd4c093..745ed42 100644
--- a/rt/html/Ticket/Display.html
+++ b/rt/html/Ticket/Display.html
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<& /Elements/Header,
Title => loc("#[_1]: [_2]", $TicketObj->Id, $TicketObj->Subject) &>
<& /Ticket/Elements/Tabs,
@@ -58,9 +58,6 @@
<& /Elements/TitleBoxEnd &>
<BR>
-
-<& /Elements/Callback, _CallbackName => 'BeforeShowHistory', Ticket => $TicketObj, %ARGS &>
-
<& /Ticket/Elements/ShowHistory ,
Ticket => $TicketObj,
Tickets => $Tickets,
@@ -127,11 +124,10 @@ if ($ARGS{'id'} eq 'new') {
}
}
- $ARGS{'UpdateContent'} =~ s/\r\n/\n/g if defined $ARGS{'UpdateContent'};
+ $ARGS{'UpdateContent'} =~ s/\r\n/\n/g;
if ( $ARGS{'UpdateTimeWorked'} ||
$session{'Attachments'} ||
- ( defined $ARGS{'UpdateContent'}
- && $ARGS{'UpdateContent'} ne ''
+ ( $ARGS{'UpdateContent'} ne ''
&& $ARGS{'UpdateContent'} ne "-- \n"
. $session{'CurrentUser'}->UserObj->Signature )) {
$ARGS{UpdateAttachments} = $session{'Attachments'};
diff --git a/rt/html/Ticket/Elements/AddCustomers b/rt/html/Ticket/Elements/AddCustomers
index 01c7367..66480e2 100644
--- a/rt/html/Ticket/Elements/AddCustomers
+++ b/rt/html/Ticket/Elements/AddCustomers
@@ -19,8 +19,9 @@
% foreach my $customer (@Customers) {
<tr>
<td>
- <input type="checkbox" name="Ticket-AddCustomer-<% $customer->{'custnum'} %>" VALUE="1" <% scalar(@Customers) == 1 ? 'CHECKED' : '' %>>
- <A HREF="<%$freeside_url%>/view/cust_main.cgi?<% $customer->{'custnum'} %>"><% &RT::URI::freeside::small_custview($customer->{'custnum'}, &RT::URI::freeside::FreesideGetConfig('countrydefault'), 1) |n %>
+ <input type="checkbox" name="Ticket-AddCustomer-<% $customer->custnum %>" VALUE="1" <% scalar(@Customers) == 1 ? 'CHECKED' : '' %>>
+%# <% $customer->name %>
+ <A HREF="<% $p %>view/cust_main.cgi?<% $customer->custnum %>"><% small_custview( $customer, scalar(FS::Conf->new->config('countrydefault')), 1 ) |n %>
</td>
</tr>
% }
@@ -30,11 +31,10 @@
<%INIT>
my ($msg);
-my $freeside_url = &RT::URI::freeside::FreesideURL();
-
my @Customers = ();
if ( $CustomerString ) {
- @Customers = &RT::URI::freeside::smart_search( 'search' => $CustomerString );
+ @Customers = smart_search( 'search' => $CustomerString );
+ warn scalar(@Customers);
}
my @Services = ();
@@ -42,6 +42,9 @@ if ($ServiceString) {
@Services = (); #service_search();
}
+eval { use FS::CGI qw( popurl small_custview ); };
+my $p = eval { popurl(3); };
+
</%INIT>
<%ARGS>
diff --git a/rt/html/Ticket/Elements/AddWatchers b/rt/html/Ticket/Elements/AddWatchers
index 98314b9..f70e86a 100644
--- a/rt/html/Ticket/Elements/AddWatchers
+++ b/rt/html/Ticket/Elements/AddWatchers
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<BR>
<%$msg%><br>
diff --git a/rt/html/Ticket/Elements/BulkLinks b/rt/html/Ticket/Elements/BulkLinks
index 6a3859a..c071bd1 100644
--- a/rt/html/Ticket/Elements/BulkLinks
+++ b/rt/html/Ticket/Elements/BulkLinks
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<TABLE>
<TR>
<TD class="label"><&|/l&>Merge into</&>:</TD>
diff --git a/rt/html/Ticket/Elements/EditBasics b/rt/html/Ticket/Elements/EditBasics
index 7156851..7ad4a63 100644
--- a/rt/html/Ticket/Elements/EditBasics
+++ b/rt/html/Ticket/Elements/EditBasics
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<TABLE>
<TR>
<td class="label"><&|/l&>Subject</&>:</td>
@@ -84,7 +84,7 @@
<%INIT>
#It's hard to do this inline, so we'll preload the html of the selectstatus in here.
-my $SelectStatus = $m->scomp("/Elements/SelectStatus", Name => 'Status', DefaultLabel => loc("[_1] (Unchanged)",loc($TicketObj->Status)));
+my $SelectStatus = $m->scomp("/Elements/SelectStatus", Name => 'Status', DefaultLabel => loc("[_1] (Unchanged)",$TicketObj->Status));
my $SelectQueue = $m->scomp("/Elements/SelectQueue", Name => 'Queue', Default =>$TicketObj->QueueObj->Id);
</%INIT>
diff --git a/rt/html/Ticket/Elements/EditCustomField b/rt/html/Ticket/Elements/EditCustomField
index 63687ac..74e57dd 100644
--- a/rt/html/Ticket/Elements/EditCustomField
+++ b/rt/html/Ticket/Elements/EditCustomField
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,14 +42,55 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
-<%init>
-
-# RT 3.2 API compatibility glue
-
-$RT::Logger->debug("Ticket/Elements/EditCustomField is deprecated in RT 3.4 and will be removed in 3.6.");
-
-$ARGS{'NamePrefix'} =~ s/^Ticket-/Object-RT::Ticket-/;
-$ARGS{'NamePrefix'} =~ s/^CustomField-/Object-RT::Ticket--CustomField-/;
-$m->comp('/Elements/EditCustomField', %ARGS, Object=> $ARGS{'TicketObj'});
-</%init>
+%# }}} END BPS TAGGED BLOCK
+% my $Values;
+% if ($TicketObj) {
+% $Values = $TicketObj->CustomFieldValues($CustomField->id);
+% }
+% if ($CustomField->Type eq 'FreeformSingle') {
+ <input name="<%$NamePrefix%><%$CustomField->Id%>-Value"
+ size="<%$Cols%>"
+% if ($TicketObj) {
+ value="<%$Values->Count ? $Values->First->Content : ''%>"
+% } elsif ($Default) {
+ value="<%$Default ? $Default : ''%>"
+% }
+>
+% } elsif ($CustomField->Type eq 'FreeformMultiple') {
+% my $content;
+% if ($TicketObj) {
+% while (my $value = $Values->Next ) {
+% $content .= $value->Content;
+% }
+% } elsif ($Default) {
+ value="<%$Default ? $Default : ''%>"
+% }
+<input type="hidden" name="<%$NamePrefix%><%$CustomField->Id%>-Values-Magic" value="1">
+<textarea cols=<%$Cols%> rows=<%$Rows%> name="<%$NamePrefix%><%$CustomField->Id%>-Values"><%$content%></textarea>
+% } elsif ($CustomField->Type =~ /^Select/) {
+ <input type="hidden" name="<%$NamePrefix%><%$CustomField->Id%>-Values-Magic" value="1">
+ <select name="<%$NamePrefix%><%$CustomField->Id%>-Values"
+ size="<%$Rows%>"
+ <%$CustomField->Type eq 'SelectMultiple' && 'MULTIPLE'%>>
+% my $CustomFieldValues = $CustomField->Values();
+% my $selected;
+% while (my $value = $CustomFieldValues->Next) {
+ <option value="<%$value->Name%>"
+% if ($TicketObj) {
+ <% $Values->HasEntry($value->Name) && ($selected = 1) && 'SELECTED' %>
+% } elsif ($Default) {
+ <% ($Default eq $value->Name) && ($selected = 1) && 'SELECTED' %>
+% }
+ ><% $value->Name%></option>
+% }
+ <option value="" <% !$selected && 'SELECTED' %>><&|/l&>(no value)</&></option>
+ </select>
+% }
+<%ARGS>
+$TicketObj => undef
+$CustomField => undef
+$NamePrefix => undef
+$Rows => 5
+$Cols=> 15
+$Default => undef
+</%ARGS>
diff --git a/rt/html/Ticket/Elements/EditCustomFields b/rt/html/Ticket/Elements/EditCustomFields
index d566f4e..b049751 100644
--- a/rt/html/Ticket/Elements/EditCustomFields
+++ b/rt/html/Ticket/Elements/EditCustomFields
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<table>
<tr>
<td valign="top" width="50%">
@@ -66,11 +66,7 @@
<b><%$CustomField->Name%></b><br>
<i><%$CustomField->FriendlyType%></i>
</td>
- <td class="entry"><& /Elements/EditCustomField,
- Object => $TicketObj,
- CustomField => $CustomField,
- NamePrefix => $NamePrefix
- &></td>
+ <td class="entry"><& EditCustomField, TicketObj => $TicketObj, CustomField => $CustomField, NamePrefix => $NamePrefix &></td>
</tr>
% }
</table>
@@ -83,12 +79,12 @@ my $CustomFields;
my $NamePrefix;
if ($TicketObj) {
- $CustomFields = $TicketObj->CustomFields();
- $NamePrefix = "Object-RT::Ticket-".$TicketObj->Id."-CustomField-";
+ $CustomFields = $TicketObj->QueueObj->CustomFields();
+ $NamePrefix = "Ticket-".$TicketObj->Id."-CustomField-";
} else {
- $CustomFields = $QueueObj->TicketCustomFields();
- $NamePrefix = "Object-RT::Ticket--CustomField-";
+ $CustomFields = $QueueObj->CustomFields();
+ $NamePrefix = "CustomField-";
}
diff --git a/rt/html/Ticket/Elements/EditCustomers b/rt/html/Ticket/Elements/EditCustomers
index 47d1aa2..10b9c5b 100644
--- a/rt/html/Ticket/Elements/EditCustomers
+++ b/rt/html/Ticket/Elements/EditCustomers
@@ -29,7 +29,7 @@
<INPUT TYPE=CHECKBOX NAME="DeleteLink--<%$link->Type%>-<%$link->Target%>">
%# <& ShowLink, URI => $link->TargetURI &><br>
- <A HREF="<% $link->TargetURI->Resolver->HREF %>"><% $link->TargetURI->Resolver->AsStringLong |n %></A>
+ <A HREF="<% $link->TargetURI->Resolver->HREF %>"><% $link->TargetURI->Resolver->AsStringLong |n %>
<BR>
% }
</td>
diff --git a/rt/html/Ticket/Elements/EditDates b/rt/html/Ticket/Elements/EditDates
index a197741..8e12f25 100644
--- a/rt/html/Ticket/Elements/EditDates
+++ b/rt/html/Ticket/Elements/EditDates
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<TABLE>
<TR>
<TD class="label"><&|/l&>Starts</&>:</TD>
diff --git a/rt/html/Ticket/Elements/EditPeople b/rt/html/Ticket/Elements/EditPeople
index 055d7ba..4b2a1ac 100644
--- a/rt/html/Ticket/Elements/EditPeople
+++ b/rt/html/Ticket/Elements/EditPeople
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<TABLE>
<TR>
<TD VALIGN=TOP>
@@ -52,7 +52,7 @@
<& /Elements/SelectUsers &>
<input type=submit name="OnlySearchForPeople" value="<&|/l&>Go!</&>">
<BR>
-<&|/l&>Find groups whose</&><BR>
+<&|/l&>Find group whose</&><BR>
<& /Elements/SelectGroups &>
<input type=submit name="OnlySearchForGroup" value="<&|/l&>Go!</&>">
diff --git a/rt/html/Ticket/Elements/EditWatchers b/rt/html/Ticket/Elements/EditWatchers
index 0089932..19c884b 100644
--- a/rt/html/Ticket/Elements/EditWatchers
+++ b/rt/html/Ticket/Elements/EditWatchers
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<ul>
%# Print out a placeholder if there are none.
%if ($Members->Count == 0 ) {
@@ -52,7 +52,7 @@
%while (my $watcher=$Members->Next) {
<li>
-<INPUT TYPE=CHECKBOX NAME="Ticket-DeleteWatcher-Type-<%$Watchers->Type%>-Principal-<%$watcher->MemberId%>" value="1" UNCHECKED>
+<INPUT TYPE=CHECKBOX NAME="Ticket-DeleteWatcher-Type-<%$Watchers->Type%>-Principal-<%$watcher->MemberId%>" UNCHECKED>
%if ($watcher->MemberObj->IsUser) {
<a href="<%$RT::WebPath%>/Admin/Users/Modify.html?id=<%$watcher->MemberObj->Object->id%>">
<%$watcher->MemberObj->Object->Name%></a>
diff --git a/rt/html/Ticket/Elements/FindAttachments b/rt/html/Ticket/Elements/FindAttachments
index 017c772..a1e973f 100755
--- a/rt/html/Ticket/Elements/FindAttachments
+++ b/rt/html/Ticket/Elements/FindAttachments
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<%INIT>
my %documents;
@@ -63,14 +63,11 @@ $attachments->Join( ALIAS1 => 'main',
my $tickets = $attachments->NewAlias('Tickets');
- $attachments->Join( ALIAS1 => $transactions,
- FIELD1 => 'ObjectId',
- ALIAS2 => $tickets,
- FIELD2 => 'id' );
-
- $attachments->Limit( ALIAS => $transactions,
- FIELD => 'ObjectType',
- VALUE => 'RT::Ticket');
+$attachments->Join( ALIAS1 => $transactions,
+ FIELD1 => 'Ticket',
+ ALIAS2 => $tickets,
+ FIELD2 => 'id' );
+
if ($Tickets) {
while ($Ticket = $Tickets->Next) {
$attachments->Limit( ALIAS => $tickets,
diff --git a/rt/html/Ticket/Elements/LoadTextAttachments b/rt/html/Ticket/Elements/LoadTextAttachments
index 943568f..370371b 100755
--- a/rt/html/Ticket/Elements/LoadTextAttachments
+++ b/rt/html/Ticket/Elements/LoadTextAttachments
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<%INIT>
my $attachments = RT::Attachments->new( $session{'CurrentUser'} );
@@ -58,17 +58,11 @@ if ( $Ticket->CurrentUserHasRight('ShowTicket') ) {
my $tickets = $attachments->NewAlias('Tickets');
-
$attachments->Join( ALIAS1 => $transactions,
- FIELD1 => 'ObjectId',
+ FIELD1 => 'Ticket',
ALIAS2 => $tickets,
FIELD2 => 'id' );
- $attachments->Limit( ALIAS => $transactions,
- FIELD => 'ObjectType',
- VALUE => 'RT::Ticket');
-
-
$attachments->Limit( ALIAS => $tickets,
FIELD => 'EffectiveId',
VALUE => $Ticket->id() );
diff --git a/rt/html/Ticket/Elements/PreviewScrips b/rt/html/Ticket/Elements/PreviewScrips
index a3492b7..846c62c 100755
--- a/rt/html/Ticket/Elements/PreviewScrips
+++ b/rt/html/Ticket/Elements/PreviewScrips
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<%args>
$TicketObj => undef
@@ -95,7 +95,7 @@ my @non_recipients = $TicketObj->SquelchMailTo;
% foreach my $scrip (@{$Object->Scrips->Prepared}) {
% next unless $scrip->ActionObj->Action->isa('RT::Action::SendEmail');
<b><%$scrip->Description%></b><br>
-<&|/l, loc($scrip->ConditionObj->Name), loc($scrip->ActionObj->Name), loc($scrip->TemplateObj->Name)&>[_1] [_2] with template [_3]</&>
+<&|/l, $scrip->ConditionObj->Name, $scrip->ActionObj->Name, $scrip->TemplateObj->Name&>[_1] [_2] with template [_3]</&>
<br>
%foreach my $type qw(To Cc Bcc) {
%my @addresses = $scrip->ActionObj->Action->$type();
diff --git a/rt/html/Ticket/Elements/ShowAttachments b/rt/html/Ticket/Elements/ShowAttachments
index 82028dd..8a2a5cb 100644
--- a/rt/html/Ticket/Elements/ShowAttachments
+++ b/rt/html/Ticket/Elements/ShowAttachments
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
% if (keys %documents) {
<& /Elements/TitleBoxStart, title => loc('Attachments'),
title_class=> 'inverse',
@@ -82,12 +82,8 @@ if ($size) {
% }
<%INIT>
-
-# If we haven't been passed in an Attachments object (through the precaching mechanism)
-# then we need to find one
-$Attachments ||= $m->comp('FindAttachments', Ticket => $Ticket);
-
my %documents;
+
while ( my $attach = $Attachments->Next() ) {
next unless ($attach->Filename());
unshift( @{ $documents{ $attach->Filename } }, $attach );
diff --git a/rt/html/Ticket/Elements/ShowBasics b/rt/html/Ticket/Elements/ShowBasics
index 00ed3cc..55e923f 100644
--- a/rt/html/Ticket/Elements/ShowBasics
+++ b/rt/html/Ticket/Elements/ShowBasics
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<table>
<tr>
<td class="label"><&|/l&>Id</&>:</td>
diff --git a/rt/html/Ticket/Elements/ShowCustomFields b/rt/html/Ticket/Elements/ShowCustomFields
index eb49212..895439e 100644
--- a/rt/html/Ticket/Elements/ShowCustomFields
+++ b/rt/html/Ticket/Elements/ShowCustomFields
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,8 +42,27 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
-<& /Elements/ShowCustomFields, Object => $Ticket &>
+%# }}} END BPS TAGGED BLOCK
+<table>
+% my @entry_fields;
+% while (my $CustomField = $CustomFields->Next()) {
+% my $Values = $Ticket->CustomFieldValues($CustomField->Id);
+ <tr>
+ <td class="label"><%$CustomField->Name%>:</td>
+ <td class="value">
+% while (my $Value = $Values->Next()) {
+<%$Value->Content%><br>
+% }
+% unless ($Values->Count()) {
+<i><&|/l&>(no value)</&></i>
+% }
+ </td>
+ </tr>
+% }
+</table>
+<%INIT>
+my $CustomFields = $Ticket->QueueObj->CustomFields();
+</%INIT>
<%ARGS>
$Ticket => undef
</%ARGS>
diff --git a/rt/html/Ticket/Elements/ShowCustomers b/rt/html/Ticket/Elements/ShowCustomers
index 612727e..5519d24 100644
--- a/rt/html/Ticket/Elements/ShowCustomers
+++ b/rt/html/Ticket/Elements/ShowCustomers
@@ -21,7 +21,7 @@
% my $cust_main = '';
<tr>
<td class="value">
- <A HREF="<% $customerURI->Resolver->HREF %>"><% $customerURI->Resolver->AsStringLong |n %></A>
+ <A HREF="<% $customerURI->Resolver->HREF %>"><% $customerURI->Resolver->AsStringLong |n %>
</td>
</tr>
% }
diff --git a/rt/html/Ticket/Elements/ShowDates b/rt/html/Ticket/Elements/ShowDates
index 2ccbb3f..a22a02d 100644
--- a/rt/html/Ticket/Elements/ShowDates
+++ b/rt/html/Ticket/Elements/ShowDates
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<TABLE>
<TR>
<TD class="label"><&|/l&>Created</&>:</TD>
diff --git a/rt/html/Ticket/Elements/ShowDependencies b/rt/html/Ticket/Elements/ShowDependencies
index f276bc9..d3bdd59 100644
--- a/rt/html/Ticket/Elements/ShowDependencies
+++ b/rt/html/Ticket/Elements/ShowDependencies
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<&|/l&>Depends on</&>:<BR>
% while (my $Link = $Ticket->DependsOn->Next) {
% my $member = $Link->TargetObj;
diff --git a/rt/html/Ticket/Elements/ShowGroupMembers b/rt/html/Ticket/Elements/ShowGroupMembers
index 1fdb79a..1d6e711 100644
--- a/rt/html/Ticket/Elements/ShowGroupMembers
+++ b/rt/html/Ticket/Elements/ShowGroupMembers
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
%# Released under the terms of version 2 of the GNU Public License
% my $UserMembers = $Group->UserMembersObj;
diff --git a/rt/html/Ticket/Elements/ShowHistory b/rt/html/Ticket/Elements/ShowHistory
index 75e3477..37b670d 100644
--- a/rt/html/Ticket/Elements/ShowHistory
+++ b/rt/html/Ticket/Elements/ShowHistory
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<%perl>
if ($ShowDisplayModes or $ShowTitle) {
my $title;
@@ -104,8 +104,8 @@ while ( my $Transaction = $Transactions->Next ) {
$m->comp( 'ShowTransaction',
%ARGS,
- AttachPath => $AttachPath,
- UpdatePath => $UpdatePath,
+ AttachPath => $AttachPath,
+ UpdatePath => $UpdatePath,
Ticket => $Ticket,
Transaction => $Transaction,
ShowHeaders => $ShowHeaders,
@@ -116,10 +116,6 @@ while ( my $Transaction = $Transactions->Next ) {
AttachmentContent => $trans_content,
LastTransaction => $Transactions->IsLast
);
-
-# manually flush the content buffer after each txn, so the user sees
-# some update
-$m->flush_buffer();
}
</%perl>
@@ -131,7 +127,9 @@ $m->flush_buffer();
my $Transactions = new RT::Transactions($session{'CurrentUser'});
if ($Tickets) {
while (my $t = $Tickets->Next) {
- $Transactions->LimitToTicket($t->id);
+ $Transactions->Limit(FIELD => 'Ticket',
+ OPERATOR => '=',
+ VALUE => $t->Id);
}
} else {
$Transactions = $Ticket->Transactions;
@@ -155,4 +153,5 @@ $ShowDisplayModes => 1
$ShowTitleBarCommands => 1
$AttachPath => $RT::WebPath."/Ticket/Attachment"
$UpdatePath => $RT::WebPath."/Ticket/Update.html"
+
</%ARGS>
diff --git a/rt/html/Ticket/Elements/ShowMemberOf b/rt/html/Ticket/Elements/ShowMemberOf
index e443132..eb285d3 100644
--- a/rt/html/Ticket/Elements/ShowMemberOf
+++ b/rt/html/Ticket/Elements/ShowMemberOf
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,11 +42,11 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<UL>
% my $memberof = $Ticket->MemberOf;
% while (my $member_of = $memberof->Next) {
-<LI><a href="<%$RT::WebPath%>/Ticket/Display.html?id=<%$member_of->Id%>"><%$member_of->Id%></a>: <%$member_of->Subject%> [<%$member_of->Status%>]
+<LI><a href="/Ticket/Display.html?id=<%$member_of->Id%>"><%$member_of->Id%></a>: <%$member_of->Subject%> [<%$member_of->Status%>]
% }
</UL>
diff --git a/rt/html/Ticket/Elements/ShowMembers b/rt/html/Ticket/Elements/ShowMembers
index f4fec1c..9802e89 100644
--- a/rt/html/Ticket/Elements/ShowMembers
+++ b/rt/html/Ticket/Elements/ShowMembers
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
% if ($members->Count) {
<UL>
% while (my $link = $members->Next) {
diff --git a/rt/html/Ticket/Elements/ShowMessageHeaders b/rt/html/Ticket/Elements/ShowMessageHeaders
index 8dc76ba..408b2c8 100644
--- a/rt/html/Ticket/Elements/ShowMessageHeaders
+++ b/rt/html/Ticket/Elements/ShowMessageHeaders
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
% use Data::Dumper;
<table>
% foreach my $header (@headers) {
diff --git a/rt/html/Ticket/Elements/ShowMessageStanza b/rt/html/Ticket/Elements/ShowMessageStanza
index eaf551d..8b91261 100644
--- a/rt/html/Ticket/Elements/ShowMessageStanza
+++ b/rt/html/Ticket/Elements/ShowMessageStanza
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
% if (ref($Message)) {
<font color="<%$colors[$Depth]%>">
<%perl>
@@ -57,7 +57,7 @@ foreach my $stanza (@$Message) {
my $content = $stanza->{raw};
RT::Interface::Web::EscapeUTF8(\$content);
$m->comp('/Elements/Callback', content => \$content, %ARGS);
- $content =~ s/\n/<br>/gi if defined $content;
+ $content =~ s/\n/<br>/gi;
</%perl>
<%$content |n%><br>
diff --git a/rt/html/Ticket/Elements/ShowPeople b/rt/html/Ticket/Elements/ShowPeople
index dbec939..597a991 100644
--- a/rt/html/Ticket/Elements/ShowPeople
+++ b/rt/html/Ticket/Elements/ShowPeople
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,11 +42,11 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<table>
<tr>
<td class="label"><&|/l&>Owner</&>:</td>
- <td class="value"><& ShowUserEntry, User => $Ticket->OwnerObj &></td>
+ <td class="value"><%$Ticket->OwnerObj->Name%></td>
</tr>
<tr>
<td class="labeltop"><&|/l&>Requestors</&>:</td>
diff --git a/rt/html/Ticket/Elements/ShowReferences b/rt/html/Ticket/Elements/ShowReferences
index bb323f6..e3639d0 100644
--- a/rt/html/Ticket/Elements/ShowReferences
+++ b/rt/html/Ticket/Elements/ShowReferences
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,14 +42,14 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<UL>
% while (my $Link = $Ticket->RefersTo->Next) {
<LI>
% if ($Link->TargetURI->IsLocal) {
% my $member = $Link->TargetObj;
-<a href="<%$RT::WebPath%>/Ticket/Display.html?id=<%$member->Id%>"><%$member->Id%></a>: (<%$member->OwnerObj->Name%>) <%$member->Subject%> [<%$member->Status%>]<br>
+<a href="/Ticket/Display.html?id=<%$member->Id%>"><%$member->Id%></a>: (<%$member->OwnerObj->Name%>) <%$member->Subject%> [<%$member->Status%>]<br>
% } else {
<A HREF="<%$Link->TargetURI->HREF%>"><%$Link->Target%></A>
% }
@@ -61,7 +61,7 @@
<LI>
% if ($Link->BaseURI->IsLocal) {
% my $member = $Link->BaseObj;
-<a href="<%$RT::WebPath%>/Ticket/Display.html?id=<%$member->Id%>"><%$member->Id%></a>: (<%$member->OwnerObj->Name%>) <%$member->Subject%> [<%$member->Status%>]<br>
+<a href="/Ticket/Display.html?id=<%$member->Id%>"><%$member->Id%></a>: (<%$member->OwnerObj->Name%>) <%$member->Subject%> [<%$member->Status%>]<br>
% } else {
<A HREF="<%$Link->BaseURI->HREF%>"><%$Link->Base%></A>
%}
diff --git a/rt/html/Ticket/Elements/ShowRequestor b/rt/html/Ticket/Elements/ShowRequestor
index 421d38e..cb9d7a6 100644
--- a/rt/html/Ticket/Elements/ShowRequestor
+++ b/rt/html/Ticket/Elements/ShowRequestor
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<%PERL>
my $rows = 10;
my $people = $Ticket->Requestors->UserMembersObj;
@@ -73,11 +73,6 @@ $tickets->OrderBy(FIELD => 'Priority',
<LI><a href="<%$RT::WebPath%><%$DisplayPath%>?id=<%$w->id%>"><%$w->Id%>: <%$w->Subject%></a> (<%$w->Status%>)
%}
</UL>
-
-<&|/l&>Groups this user belongs to</&>:<BR>
-
-<& /Elements/ShowMemberships, UserObj => $requestor &>
-
<& /Elements/TitleBoxEnd &>
% }
diff --git a/rt/html/Ticket/Elements/ShowSummary b/rt/html/Ticket/Elements/ShowSummary
index 5a6e7e0..f3775ea 100644
--- a/rt/html/Ticket/Elements/ShowSummary
+++ b/rt/html/Ticket/Elements/ShowSummary
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<TABLE WIDTH="100%" class="ticketsummary" >
<TR>
<TD VALIGN=TOP WIDTH="50%" class="boxcontainer">
@@ -53,7 +53,7 @@
<& /Ticket/Elements/ShowBasics, Ticket => $Ticket &>
<& /Elements/TitleBoxEnd &>
<br>
-% if ($Ticket->QueueObj->TicketCustomFields->First) {
+% if ($Ticket->QueueObj->CustomFields()->First) {
<& /Elements/TitleBoxStart, title => loc('Custom Fields'),
title_href =>"$RT::WebPath/Ticket/Modify.html?id=".$Ticket->Id,
title_class=> 'inverse',
diff --git a/rt/html/Ticket/Elements/ShowTransaction b/rt/html/Ticket/Elements/ShowTransaction
index 8bf589d..f0b8326 100644
--- a/rt/html/Ticket/Elements/ShowTransaction
+++ b/rt/html/Ticket/Elements/ShowTransaction
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,9 +42,9 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<TR class="<% $RowNum%2 ? 'oddline' : 'evenline'%>" >
-<TD rowspan="2" valign="top" bgcolor="<%$bgcolor%>"><A NAME="txn-<%$Transaction->Id%>" href="<% $DisplayPath %>#txn-<%$Transaction->Id%>">#</A><% $LastTransaction ? '<a name="lasttrans">&nbsp;</a>' : '&nbsp;' |n %></TD>
+<TD rowspan="2" valign="top" bgcolor="<%$bgcolor%>"><A NAME="txn-<%$Transaction->Id%>" href="#txn-<%$Transaction->Id%>">#</A><% $LastTransaction ? '<a name="lasttrans">&nbsp;</a>' : '&nbsp;' |n %></TD>
<TD>&nbsp&nbsp;</TD>
<TD><font size=-2><% $transdate|n %></font>&nbsp;</TD>
% my $desc = $Transaction->BriefDescription;
@@ -56,9 +56,6 @@
<TD ALIGN="RIGHT"><font size=-1><%$titlebar_commands|n%></font></TD>
</TR>
<TR class="<% $RowNum%2 ? 'oddline' : 'evenline'%>"><TD colspan=5>
-% if ($Transaction->CustomFieldValues->Count) {
-<& /Elements/ShowCustomFields, Object => $Transaction &>
-% }
% $m->comp('ShowTransactionAttachments', %ARGS, Parent => 0) unless ($Collapsed ||!$ShowBody);
</TD>
</TR>
@@ -70,7 +67,6 @@ $ShowHeaders => 0
$Collapsed => undef
$ShowTitleBarCommands => 1
$RowNum => 1
-$DisplayPath => $RT::WebPath."/Ticket/Display.html?id=".$Ticket->id
$AttachPath => $RT::WebPath."/Ticket/Attachment"
$UpdatePath => $RT::WebPath."/Ticket/Update.html"
$EmailRecordPath => $RT::WebPath."/Ticket/ShowEmailRecord.html"
@@ -118,7 +114,6 @@ else {
if ( $Ticket->Id != $Transaction->Ticket ) {
$TicketString = "Ticket " . $Transaction->Ticket . ": ";
}
-$TicketString ||= '';
if ( $Transaction->TimeTaken != 0 ) {
$TimeTaken = $Transaction->TimeTaken . " min";
diff --git a/rt/html/Ticket/Elements/ShowTransactionAttachments b/rt/html/Ticket/Elements/ShowTransactionAttachments
index 8dabff4..b01586d 100644
--- a/rt/html/Ticket/Elements/ShowTransactionAttachments
+++ b/rt/html/Ticket/Elements/ShowTransactionAttachments
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<%perl>
# Find all the attachments which have parent $Parent
# For each of these attachments
@@ -79,24 +79,21 @@ foreach my $message ( grep { $_->Parent == $Parent } @$Attachments ) {
}
</%PERL>
-<A HREF="<%$AttachPath%>/<%$Transaction->Id%>/<%$message->Id%>/<%$message->Filename | u%>"><&|/l&>Download</&> <%$message->Filename || loc('(untitled)') %></a>
+<A HREF="<%$AttachPath%>/<%$Transaction->Id%>/<%$message->Id%>/<%$message->Filename | u%>"><&|/l&>Download</&><%$message->Filename || loc('(untitled)') %></a>
<div class="downloadcontenttype">
<%$message->ContentType%> <% $size %>
</div>
</div>
-% }
+%}
+
% # }}}
<div class="messagebody">
<%perl>
-# {{{ if it has a content-disposition: attachment, don't show inline
-unless ( $message->GetHeader('Content-Disposition') =~ /attachment/i ) {
-
+# {{{ if it's got content-disposition inline, show it inline
my $content;
# If it's text
- if ( $message->ContentType =~ m{^(text|message)}i
- && $size <= $RT::MaxInlineBody )
- {
+ if ( $message->ContentType =~ m{^(text|message)}i ) {
if (
@@ -130,7 +127,7 @@ unless ( $message->GetHeader('Content-Disposition') =~ /attachment/i ) {
if ( $message->ContentType =~ m{^text/(?:html|enriched)$}i ) {
$content =
$m->comp( '/Elements/ScrubHTML', Content => $content );
- $m->out($content);
+ $m->out( $content );
}
# if it's a text/plain show the body
@@ -149,24 +146,22 @@ unless ( $message->GetHeader('Content-Disposition') =~ /attachment/i ) {
}
}
+ # if it's an image, show it as an image
+ elsif ( $message->ContentType =~ /^image\//i ) {
+ $m->out('<img src="'
+ . $AttachPath . '/'
+ . $Transaction->Id . '/'
+ . $message->Id
+ . '/">' );
+ }
- # if it's an image, show it as an image
- elsif ( $message->ContentType =~ /^image\//i ) {
- $m->out('<img src="'
- . $AttachPath . '/'
- . $Transaction->Id . '/'
- . $message->Id
- . '/">' );
- }
-}
-# }}}
+ # }}}
+
+ $m->comp( 'ShowTransactionAttachments', %ARGS,
+ Parent => $message->id,
+ ParentObj => $message );
-$m->comp(
- 'ShowTransactionAttachments', %ARGS,
- Parent => $message->id,
- ParentObj => $message
-);
}
</%PERL>
diff --git a/rt/html/Ticket/Elements/ShowUserEntry b/rt/html/Ticket/Elements/ShowUserEntry
index 163bcbd..38473ff 100644
--- a/rt/html/Ticket/Elements/ShowUserEntry
+++ b/rt/html/Ticket/Elements/ShowUserEntry
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
%# Released under the terms of version 2 of the GNU Public License
<%$User->Name%>
diff --git a/rt/html/Ticket/Elements/Tabs b/rt/html/Ticket/Elements/Tabs
index 46e1d4a..64fa131 100644
--- a/rt/html/Ticket/Elements/Tabs
+++ b/rt/html/Ticket/Elements/Tabs
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<& /Elements/Callback, Ticket => $Ticket, actions=> $actions, tabs => $tabs, %ARGS &>
<& /Elements/Tabs,
tabs => $tabs,
@@ -123,7 +123,7 @@ my $ticket_page_tabs = {
path => "Ticket/ModifyCustomers.html?id=" . $id, },
_F => { title => loc('Jumbo'),
path => "Ticket/ModifyAll.html?id=" . $id,
- separator => 1
+ seperator => 1
},
};
@@ -189,7 +189,6 @@ my $args = "?" . $m->comp(
Order => $ARGS{'Order'} || $session{'CurrentSearchHash'}->{'Order'},
Rows => $ARGS{'Rows'},
) if ($ARGS{'Query'} or $session{'CurrentSearchHash'}->{'Query'});
-$args ||= '';
$tabs->{"f"} = { path => "Search/Build.html?NewQuery=1",
title => loc('New Query')};
@@ -214,7 +213,7 @@ if (defined $session{'tickets'} and $session{'tickets'}->Count) {
<%ARGS>
$Ticket => undef
$subtabs => undef
-$current_tab => ''
-$current_subtab => ''
+$current_tab => undef
+$current_subtab => undef
$Title => undef
</%ARGS>
diff --git a/rt/html/Ticket/History.html b/rt/html/Ticket/History.html
index a80cd00..faa6a29 100644
--- a/rt/html/Ticket/History.html
+++ b/rt/html/Ticket/History.html
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<& /Elements/Header, Title => loc("Ticket History # [_1] [_2]", $Ticket->Id, $Ticket->Subject) &>
<& /Ticket/Elements/Tabs,
Ticket => $Ticket, current_tab => 'Ticket/History.html?id='.$Ticket->id,
diff --git a/rt/html/Ticket/Modify.html b/rt/html/Ticket/Modify.html
index a6c3161..f567ff2 100644
--- a/rt/html/Ticket/Modify.html
+++ b/rt/html/Ticket/Modify.html
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,14 +42,14 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<& /Elements/Header, Title => loc('Modify ticket #[_1]', $TicketObj->Id) &>
<& /Ticket/Elements/Tabs,
Ticket => $TicketObj, current_subtab => "Ticket/Modify.html?id=".$TicketObj->Id,
Title => loc('Modify ticket #[_1]', $TicketObj->Id) &>
<& /Elements/ListActions, actions => \@results &>
-<FORM METHOD=POST ACTION="Modify.html" ENCTYPE="multipart/form-data">
+<FORM METHOD=POST ACTION="Modify.html">
<INPUT TYPE=HIDDEN NAME=id VALUE="<%$TicketObj->Id%>">
<& /Elements/TitleBoxStart, title => loc('Modify ticket #[_1]',$TicketObj->Id), color=> "#993333", width => "100%" &>
@@ -62,13 +62,13 @@
<%INIT>
my $TicketObj = LoadTicket($id);
-my $CustomFields = $TicketObj->QueueObj->TicketCustomFields();
+my $CustomFields = $TicketObj->QueueObj->CustomFields();
# Now let callbacks have a chance at editing %ARGS
$m->comp('/Elements/Callback', TicketObj => $TicketObj, CustomFields => $CustomFields, %ARGS);
my @results = ProcessTicketBasics(TicketObj => $TicketObj, ARGSRef => \%ARGS);
-my @cf_results = ProcessObjectCustomFieldUpdates(Object => $TicketObj, ARGSRef => \%ARGS);
+my @cf_results = ProcessTicketCustomFieldUpdates(TicketObj => $TicketObj, ARGSRef => \%ARGS);
push (@results, @cf_results);
# TODO: display the results, even if we can't display the ticket
diff --git a/rt/html/Ticket/ModifyAll.html b/rt/html/Ticket/ModifyAll.html
index 23cd935..f78cddc 100644
--- a/rt/html/Ticket/ModifyAll.html
+++ b/rt/html/Ticket/ModifyAll.html
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<& /Elements/Header, Title => loc("Ticket #[_1] Jumbo update: [_2]", $Ticket->Id, $Ticket->Subject) &>
<& /Ticket/Elements/Tabs,
Ticket => $Ticket,
@@ -100,17 +100,6 @@
<td class="label"><&|/l&>Subject</&>:</td>
<td class="entry"><input name="UpdateSubject" size=60 value="<%$Ticket->Subject%>"></td>
</tr>
-% if (my $TxnCFs = $Ticket->TransactionCustomFields) {
-% while (my $CF = $TxnCFs->Next()) {
-<TR>
-<TD class="label"><% $CF->Name %>:</TD>
-<TD class="entry"><& /Elements/EditCustomField,
- CustomField => $CF,
- NamePrefix => "Object-RT::Transaction--CustomField-"
- &><em><% $CF->FriendlyType %></em></TD>
-</TD></TR>
-% } # end if while
-% } # end of if
<tr>
<td class="label"><&|/l&>Attach</&>:</td>
<td class="entry"><input name="UpdateAttachment" type=file></td>
@@ -123,9 +112,7 @@
<& /Elements/TitleBoxEnd &>
-<& /Elements/Submit,
- Label => loc('Save Changes'),
- Caption => loc("If you've updated anything above, be sure to"), color => "#333399" &>
+<& /Elements/Submit, Label => loc('Save Changes'), Caption => loc("If you've updated anything above, be sure to"), color => "#333399" &>
</form>
<%INIT>
@@ -149,7 +136,8 @@ my (@wresults, @results, @dresults, @lresults, @cf_results);
unless ($OnlySearchForPeople) {
@wresults = ProcessTicketWatchers( TicketObj => $Ticket, ARGSRef => \%ARGS);
- @cf_results = ProcessObjectCustomFieldUpdates( Object => $Ticket, ARGSRef => \%ARGS);
+ @results = ProcessTicketBasics( TicketObj => $Ticket, ARGSRef => \%ARGS);
+ @cf_results = ProcessTicketCustomFieldUpdates( TicketObj => $Ticket, ARGSRef => \%ARGS);
@dresults = ProcessTicketDates( TicketObj => $Ticket, ARGSRef => \%ARGS);
@lresults = ProcessTicketLinks( TicketObj => $Ticket, ARGSRef => \%ARGS);
@@ -171,11 +159,15 @@ unless ($OnlySearchForPeople) {
$ARGS{'UpdateContent'} =~ s/\r+\n/\n/g;
- if ($ARGS{'UpdateAttachments'} || ( $ARGS{'UpdateContent'} && $ARGS{'UpdateContent'} ne "-- \n" .
- $session{'CurrentUser'}->UserObj->Signature)) {
- ProcessUpdateMessage(TicketObj => $Ticket, ARGSRef=>\%ARGS, Actions=>\@results);
+ if ($ARGS{'UpdateAttachments'} || (
+ $ARGS{'UpdateContent'} &&
+ $ARGS{'UpdateContent'} ne "-- \n" .
+ $session{'CurrentUser'}->UserObj->Signature
+ )) {
+ ProcessUpdateMessage(TicketObj => $Ticket,
+ ARGSRef=>\%ARGS,
+ Actions=>\@results);
}
- @results = ProcessTicketBasics( TicketObj => $Ticket, ARGSRef => \%ARGS);
}
push @results, @wresults;
push @results, @dresults;
diff --git a/rt/html/Ticket/ModifyDates.html b/rt/html/Ticket/ModifyDates.html
index a4f68f2..bf4bc79 100644
--- a/rt/html/Ticket/ModifyDates.html
+++ b/rt/html/Ticket/ModifyDates.html
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<& /Elements/Header, Title => loc('Modify dates for #[_1]', $TicketObj->Id) &>
<& /Ticket/Elements/Tabs,
Ticket => $TicketObj,
diff --git a/rt/html/Ticket/ModifyLinks.html b/rt/html/Ticket/ModifyLinks.html
index 150597d..05d369d 100644
--- a/rt/html/Ticket/ModifyLinks.html
+++ b/rt/html/Ticket/ModifyLinks.html
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<& /Elements/Header, Title => loc("Link ticket #[_1]", $Ticket->Id) &>
<& /Ticket/Elements/Tabs,
Ticket => $Ticket,
diff --git a/rt/html/Ticket/ModifyPeople.html b/rt/html/Ticket/ModifyPeople.html
index 61cbe6c..dde2d29 100644
--- a/rt/html/Ticket/ModifyPeople.html
+++ b/rt/html/Ticket/ModifyPeople.html
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<& /Elements/Header, Title => loc('Modify people related to ticket #[_1]', $Ticket->id) &>
<& /Ticket/Elements/Tabs,
Ticket => $Ticket,
diff --git a/rt/html/Ticket/ShowEmailRecord.html b/rt/html/Ticket/ShowEmailRecord.html
index 38eddd3..23eb6d5 100644
--- a/rt/html/Ticket/ShowEmailRecord.html
+++ b/rt/html/Ticket/ShowEmailRecord.html
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<%args>
$Attachment => undef
$Transaction => undef
diff --git a/rt/html/Ticket/Update.html b/rt/html/Ticket/Update.html
index df739c9..e26d988 100644
--- a/rt/html/Ticket/Update.html
+++ b/rt/html/Ticket/Update.html
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<& /Elements/Header, Title => $title &>
<& /Ticket/Elements/Tabs,
Ticket => $TicketObj,
@@ -58,7 +58,7 @@
<tr><td align=right><&|/l&>Status</&>:</td>
<td>
-<& /Elements/SelectStatus, Name=>"Status", DefaultLabel => loc("[_1] (Unchanged)", loc($TicketObj->Status)), Default => $ARGS{'Status'} || ($TicketObj->Status eq $DefaultStatus ? undef : $DefaultStatus)&>
+<& /Elements/SelectStatus, Name=>"Status", DefaultLabel => loc("[_1] (Unchanged)", $TicketObj->Status), Default => $ARGS{'Status'} || ($TicketObj->Status eq $DefaultStatus ? undef : $DefaultStatus)&>
<&|/l&>Owner</&>:
<& /Elements/SelectOwner, Name=>"Owner", DefaultLabel => loc("[_1] (Unchanged)", $TicketObj->OwnerObj->Name()), QueueObj => $TicketObj->QueueObj, TicketObj => $TicketObj, Default => $ARGS{'Owner'} &>
<&|/l&>Worked</&>: <input size=4 name="UpdateTimeWorked" value="<% $ARGS{UpdateTimeWorked}%>"> <&|/l&>minutes</&></td></tr>
@@ -94,33 +94,19 @@ value="<% $ARGS{UpdateCc} %>"><BR>
<TD COLSPAN=5>
<&|/l&>Check box to delete</&><BR>
% foreach my $attach_name (keys %{$session{'Attachments'}}) {
-<input type="checkbox" name="DeleteAttach-<%$attach_name%>" value="1"><%$attach_name%><BR>
+<input type="checkbox" name="DeleteAttach-<%$attach_name%>"><%$attach_name%><BR>
% } # end of foreach
</TD>
</TR>
<TR>
% } # end of if
-
-% if (my $TxnCFs = $TicketObj->TransactionCustomFields) {
-% while (my $CF = $TxnCFs->Next()) {
-<TR>
-<TD ALIGN=RIGHT><% $CF->Name %>:</TD>
-<TD><& /Elements/EditCustomField, CustomField => $CF, NamePrefix =>
- "Object-RT::Transaction--CustomField-" &><em><% $CF->FriendlyType %></em></TD>
-</TR>
-% } # end if while
-% } # end of if
-
<tr><td align=right><&|/l&>Attach</&>:</td><td><input name="Attach" type="file"><INPUT TYPE=SUBMIT NAME="AddMoreAttach" VALUE="<&|/l&>Add More Files</&>"><input type="hidden" name="UpdateAttach" value="1">
</td></tr>
<tr><td align="right" valign="top"><&|/l&>Message</&>:</td><td>
<& /Elements/Callback, _CallbackName => 'BeforeMessageBox', %ARGS &>
% if (exists $ARGS{UpdateContent}) {
-% # preserve QuoteTransaction so we can use it to set up sane references/in/reply to
-% my $temp = $ARGS{'QuoteTransaction'};
% delete $ARGS{'QuoteTransaction'};
<& /Elements/MessageBox, Name=>"UpdateContent", Default=>$ARGS{UpdateContent}, IncludeSignature => 0, %ARGS&>
-% $ARGS{'QuoteTransaction'} = $temp;
% } else {
<& /Elements/MessageBox, Name=>"UpdateContent", %ARGS &>
% }
@@ -136,6 +122,7 @@ value="<% $ARGS{UpdateCc} %>"><BR>
% }
</FORM>
<%INIT>
+
my $CanRespond = 0;
my $CanComment = 0;
my $title;
@@ -181,7 +168,6 @@ foreach my $key (keys %ARGS) {
}
$session{'Attachments'} = { %{$session{'Attachments'} || {}} };
}
-# }}}
# {{{ store the uploaded attachment in session
if ($ARGS{'Attach'}) { # attachment?
@@ -194,7 +180,7 @@ if ($ARGS{'Attach'}) { # attachment?
$subject =~ s#^.*[\\/]##;
my $attachment = MakeMIMEEntity(
- Filename => $subject,
+ Subject => $subject,
Body => "",
AttachmentFieldName => 'Attach'
);
@@ -214,7 +200,6 @@ if ( exists $ARGS{SubmitTicket} ) {
$m->comp('Display.html', TicketObj => $TicketObj, %ARGS);
return;
}
-
</%INIT>
<%ARGS>
diff --git a/rt/html/Tools/Elements/Tabs b/rt/html/Tools/Elements/Tabs
index fc4153b..39321f1 100644
--- a/rt/html/Tools/Elements/Tabs
+++ b/rt/html/Tools/Elements/Tabs
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<& /Elements/Tabs,
tabs => $tabs,
current_toptab => 'Tools/Offline.html',
diff --git a/rt/html/Tools/MyDay.html b/rt/html/Tools/MyDay.html
index a20209c..3fe2eda 100644
--- a/rt/html/Tools/MyDay.html
+++ b/rt/html/Tools/MyDay.html
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<& /Elements/Header, title => "What I did today" &>
(displaying new and open tickets for <%$session{'CurrentUser'}->Name%>)
<FORM METHOD=POST ACTION="MyDay.html">
@@ -62,7 +62,7 @@ HREF="<%$RT::WebPath%>/Ticket/Display.html?id=<%$Ticket->Id%>"><%$Ticket->Id%>:
cols=60></textarea></TD></TR>
<TR <%$class|n%>>
<TD><SPAN CLASS="label">Status:</SPAN> <& /Elements/SelectStatus, Name=> 'UpdateStatus-'.$Ticket->Id,
- DefaultLabel => loc("[_1] (Unchanged)",loc($Ticket->Status())) &></TD>
+ DefaultLabel => loc("[_1] (Unchanged)",$Ticket->Status()) &></TD>
</TR>
% }
diff --git a/rt/html/Tools/Offline.html b/rt/html/Tools/Offline.html
index 8b12784..0879c94 100644
--- a/rt/html/Tools/Offline.html
+++ b/rt/html/Tools/Offline.html
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<& /Elements/Header, Title => loc("Offline upload") &>
<& Elements/Tabs,
current_tab => "Tools/Offline.html",
diff --git a/rt/html/User/Delegation.html b/rt/html/User/Delegation.html
index 3347fda..47a5d13 100644
--- a/rt/html/User/Delegation.html
+++ b/rt/html/User/Delegation.html
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<& /Elements/Header, Title => loc("Delegate rights") &>
<& /User/Elements/Tabs,
current_tab => 'User/Delegation.html',
diff --git a/rt/html/User/Elements/DelegateRights b/rt/html/User/Elements/DelegateRights
index 79ecb59..112f3f6 100644
--- a/rt/html/User/Elements/DelegateRights
+++ b/rt/html/User/Elements/DelegateRights
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<h2><%$sectionheading%></h2>
<%perl>
@@ -81,7 +81,7 @@ while ( my $delegation = $delegations->Next) {
</td>
% while (my $pg = $personalgroups->Next) {
<td align=center>
- <input name="Delegate-ACE-<% $right->Id %>-to-<% $pg->PrincipalId%>" type=checkbox value="1" <%$ del_hash->{$pg->PrincipalId} && 'CHECKED' %>>
+ <input name="Delegate-ACE-<% $right->Id %>-to-<% $pg->PrincipalId%>" type=checkbox <%$ del_hash->{$pg->PrincipalId} && 'CHECKED' %>>
% if ( $del_hash->{$pg->PrincipalId}) {
<input type=hidden name="Delegate-Existing-ACE-<% $right->Id %>-to-<% $pg->PrincipalId%>-as-<%$del_hash->{$pg->PrincipalId}->Id%>">
% }
diff --git a/rt/html/User/Elements/GroupTabs b/rt/html/User/Elements/GroupTabs
index 2e79df2..26d8e85 100644
--- a/rt/html/User/Elements/GroupTabs
+++ b/rt/html/User/Elements/GroupTabs
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<& /User/Elements/Tabs,
subtabs => $tabs,
current_tab => 'User/Groups/',
diff --git a/rt/html/User/Elements/Tabs b/rt/html/User/Elements/Tabs
index 1d25fb9..6411be6 100644
--- a/rt/html/User/Elements/Tabs
+++ b/rt/html/User/Elements/Tabs
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<& /Elements/Tabs,
tabs => $tabs,
current_toptab => 'User/Prefs.html',
diff --git a/rt/html/User/Groups/Members.html b/rt/html/User/Groups/Members.html
index 2068e5a..0b133b3 100644
--- a/rt/html/User/Groups/Members.html
+++ b/rt/html/User/Groups/Members.html
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<& /Elements/Header, Title => $title &>
<& /User/Elements/GroupTabs,
GroupObj => $Group,
@@ -81,7 +81,7 @@
% $UserMembers->LimitToUsers();
<UL>
% while (my $member = $UserMembers->Next()) {
-<LI><INPUT TYPE=CHECKBOX Name="DeleteMember-<%$member->MemberId%>" value="1">
+<LI><INPUT TYPE=CHECKBOX Name="DeleteMember-<%$member->MemberId%>">
<%$member->MemberObj->Object->Name%> (<%$member->MemberObj->Object->RealName%>)
% }
</ul>
@@ -90,7 +90,7 @@
% my $GroupMembers = $Group->MembersObj;
% $GroupMembers->LimitToGroups();
% while (my $member = $GroupMembers->Next()) {
-<LI><INPUT TYPE=CHECKBOX Name="DeleteMember-<%$member->MemberId%>" value="1">
+<LI><INPUT TYPE=CHECKBOX Name="DeleteMember-<%$member->MemberId%>">
<%$member->MemberObj->Object->Name%>
% }
% }
diff --git a/rt/html/User/Groups/Modify.html b/rt/html/User/Groups/Modify.html
index c0e9ce5..e744e10 100644
--- a/rt/html/User/Groups/Modify.html
+++ b/rt/html/User/Groups/Modify.html
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<& /Elements/Header, Title => $title &>
<& /User/Elements/GroupTabs,
@@ -74,7 +74,7 @@
<INPUT TYPE=CHECKBOX NAME="Enabled" VALUE="1" <%$EnabledChecked%>> <&|/l&>Enabled (Unchecking this box disables this group)</&><BR>
</TR>
</TABLE>
-<& /Elements/Submit, Label => loc('Save Changes'), Reset => 1 &>
+<& /Elements/Submit, Label => loc('Create'), Reset => 1 &>
</form>
<%INIT>
diff --git a/rt/html/User/Groups/index.html b/rt/html/User/Groups/index.html
index 6d2e15d..d4fa7df 100644
--- a/rt/html/User/Groups/index.html
+++ b/rt/html/User/Groups/index.html
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<& /Elements/Header, Title => $title &>
<& /User/Elements/GroupTabs,
current_subtab => 'User/Groups/index.html',
diff --git a/rt/html/User/Prefs.html b/rt/html/User/Prefs.html
index f1c7558..b5aa13d 100644
--- a/rt/html/User/Prefs.html
+++ b/rt/html/User/Prefs.html
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<& /Elements/Header, Title=>loc("Preferences") &>
<& /User/Elements/Tabs,
current_tab => 'User/Prefs.html',
@@ -165,7 +165,7 @@
%if ($UserObj->Privileged) {
<BR>
<& /Elements/TitleBoxStart, title => loc('Signature') &>
-<TEXTAREA COLS=80 ROWS=5 name="Signature" class="signature" WRAP=HARD>
+<TEXTAREA COLS=80 ROWS=5 name="Signature" WRAP=HARD>
<%$UserObj->Signature%></TEXTAREA>
<& /Elements/TitleBoxEnd &>
% }
@@ -210,10 +210,9 @@ if ($UserObj->Id) {
Object => $UserObj,
ARGSRef => \%ARGS );
if ($Lang) {
- $session{'CurrentUser'}->LanguageHandle($Lang);
- $session{'CurrentUser'} = $session{'CurrentUser'}; # force writeback
+ $session{'CurrentUser'}->LanguageHandle($Lang);
+ $session{'CurrentUser'}= $session{'CurrentUser'}; # Force writeback
}
-
push (@results,@fieldresults);
diff --git a/rt/html/autohandler b/rt/html/autohandler
index c854c2b..b21d261 100644
--- a/rt/html/autohandler
+++ b/rt/html/autohandler
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<%INIT>
# Roll back any dangling transactions from a previous failed connection
@@ -61,15 +61,21 @@ if ($m->request_comp->attr_exists('AutoFlush')) {
# passed just one, a scalar whatever they are, mark them as utf8
my $type = ref($_);
(!$type)
- ? Encode::is_utf8($_) ? $_ : Encode::decode(utf8 => $_, Encode::FB_PERLQQ) :
+ ? Encode::decode(utf8 => $_, Encode::FB_PERLQQ) :
($type eq 'ARRAY')
- ? [ map { (ref($_) or Encode::is_utf8($_)) ? $_ : Encode::decode(utf8 => $_, Encode::FB_PERLQQ) } @$_ ] :
+ ? [ map { ref($_) ? $_ : Encode::decode(utf8 => $_, Encode::FB_PERLQQ) } @$_ ] :
($type eq 'HASH')
- ? { map { (ref($_) or Encode::is_utf8($_)) ? $_ : Encode::decode(utf8 => $_, Encode::FB_PERLQQ) } %$_ } : $_
+ ? { map { ref($_) ? $_ : Encode::decode(utf8 => $_, Encode::FB_PERLQQ) } %$_ } : $_
} %ARGS;
-$m->{'rt_base_time'} = [Time::HiRes::gettimeofday()];
+if ($ARGS{'Debug'}) {
+ require Time::HiRes;
+ $m->{'rt_base_time'} = [Time::HiRes::gettimeofday()];
+}
+else {
+ $m->{'rt_base_time'} = time;
+}
$m->comp('/Elements/SetupSessionCookie', %ARGS);
unless ($session{'CurrentUser'} && $session{'CurrentUser'}->Id) {
@@ -163,7 +169,7 @@ elsif ( $RT::WebExternalAuth ) {
elsif ($RT::WebFallbackToInternalAuth) {
unless (defined($session{'CurrentUser'})) {
$m->comp('/Elements/Login', %ARGS,
- Error=> loc('You are not an authorized user'));
+ Error=> loc('XXX CHANGEME You are not an authorized user'));
$m->abort();
}
} else {
@@ -187,8 +193,8 @@ if (!$session{'CurrentUser'} && defined ($user) && defined ($pass) ){
if (!$session{'CurrentUser'}->id() ||
!$session{'CurrentUser'}->IsPassword($pass))
{
- delete $session{'CurrentUser'};
$RT::Logger->error("FAILED LOGIN for $user from $ENV{'REMOTE_ADDR'}");
+ delete $session{'CurrentUser'};
$m->comp('/Elements/Login', %ARGS,
Error => loc('Your username or password is incorrect'));
$m->abort();
diff --git a/rt/html/index.html b/rt/html/index.html
index 04d48ec..8c64b5a 100644
--- a/rt/html/index.html
+++ b/rt/html/index.html
@@ -24,11 +24,11 @@ If you need commercial support, please contact us at sales@bestpractical.com.
<!--
% }
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -68,7 +68,7 @@ If you need commercial support, please contact us at sales@bestpractical.com.
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<& /Elements/Header, Title=>loc("RT at a glance"), Refresh => $session{'home_refresh_interval'} &>
<& /Elements/Tabs,
current_toptab => '',
diff --git a/rt/html/l b/rt/html/l
index dbd146e..d19fbec 100644
--- a/rt/html/l
+++ b/rt/html/l
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<%init>
my $hand = ($session{'CurrentUser'} ||= RT::CurrentUser->new)->LanguageHandle;
$m->print($hand->maketext($m->content,@_));