[Bps-public-commit] RT-BugTracker-Public branch, rt4, updated. a0c6f91afaec7e1d6d9fcdd2e9a549e62e5f11b0

Thomas Sibley trs at bestpractical.com
Thu Feb 28 21:12:32 EST 2013


The branch, rt4 has been updated
       via  a0c6f91afaec7e1d6d9fcdd2e9a549e62e5f11b0 (commit)
       via  dc28df05585b41d9f21d5a9d1a529e0cf03e898f (commit)
       via  9ac76a193fa83039fa4831d5f42a4410a370d02e (commit)
       via  201a6a18c1cce14e7076fa876ed38ee6801118d8 (commit)
       via  c70efa947b9efdf9c3fda71c807fdfe24d13b63b (commit)
       via  bf2d6d1b333915a6383b3d5cc39572007793a41b (commit)
      from  23943dc01d3d94297a1e816dad34432ff2735e2d (commit)

Summary of changes:
 .../BugTracker-Public/Elements/Login/Default       |   2 +-
 .../BugTracker-Public/Elements/Tabs/Privileged     |  84 ++++++++++++
 .../NoAuth/Logout.html/AfterSessionDelete          |   7 +
 .../BugTracker-Public/NoAuth/Logout.html/Default   |  17 +++
 html/Callbacks/BugTracker-Public/autohandler/Final |   6 +
 html/Public/Bug/Display.html                       |   5 +-
 html/Public/Bug/Report.html                        |   6 +-
 html/Public/Bug/Update.html                        |   5 +-
 html/Public/Dist/Browse.html                       |   5 +-
 html/Public/Dist/ByMaintainer.html                 |   5 +-
 html/Public/Dist/Display.html                      |   7 +-
 html/Public/Elements/ErrorNoDist                   |   7 +-
 html/Public/Elements/ErrorNoUser                   |   7 +-
 html/Public/Elements/Tabs                          | 146 +--------------------
 html/Public/Search/Simple.html                     |   5 +-
 html/Public/index.html                             |   5 +-
 inc/Module/Install/RTx.pm                          |  13 +-
 17 files changed, 135 insertions(+), 197 deletions(-)
 create mode 100644 html/Callbacks/BugTracker-Public/Elements/Tabs/Privileged
 create mode 100644 html/Callbacks/BugTracker-Public/NoAuth/Logout.html/AfterSessionDelete
 create mode 100644 html/Callbacks/BugTracker-Public/NoAuth/Logout.html/Default
 create mode 100644 html/Callbacks/BugTracker-Public/autohandler/Final

- Log -----------------------------------------------------------------
commit bf2d6d1b333915a6383b3d5cc39572007793a41b
Author: Thomas Sibley <trs at bestpractical.com>
Date:   Thu Feb 28 14:50:18 2013 -0800

    Update M:I:RTx

diff --git a/inc/Module/Install/RTx.pm b/inc/Module/Install/RTx.pm
index ce01018..abf6aea 100644
--- a/inc/Module/Install/RTx.pm
+++ b/inc/Module/Install/RTx.pm
@@ -14,7 +14,7 @@ use FindBin;
 use File::Glob     ();
 use File::Basename ();
 
