[Bps-public-commit] rtx-calendar branch, master, updated. 46795560eb367854cad05efab2b351a986796607

? sunnavy sunnavy at bestpractical.com
Mon Apr 11 00:15:21 EDT 2011


The branch, master has been updated
       via  46795560eb367854cad05efab2b351a986796607 (commit)
      from  562dbc79d445c868a3d4ac2517f3a3aa4ced2d65 (commit)

Summary of changes:
 .../RTx-Calendar/Elements/Tabs/Privileged          |   73 ++++++++++++++++++++
 html/Prefs/Calendar.html                           |    4 +
 html/Search/Calendar.html                          |   14 +++-
 3 files changed, 87 insertions(+), 4 deletions(-)
 create mode 100644 html/Callbacks/RTx-Calendar/Elements/Tabs/Privileged

- Log -----------------------------------------------------------------
commit 46795560eb367854cad05efab2b351a986796607
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Mon Apr 11 11:53:51 2011 +0800

    make rt4 happy

diff --git a/html/Callbacks/RTx-Calendar/Elements/Tabs/Privileged b/html/Callbacks/RTx-Calendar/Elements/Tabs/Privileged
new file mode 100644
index 0000000..5403fb2
--- /dev/null
+++ b/html/Callbacks/RTx-Calendar/Elements/Tabs/Privileged
@@ -0,0 +1,73 @@
+%# BEGIN BPS TAGGED BLOCK {{{
+%# 
+%# COPYRIGHT:
+%# 
+%# This software is Copyright (c) 1996-2011 Best Practical Solutions, LLC
+%#                                          <jesse at bestpractical.com>
+%# 
+%# (Except where explicitly superseded by other copyright notices)
+%# 
+%# 
+%# LICENSE:
+%# 
+%# This work is made available to you under the terms of Version 2 of
+%# the GNU General Public License. A copy of that license should have
+%# been provided with this software, but in any event can be snarfed
+%# from www.gnu.org.
+%# 
+%# This work is distributed in the hope that it will be useful, but
+%# WITHOUT ANY WARRANTY; without even the implied warranty of
+%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+%# General Public License for more details.
+%# 
+%# You should have received a copy of the GNU General Public License
+%# along with this program; if not, write to the Free Software
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html.
+%# 
+%# 
+%# CONTRIBUTION SUBMISSION POLICY:
+%# 
+%# (The following paragraph is not intended to limit the rights granted
+%# to you to modify and distribute this software under the terms of
+%# the GNU General Public License and is only of importance to you if
+%# you choose to contribute your changes and enhancements to the
+%# community by submitting them to Best Practical Solutions, LLC.)
+%# 
+%# By intentionally submitting any modifications, corrections or
+%# derivatives to this work, or any other work intended for use with
+%# Request Tracker, to Best Practical Solutions, LLC, you confirm that
+%# you are the copyright holder for those contributions and you grant
+%# Best Practical Solutions,  LLC a nonexclusive, worldwide, irrevocable,
+%# royalty-free, perpetual, license to use, copy, create derivative
+%# works based on those contributions, and sublicense and distribute
+%# those contributions and any derivatives thereof.
+%# 
+%# END BPS TAGGED BLOCK }}}
+<%INIT>
+my $request_path = $HTML::Mason::Commands::r->path_info;
+
+my $query_string = sub {
+    my %args = @_;
+    my $u    = URI->new();
+    $u->query_form(%args);
+    return $u->query;
+};
+
+if ( $request_path =~ qr{^/Search/} && $m->request_args->{Query} ) {
+    my $tabs = PageMenu;
+    $tabs->child( 'calendar' => title => loc('Calendar'),
+                    path => '/Search/Calendar.html?' . $query_string->(
+                        %{$m->request_args} ) );
+}
+
+my $about_me = Menu->child( 'preferences' );
+my $settings = $about_me ? $about_me->child('settings') : undef;
+
+if ( $settings ) {
+    $settings->child( 'calendar' => title => loc('Calendar'),
+                    path => '/Prefs/Calendar.html' );
+}
+
+</%INIT>
diff --git a/html/Prefs/Calendar.html b/html/Prefs/Calendar.html
index 559e794..f98950d 100644
--- a/html/Prefs/Calendar.html
+++ b/html/Prefs/Calendar.html
@@ -6,10 +6,14 @@ $HiddenField => undef
 </%args>
 
 <& /Elements/Header, Title => $title &>
