[Bps-public-commit] RT-Extension-rt_cpan_org branch, rt4, updated. b170cb2f318c1acc358b27d9f561b83e3afff6a3

Thomas Sibley trs at bestpractical.com
Tue Feb 26 01:47:51 EST 2013


The branch, rt4 has been updated
       via  b170cb2f318c1acc358b27d9f561b83e3afff6a3 (commit)
       via  113af5963f32c64df469382c46339b116d243084 (commit)
       via  5f75657c88b9ba1c8a5675df62f29a503ea1d957 (commit)
       via  ac7b4b1e36e8e9f0a65dd6f61a5d694bd6408608 (commit)
      from  2fceb4c147869e456af4db531205f6e719d4e458 (commit)

Summary of changes:
 .gitignore                                         |   1 +
 .../Callbacks/rt_cpan_org/Elements/Tabs/Privileged |   5 +
 html/NoAuth/css/rt.cpan.org-3.4/main.css           |   4 -
 html/NoAuth/css/rt.cpan.org-3.5/main.css           |   7 -
 html/NoAuth/css/rt.cpan.org-web2/main.css          |   5 -
 .../css/{rt.cpan.org/main.css => rt.cpan.org.css}  |   2 +
 html/NoAuth/js/rt.cpan.org.js                      |   8 +
 html/Ticket/ModifyAll.html                         | 246 --------------------
 html/Ticket/Update.html                            | 254 ---------------------
 lib/RT/Extension/rt_cpan_org.pm                    |  28 +--
 10 files changed, 19 insertions(+), 541 deletions(-)
 create mode 100644 html/Callbacks/rt_cpan_org/Elements/Tabs/Privileged
 delete mode 100644 html/NoAuth/css/rt.cpan.org-3.4/main.css
 delete mode 100644 html/NoAuth/css/rt.cpan.org-3.5/main.css
 delete mode 100644 html/NoAuth/css/rt.cpan.org-web2/main.css
 rename html/NoAuth/css/{rt.cpan.org/main.css => rt.cpan.org.css} (98%)
 create mode 100644 html/NoAuth/js/rt.cpan.org.js
 delete mode 100644 html/Ticket/ModifyAll.html
 delete mode 100644 html/Ticket/Update.html

- Log -----------------------------------------------------------------
commit ac7b4b1e36e8e9f0a65dd6f61a5d694bd6408608
Author: Thomas Sibley <trs at bestpractical.com>
Date:   Mon Feb 25 21:48:26 2013 -0800

    No description is better than one that refers to removed code

diff --git a/lib/RT/Extension/rt_cpan_org.pm b/lib/RT/Extension/rt_cpan_org.pm
index eb6ba85..ccab495 100644
--- a/lib/RT/Extension/rt_cpan_org.pm
+++ b/lib/RT/Extension/rt_cpan_org.pm
@@ -58,26 +58,6 @@ our $VERSION = '4.0';
 
 RT::Extension::rt_cpan_org - The customizations that turn a RT into a RT for rt.cpan.org
 
-=head1 DESCRIPTION
-
-=head1 OVERLAYS AND CUSTOMIZATIONS
-
-=head2 autohandler
-
-=over 4
-
-=item * C<$goto> argument
-
-=item * C<$nossl> argument and redirect to https in some
-cases
-
-=item * rewriting Web* options depending on schema (http/https)
-
-=item * XXX: old code was disabling everything related to
-SelfService. Not sure why. Should be checked.
-
-=back
-
 =cut
 
 require RT::Config;

commit 5f75657c88b9ba1c8a5675df62f29a503ea1d957
Author: Thomas Sibley <trs at bestpractical.com>
Date:   Mon Feb 25 22:31:07 2013 -0800

    Remove custom themes and simply provide a custom style for all
    
    This is what the themes were effectively doing.