-my @DIRS = qw(etc lib html bin sbin po var);
+my @DIRS = qw(etc lib html static bin sbin po var);
 my @INDEX_DIRS = qw(lib bin sbin);
 
 sub RTx {
@@ -62,10 +62,11 @@ sub RTx {
     unshift @INC, "$RT::LocalPath/lib" if $RT::LocalPath;
     unshift @INC, $lib_path;
 
-    $RT::LocalVarPath  ||= $RT::VarPath;
-    $RT::LocalPoPath   ||= $RT::LocalLexiconPath;
-    $RT::LocalHtmlPath ||= $RT::MasonComponentRoot;
-    $RT::LocalLibPath  ||= "$RT::LocalPath/lib";
+    $RT::LocalVarPath    ||= $RT::VarPath;
+    $RT::LocalPoPath     ||= $RT::LocalLexiconPath;
+    $RT::LocalHtmlPath   ||= $RT::MasonComponentRoot;
+    $RT::LocalStaticPath ||= $RT::StaticPath;
+    $RT::LocalLibPath    ||= "$RT::LocalPath/lib";
 
     my $with_subdirs = $ENV{WITH_SUBDIRS};
     @ARGV = grep { /WITH_SUBDIRS=(.*)/ ? ( ( $with_subdirs = $1 ), 0 ) : 1 }
@@ -208,4 +209,4 @@ sub requires_rt {
 
 __END__
 
-#line 328
+#line 329

commit c70efa947b9efdf9c3fda71c807fdfe24d13b63b
Author: Thomas Sibley <trs at bestpractical.com>
Date:   Thu Feb 28 17:35:14 2013 -0800

    We always use SSL these days

diff --git a/html/Callbacks/BugTracker-Public/Elements/Login/Default b/html/Callbacks/BugTracker-Public/Elements/Login/Default
index 8493dce..10e3fb8 100644
--- a/html/Callbacks/BugTracker-Public/Elements/Login/Default
+++ b/html/Callbacks/BugTracker-Public/Elements/Login/Default
@@ -47,6 +47,6 @@
 %# END BPS TAGGED BLOCK }}}
 <h3><% loc("Don't have an account but want to browse bugs?") %></h3>
 <p>
-<% loc('Use the <a href="[_1]">public interface</a>.', RT->Config->Get('WebBaseURL') .'/Public/?nossl=true' ) |n %>
+<% loc('Use the <a href="[_1]">public interface</a>.', RT->Config->Get('WebBaseURL') .'/Public/' ) |n %>
 <% loc('Want to report a bug? Send it in via e-mail.') %>
 </p>

commit 201a6a18c1cce14e7076fa876ed38ee6801118d8
Author: Thomas Sibley <trs at bestpractical.com>
Date:   Thu Feb 28 17:35:41 2013 -0800

    Adjust the public menus to apply only for public users
    
    This cuts down on a lot of the mostly unnecessary copying from core RT's
    /Elements/Tabs.

diff --git a/html/Public/Elements/Tabs b/html/Public/Elements/Tabs
index 139bd7a..346b2e9 100755
--- a/html/Public/Elements/Tabs
+++ b/html/Public/Elements/Tabs
@@ -50,24 +50,17 @@
 &>
 <a name="skipnav" id="skipnav" accesskey="8"></a>
 <%INIT>
-my $query_string = sub {
-    my %args = @_;
-    my $u    = URI->new();
-    $u->query_form(%args);
-    return $u->query;
-};
-
+# Only show the Public nav to the public user
+unless (RT::BugTracker::Public->IsPublicUser) {
+    $m->comp("/Elements/Tabs");
+    return;
+}
 
 PageWidgets()->child( simple_search => raw_html => $m->scomp(
-        '/Elements/SimpleSearch', SendTo => '/Public/Search/Simple.html'
-    )
-);
+    '/Elements/SimpleSearch', SendTo => '/Public/Search/Simple.html' ));
 
-PageWidgets()->child( create_ticket => raw_html =>
-      $m->scomp( '/Elements/CreateTicket', SendTo => '/Public/Bug/Report.html' ) );
-
-PageWidgets()->child( contact_info => raw_html =>
-      $m->scomp( '/Elements/ContactInfo' ) ) if $m->comp_exists('/Elements/ContactInfo');
+PageWidgets()->child( create_ticket => raw_html => $m->scomp(
+    '/Elements/CreateTicket', SendTo => '/Public/Bug/Report.html' ));
 
 Menu()->child(
     search_dist => title => loc('Search Distributions'),
@@ -79,79 +72,19 @@ Menu()->child(
     path        => '/Public/Dist/Browse.html',
 );
 
-my $username =
-    '<span class="current-user">'
-  . $m->interp->apply_escapes( RT::BugTracker::Public->IsPublicUser ?
-          'anonymous guest' : $session{'CurrentUser'}->Name, 'h' )
-  . '</span>';
-
-my $about_me = Menu()->child(
-    'preferences' => title => loc( 'Logged in as [_1]', $username ),
+Menu->child(
+    'preferences' => title => loc( 'Welcome [_1]anonymous guest[_2].', '<span class="current-user">', '</span>' ),
     escape_title  => 0,
     sort_order    => 99,
 );
 
-if (   $session{'CurrentUser'}->UserObj
-    && $session{'CurrentUser'}
-    ->HasRight( Right => 'ModifySelf', Object => RT->System ) )
-{
-    my $settings = $about_me->child(
-        settings => title => loc('Settings'),
-        path     => '/Prefs/Other.html'
-    );
-    $settings->child(
-        options => title => loc('Options'),
-        path    => '/Prefs/Other.html'
-    );
-    $settings->child(
-        about_me => title => loc('About me'),
-        path     => '/User/Prefs.html'
-    );
-    $settings->child(
-        search_options => title => loc('Search options'),
-        path           => '/Prefs/SearchOptions.html'
-    );
-    $settings->child(
-        myrt => title => loc('RT at a glance'),
-        path => '/Prefs/MyRT.html'
-    );
-    $settings->child(
-        quicksearch => title => loc('Quick search'),
-        path        => '/Prefs/Quicksearch.html'
-    );
-
-    my $search_menu =
-      $settings->child( 'saved-searches' => title => loc('Saved Searches') );
-    my $searches = [
-        $m->comp(
-            "/Search/Elements/SearchesForObject",
-            Object => RT::System->new( $session{'CurrentUser'} )
-        )
-    ];
-    my $i = 0;
-
-    for my $search (@$searches) {
-        $search_menu->child(
-            "search-" . $i++ => title => $search->[0],
-            path             => "/Prefs/Search.html?"
-              . $query_string->(
-                name => ref( $search->[1] ) . '-' . $search->[1]->Id
-              ),
-        );
-    }
-}
-
-if (
-    $session{'CurrentUser'}->Name
-    && (  !RT->Config->Get('WebExternalAuth')
-        || RT->Config->Get('WebFallbackToInternalAuth') )
-  )
-{
-    $about_me->child(
-        logout => title => loc('Logout'),
-        path   => '/NoAuth/Logout.html'
-    );
-}
+# Public user must logout to login
+Menu->child(
+    "login",
+    title       => loc('Login as another user'),
+    path        => '/NoAuth/Logout.html',
+    sort_order  => 100,
+);
 
 Menu()->child(
     browse_dist => title => loc('Browse Distributions'),

commit 9ac76a193fa83039fa4831d5f42a4410a370d02e
Author: Thomas Sibley <trs at bestpractical.com>
Date:   Thu Feb 28 17:36:49 2013 -0800

    Restore highlighting of public distribution page menu items
    
    Request paths are canonicalized to use ; as the query param separator
    when comparing the request path to possible active menu paths.  This
    canonicalization happens regardless of what the actual request URL uses
    for a separator.  Thus, using & as the param separator guarantees a menu
    item will never be highlighted as active.

diff --git a/html/Public/Elements/Tabs b/html/Public/Elements/Tabs
index 346b2e9..42124ff 100755
--- a/html/Public/Elements/Tabs
+++ b/html/Public/Elements/Tabs
@@ -96,17 +96,17 @@ if ( $queue ) {
     my $escaped = $m->interp->apply_escapes($queue, 'u');
     PageMenu()->child(
         active_bugs => title => loc("Active bugs"),
-        path => "/Public/Dist/Display.html?Status=Active&Name=" . $escaped,
+        path => "/Public/Dist/Display.html?Status=Active;Name=" . $escaped,
     );
 
     PageMenu()->child( resolved_bugs =>
             title => loc("Resolved bugs"),
-            path  => "/Public/Dist/Display.html?Status=Resolved&Name=". $escaped,
+            path  => "/Public/Dist/Display.html?Status=Resolved;Name=". $escaped,
     );
 
     PageMenu()->child( rejected_bugs => 
             title => loc("Rejected bugs"),
-            path  => "/Public/Dist/Display.html?Status=Rejected&Name=". $escaped,
+            path  => "/Public/Dist/Display.html?Status=Rejected;Name=". $escaped,
     );
 
     PageMenu()->child( report => 

commit dc28df05585b41d9f21d5a9d1a529e0cf03e898f
Author: Thomas Sibley <trs at bestpractical.com>
Date:   Thu Feb 28 17:40:38 2013 -0800

    Return to the original page if a public user decides to fully log in
    
    This means authors can hit a public bug report, click the login link,
    and then be taken back to the bug report.  Unfortunately that very
    common workflow has been broken since security updates last year.

diff --git a/html/Callbacks/BugTracker-Public/NoAuth/Logout.html/AfterSessionDelete b/html/Callbacks/BugTracker-Public/NoAuth/Logout.html/AfterSessionDelete
new file mode 100644
index 0000000..58d3cf1
--- /dev/null
+++ b/html/Callbacks/BugTracker-Public/NoAuth/Logout.html/AfterSessionDelete
@@ -0,0 +1,7 @@
+<%init>
+return unless $m->notes->{NextHash} and $m->notes->{NextPage};
+
+# Resurrect the next page data we're about to pass to the login page via the
+# logout's meta-refresh.
+$session{NextPage}->{ $m->notes->{NextHash} } = $m->notes->{NextPage};
+</%init>
diff --git a/html/Callbacks/BugTracker-Public/NoAuth/Logout.html/Default b/html/Callbacks/BugTracker-Public/NoAuth/Logout.html/Default
new file mode 100644
index 0000000..8cb0132
--- /dev/null
+++ b/html/Callbacks/BugTracker-Public/NoAuth/Logout.html/Default
@@ -0,0 +1,17 @@
+<%args>
+$URL => undef
+</%args>
+<%init>
+return unless $URL and RT::BugTracker::Public->IsPublicUser
+          and $session{"LastPublicPage"};
+
+# Because we don't have a callback that is both after the session delete and
+# can modify the login URL, we need to stash the next page data pre-delete, set
+# the next page hash, and then resurrect it after the session is deleted.
+$m->notes->{NextHash} = RT::Interface::Web::SetNextPage($DECODED_ARGS, $session{"LastPublicPage"});
+$m->notes->{NextPage} = RT::Interface::Web::FetchNextPage($m->notes->{NextHash});
+
+$$URL = RT->Config->Get("WebPath")
+      . "/NoAuth/Login.html?next="
+      . $m->notes->{NextHash};
+</%init>
diff --git a/html/Callbacks/BugTracker-Public/autohandler/Final b/html/Callbacks/BugTracker-Public/autohandler/Final
new file mode 100644
index 0000000..f14f527
--- /dev/null
+++ b/html/Callbacks/BugTracker-Public/autohandler/Final
@@ -0,0 +1,6 @@
+<%init>
+# Rather than rely on the HTTP referer and then have to sanitize it, just keep
+# track of the referring page ourselves.
+$session{'LastPublicPage'} = RT::Interface::Web::IntuitNextPage()
+    if RT::BugTracker::Public->IsPublicUser;
+</%init>

commit a0c6f91afaec7e1d6d9fcdd2e9a549e62e5f11b0
Author: Thomas Sibley <trs at bestpractical.com>
Date:   Thu Feb 28 18:10:21 2013 -0800

    Move the public menus into an Elements/Tabs callback instead of a separate component
    
    Now public menus can persist on the /NoAuth/ about pages, and generally
    more robustly follow the logged in public user.
    
    It now also uses the query param detection style for ticket IDs and
    queue names instead of expecting passed in objects.  Keep the
    /Public/Elements/Tabs element as a small shim for any customizations
    built on top of this extension.

diff --git a/html/Callbacks/BugTracker-Public/Elements/Tabs/Privileged b/html/Callbacks/BugTracker-Public/Elements/Tabs/Privileged
new file mode 100644
index 0000000..58926eb
--- /dev/null
+++ b/html/Callbacks/BugTracker-Public/Elements/Tabs/Privileged
@@ -0,0 +1,84 @@
+<%init>
+# Only show the Public nav to the public user
+return unless RT::BugTracker::Public->IsPublicUser;
+
+# Save the About menu, if any (provided by RT::Extension::rt_cpan_org, for
+# example)
+my $about = Menu->child("about");
+
+# Clear the decks
+RT::Interface::Web::InitializeMenu();
+
+PageWidgets()->child( simple_search => raw_html => $m->scomp(
+    '/Elements/SimpleSearch', SendTo => '/Public/Search/Simple.html' ));
+
+PageWidgets()->child( create_ticket => raw_html => $m->scomp(
+    '/Elements/CreateTicket', SendTo => '/Public/Bug/Report.html' ));
+
+Menu()->child(
+    search_dist => title => loc('Search Distributions'),
+    path        => '/Public/',
+);
+
+Menu()->child(
+    browse_dist => title => loc('Browse Distributions'),
+    path        => '/Public/Dist/Browse.html',
+);
+
+Menu->child( "about", menu => $about );
+
+Menu->child(
+    'preferences' => title => loc( 'Welcome [_1]anonymous guest[_2].', '<span class="current-user">', '</span>' ),
+    escape_title  => 0,
+    sort_order    => 100,
+);
+
+# Public user must logout to login
+Menu->child(
+    "login",
+    title       => loc('Login as another user'),
+    path        => '/NoAuth/Logout.html',
+    sort_order  => 101,
+);
+
+my $queue;
+my $request_path = $HTML::Mason::Commands::r->path_info;
+   $request_path =~ s!^/{2,}!/!;
+
+if ( $request_path =~ m{^/Public/Bug/(?:Display|Update)\.html}
+     and my $id = $DECODED_ARGS->{id} )
+{
+    my $ticket = RT::Ticket->new( $session{CurrentUser} );
+    $ticket->Load($id);
+    $queue = $ticket->QueueObj if $ticket->id;
+}
+elsif ( $request_path =~ m{^/Public/(?:Bug/Report|Dist/Display)\.html}
+        and my $name = ($DECODED_ARGS->{Name} || $DECODED_ARGS->{Queue}) )
+{
+    $queue = RT::Queue->new( $session{CurrentUser} );
+    $queue->Load($name);
+}
+
+if ( $queue and $queue->id ) {
+    my $escaped = $m->interp->apply_escapes($queue->Name, 'u');
+    PageMenu()->child(
+        active_bugs => title => loc("Active bugs"),
+        path => "/Public/Dist/Display.html?Status=Active;Name=" . $escaped,
+    );
+
+    PageMenu()->child( resolved_bugs =>
+            title => loc("Resolved bugs"),
+            path  => "/Public/Dist/Display.html?Status=Resolved;Name=". $escaped,
+    );
+
+    PageMenu()->child( rejected_bugs => 
+            title => loc("Rejected bugs"),
+            path  => "/Public/Dist/Display.html?Status=Rejected;Name=". $escaped,
+    );
+
+    PageMenu()->child( report => 
+            title => loc("Report a new bug"),
+            path  => '/Public/Bug/Report.html?Queue='. $escaped,
+    );
+}
+</%init>
diff --git a/html/Public/Bug/Display.html b/html/Public/Bug/Display.html
index a75566b..52fec10 100755
--- a/html/Public/Bug/Display.html
+++ b/html/Public/Bug/Display.html
@@ -47,10 +47,7 @@
 %# END BPS TAGGED BLOCK }}}
 <& /Elements/Header, 
     Title => $title &>
-<& /Public/Elements/Tabs, 
-    Title => $title,
-    ticket => $TicketObj,
-&>
+<& /Elements/Tabs &>
 
 <& /Elements/ListActions, actions => \@Actions &>
 
diff --git a/html/Public/Bug/Report.html b/html/Public/Bug/Report.html
index c08091a..63cf7b3 100755
--- a/html/Public/Bug/Report.html
+++ b/html/Public/Bug/Report.html
@@ -46,11 +46,7 @@
 %# 
 %# END BPS TAGGED BLOCK }}}
 <& /Elements/Header, Title => loc("Report a bug in [_1]", $Queue) &>
-<& /Public/Elements/Tabs,
-    Title => loc("Report a bug in [_1]", $Queue),
-    queue => $Queue,
-    current_tab => $current_tab,
-&>
+<& /Elements/Tabs &>
 
 <p>
 Thanks for taking the time to report a bug in <em><% $Queue %></em>.  You
diff --git a/html/Public/Bug/Update.html b/html/Public/Bug/Update.html
index 71c056c..89f727c 100755
--- a/html/Public/Bug/Update.html
+++ b/html/Public/Bug/Update.html
@@ -46,10 +46,7 @@
 %# 
 %# END BPS TAGGED BLOCK }}}
 <& /Elements/Header, Title => $title &>
-<& /Public/Elements/Tabs,
-    Title => $title,
-    ticket => $TicketObj,
-&>
+<& /Elements/Tabs &>
 
 <form action="<% $RT::WebPath %>/Public/Bug/Update.html" name="TicketUpdate" 
 	method="post" enctype="multipart/form-data">
diff --git a/html/Public/Dist/Browse.html b/html/Public/Dist/Browse.html
index f0b2802..9428608 100755
--- a/html/Public/Dist/Browse.html
+++ b/html/Public/Dist/Browse.html
@@ -46,10 +46,7 @@
 %# 
 %# END BPS TAGGED BLOCK }}}
 <& /Elements/Header, Title => $title &>
-<& /Public/Elements/Tabs,
-    Title => $title,
-    current_toptab => 'Public/Dist/Browse.html',
-&>
+<& /Elements/Tabs &>
 
 <& /Dist/Elements/BeginsWith, Name => $Name &>
 
diff --git a/html/Public/Dist/ByMaintainer.html b/html/Public/Dist/ByMaintainer.html
index ce59742..321954d 100755
--- a/html/Public/Dist/ByMaintainer.html
+++ b/html/Public/Dist/ByMaintainer.html
@@ -46,10 +46,7 @@
 %# 
 %# END BPS TAGGED BLOCK }}}
 <& /Elements/Header, Title => $title &>
-<& /Public/Elements/Tabs,
-    Title => $title,
-    current_toptab => 'Public/',
-&>
+<& /Elements/Tabs &>
 
 <& /Public/Elements/DistributionList, queues => $watched_queues &>
 
diff --git a/html/Public/Dist/Display.html b/html/Public/Dist/Display.html
index be6d8ef..91f89bd 100755
--- a/html/Public/Dist/Display.html
+++ b/html/Public/Dist/Display.html
@@ -46,12 +46,7 @@
 %# 
 %# END BPS TAGGED BLOCK }}}
 <& /Elements/Header, Title => $title &>
-
-<& /Public/Elements/Tabs,
-    Title => $title,
-    queue => $Name,
-    current_tab => $current_tab,
-&>
+<& /Elements/Tabs &>
 
 <& /Dist/Elements/ShowNotes, Queue => $QueueObj &>
 
diff --git a/html/Public/Elements/ErrorNoDist b/html/Public/Elements/ErrorNoDist
index 409e9dd..22fa36e 100644
--- a/html/Public/Elements/ErrorNoDist
+++ b/html/Public/Elements/ErrorNoDist
@@ -45,11 +45,8 @@
 %# those contributions and any derivatives thereof.
 %# 
 %# END BPS TAGGED BLOCK }}}
-<& /Elements/Header, Title => loc("Error") &>
-<& /Public/Elements/Tabs,
-        Title       => loc("Unable to find distribution"),
-        current_tab => '',
-        &>
+<& /Elements/Header, Title => loc("Unable to find distribution") &>
+<& /Elements/Tabs &>
 
 <p>
 % if ($Queue) {
diff --git a/html/Public/Elements/ErrorNoUser b/html/Public/Elements/ErrorNoUser
index 02ce3e9..e41c677 100644
--- a/html/Public/Elements/ErrorNoUser
+++ b/html/Public/Elements/ErrorNoUser
@@ -45,11 +45,8 @@
 %# those contributions and any derivatives thereof.
 %# 
 %# END BPS TAGGED BLOCK }}}
-<& /Elements/Header, Title => loc("Error") &>
-<& /Public/Elements/Tabs,
-        Title       => loc("Unable to find user"),
-        current_tab => '',
-        &>
+<& /Elements/Header, Title => loc("Unable to find user") &>
+<& /Elements/Tabs &>
 
 <p>
   The user you specified, <strong><% $Name %></strong>, could not be found.
diff --git a/html/Public/Elements/Tabs b/html/Public/Elements/Tabs
index 42124ff..133ed74 100755
--- a/html/Public/Elements/Tabs
+++ b/html/Public/Elements/Tabs
@@ -45,81 +45,4 @@
 %# those contributions and any derivatives thereof.
 %# 
 %# END BPS TAGGED BLOCK }}}
-<& /Elements/PageLayout,
-    title => $Title
-&>
-<a name="skipnav" id="skipnav" accesskey="8"></a>
-<%INIT>
-# Only show the Public nav to the public user
-unless (RT::BugTracker::Public->IsPublicUser) {
-    $m->comp("/Elements/Tabs");
-    return;
-}
-
-PageWidgets()->child( simple_search => raw_html => $m->scomp(
-    '/Elements/SimpleSearch', SendTo => '/Public/Search/Simple.html' ));
-
-PageWidgets()->child( create_ticket => raw_html => $m->scomp(
-    '/Elements/CreateTicket', SendTo => '/Public/Bug/Report.html' ));
-
-Menu()->child(
-    search_dist => title => loc('Search Distributions'),
-    path        => '/Public/',
-);
-
-Menu()->child(
-    browse_dist => title => loc('Browse Distributions'),
-    path        => '/Public/Dist/Browse.html',
-);
-
-Menu->child(
-    'preferences' => title => loc( 'Welcome [_1]anonymous guest[_2].', '<span class="current-user">', '</span>' ),
-    escape_title  => 0,
-    sort_order    => 99,
-);
-
-# Public user must logout to login
-Menu->child(
-    "login",
-    title       => loc('Login as another user'),
-    path        => '/NoAuth/Logout.html',
-    sort_order  => 100,
-);
-
-Menu()->child(
-    browse_dist => title => loc('Browse Distributions'),
-    path        => '/Public/Dist/Browse.html',
-);
-
-$queue ||= $ticket->QueueObj->Name if $ticket;
-if ( $queue ) {
-    my $escaped = $m->interp->apply_escapes($queue, 'u');
-    PageMenu()->child(
-        active_bugs => title => loc("Active bugs"),
-        path => "/Public/Dist/Display.html?Status=Active;Name=" . $escaped,
-    );
-
-    PageMenu()->child( resolved_bugs =>
-            title => loc("Resolved bugs"),
-            path  => "/Public/Dist/Display.html?Status=Resolved;Name=". $escaped,
-    );
-
-    PageMenu()->child( rejected_bugs => 
-            title => loc("Rejected bugs"),
-            path  => "/Public/Dist/Display.html?Status=Rejected;Name=". $escaped,
-    );
-
-    PageMenu()->child( report => 
-            title => loc("Report a new bug"),
-            path  => '/Public/Bug/Report.html?Queue='. $escaped,
-    );
-}
-
-$m->callback( %ARGS );
-
-</%INIT>
-<%ARGS>
-$Title => undef
-$ticket => undef
-$queue => undef
-</%ARGS>
+<& /Elements/Tabs &>
diff --git a/html/Public/Search/Simple.html b/html/Public/Search/Simple.html
index 950f92d..3f39920 100644
--- a/html/Public/Search/Simple.html
+++ b/html/Public/Search/Simple.html
@@ -46,10 +46,7 @@
 %# 
 %# END BPS TAGGED BLOCK }}}
 <& /Elements/Header, Title => $title &>
-<& /Public/Elements/Tabs, 
-    current_toptab => "Public/Search/Simple.html",
-    Title => $title
-&>
+<& /Elements/Tabs &>
 
 % if (not $q and not $ARGS{Query}) {
 <div id="SimpleSearchForm">
diff --git a/html/Public/index.html b/html/Public/index.html
index 67df720..d5737ad 100755
--- a/html/Public/index.html
+++ b/html/Public/index.html
@@ -46,10 +46,7 @@
 %# 
 %# END BPS TAGGED BLOCK }}}
 <& /Elements/Header, Title => loc("Public Bug Tracker") &>
-<& /Public/Elements/Tabs, 
-    current_toptab => "Public/",
-    Title => loc("Public Bug Tracker")
-&>
+<& /Elements/Tabs &>
 
 <& /Elements/ListActions, actions => \@results &>
 

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



More information about the Bps-public-commit mailing list