+% if ( $RT::VERSION lt '3.9.6' ) {
 <& /User/Elements/Tabs,
     current_tab => 'Prefs/Calendar.html',
     Title => $title
 &>
+% } else {
+<& /Elements/Tabs &>
+% }
 
 <&| /Widgets/TitleBox, title => loc('ICal Feeds (ics)') &>
 
diff --git a/html/Search/Calendar.html b/html/Search/Calendar.html
index 731333d..871c462 100644
--- a/html/Search/Calendar.html
+++ b/html/Search/Calendar.html
@@ -10,9 +10,15 @@ $NewQuery => 0
 </%args>
 
 <& /Elements/Header, Title => $title &>
+
+% if ( $RT::VERSION lt '3.9.6' ) {
 <& /Ticket/Elements/Tabs,
     current_tab => "Search/Calendar.html?$QueryString",
     Title => $title &>
+% } else {
+    <& /Elements/Tabs &>
+% }
+
 <&| /Widgets/TitleBox,
      title => loc('Calendar for ') . $rtdate->GetMonth($Month) . " $Year" ,
      title_class=> 'inverse',
@@ -26,7 +32,7 @@ $NewQuery => 0
 %    $PYear--;
 %    $PMonth = 11;
 % }
-<a href="<%$RT::WebPath%>/Search/Calendar.html?Month=<%$PMonth%>&Year=<%$PYear%>&<%$QueryString%>">«<%$rtdate->GetMonth($PMonth)%></a>
+<a href="<%$RT::WebPath%>/Search/Calendar.html?Month=<%$PMonth%>&Year=<%$PYear%>&<%$QueryString%>">?<%$rtdate->GetMonth($PMonth)%></a>
 </td>
 <td align="center">
 <a href="<%$RT::WebPath%>/Prefs/Calendar.html">Calendar Preferences and Help</a>
@@ -37,7 +43,7 @@ $NewQuery => 0
 %    $NYear++;
 %    $NMonth = 0;
 % }
-<a href="<%$RT::WebPath%>/Search/Calendar.html?Month=<%$NMonth%>&Year=<%$NYear%>&<%$QueryString%>"><%$rtdate->GetMonth($NMonth)%>»</a>
+<a href="<%$RT::WebPath%>/Search/Calendar.html?Month=<%$NMonth%>&Year=<%$NYear%>&<%$QueryString%>"><%$rtdate->GetMonth($NMonth)%>?</a>
 </td>
 </tr>
 </table>
@@ -77,10 +83,10 @@ $NewQuery => 0
 <table width="100%">
 <tr>
 <td align="left">
-<a href="<%$RT::WebPath%>/Search/Calendar.html?Month=<%$PMonth%>&Year=<%$PYear%>&<%$QueryString%>">«<%$rtdate->GetMonth($PMonth)%></a>
+<a href="<%$RT::WebPath%>/Search/Calendar.html?Month=<%$PMonth%>&Year=<%$PYear%>&<%$QueryString%>">?<%$rtdate->GetMonth($PMonth)%></a>
 </td>
 <td align="right">
-<a href="<%$RT::WebPath%>/Search/Calendar.html?Month=<%$NMonth%>&Year=<%$NYear%>&<%$QueryString%>"><%$rtdate->GetMonth($NMonth)%>»</a>
+<a href="<%$RT::WebPath%>/Search/Calendar.html?Month=<%$NMonth%>&Year=<%$NYear%>&<%$QueryString%>"><%$rtdate->GetMonth($NMonth)%>?</a>
 </td>
 </tr>
 </table>

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



More information about the Bps-public-commit mailing list