diff --git a/html/NoAuth/css/rt.cpan.org-3.4/main.css b/html/NoAuth/css/rt.cpan.org-3.4/main.css
deleted file mode 100644
index 92b44df..0000000
--- a/html/NoAuth/css/rt.cpan.org-3.4/main.css
+++ /dev/null
@@ -1,4 +0,0 @@
-
- at import url(../3.4-compat/main.css);
- at import url(../rt.cpan.org/main.css);
-
diff --git a/html/NoAuth/css/rt.cpan.org-3.5/main.css b/html/NoAuth/css/rt.cpan.org-3.5/main.css
deleted file mode 100644
index 9d4a7f1..0000000
--- a/html/NoAuth/css/rt.cpan.org-3.5/main.css
+++ /dev/null
@@ -1,7 +0,0 @@
-
- at import url(../3.5-default/main.css);
-
-body { background-color: white; }
-
- at import url(../rt.cpan.org/main.css);
-
diff --git a/html/NoAuth/css/rt.cpan.org-web2/main.css b/html/NoAuth/css/rt.cpan.org-web2/main.css
deleted file mode 100644
index c5f261c..0000000
--- a/html/NoAuth/css/rt.cpan.org-web2/main.css
+++ /dev/null
@@ -1,5 +0,0 @@
-
- at import url(../web2/main.css);
- at import url(../rt.cpan.org/main.css);
-
-a { text-decoration: underline; }
diff --git a/html/NoAuth/css/rt.cpan.org/main.css b/html/NoAuth/css/rt.cpan.org.css
similarity index 98%
rename from html/NoAuth/css/rt.cpan.org/main.css
rename to html/NoAuth/css/rt.cpan.org.css
index de0138b..d46a06a 100644
--- a/html/NoAuth/css/rt.cpan.org/main.css
+++ b/html/NoAuth/css/rt.cpan.org.css
@@ -104,3 +104,5 @@ tt {
 .contact-info {
     text-align: right;
 }
+
+a { text-decoration: underline; }
diff --git a/lib/RT/Extension/rt_cpan_org.pm b/lib/RT/Extension/rt_cpan_org.pm
index ccab495..3f6639e 100644
--- a/lib/RT/Extension/rt_cpan_org.pm
+++ b/lib/RT/Extension/rt_cpan_org.pm
@@ -60,6 +60,8 @@ RT::Extension::rt_cpan_org - The customizations that turn a RT into a RT for rt.
 
 =cut
 
+RT->AddStyleSheets("rt.cpan.org.css");
+
 require RT::Config;
 
 # There is no sense in overriding default queue for rt.cpan.org
@@ -68,11 +70,6 @@ $RT::Config::META{'DefaultQueue'}{'Overridable'} = 0;
 # We provide a custom username format; others are not useful.
 $RT::Config::META{'UsernameFormat'}{'Overridable'} = 0;
 
-# Add rt.cpan.org variants of supplied styles.
-$RT::Config::META{'WebDefaultStylesheet'}{'WidgetArguments'}{'Values'} = [
-    qw(rt.cpan.org-web2 rt.cpan.org-3.5 rt.cpan.org-3.4)
-];
-
 require RT::Interface::Web;
 package RT::Interface::Web;
 

commit 113af5963f32c64df469382c46339b116d243084
Author: Thomas Sibley <trs at bestpractical.com>
Date:   Mon Feb 25 22:24:58 2013 -0800

    Replace massive overlays by simply removing Commenting from the UI
    
    Removes Comment from the Actions menu, "private" from available
    UpdateTypes, and the per-transaction "Comment" links.
    
    RT::Ticket->Comment is already overridden to forbid comments at the API
    level.

diff --git a/html/Callbacks/rt_cpan_org/Elements/Tabs/Privileged b/html/Callbacks/rt_cpan_org/Elements/Tabs/Privileged
new file mode 100644
index 0000000..1860be0
--- /dev/null
+++ b/html/Callbacks/rt_cpan_org/Elements/Tabs/Privileged
@@ -0,0 +1,5 @@
+<%init>
+if (my $actions = PageMenu->child("actions")) {
+    $actions->delete("comment");
+}
+</%init>
diff --git a/html/NoAuth/js/rt.cpan.org.js b/html/NoAuth/js/rt.cpan.org.js
new file mode 100644
index 0000000..05ca60f
--- /dev/null
+++ b/html/NoAuth/js/rt.cpan.org.js
@@ -0,0 +1,8 @@
+jQuery(function(){
+    jQuery("select[name=UpdateType] option[value=private]").remove();
+    jQuery("#ticket-history a.comment-link").each(function(){
+        var parent = this.parentNode;
+        parent.removeChild(this);
+        parent.innerHTML = parent.innerHTML.replace(/\[\]/,"");
+    });
+});
diff --git a/html/Ticket/ModifyAll.html b/html/Ticket/ModifyAll.html
deleted file mode 100644
index 9091f19..0000000
--- a/html/Ticket/ModifyAll.html
+++ /dev/null
@@ -1,246 +0,0 @@
-%# BEGIN BPS TAGGED BLOCK {{{
-%# 
-%# COPYRIGHT:
-%# 
-%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC
-%#                                          <jesse at bestpractical.com>
-%# 
-%# (Except where explicitly superseded by other copyright notices)
-%# 
-%# 
-%# LICENSE:
-%# 
-%# This work is made available to you under the terms of Version 2 of
-%# the GNU General Public License. A copy of that license should have
-%# been provided with this software, but in any event can be snarfed
-%# from www.gnu.org.
-%# 
-%# This work is distributed in the hope that it will be useful, but
-%# WITHOUT ANY WARRANTY; without even the implied warranty of
-%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-%# General Public License for more details.
-%# 
-%# You should have received a copy of the GNU General Public License
-%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-%# 02110-1301 or visit their web page on the internet at
-%# http://www.gnu.org/copyleft/gpl.html.
-%# 
-%# 
-%# CONTRIBUTION SUBMISSION POLICY:
-%# 
-%# (The following paragraph is not intended to limit the rights granted
-%# to you to modify and distribute this software under the terms of
-%# the GNU General Public License and is only of importance to you if
-%# you choose to contribute your changes and enhancements to the
-%# community by submitting them to Best Practical Solutions, LLC.)
-%# 
-%# By intentionally submitting any modifications, corrections or
-%# derivatives to this work, or any other work intended for use with
-%# Request Tracker, to Best Practical Solutions, LLC, you confirm that
-%# you are the copyright holder for those contributions and you grant
-%# Best Practical Solutions,  LLC a nonexclusive, worldwide, irrevocable,
-%# royalty-free, perpetual, license to use, copy, create derivative
-%# works based on those contributions, and sublicense and distribute
-%# those contributions and any derivatives thereof.
-%# 
-%# END BPS TAGGED BLOCK }}}
-<& /Elements/Header, Title => loc("Ticket #[_1] Jumbo update: [_2]", $Ticket->Id, $Ticket->Subject) &>
-<& /Ticket/Elements/Tabs, 
-    Ticket => $Ticket, 
-    current_tab => "Ticket/ModifyAll.html?id=".$Ticket->Id, 
-    Title => loc("Ticket #[_1] Jumbo update: [_2]", $Ticket->Id, $Ticket->Subject) &>
-
-% $m->callback(CallbackName => 'BeforeActionList', Actions => \@results, ARGSRef => \%ARGS, Ticket => $Ticket);
-<& /Elements/ListActions, actions => \@results &>
-
-<form method="post" action="ModifyAll.html" enctype="multipart/form-data">
-% $m->callback( CallbackName => 'FormStart', ARGSRef => \%ARGS );
-<input type="hidden" class="hidden" name="id" value="<%$Ticket->Id%>" />
-
-<&| /Widgets/TitleBox, title => loc('Modify ticket # [_1]', $Ticket->Id), class=>'ticket-info-basics' &>
-<& Elements/EditBasics, TicketObj => $Ticket &>
-<& Elements/EditCustomFields, TicketObj => $Ticket &>
-</&>
-
-<br />
-
-<&| /Widgets/TitleBox, title => loc('Dates'), class=>'ticket-info-dates'&>
-<& Elements/EditDates, TicketObj => $Ticket &>
-</&>
-
-<br />
-
-
-<&| /Widgets/TitleBox, title => loc('People'), class=>'ticket-info-people' &>
-<& Elements/EditPeople, Ticket => $Ticket, UserField => $UserField, UserString => $UserString, UserOp => $UserOp, GroupString => $GroupString, GroupOp => $GroupOp, GroupField => $GroupField &>
-</&>
-
-<br />
-
-<&| /Widgets/TitleBox, title => loc('Links'), class=>'ticket-info-links' &>
-<& /Elements/EditLinks, Object => $Ticket, Merge => 1 &>
-</&>
-
-<br />
-
-<&| /Widgets/TitleBox, title => loc('Update ticket') &>
-<table>
-  <tr>
-    <td class="label"><&|/l&>Update Type</&>:</td>
-    <td class="entry">
-      <select name="UpdateType">
-% if ($CanRespond) {
-        <option value="response"><&|/l&>Reply to requestors</&></option>
-% }
-      </select> 
-    </td>
-  </tr>
-  <tr>
-    <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"><% loc($CF->Name) %>:</td>
-<td class="entry"><& /Elements/EditCustomField, 
-    CustomField => $CF, 
-    NamePrefix => "Object-RT::Transaction--CustomField-"
-    &><em><% $CF->FriendlyType %></em>
-</td></tr>
-%    } # end if while
-% } # end of if
-% if (exists $session{'Attachments'}) {
-<tr><td><&|/l&>Attached file</&>:</td>
-<td>
-<&|/l&>Check box to delete</&><br />
-% foreach my $attach_name (keys %{$session{'Attachments'}}) {
-<input type="checkbox" class="checkbox" name="DeleteAttach-<%$attach_name%>" value="1" /><%$attach_name%><br />
-% } # end of foreach
-</td>
-</tr>
-% } # end of if
-
-  <tr>
-    <td class="label"><&|/l&>Attach</&>:</td>
-    <td class="entry"><input name="Attach" type="file" />
-    <input type="submit" class="button" name="AddMoreAttach" value="<&|/l&>Add More Files</&>" />
-    <input type="hidden" class="hidden" name="UpdateAttach" value="1" /></td>
-  </tr>
-  <tr>
-    <td class="labeltop"><&|/l&>Content</&>:</td>
-    <td class="entry"><& /Elements/MessageBox, Name=>"UpdateContent", QuoteTransaction=>$ARGS{QuoteTransaction} &></td>
-  </tr>
-</table>
-</&>
-  
-
-<& /Elements/Submit, 
-    Name    => 'SubmitTicket',
-    Label   => loc('Save Changes'), 
-    Caption => loc("If you've updated anything above, be sure to"), color => "#333399" &>
-</form>
-
-<%INIT>
-
-
-
-my $Ticket = LoadTicket($id);
-my $CustomFields = $Ticket->CustomFields;
-
-# call this to show up hints of valid cf values.
-$m->comp(
-    '/Elements/ValidateCustomFields',
-    CustomFields => $CustomFields,
-    ARGSRef => {},
-);
-
-my $CanRespond = 0;
-
-$CanRespond = 1 if ( $Ticket->CurrentUserHasRight('ReplyToTicket') or
-                     $Ticket->CurrentUserHasRight('ModifyTicket') ); 
-
-# {{{ deal with deleting uploaded attachments
-foreach my $key (keys %ARGS) {
-    if ($key =~ m/^DeleteAttach-(.+)$/) {
-        delete $session{'Attachments'}{$1};
-    }
-    $session{'Attachments'} = { %{$session{'Attachments'} || {}} };
-}
-# }}}
-# {{{ store the uploaded attachment in session
-if ($ARGS{'Attach'}) {            # attachment?
-    my $attachment = MakeMIMEEntity(
-        AttachmentFieldName => 'Attach'
-    );
-
-    my $file_path = Encode::decode_utf8("$ARGS{'Attach'}");
-    $session{'Attachments'} = {
-        %{$session{'Attachments'} || {}},
-        $file_path => $attachment,
-    };
-}
-# }}}
-
-# delete temporary storage entry to make WebUI clean
-unless (keys %{$session{'Attachments'}} and $ARGS{'UpdateAttach'}) {
-    delete $session{'Attachments'};
-}
-# }}}
-
-
-$m->callback( TicketObj => $Ticket, ARGSRef => \%ARGS );
-my @results;
-
-unless ($OnlySearchForPeople or $OnlySearchForGroup or $ARGS{'AddMoreAttach'} ) {
-    # There might be two owners. 
-    if ( ref ($ARGS{'Owner'} )) {
-        my @owners =@{$ARGS{'Owner'}};
-        delete $ARGS{'Owner'};
-        foreach my $owner(@owners){
-            $ARGS{'Owner'} = $owner unless ($Ticket->OwnerObj->id == $owner);
-        }
-
-    }
-
-    push @results, ProcessTicketWatchers( TicketObj => $Ticket, ARGSRef => \%ARGS);
-    push @results, ProcessObjectCustomFieldUpdates( Object => $Ticket, ARGSRef => \%ARGS);
-    push @results, ProcessTicketDates( TicketObj => $Ticket, ARGSRef => \%ARGS);
-    
-    # Add session attachments if any to be processed by ProcessUpdateMessage
-    $ARGS{'UpdateAttachments'} = $session{'Attachments'} if ( $session{'Attachments'} );
-    push @results, ProcessUpdateMessage( TicketObj => $Ticket, ARGSRef=>\%ARGS );
-    # Cleanup WebUI
-    delete $session{'Attachments'};
-
-    push @results, ProcessTicketBasics( TicketObj => $Ticket, ARGSRef => \%ARGS );
-    push @results, ProcessTicketLinks( TicketObj => $Ticket, ARGSRef => \%ARGS);
-}
-
-$Ticket->ApplyTransactionBatch;
-
-# If they've gone and moved the ticket to somewhere they can't see, etc...
-# TODO: display the results, even if we can't display the ticket.
-
-unless ($Ticket->CurrentUserHasRight('ShowTicket')) {
-   Abort("No permission to view ticket");
-}
-
-
-</%INIT>
-
-
-
-<%ARGS>
-$OnlySearchForPeople => undef
-$OnlySearchForGroup => undef
-$UserField => undef
-$UserOp => undef
-$UserString => undef
-$GroupString => undef
-$GroupOp => undef
-$GroupField => undef
-$id => undef
-</%ARGS>
-
diff --git a/html/Ticket/Update.html b/html/Ticket/Update.html
deleted file mode 100644
index 1570676..0000000
--- a/html/Ticket/Update.html
+++ /dev/null
@@ -1,254 +0,0 @@
-%# BEGIN BPS TAGGED BLOCK {{{
-%# 
-%# COPYRIGHT:
-%# 
-%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC
-%#                                          <jesse at bestpractical.com>
-%# 
-%# (Except where explicitly superseded by other copyright notices)
-%# 
-%# 
-%# LICENSE:
-%# 
-%# This work is made available to you under the terms of Version 2 of
-%# the GNU General Public License. A copy of that license should have
-%# been provided with this software, but in any event can be snarfed
-%# from www.gnu.org.
-%# 
-%# This work is distributed in the hope that it will be useful, but
-%# WITHOUT ANY WARRANTY; without even the implied warranty of
-%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-%# General Public License for more details.
-%# 
-%# You should have received a copy of the GNU General Public License
-%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-%# 02110-1301 or visit their web page on the internet at
-%# http://www.gnu.org/copyleft/gpl.html.
-%# 
-%# 
-%# CONTRIBUTION SUBMISSION POLICY:
-%# 
-%# (The following paragraph is not intended to limit the rights granted
-%# to you to modify and distribute this software under the terms of
-%# the GNU General Public License and is only of importance to you if
-%# you choose to contribute your changes and enhancements to the
-%# community by submitting them to Best Practical Solutions, LLC.)
-%# 
-%# By intentionally submitting any modifications, corrections or
-%# derivatives to this work, or any other work intended for use with
-%# Request Tracker, to Best Practical Solutions, LLC, you confirm that
-%# you are the copyright holder for those contributions and you grant
-%# Best Practical Solutions,  LLC a nonexclusive, worldwide, irrevocable,
-%# royalty-free, perpetual, license to use, copy, create derivative
-%# works based on those contributions, and sublicense and distribute
-%# those contributions and any derivatives thereof.
-%# 
-%# END BPS TAGGED BLOCK }}}
-<& /Elements/Header, Title => $title &>
-<& /Ticket/Elements/Tabs, 
-    Ticket => $TicketObj, 
-    Title=> $title &>
-    
-% $m->callback(CallbackName => 'BeforeActionList', ARGSRef => \%ARGS, Ticket => $TicketObj);
-<& /Elements/ListActions, actions => \@results &>
-
-<form action="Update.html" name="TicketUpdate"
-    method="post" enctype="multipart/form-data">
-% $m->callback( CallbackName => 'FormStart', ARGSRef => \%ARGS, Ticket => $TicketObj );
-<input type="hidden" class="hidden" name="QuoteTransaction" value="<% $ARGS{QuoteTransaction}||'' %>" />
-<input type="hidden" class="hidden" name="DefaultStatus" value="<% $DefaultStatus ||''%>" />
-<input type="hidden" class="hidden" name="Action" value="<% $ARGS{Action}||'' %>" />
-
-<& /Elements/GnuPG/SignEncryptWidget:ShowIssues, self => $gnupg_widget &>
-
-<table width="100%" border="0">
-% $m->callback(CallbackName => 'AfterTableOpens', ARGSRef => \%ARGS, Ticket => $TicketObj);
-
-<tr><td class="label"><&|/l&>Status</&>:</td>
-<td>
-<& /Elements/SelectStatus, Name=>"Status", DefaultLabel => loc("[_1] (Unchanged)", loc($TicketObj->Status)), Default => $ARGS{'Status'} || ($TicketObj->Status eq $DefaultStatus ? undef : $DefaultStatus)&>
-<span class="label"><&|/l&>Owner</&>:</span>
-<& /Elements/SelectOwner,
-    Name         => "Owner",
-    TicketObj    => $TicketObj,
-    QueueObj     => $TicketObj->QueueObj,
-    DefaultLabel => loc("[_1] (Unchanged)", $TicketObj->OwnerObj->Name),
-    Default      => $ARGS{'Owner'}
-&>
-<span class="label"><&|/l&>Worked</&>:</span>
-<& /Elements/EditTimeValue,
-    Name => 'UpdateTimeWorked',
-    Default => $ARGS{UpdateTimeWorked}||'',
-    InUnits => $ARGS{'UpdateTimeWorked-TimeUnits'}||'minutes',
-&>
-</td></tr>
-% my $skip;
-% $m->callback( %ARGS, CallbackName => 'BeforeUpdateType', skip => \$skip );
-% if (!$skip) {
-<input type="hidden" class="hidden" name="id" value="<%$TicketObj->Id%>" /><br />
-% }
-<tr><td class="label"><&|/l&>Update Type</&>:</td>
-<td><select name="UpdateType">
-% if ($CanRespond) {
-<option value="response" <% ($ARGS{'UpdateType'} && $ARGS{'UpdateType'} eq "response") ? qq[ selected="selected"] : !$ARGS{'UpdateType'}&&$ResponseDefault |n %>><&|/l&>Reply to requestors</&></option>
-% }
-</select> 
-</td></tr>
-<tr><td class="label"><&|/l&>Subject</&>:</td><td> <input name="UpdateSubject" size="60" value="<% $ARGS{UpdateSubject} || $TicketObj->Subject()%>" /></td></tr>
-
-<& /Ticket/Elements/UpdateCc, %ARGS, TicketObj => $TicketObj &>
-
-<& /Ticket/Elements/EditTransactionCustomFields, %ARGS, TicketObj => $TicketObj &>
-
-% if (exists $session{'Attachments'}) {
-<tr><td><&|/l&>Attached file</&>:</td>
-<td>
-<&|/l&>Check box to delete</&><br />
-% foreach my $attach_name (keys %{$session{'Attachments'}}) {
-<input type="checkbox" class="checkbox" name="DeleteAttach-<%$attach_name%>" value="1" /><%$attach_name%><br />
-% } # end of foreach
-</td>
-</tr>
-% } # end of if
-
-<tr><td class="label"><&|/l&>Attach</&>:</td><td><input name="Attach" type="file" /><input type="submit" class="button" name="AddMoreAttach" value="<&|/l&>Add More Files</&>" /><input type="hidden" class="hidden" name="UpdateAttach" value="1" />
-</td></tr>
-
-% if ( $gnupg_widget ) {
-<tr><td> </td><td>
-<& /Elements/GnuPG/SignEncryptWidget,
-    self => $gnupg_widget,
-    TicketObj => $TicketObj,
-&>
-</td></tr>
-% }
-
-<tr><td class="label" valign="top"><&|/l&>Message</&>:</td><td>
-% $m->callback( %ARGS, CallbackName => 'BeforeMessageBox' );
-% 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 &>
-% }
-</td></tr>
-</table>
-
-
-
-
-<& /Elements/Submit, Label => loc('Update Ticket'), Name => 'SubmitTicket' &>
-% if ($TicketObj->CurrentUserHasRight('ShowOutgoingEmail')) {
-<&|/Widgets/TitleBox, title => loc('Scrips and Recipients') &>
-<& /Ticket/Elements/PreviewScrips, TicketObj => $TicketObj, %ARGS &>
-</&>
-
-% }
-</form>
-<%INIT>
-my $CanRespond = 0;
-my $checks_failure = 0;
-my $title;
-
-my $TicketObj = LoadTicket($id);
-
-my @results;
-
-$m->callback( Ticket => $TicketObj, ARGSRef => \%ARGS, results => \@results, CallbackName => 'Initial' );
-
-unless($DefaultStatus){
-    $DefaultStatus=($ARGS{'Status'} ||$TicketObj->Status());
-}
-
-if ($DefaultStatus eq 'new'){
-    $DefaultStatus='open';
-}
-
-if ($DefaultStatus eq 'resolved') {
-    $title = loc("Resolve ticket #[_1] ([_2])", $TicketObj->id, $TicketObj->Subject);
-} else {
-    $title = loc("Update ticket #[_1] ([_2])", $TicketObj->id, $TicketObj->Subject);
-}
-
-# Things needed in the template - we'll do the processing here, just
-# for the convenience:
-
-my $ResponseDefault = qq[ selected="selected"];
-
-
-
-$CanRespond = 1 if ( $TicketObj->CurrentUserHasRight('ReplyToTicket') or
-                     $TicketObj->CurrentUserHasRight('ModifyTicket') ); 
-
-# {{{ deal with deleting uploaded attachments
-foreach my $key (keys %ARGS) {
-    if ($key =~ m/^DeleteAttach-(.+)$/) {
-        delete $session{'Attachments'}{$1};
-    }
-    $session{'Attachments'} = { %{$session{'Attachments'} || {}} };
-}
-# }}}
-
-# {{{ store the uploaded attachment in session
-if ($ARGS{'Attach'}) {            # attachment?
-    my $attachment = MakeMIMEEntity(
-        AttachmentFieldName => 'Attach'
-    );
-
-    my $file_path = Encode::decode_utf8("$ARGS{'Attach'}");
-    $session{'Attachments'} = {
-        %{$session{'Attachments'} || {}},
-        $file_path => $attachment,
-    };
-}
-# }}}
-
-# delete temporary storage entry to make WebUI clean
-unless (keys %{$session{'Attachments'}} and $ARGS{'UpdateAttach'}) {
-    delete $session{'Attachments'};
-}
-# }}}
-
-my $gnupg_widget = $m->comp('/Elements/GnuPG/SignEncryptWidget:new', Arguments => \%ARGS );
-$m->comp( '/Elements/GnuPG/SignEncryptWidget:Process',
-    self => $gnupg_widget,
-    TicketObj => $TicketObj,
-);
-
-if ( $ARGS{'SubmitTicket'} ) {
-    my $CFs = $TicketObj->TransactionCustomFields;
-    my $ValidCFs = $m->comp(
-        '/Elements/ValidateCustomFields',
-        CustomFields => $CFs,
-        NamePrefix => "Object-RT::Transaction--CustomField-",
-        ARGSRef => \%ARGS
-    );
-    unless ( $ValidCFs ) {
-        $checks_failure = 1;
-        while (my $CF = $CFs->Next) {
-            my $msg = $m->notes('InvalidField-' . $CF->Id) or next;
-            push @results, loc($CF->Name) . ': ' . $msg;
-        }
-    }
-    my $status = $m->comp('/Elements/GnuPG/SignEncryptWidget:Check',
-        self      => $gnupg_widget,
-        TicketObj => $TicketObj,
-    );
-    $checks_failure = 1 unless $status;
-}
-
-if ( !$checks_failure && exists $ARGS{SubmitTicket} ) {
-    $m->callback( Ticket => $TicketObj, ARGSRef => \%ARGS, CallbackName => 'BeforeDisplay' );
-    return $m->comp('Display.html', TicketObj => $TicketObj, %ARGS);
-}
-</%INIT>
-
-<%ARGS>
-$id => undef
-$Action => undef
-$DefaultStatus => undef
-</%ARGS>
diff --git a/lib/RT/Extension/rt_cpan_org.pm b/lib/RT/Extension/rt_cpan_org.pm
index 3f6639e..674eaa7 100644
--- a/lib/RT/Extension/rt_cpan_org.pm
+++ b/lib/RT/Extension/rt_cpan_org.pm
@@ -61,6 +61,7 @@ RT::Extension::rt_cpan_org - The customizations that turn a RT into a RT for rt.
 =cut
 
 RT->AddStyleSheets("rt.cpan.org.css");
+RT->AddJavaScript("rt.cpan.org.js");
 
 require RT::Config;
 

commit b170cb2f318c1acc358b27d9f561b83e3afff6a3
Author: Thomas Sibley <trs at bestpractical.com>
Date:   Mon Feb 25 22:41:45 2013 -0800

    Preserve inc/.author across git clean

diff --git a/.gitignore b/.gitignore
index 0a12b71..aeec327 100644
--- a/.gitignore
+++ b/.gitignore
@@ -11,3 +11,4 @@ cover_db/
 nytprof/
 *.tar.gz
 *.sw[po]
+/inc/.author

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



More information about the Bps-public-commit mailing list