[Rt-commit] r14146 - in rt/branches/3.999-DANGEROUS: . lib/RT/Graph share/html share/html/Dashboards share/html/Elements share/html/Ticket share/html/Ticket/Elements
sunnavy at bestpractical.com
sunnavy at bestpractical.com
Wed Jul 16 04:16:25 EDT 2008
Author: sunnavy
Date: Wed Jul 16 04:16:24 2008
New Revision: 14146
Modified:
rt/branches/3.999-DANGEROUS/ (props changed)
rt/branches/3.999-DANGEROUS/lib/RT/Graph/Tickets.pm
rt/branches/3.999-DANGEROUS/share/html/Dashboards/Modify.html
rt/branches/3.999-DANGEROUS/share/html/Dashboards/Queries.html
rt/branches/3.999-DANGEROUS/share/html/Dashboards/Render.html
rt/branches/3.999-DANGEROUS/share/html/Dashboards/Subscription.html
rt/branches/3.999-DANGEROUS/share/html/Elements/EditCustomFieldSelect
rt/branches/3.999-DANGEROUS/share/html/Elements/ShowLinks
rt/branches/3.999-DANGEROUS/share/html/Search/Elements/EditSearches
rt/branches/3.999-DANGEROUS/share/html/Ticket/Create.html
rt/branches/3.999-DANGEROUS/share/html/Ticket/Elements/ShowMessageHeaders
rt/branches/3.999-DANGEROUS/share/html/Ticket/Elements/ShowSummary
rt/branches/3.999-DANGEROUS/share/html/Ticket/Elements/ShowTransactionAttachments
rt/branches/3.999-DANGEROUS/share/html/index.html
Log:
r14506 at sunnavys-mb: sunnavy | 2008-07-16 15:12:11 +0800
go on fixing
Modified: rt/branches/3.999-DANGEROUS/lib/RT/Graph/Tickets.pm
==============================================================================
--- rt/branches/3.999-DANGEROUS/lib/RT/Graph/Tickets.pm (original)
+++ rt/branches/3.999-DANGEROUS/lib/RT/Graph/Tickets.pm Wed Jul 16 04:16:24 2008
@@ -114,7 +114,7 @@
Queue => sub { return $_[0]->queue_obj->name || $_[0]->queue },
CF => sub {
my $values = $_[0]->CustomFieldValues( $_[1] );
- return join ', ', map $_->Content, @{ $values->ItemsArrayRef };
+ return join ', ', map $_->Content, @{ $values->items_array_ref };
},
);
foreach my $field (qw(Subject Status TimeLeft TimeWorked TimeEstimated)) {
@@ -141,13 +141,13 @@
foreach my $field (qw(Members DependedOnBy ReferredToBy)) {
$property_cb{$field} = sub {
return join ', ', map $_->base_obj->id,
- @{ $_[0]->$field->ItemsArrayRef };
+ @{ $_[0]->$field->items_array_ref };
};
}
foreach my $field (qw(MemberOf DependsOn RefersTo)) {
$property_cb{$field} = sub {
return join ', ', map $_->target_obj->id,
- @{ $_[0]->$field->ItemsArrayRef };
+ @{ $_[0]->$field->items_array_ref };
};
}
Modified: rt/branches/3.999-DANGEROUS/share/html/Dashboards/Modify.html
==============================================================================
--- rt/branches/3.999-DANGEROUS/share/html/Dashboards/Modify.html (original)
+++ rt/branches/3.999-DANGEROUS/share/html/Dashboards/Modify.html Wed Jul 16 04:16:24 2008
@@ -91,7 +91,7 @@
my $Dashboard = RT::Dashboard->new(Jifty->web->current_user);
my @privacies = $Dashboard->_privacy_objects(($Create ? 'Create' : 'Modify') => 1);
-Abort(loc("Permission denied")) if @privacies == 0;
+abort(loc("Permission denied")) if @privacies == 0;
if ($Create) {
$current_subtab = 'Dashboards/Modify.html?Create=1';
@@ -107,7 +107,7 @@
);
if (!$val) {
- Abort(loc("Dashboard could not be created: [_1]", $msg));
+ abort(loc("Dashboard could not be created: [_1]", $msg));
}
push @results, $msg;
@@ -115,7 +115,7 @@
}
else {
my ($ok, $msg) = $Dashboard->LoadById($id);
- $ok || Abort($msg);
+ $ok || abort($msg);
}
if ($id) {
@@ -147,7 +147,7 @@
if (!$Create && !$tried_create && $id && $ARGS{'Delete'}) {
my ($ok, $msg) = $Dashboard->Delete();
- $ok || Abort(loc("Couldn't delete dashboard [_1]: [_2]", $id, $msg));
+ $ok || abort(loc("Couldn't delete dashboard [_1]: [_2]", $id, $msg));
# put the user back into a useful place with a message
RT::Interface::Web::redirect(RT->config->get('WebURL')."Dashboards/index.html?Deleted=$id");
Modified: rt/branches/3.999-DANGEROUS/share/html/Dashboards/Queries.html
==============================================================================
--- rt/branches/3.999-DANGEROUS/share/html/Dashboards/Queries.html (original)
+++ rt/branches/3.999-DANGEROUS/share/html/Dashboards/Queries.html Wed Jul 16 04:16:24 2008
@@ -84,7 +84,7 @@
use RT::Dashboard;
my $Dashboard = new RT::Dashboard(Jifty->web->current_user);
my ($ok, $msg) = $Dashboard->LoadById($id);
-$ok || Abort(loc("Couldn't load dashboard [_1]: [_2]", $id, $msg));
+$ok || abort(loc("Couldn't load dashboard [_1]: [_2]", $id, $msg));
my $title = loc("Modify the queries of dashboard [_1]", $Dashboard->name);
my %desc_of;
Modified: rt/branches/3.999-DANGEROUS/share/html/Dashboards/Render.html
==============================================================================
--- rt/branches/3.999-DANGEROUS/share/html/Dashboards/Render.html (original)
+++ rt/branches/3.999-DANGEROUS/share/html/Dashboards/Render.html Wed Jul 16 04:16:24 2008
@@ -80,7 +80,7 @@
use RT::Dashboard;
my $DashboardObj = RT::Dashboard->new(Jifty->web->current_user);
my ($ok, $msg) = $DashboardObj->LoadById($id);
-Abort(loc("Couldn't load dashboard [_1]: [_2]", $id, $msg)) if !$ok;
+abort(loc("Couldn't load dashboard [_1]: [_2]", $id, $msg)) if !$ok;
my $SubscriptionObj = RT::Model::Attribute->new(Jifty->web->current_user);
my $Loaded = 0;
Modified: rt/branches/3.999-DANGEROUS/share/html/Dashboards/Subscription.html
==============================================================================
--- rt/branches/3.999-DANGEROUS/share/html/Dashboards/Subscription.html (original)
+++ rt/branches/3.999-DANGEROUS/share/html/Dashboards/Subscription.html Wed Jul 16 04:16:24 2008
@@ -190,7 +190,7 @@
: $ARGS{'DashboardId'};
($val, $msg) = $DashboardObj->LoadById($DashboardId);
-$val || Abort(loc("Couldn't load dashboard [_1]: [_2].", $DashboardId, $msg));
+$val || abort(loc("Couldn't load dashboard [_1]: [_2].", $DashboardId, $msg));
my %fields = (
DashboardId => $DashboardId,
@@ -233,7 +233,7 @@
}
# create
else {
- Abort(loc("Unable to subscribe to dashboard [_1]: Permission denied", $DashboardId))
+ abort(loc("Unable to subscribe to dashboard [_1]: Permission denied", $DashboardId))
unless $DashboardObj->CurrentUserCanSubscribe;
my ($val, $msg) = $SubscriptionObj->Create(
Modified: rt/branches/3.999-DANGEROUS/share/html/Elements/EditCustomFieldSelect
==============================================================================
--- rt/branches/3.999-DANGEROUS/share/html/Elements/EditCustomFieldSelect (original)
+++ rt/branches/3.999-DANGEROUS/share/html/Elements/EditCustomFieldSelect Wed Jul 16 04:16:24 2008
@@ -85,7 +85,7 @@
% @default = grep defined && length, @Default;
% # $Values->HasEntry is too slow here
% if ( !@default && $Values ) {
-% @default = map $_->Content, @{$Values->ItemsArrayRef};
+% @default = map $_->Content, @{$Values->items_array_ref};
% }
% $_ = lc $_ foreach @Default;
% my $selected;
Modified: rt/branches/3.999-DANGEROUS/share/html/Elements/ShowLinks
==============================================================================
--- rt/branches/3.999-DANGEROUS/share/html/Elements/ShowLinks (original)
+++ rt/branches/3.999-DANGEROUS/share/html/Elements/ShowLinks Wed Jul 16 04:16:24 2008
@@ -52,18 +52,18 @@
<%PERL>
my ( @active, @inactive, @not_tickets );
-for my $link ( @{ $Ticket->depends_on->ItemsArrayRef } ) {
+for my $link ( @{ $Ticket->depends_on->items_array_ref } ) {
my $target = $link->target_obj;
if ( $target && $target->isa('RT::Model::Ticket') ) {
- if ( $target->queue_obj->IsInactiveStatus( $target->status ) ) {
- push( @inactive, $link->targetURI );
+ if ( $target->queue_obj->is_inactive_status( $target->status ) ) {
+ push( @inactive, $link->target_uri );
}
else {
- push( @active, $link->targetURI );
+ push( @active, $link->target_uri );
}
}
else {
- push( @not_tickets, $link->targetURI );
+ push( @not_tickets, $link->target_uri );
}
}
</%PERL>
@@ -129,6 +129,12 @@
</table>
<%INIT>
+my $pascal_to_camel = sub {
+ my $name = shift;
+ $name =~ s/^([A-Z])/lc $1/e;
+ $name =~ s/([A-Z])/'_' . lc $1/eg;
+ return $name;
+};
my $clone = {};
my $path
@@ -145,10 +151,11 @@
my $type = $RT::Model::Ticket::LINKTYPEMAP{$relation}->{type};
my $other = "Local" . $mode;
my $field = $mode eq 'base' ? 'new-' . $type : $type . '-new';
+ my $rel = $pascal_to_camel->( $relation );
$clone->{$field}
= $path . "&$field="
. join( '%20',
- ( map { $_->$other() } @{ $Ticket->$relation->ItemsArrayRef } ),
+ ( map { $_->$other() } @{ $Ticket->$rel->items_array_ref } ),
$Ticket->id );
}
Modified: rt/branches/3.999-DANGEROUS/share/html/Search/Elements/EditSearches
==============================================================================
--- rt/branches/3.999-DANGEROUS/share/html/Search/Elements/EditSearches (original)
+++ rt/branches/3.999-DANGEROUS/share/html/Search/Elements/EditSearches Wed Jul 16 04:16:24 2008
@@ -55,7 +55,7 @@
<&|/l&>description</&>:
<input size="25" name="saved_search_description" value="<% $description || '' %>" />
-% if ($Id ne 'new') {
+% if ($id ne 'new') {
<nobr>
% if ( $Dirty ) {
<input type="submit" class="button" name="SavedSearchRevert" value="<%_('Revert')%>" />
@@ -69,13 +69,13 @@
% if ( $object && $object->id ) {
<input type="submit" class="button" name="SavedSearchSave" value="<%_('Update')%>" />
% } else {
-}
+% }
<input type="submit" class="button" name="SavedSearchSave" value="<%_('Save')%>" />
% }
<br />
<hr />
<&|/l&>load saved search:</&>
-<& SelectSearchesForObjects, name => 'SavedSearchLoad', objects => \@objects, SearchType => $Type &>
+<& SelectSearchesForObjects, name => 'SavedSearchLoad', objects => \@objects, SearchType => $type &>
<input type="submit" value="<% _('Load') %>" class="button" />
</&>
@@ -87,7 +87,7 @@
);
my $can_modify = Jifty->web->current_user->has_right(
- Right => 'CreateSavedSearch',
+ right => 'CreateSavedSearch',
object => RT->system,
);
@@ -108,7 +108,7 @@
return 0 unless $obj && $obj->id;
foreach( @{ $arg{'SearchFields'} } ) {
- return 1 if $obj->SubValue( $_ ) ne $arg{'Query'}->{$_};
+ return 1 if $obj->sub_value( $_ ) ne $arg{'Query'}->{$_};
}
return 0;
@@ -223,7 +223,7 @@
my $privacy = $SavedSearch->{'Privacy'};
-my %params = map { $_ => $Query->{$_} } @SearchFields;
+my %params = map { $_ => $query->{$_} } @SearchFields;
my ($new_obj_type, $new_obj_id) = split(/\-/, ($privacy || ''));
if ( $obj && $obj->id ) {
Modified: rt/branches/3.999-DANGEROUS/share/html/Ticket/Create.html
==============================================================================
--- rt/branches/3.999-DANGEROUS/share/html/Ticket/Create.html (original)
+++ rt/branches/3.999-DANGEROUS/share/html/Ticket/Create.html Wed Jul 16 04:16:24 2008
@@ -326,7 +326,7 @@
$m->callback( queue_obj => $queue_obj, args_ref => \%ARGS );
-$queue_obj->disabled && Abort(loc("Cannot create tickets in a disabled queue."));
+$queue_obj->disabled && abort(loc("Cannot create tickets in a disabled queue."));
my $CFs = $queue_obj->ticket_custom_fields();
my $TxnCFs = $queue_obj->ticket_transaction_custom_fields();
Modified: rt/branches/3.999-DANGEROUS/share/html/Ticket/Elements/ShowMessageHeaders
==============================================================================
--- rt/branches/3.999-DANGEROUS/share/html/Ticket/Elements/ShowMessageHeaders (original)
+++ rt/branches/3.999-DANGEROUS/share/html/Ticket/Elements/ShowMessageHeaders Wed Jul 16 04:16:24 2008
@@ -56,7 +56,6 @@
<%INIT>
my @headers;
foreach my $field( RT->config->get('ShowBccHeader')? $Message->_split_headers : $Message->split_headers ) {
-foreach my $field( $Message->split_headers ) {
my ($tag, $value) = split /:/, $field, 2;
next unless $tag && $value;
push @headers, { Tag => $tag, value => $value };
Modified: rt/branches/3.999-DANGEROUS/share/html/Ticket/Elements/ShowSummary
==============================================================================
--- rt/branches/3.999-DANGEROUS/share/html/Ticket/Elements/ShowSummary (original)
+++ rt/branches/3.999-DANGEROUS/share/html/Ticket/Elements/ShowSummary Wed Jul 16 04:16:24 2008
@@ -74,7 +74,7 @@
% $m->callback( %ARGS, Callbackname => 'LeftColumn' );
</td>
<td valign="top" class="boxcontainer">
-% if ( RT->config->get('enableReminders') ) {
+% if ( RT->config->get('EnableReminders') ) {
<&|/Widgets/TitleBox, title => _("Reminders"),
title_href => RT->config->get('WebPath')."/Ticket/Reminders.html?id=".$Ticket->id,
class => 'ticket-info-reminders' &>
@@ -89,6 +89,7 @@
</tr>
</table>
</&>
+% }
<&| /Widgets/TitleBox, title => _("dates"),
title_href => RT->config->get('WebPath')."/Ticket/ModifyDates.html?id=".$Ticket->id,
class => 'ticket-info-dates' &>
Modified: rt/branches/3.999-DANGEROUS/share/html/Ticket/Elements/ShowTransactionAttachments
==============================================================================
--- rt/branches/3.999-DANGEROUS/share/html/Ticket/Elements/ShowTransactionAttachments (original)
+++ rt/branches/3.999-DANGEROUS/share/html/Ticket/Elements/ShowTransactionAttachments Wed Jul 16 04:16:24 2008
@@ -183,7 +183,7 @@
# If the transaction has anything attached to it at all
elsif (!$show_headers) {
- push @DisplayHeaders, 'RT-Send-Bcc' if RT->config->get('ShowBccHeader');
+ push @display_headers, 'RT-Send-Bcc' if RT->config->get('ShowBccHeader');
@display_headers = qw(To From RT-Send-Cc Cc Bcc date subject);
}
Modified: rt/branches/3.999-DANGEROUS/share/html/index.html
==============================================================================
--- rt/branches/3.999-DANGEROUS/share/html/index.html (original)
+++ rt/branches/3.999-DANGEROUS/share/html/index.html Wed Jul 16 04:16:24 2008
@@ -88,9 +88,9 @@
if ( $ARGS{'quick_create'} ) {
my $queue_obj = new RT::Model::Queue(Jifty->web->current_user);
- $queue_obj->load($ARGS{Queue}) or Abort(loc("Queue could not be loaded."));
+ $queue_obj->load($ARGS{queue}) or abort(loc("Queue could not be loaded."));
- my $CFs = $queue_obj->ticketCustomFields();
+ my $CFs = $queue_obj->ticket_custom_fields();
my $ValidCFs = $m->comp(
'/Elements/ValidateCustomFields',
@@ -100,15 +100,15 @@
if ( $ValidCFs ) {
- my ($t, $msg) = CreateTicket(
+ my ($t, $msg) = create_ticket(
queue => $ARGS{'queue'},
- Owner => $ARGS{'Owner'},
- Status => 'new',
+ owner => $ARGS{'owner'},
+ status => 'new',
# yes! it's Requestors, not Requestor
- Requestors => Jifty->web->current_user->id,
- From => Jifty->web->current_user->id,
- Content => $ARGS{'Content'},
- Subject => $ARGS{'Subject'});
+ requestors => Jifty->web->current_user->id,
+ from => Jifty->web->current_user->id,
+ content => $ARGS{'content'},
+ subject => $ARGS{'subject'});
push @results, $msg;
}
else {
More information about the Rt-commit
mailing list