[Rt-commit] rt branch, menuing, updated. rt-3.9.4-226-g4ea4554

Jesse Vincent jesse at bestpractical.com
Mon Nov 1 22:15:41 EDT 2010


The branch, menuing has been updated
       via  4ea455428995526a7199ff65e8cb9f8e45f360fc (commit)
       via  c31ef29049667f7074072f18713a18db9e47168f (commit)
       via  a4674e559c7254633943e2b23033ebde9523ea99 (commit)
       via  5b6d6a273b55f37fca07f0fd4fc067f4f94fed5a (commit)
       via  4d7d66b9ea5b24c425f119890f566930225b4ebe (commit)
       via  6f92ae28f6a0b1eee2ac1c85d4c8cfe89077c0ee (commit)
       via  a8d1fcb88143ec7b072df412ea47f4fde1b888d5 (commit)
       via  dba4af6ba5a02cd744fa99dc889a88f6d22c4a68 (commit)
       via  ed88c179720eeec81551e14e64c0bb4c96ad4579 (commit)
       via  792b55bcfe44a24753db935f1f3fb7c3f0d67987 (commit)
       via  4d40864256488459538d065d165f628b2da1bb54 (commit)
       via  05fbf0c27f50a621acac6dd320a99ffa50b07188 (commit)
       via  111894dbbbbcd91d9f43c5625429ef316ba97ed6 (commit)
       via  887d3e72dacfe2e71441d5d0ef4e1c48bada3a45 (commit)
       via  18fb3677379464ae90ea3b3112805e7d3f4b1988 (commit)
       via  e630e3b4decb40a705e6b8cdbc79e9a7dbc451e4 (commit)
       via  0271cfff9a549985c189567c55a0209df7bb7e96 (commit)
       via  3ff50155862df46bef4262f00edb5d1d4bbe4d58 (commit)
       via  7c2cdc00d7cb565f913708dd4a2e5ce020ad0f7b (commit)
       via  d15448453c96d432272a3102c3fdc626f2b36296 (commit)
       via  b7fa4efb40ba3ac17820601cae4e7df3b84e2e81 (commit)
       via  23442421133b09eb64c3ec53cd33fc6c76221c46 (commit)
       via  0810d026ee1ae6e0a52c03365d7b287b7332ab9e (commit)
       via  d0ed9b23f284dba69bbe261e67f2b5ead6f7f620 (commit)
       via  74c6a210803e44a5d7b7209600c76d68006bd067 (commit)
       via  3039caad36a1605331d0a2276577e8a41c256356 (commit)
       via  5c6811e3fbbfa681bce87b5e6d380c286e712dff (commit)
       via  eb61aafb4f85436867734a13be89d255fa1b12d0 (commit)
      from  892d60343d2d107c15461961192ecbcff862be03 (commit)

Summary of changes:
 lib/RT/Interface/Web/Menu.pm                       |    8 +-
 share/html/Admin/Elements/EditScrip                |   22 +-
 share/html/Admin/Elements/SelectTemplate           |   15 +-
 share/html/Admin/Global/Template.html              |    2 +-
 share/html/Admin/Queues/Template.html              |    2 +-
 share/html/Dashboards/Modify.html                  |   34 ++-
 share/html/Dashboards/Subscription.html            |    2 +-
 share/html/Elements/CreateTicket                   |    6 +-
 .../{Ticket => }/Elements/MaybeRedirectForResults  |    6 +-
 share/html/Elements/Menu                           |    8 +-
 share/html/Elements/PageLayout                     |    2 +-
 share/html/Elements/Tabs                           |  293 ++++++++++++--------
 share/html/Ticket/Display.html                     |    4 +-
 share/html/Widgets/TitleBoxStart                   |   16 +-
 t/customfields/access_via_queue.t                  |    8 +-
 t/customfields/sort_order.t                        |    6 +-
 t/ticket/scrips_batch.t                            |   18 +-
 t/web/cf_access.t                                  |   24 +-
 t/web/cf_date.t                                    |   16 +-
 t/web/cf_datetime.t                                |   24 +-
 t/web/cf_onqueue.t                                 |   10 +-
 t/web/cf_select_one.t                              |   23 +-
 t/web/dashboards-groups.t                          |    9 +-
 t/web/dashboards-permissions.t                     |    5 +-
 t/web/dashboards.t                                 |   10 +-
 t/web/gnupg-select-keys-on-create.t                |   26 +-
 t/web/gnupg-select-keys-on-update.t                |   26 +-
 t/web/gnupg-tickyboxes.t                           |    2 +-
 t/web/html_template.t                              |    9 +-
 t/web/search_rss.t                                 |    2 +-
 t/web/ticket-create-utf8.t                         |    6 +-
 t/web/ticket_owner_autocomplete.t                  |    2 +-
 32 files changed, 335 insertions(+), 311 deletions(-)
 rename share/html/{Ticket => }/Elements/MaybeRedirectForResults (94%)

- Log -----------------------------------------------------------------
commit eb61aafb4f85436867734a13be89d255fa1b12d0
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Mon Nov 1 14:26:04 2010 -0400

    Added a name/id to ModifyScrip

diff --git a/share/html/Admin/Elements/EditScrip b/share/html/Admin/Elements/EditScrip
index aa0861a..3141541 100755
--- a/share/html/Admin/Elements/EditScrip
+++ b/share/html/Admin/Elements/EditScrip
@@ -47,7 +47,7 @@
 %# END BPS TAGGED BLOCK }}}
 <& /Elements/ListActions, actions => \@actions &>
   
-<form method="post" action="Scrip.html">
+<form method="post" action="Scrip.html" id="ModifyScrip" name="ModifyScrip">
 <input type="hidden" class="hidden" name="id" value="<% $id %>" />
 <input type="hidden" class="hidden" name="Queue" value="<% $Queue %>" />
 

commit 5c6811e3fbbfa681bce87b5e6d380c286e712dff
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Mon Nov 1 14:26:27 2010 -0400

    gave pagenav ids a unique prefix

diff --git a/share/html/Elements/PageLayout b/share/html/Elements/PageLayout
index 2b92c97..1380940 100755
--- a/share/html/Elements/PageLayout
+++ b/share/html/Elements/PageLayout
@@ -54,7 +54,7 @@
 % if ( $show_menu ) {
 <div id="main-navigation"><& /Elements/Menu, menu => Menu(), id => 'app-nav' &></div>
 
-<div id="page-navigation"><& /Elements/Menu, menu => PageMenu(), id => 'page-menu' &></div>
+<div id="page-navigation"><& /Elements/Menu, menu => PageMenu(), id => 'page-menu', 'parent_id' => 'page' &></div>
 % }
 <div id="widgets"><& /Elements/Widgets &></div>
 <script type="text/javascript">

commit 3039caad36a1605331d0a2276577e8a41c256356
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Mon Nov 1 14:26:48 2010 -0400

    Added Scrips to queue nav

diff --git a/share/html/Elements/Tabs b/share/html/Elements/Tabs
index aabf8a8..a1c68e5 100755
--- a/share/html/Elements/Tabs
+++ b/share/html/Elements/Tabs
@@ -315,6 +315,19 @@ if ( $request_path =~ qr'Admin/Queues' ) {
 );
         $templates->child( create => title =>  loc('Create'), path  => "/Admin/Queues/Template.html?Create=1;Queue=".$id );
 
+        my $scrips = $queue->child( scrips => title => loc('Scrips'),
+                       path => "/Admin/Queues/Scrips.html?id=" . $id );
+
+
+
+        $scrips->child(select => title => loc('Select'), path => "/Admin/Queues/Scrips.html?id=".$id
+);
+        $scrips->child( create => title =>  loc('Create'), path  => "/Admin/Queues/Scrip.html?Create=1;Queue=".$id );
+
+
+
+
+
         $queue->child( loc('Ticket Custom Fields'),
              path => '/Admin/Queues/CustomFields.html?sub_type=RT::Ticket&id='
                  . $id );

commit 74c6a210803e44a5d7b7209600c76d68006bd067
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Mon Nov 1 14:27:12 2010 -0400

    updated another scrip testfile

diff --git a/t/ticket/scrips_batch.t b/t/ticket/scrips_batch.t
index d62fb3a..d4004fb 100644
--- a/t/ticket/scrips_batch.t
+++ b/t/ticket/scrips_batch.t
@@ -2,7 +2,7 @@
 use strict;
 use warnings;
 
-use RT::Test tests => '19';
+use RT::Test tests => '17';
 use_ok('RT');
 use_ok('RT::Ticket');
 
@@ -16,12 +16,10 @@ ok $m->login, 'logged in as root';
 
 my $sid;
 {
-    $m->follow_link_ok( { text => 'Configuration' } );
-    $m->follow_link_ok( { text => 'Queues' } );
+    $m->follow_link_ok( { id => 'config-queues' } );
     $m->follow_link_ok( { text => $queue->Name } );
-    $m->follow_link_ok( { text => 'Scrips' } );
-    $m->follow_link_ok( { url_regex => qr'Scrip.html\?create=1' } );
-    $m->form_name('TicketModify');
+    $m->follow_link_ok( { id => 'page-scrips-create'});
+    $m->form_name('ModifyScrip');
     $m->field('Scrip-new-Description' => 'test');
     $m->select('Scrip-new-ScripCondition' => 'On Transaction');
     $m->select('Scrip-new-ScripAction' => 'User Defined');
@@ -32,9 +30,9 @@ my $sid;
     $m->submit;
     $m->content_contains("Scrip Created");
 
-    ($sid) = ($m->content =~ /Scrip\s*#(\d+)/);
 
-    my $form = $m->form_name('TicketModify');
+    my $form = $m->form_name('ModifyScrip');
+    $sid = $form->value('id');
     is $m->value("Scrip-$sid-Description"), 'test', 'correct description';
     is value_name($form, "Scrip-$sid-ScripCondition"), 'On Transaction', 'correct condition';
     is value_name($form, "Scrip-$sid-ScripAction"), 'User Defined', 'correct action';
@@ -62,13 +60,13 @@ END
     $m->submit;
 
     $m->goto_create_ticket( $queue );
-    $m->form_name('TicketModify');
+    $m->form_name('TicketCreate');
     $m->submit;
 
     is_deeply parse_handle($tmp_fh), ['Create'], 'Create';
 
     $m->follow_link_ok( { text => 'Resolve' } );
-    $m->form_name('TicketModify');
+    $m->form_name('TicketUpdate');
     $m->field( "UpdateContent" => 'resolve it' );
     $m->click('SubmitTicket');
 

commit d0ed9b23f284dba69bbe261e67f2b5ead6f7f620
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Mon Nov 1 14:27:35 2010 -0400

    Updates to get scrip edit HTML to not be so painfully unreadable

diff --git a/share/html/Admin/Elements/EditScrip b/share/html/Admin/Elements/EditScrip
index 3141541..37d0dbe 100755
--- a/share/html/Admin/Elements/EditScrip
+++ b/share/html/Admin/Elements/EditScrip
@@ -54,32 +54,32 @@
 <&| /Widgets/TitleBox, title => loc('Scrip Fields') &>
 <table>
 
-<tr><td align="right"><&|/l&>Description</&>:</td><td>
-<input name="Scrip-<% $id %>-Description" 
-    size="60"
+<tr><td class="label"><&|/l&>Description</&>:</td><td class="value">\
+<input name="Scrip-<% $id %>-Description" \
+    size="60" \
     value="<% $ARGS{"Scrip-$id-Description"} || $scrip->Description || '' %>" />
 </td></tr>
 
-<tr><td align="right"><&|/l&>Condition</&>:</td><td>
+<tr><td class="label"><&|/l&>Condition</&>:</td><td class="value">\
 <& /Admin/Elements/SelectScripCondition,
     Name => "Scrip-$id-ScripCondition",
     Default => $ARGS{"Scrip-$id-ScripCondition"} || $scrip->ConditionObj->Id,
 &></td></tr>
 
-<tr><td align="right"><&|/l&>Action</&>:</td><td>
+<tr><td class="label"><&|/l&>Action</&>:</td><td class="value">\
 <& /Admin/Elements/SelectScripAction,
     Name => "Scrip-$id-ScripAction",
     Default => $ARGS{"Scrip-$id-ScripAction"} || $scrip->ActionObj->Id,
 &></td></tr>
 
-<tr><td align="right"><&|/l&>Template</&>:</td><td>
+<tr><td class="label"><&|/l&>Template</&>:</td><td class="value">\
 <& /Admin/Elements/SelectTemplate,
     Name => "Scrip-$id-Template",
     Default => $ARGS{"Scrip-$id-Template"} || $scrip->TemplateObj->Id,
     Queue => $Queue,
 &></td></tr>
 
-<tr><td align="right"><&|/l&>Stage</&>:</td><td>
+<tr><td class="label"><&|/l&>Stage</&>:</td><td class="value">\
 <& /Admin/Elements/SelectStage,
     Name => "Scrip-$id-Stage",
     Default => $ARGS{"Scrip-$id-Stage"} || $scrip->Stage,
@@ -100,21 +100,21 @@
 <i><&|/l&>(Use these fields when you choose 'User Defined' for a condition or action)</&></i>
 </td></tr>
 
-<tr><td class="labeltop"><&|/l&>Custom condition</&>:</td><td>
+<tr><td class="labeltop"><&|/l&>Custom condition</&>:</td><td class="value">
 % my $code = $ARGS{"Scrip-$id-CustomIsApplicableCode"} || $scrip->CustomIsApplicableCode || '';
 % my $lines = @{[ $code =~ /\n/gs ]} + 3;
 % $lines = $min_lines if $lines < $min_lines;
 <textarea cols="80" rows="<% $lines %>" name="Scrip-<% $id %>-CustomIsApplicableCode"><% $code %></textarea>
 </td></tr>
 
-<tr><td class="labeltop"><&|/l&>Custom action preparation code</&>:</td><td>
+<tr><td class="labeltop"><&|/l&>Custom action preparation code</&>:</td><td class="value">
 % $code = $ARGS{"Scrip-$id-CustomPrepareCode"} || $scrip->CustomPrepareCode || '';
 % $lines = @{[ $code =~ /\n/gs ]} + 3;
 % $lines = $min_lines if $lines < $min_lines;
 <textarea cols="80" rows="<% $lines %>" name="Scrip-<% $id %>-CustomPrepareCode"><% $code %></textarea>
 </td></tr>
 
-<tr><td class="labeltop"><&|/l&>Custom action cleanup code</&>:</td><td>
+<tr><td class="labeltop"><&|/l&>Custom action cleanup code</&>:</td><td class="value">
 % $code = $ARGS{"Scrip-$id-CustomCommitCode"} || $scrip->CustomCommitCode || '';
 % $lines = @{[ $code =~ /\n/gs ]} + 3;
 % $lines = $min_lines if $lines < $min_lines;
diff --git a/share/html/Admin/Elements/SelectTemplate b/share/html/Admin/Elements/SelectTemplate
index 54001c5..d077389 100755
--- a/share/html/Admin/Elements/SelectTemplate
+++ b/share/html/Admin/Elements/SelectTemplate
@@ -47,19 +47,12 @@
 %# END BPS TAGGED BLOCK }}}
 <select name="<%$Name%>">
 <option value="" 
-<% defined($Default) && $Default eq 'none' && qq[ selected="selected"] |n %>
->-</option>
+<% defined($Default) && $Default eq 'none' && qq[ selected="selected"] |n %>>-</option>
 %while  (my $Template = $PrimaryTemplates->Next) {
-<option value="<%$Template->Id%>"
-<% ($Template->Id == $Default) && qq[ selected="selected"] |n %>
-><% loc($Template->Name) %>
-</option>
+<option value="<%$Template->Id%>" <% ($Template->Id == $Default) && qq[ selected="selected"] |n %>><% loc($Template->Name) %></option>
 %}
 %while  (my $Template = $OtherTemplates->Next) {
-<option value="<%$Template->Id%>"
-<% defined($Default) && ($Template->Id == $Default) && qq[ selected="selected"] |n %>
-><&|/l, loc($Template->Name) &>Global template: [_1]</&>
-</option>
+<option value="<%$Template->Id%>" <% defined($Default) && ($Template->Id == $Default) && qq[ selected="selected"] |n %>><&|/l, loc($Template->Name) &>Global template: [_1]</&></option>
 %}
 </select>
 
@@ -78,10 +71,8 @@ $OtherTemplates->OrderBy(FIELD => 'Name');
 
 </%INIT>
 <%ARGS>
-
 $Queue => undef
 $Default => 'none'
 $DefaultQueue => undef
 $Name => 'Template'
-
 </%ARGS>

commit 0810d026ee1ae6e0a52c03365d7b287b7332ab9e
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Mon Nov 1 14:41:07 2010 -0400

    canonicalize custom-fields in nav, not customfields.

diff --git a/share/html/Elements/Tabs b/share/html/Elements/Tabs
index a1c68e5..1d6600a 100755
--- a/share/html/Elements/Tabs
+++ b/share/html/Elements/Tabs
@@ -130,7 +130,7 @@ if ( $request_path =~ qr{.*} ) {
         my $queues = $admin->child( queues => title => loc('Queues'), path => '/Admin/Queues/', );
         $queues->child( loc('Select'), path => "/Admin/Queues/" );
         $queues->child( loc('Create'), path => "/Admin/Queues/Modify.html?Create=1" );
-        my $cfs = $admin->child( customfields => title => loc('Custom Fields'), path => '/Admin/CustomFields/',
+        my $cfs = $admin->child( 'custom-fields' => title => loc('Custom Fields'), path => '/Admin/CustomFields/',
         );
         $cfs->child( select => title => loc('Select'), path => "/Admin/CustomFields/" );
         $cfs->child( create => title => loc('Create'), path => "/Admin/CustomFields/Modify.html?Create=1" );
diff --git a/t/web/cf_access.t b/t/web/cf_access.t
index 276293e..9630d2b 100644
--- a/t/web/cf_access.t
+++ b/t/web/cf_access.t
@@ -13,11 +13,7 @@ ok $m->login, 'logged in';
 
 diag "Create a CF";
 {
-    $m->follow_link( text => 'Configuration' );
-    $m->title_is(q/RT Administration/, 'admin screen');
-    $m->follow_link( text => 'Custom Fields' );
-    $m->title_is(q/Select a Custom Field/, 'admin-cf screen');
-    $m->follow_link( text => 'Create' );
+    $m->follow_link( id => 'config-custom-fields-create');
     $m->submit_form(
         form_name => "ModifyCustomField",
         fields => {
@@ -33,13 +29,11 @@ diag "apply the CF to General queue";
 my ( $cf, $cfid, $tid );
 {
     $m->title_is(q/Created CustomField img/, 'admin-cf created');
-    $m->follow_link( text => 'Queues' );
-    $m->title_is(q/Admin queues/, 'admin-queues screen');
+    $m->follow_link( id => 'config-queues');
     $m->follow_link( text => 'General' );
-    $m->title_is(q/Editing Configuration for queue General/, 'admin-queue: general');
-    $m->follow_link( text => 'Ticket Custom Fields' );
-
-    $m->title_is(q/Edit Custom Fields for General/, 'admin-queue: general cfid');
+    $m->title_is(q/Configuration for queue General/, 'admin-queue: general');
+    $m->follow_link( id => 'page-ticket-custom-fields');
+    $m->title_is(q/Custom Fields for queue General/, 'admin-queue: general cfid');
     $m->form_name('EditCustomFields');
 
     # Sort by numeric IDs in names
diff --git a/t/web/cf_date.t b/t/web/cf_date.t
index 085f216..81af084 100644
--- a/t/web/cf_date.t
+++ b/t/web/cf_date.t
@@ -15,7 +15,7 @@ my $cf_name = 'test cf date';
 my $cfid;
 diag "Create a CF";
 {
-    $m->follow_link( id => 'config-customfields-create');
+    $m->follow_link( id => 'config-custom-fields-create');
     $m->submit_form(
         form_name => "ModifyCustomField",
         fields    => {

commit 23442421133b09eb64c3ec53cd33fc6c76221c46
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Mon Nov 1 14:57:05 2010 -0400

    work on queue - cf mapping  nav

diff --git a/share/html/Elements/Tabs b/share/html/Elements/Tabs
index 1d6600a..c4e1b42 100755
--- a/share/html/Elements/Tabs
+++ b/share/html/Elements/Tabs
@@ -328,29 +328,20 @@ if ( $request_path =~ qr'Admin/Queues' ) {
 
 
 
-        $queue->child( loc('Ticket Custom Fields'),
-             path => '/Admin/Queues/CustomFields.html?sub_type=RT::Ticket&id='
-                 . $id );
-
-        $queue->child( loc('Transaction Custom Fields'),
-            path =>
-                '/Admin/Queues/CustomFields.html?sub_type=RT::Ticket-RT::Transaction&id='
-                . $id );
-
-        $queue->child( loc('Group Rights'),
-                       path => "/Admin/Queues/GroupRights.html?id=" . $id );
-        $queue->child( loc('User Rights'),
-                       path => "/Admin/Queues/UserRights.html?id=" . $id );
+        my $ticket_cfs = $queue->child( loc('Ticket Custom Fields'), path => '/Admin/Queues/CustomFields.html?SubType=RT::Ticket&id=' . $id );
+
+        my $txn_cfs = $queue->child( loc('Transaction Custom Fields'), path => '/Admin/Queues/CustomFields.html?SubType=RT::Ticket-RT::Transaction&id=' . $id );
+
+        $queue->child( loc('Group Rights'), path => "/Admin/Queues/GroupRights.html?id=" . $id );
+        $queue->child( loc('User Rights'), path => "/Admin/Queues/UserRights.html?id=" . $id );
     }
 }
 
 if ( $request_path =~ qr'/Admin/Users' ) {
-    if ( $session{'CurrentUser'}
-         ->HasRight( Object => $RT::System, Right => 'AdminUsers' ) )
+    if ( $session{'CurrentUser'}->HasRight( Object => $RT::System, Right => 'AdminUsers' ) )
     {
         PageMenu->child(select => title => loc('Select'), path => "/Admin/Users/" );
-        PageMenu->child( create => title =>  loc('Create'), path      => "/Admin/Users/Modify.html?Create=1",
-                       );
+        PageMenu->child( create => title =>  loc('Create'), path      => "/Admin/Users/Modify.html?Create=1");
     }
     if ( my $id = $m->request_args->{'id'} ) {
         my $obj = RT::User->new( $session{'CurrentUser'} );

commit b7fa4efb40ba3ac17820601cae4e7df3b84e2e81
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Mon Nov 1 14:57:40 2010 -0400

    fix queue-cf mapping tests

diff --git a/t/customfields/sort_order.t b/t/customfields/sort_order.t
index 3dfdf3f..d210f31 100644
--- a/t/customfields/sort_order.t
+++ b/t/customfields/sort_order.t
@@ -51,8 +51,7 @@ diag "reorder CFs: C, A and B";
 {
     $m->get( '/Admin/Queues/' );
     $m->follow_link_ok( {text => $queue->id} );
-    $m->follow_link_ok( {text => 'Ticket Custom Fields'} );
-
+    $m->follow_link_ok( {id  => 'page-ticket-custom-fields'} );
     my @tmp = ($m->content =~ /(CF [ABC])/g);
     is_deeply(\@tmp, ['CF B', 'CF A', 'CF C']);
 
@@ -83,8 +82,7 @@ diag "check ticket create, display and edit pages";
     
     @tmp = ($m->content =~ /(CF [ABC])/g);
     is_deeply(\@tmp, ['CF C', 'CF A', 'CF B']);
-
-    $m->follow_link_ok( {text => 'Custom Fields'} );
+    $m->follow_link_ok( {id => 'page-basics'});
 
     @tmp = ($m->content =~ /(CF [ABC])/g);
     is_deeply(\@tmp, ['CF C', 'CF A', 'CF B']);

commit d15448453c96d432272a3102c3fdc626f2b36296
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Mon Nov 1 15:52:45 2010 -0400

    generalized the "Redirect and show results" mechanism

diff --git a/share/html/Elements/MaybeRedirectForResults b/share/html/Elements/MaybeRedirectForResults
new file mode 100644
index 0000000..0cf933b
--- /dev/null
+++ b/share/html/Elements/MaybeRedirectForResults
@@ -0,0 +1,66 @@
+%# BEGIN BPS TAGGED BLOCK {{{
+%#
+%# COPYRIGHT:
+%#
+%# This software is Copyright (c) 1996-2010 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 }}}
+<%args>
+$Actions => []
+$ARGSRef => {}
+$Path
+$id
+</%args>
+<%init>
+if ( @$Actions ) {
+    # We've done something, so we need to clear the decks to avoid
+    # resubmission on refresh.
+    # But we need to store Actions somewhere too, so we don't lose them.
+    my $key = Digest::MD5::md5_hex( rand(1024) );
+    push @{ $session{"Actions"}->{$key} ||= [] }, @$Actions;
+    $session{'i'}++;
+    my $url = RT->Config->Get('WebURL') . "$Path?id=" . $id . "&results=" . $key;
+    $url .= '#' . $ARGSRef->{Anchor} if $ARGSRef->{Anchor};
+    RT::Interface::Web::Redirect($url);
+}
+</%init>
diff --git a/share/html/Ticket/Display.html b/share/html/Ticket/Display.html
index 43e834a..257d1a8 100755
--- a/share/html/Ticket/Display.html
+++ b/share/html/Ticket/Display.html
@@ -196,10 +196,10 @@ $m->callback(
 
 # This code does automatic redirection if any updates happen. 
 $m->comp(
-    'Elements/MaybeRedirectForResults',
+    '/Elements/MaybeRedirectForResults',
     Actions     => \@Actions,
     Path        => 'Ticket/Display.html',
-    TicketObj   => $TicketObj,
+    id          => $TicketObj->id,
     ARGSRef     => \%ARGS
 );
 

commit 7c2cdc00d7cb565f913708dd4a2e5ce020ad0f7b
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Mon Nov 1 15:53:13 2010 -0400

    get dashboard create/modify to use the redirect mechanism

diff --git a/share/html/Dashboards/Modify.html b/share/html/Dashboards/Modify.html
index cb90aa9..0c025ff 100755
--- a/share/html/Dashboards/Modify.html
+++ b/share/html/Dashboards/Modify.html
@@ -148,6 +148,17 @@ if (!$Create && !$tried_create && $id && $ARGS{'Save'}) {
 
 }
 
+
+# This code does automatic redirection if any updates happen. 
+$m->comp(
+    '/Elements/MaybeRedirectForResults',
+    Actions     => \@results,
+    Path        => 'Dashboards/Modify.html',
+    id              => $id,
+    ARGSRef     => \%ARGS
+);
+
+
 my $can_delete = $Dashboard->CurrentUserCanDelete;
 
 if (!$Create && !$tried_create && $id && $ARGS{'Delete'}) {

commit 3ff50155862df46bef4262f00edb5d1d4bbe4d58
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Mon Nov 1 18:10:57 2010 -0400

    Give modifydashboard a form id

diff --git a/share/html/Dashboards/Modify.html b/share/html/Dashboards/Modify.html
index 0c025ff..48a1bd0 100755
--- a/share/html/Dashboards/Modify.html
+++ b/share/html/Dashboards/Modify.html
@@ -47,13 +47,12 @@
 %# END BPS TAGGED BLOCK }}}
 <& /Elements/Header, Title => $title &>
 <& /Dashboards/Elements/Tabs,
-    current_subtab => $current_subtab,
     Title => $title,
     $Create ? () : (DashboardObj => $Dashboard),
 &>
 <& /Elements/ListActions, actions => \@results &>
 
-<form action="<%RT->Config->Get('WebPath')%>/Dashboards/Modify.html" method="post" enctype="multipart/form-data" name="ModifyDashboard">
+<form action="<%RT->Config->Get('WebPath')%>/Dashboards/Modify.html" method="post" enctype="multipart/form-data" name="ModifyDashboard" id="ModifyDashboard">
 
 %unless ($Dashboard->Id) {
 <input type="hidden" class="hidden" name="id" value="new" />
diff --git a/share/html/Ticket/Elements/MaybeRedirectForResults b/share/html/Ticket/Elements/MaybeRedirectForResults
deleted file mode 100644
index e31b5a5..0000000
--- a/share/html/Ticket/Elements/MaybeRedirectForResults
+++ /dev/null
@@ -1,66 +0,0 @@
-%# BEGIN BPS TAGGED BLOCK {{{
-%#
-%# COPYRIGHT:
-%#
-%# This software is Copyright (c) 1996-2010 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 }}}
-<%args>
-$Actions => []
-$ARGSRef => {}
-$Path    => 'Ticket/Display.html'
-$TicketObj
-</%args>
-<%init>
-if ( @$Actions ) {
-    # We've done something, so we need to clear the decks to avoid
-    # resubmission on refresh.
-    # But we need to store Actions somewhere too, so we don't lose them.
-    my $key = Digest::MD5::md5_hex( rand(1024) );
-    push @{ $session{"Actions"}->{$key} ||= [] }, @$Actions;
-    $session{'i'}++;
-    my $url = RT->Config->Get('WebURL') . "$Path?id=" . $TicketObj->id . "&results=" . $key;
-    $url .= '#' . $ARGSRef->{Anchor} if $ARGSRef->{Anchor};
-    RT::Interface::Web::Redirect($url);
-}
-</%init>

commit 0271cfff9a549985c189567c55a0209df7bb7e96
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Mon Nov 1 18:11:13 2010 -0400

    Slightly improve css on the dashboard modification page

diff --git a/share/html/Dashboards/Modify.html b/share/html/Dashboards/Modify.html
index 48a1bd0..1f02a9d 100755
--- a/share/html/Dashboards/Modify.html
+++ b/share/html/Dashboards/Modify.html
@@ -62,16 +62,14 @@
 
 <&|/Widgets/TitleBox, title => loc('Basics') &>
 <table>
-<tr><td align="right">
-<&|/l&>Name</&>:
-</td>
-<td><input name="Name" value="<%$Dashboard->Name%>" /></td>
+    <tr>
+     <td class="label"><&|/l&>Name</&>:</td>
+     <td class="value"><input name="Name" value="<%$Dashboard->Name%>" /></td>
+    </tr>
+    <tr>
+    <td class="label"><&|/l&>Privacy</&>:</td>
+    <td><& /Dashboards/Elements/SelectPrivacy, Name => "Privacy", Objects => \@privacies, Default => $Dashboard->Privacy &></td>
 </tr>
-<tr><td align="right">
-<&|/l&>Privacy</&>:
-</td><td>
-<& /Dashboards/Elements/SelectPrivacy, Name => "Privacy", Objects => \@privacies, Default => $Dashboard->Privacy &>
-</td></tr>
 </table>
 </&>
 <& /Elements/Submit, Name => 'Save', Label =>( $Create ? loc('Create') : loc('Save Changes') ) &>

commit e630e3b4decb40a705e6b8cdbc79e9a7dbc451e4
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Mon Nov 1 18:11:40 2010 -0400

    remove dead code

diff --git a/share/html/Dashboards/Modify.html b/share/html/Dashboards/Modify.html
index 1f02a9d..28050a4 100755
--- a/share/html/Dashboards/Modify.html
+++ b/share/html/Dashboards/Modify.html
@@ -80,7 +80,6 @@
 </form>
 <%INIT>
 
-my $current_subtab;
 my ($title, @results);
 my $tried_create = 0;
 
@@ -96,7 +95,6 @@ my @privacies = $Dashboard->$method;
 Abort(loc("Permission denied")) if @privacies == 0;
 
 if ($Create) {
-    $current_subtab = 'Dashboards/Modify.html?Create=1';
     $title = loc("Create a new dashboard");
 }
 else {
@@ -122,12 +120,10 @@ else {
 
     if ($id) {
         $title = loc("Modify the dashboard [_1]", $Dashboard->Name);
-        $current_subtab = 'Dashboards/Modify.html?id=' . $id;
     }	
     # If the create failed
     else {
         $Create = 1;
-        $current_subtab = 'Dashboards/Modify.html?Create=1';
         $title = loc("Create a new dashboard");
     }
 }

commit 18fb3677379464ae90ea3b3112805e7d3f4b1988
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Mon Nov 1 18:11:54 2010 -0400

    fix a broken refactoring in Dashboards

diff --git a/share/html/Dashboards/Subscription.html b/share/html/Dashboards/Subscription.html
index dc17cd7..d9134a1 100644
--- a/share/html/Dashboards/Subscription.html
+++ b/share/html/Dashboards/Subscription.html
@@ -53,7 +53,7 @@
 <& /Elements/ListActions, actions => \@results &>
 
 <form action="<%RT->Config->Get('WebPath')%>/Dashboards/Subscription.html" method="post" enctype="multipart/form-data" name="SubscribeDashboard">
-<input type="hidden" class="hidden" name="Id" value="<% $fields{'Id'} %>" />
+<input type="hidden" class="hidden" name="id" value="<% $fields{'DashboardId'} %>" />
 <table width="100%" border="0">
 <tr>
 

commit 887d3e72dacfe2e71441d5d0ef4e1c48bada3a45
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Mon Nov 1 18:12:23 2010 -0400

    Tidy the html we generate a bit

diff --git a/share/html/Elements/CreateTicket b/share/html/Elements/CreateTicket
index 5a69325..e694802 100755
--- a/share/html/Elements/CreateTicket
+++ b/share/html/Elements/CreateTicket
@@ -45,13 +45,9 @@
 %# those contributions and any derivatives thereof.
 %#
 %# END BPS TAGGED BLOCK }}}
-<form
-    action="<% RT->Config->Get('WebPath') %><% $SendTo %>"
-    name="CreateTicketInQueue"
-    id="CreateTicketInQueue"
+<form action="<% RT->Config->Get('WebPath') %><% $SendTo %>" name="CreateTicketInQueue" id="CreateTicketInQueue" \
 % $m->callback(CallbackName => 'InFormElement');
 >
-
 <&|/l, $m->scomp('/Elements/SelectNewTicketQueue', OnChange => 'document.CreateTicketInQueue.submit()', SendTo => $SendTo ) &><input type="submit" class="button" value="New ticket in" />&nbsp;[_1]</&>
 </form>
 <%ARGS>
diff --git a/share/html/Widgets/TitleBoxStart b/share/html/Widgets/TitleBoxStart
index 84bbf16..62663db 100755
--- a/share/html/Widgets/TitleBoxStart
+++ b/share/html/Widgets/TitleBoxStart
@@ -48,21 +48,17 @@
 <div class="titlebox<% $class ? " $class " : '' %>" id="<% $id %>">
   <div class="titlebox-title<% $title_class ? " $title_class" : ''%>">
 % if ($hideable) {
-    <span class="widget"><a href="#" 
-	onclick="return rollup('<%$tid%>');" 
-	title="Toggle visibility"></a>
-	</span>
+    <span class="widget"><a href="#" onclick="return rollup('<%$tid%>');" title="Toggle visibility"></a></span>
 % }
-    <span class="left">
-      	<% $title_href ? qq[<a href="$title_href">] : '' | n 
+    <span class="left"><%
+            $title_href ? qq[<a href="$title_href">] : '' | n
         %><% $title %><% $title_raw |n %><% $title_href ? "</a>" : '' |n%></span>
-    <span class="right<%($titleright_href || $titleright || $titleright_raw) ? '' : '-empty' %>">
-	<% $titleright_href ? qq[<a href="$titleright_href">] : '' | n %>
-	<% $titleright  %><% $titleright_raw |n%><% $titleright_href ? "</a>" : '' |n%>
+    <span class="right<%($titleright_href || $titleright || $titleright_raw) ? '' : '-empty' %>">\
+	<% $titleright_href ? qq[<a href="$titleright_href">] : '' | n %>\
+	<% $titleright  %><% $titleright_raw |n%><% $titleright_href ? "</a>" : '' |n%>\
     </span>
   </div>
   <div class="titlebox-content <% $bodyclass %>" id="<% $tid %>">
-
 <%ARGS>
 $class => ''
 $bodyclass => ''

commit 111894dbbbbcd91d9f43c5625429ef316ba97ed6
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Mon Nov 1 18:12:36 2010 -0400

    fix a 3.999 backport bug in "Reply"

diff --git a/share/html/Elements/Tabs b/share/html/Elements/Tabs
index c4e1b42..3d30f35 100755
--- a/share/html/Elements/Tabs
+++ b/share/html/Elements/Tabs
@@ -468,7 +468,7 @@ if ( $request_path =~ qr'(?:Ticket|Search)/' ) {
              or $obj->CurrentUserHasRight('ReplyToTicket') )
         {
             $actions->child( loc('Reply'),
-                     path => "/Ticket/Update.html?action=respond&id=" . $id );
+                     path => "/Ticket/Update.html?Action=Respond&id=" . $id );
         }
 
         if ( $can{'ModifyTicket'} ) {

commit 05fbf0c27f50a621acac6dd320a99ffa50b07188
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Mon Nov 1 18:12:52 2010 -0400

    Grammar nit

diff --git a/t/customfields/access_via_queue.t b/t/customfields/access_via_queue.t
index 3bc4c62..2612fec 100644
--- a/t/customfields/access_via_queue.t
+++ b/t/customfields/access_via_queue.t
@@ -98,7 +98,7 @@ ok( RT::Test->set_rights(
 my ($baseurl, $m) = RT::Test->started_ok;
 ok $m->login( tester => 'password' ), 'logged in';
 
-diag "check that we have no the CF on the create";
+diag "check that we don't have the cf on create";
 {
     $m->submit_form(
         form_name => "CreateTicketInQueue",

commit 4d40864256488459538d065d165f628b2da1bb54
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Mon Nov 1 18:13:41 2010 -0400

    Numerous fixes to form names in tests

diff --git a/t/customfields/access_via_queue.t b/t/customfields/access_via_queue.t
index 2612fec..b6a1abe 100644
--- a/t/customfields/access_via_queue.t
+++ b/t/customfields/access_via_queue.t
@@ -117,7 +117,7 @@ diag "check that we don't have the cf on create";
     ok $tid, "created a ticket succesfully";
     $m->content_lacks($cf_name, "don't see CF");
 
-    $m->follow_link( text => 'Custom Fields' );
+    $m->follow_link( id => 'page-basics');
     $form = $m->form_name('TicketModify');
     $cf_field = "Object-RT::Ticket-$tid-CustomField-". $cf->id ."-Value";
     ok !$form->find_input( $cf_field ), 'no form field on the page';
@@ -142,13 +142,13 @@ diag "check that owner can see and edit CF";
     ok $m->goto_ticket( $tid ), "opened ticket";
     $m->content_contains($cf_name, "see CF");
 
-    $m->follow_link( text => 'Custom Fields' );
+    $m->follow_link( id => 'page-basics');
     my $form = $m->form_name('TicketModify');
     my $cf_field = "Object-RT::Ticket-$tid-CustomField-". $cf->id ."-Value";
     ok $form->find_input( $cf_field ), 'form field on the page';
 
     $m->submit_form(
-        form_number => 3,
+        form_name => 'TicketModify',
         fields => {
             $cf_field => "changed cf",
         },
diff --git a/t/web/cf_date.t b/t/web/cf_date.t
index 81af084..7a28806 100644
--- a/t/web/cf_date.t
+++ b/t/web/cf_date.t
@@ -3,7 +3,7 @@
 use strict;
 use warnings;
 
-use RT::Test tests => 35;
+use RT::Test tests => 33;
 
 my ( $baseurl, $m ) = RT::Test->started_ok;
 ok $m->login, 'logged in as root';
@@ -84,7 +84,7 @@ diag 'check search build page';
 {
     $m->get_ok( $baseurl . '/Search/Build.html?Query=Queue=1' );
 
-    $m->form_name('TicketModify');
+    $m->form_name('BuildQuery');
     my ($cf_op) =
       $m->find_all_inputs( type => 'option', name_regex => qr/test cf date/ );
     is_deeply(
@@ -108,7 +108,7 @@ diag 'check search build page';
     $m->content_lacks( '2010-05-06', 'did not get the wrong ticket' );
 
     $m->get_ok( $baseurl . '/Search/Build.html?Query=Queue=1' );
-    $m->form_name('TicketModify');
+    $m->form_name('BuildQuery');
     $m->submit_form(
         fields => {
             $cf_op->name    => '<',
@@ -119,7 +119,7 @@ diag 'check search build page';
     $m->content_contains( 'Found 1 ticket', 'Found 1 ticket' );
 
     $m->get_ok( $baseurl . '/Search/Build.html?Query=Queue=1' );
-    $m->form_name('TicketModify');
+    $m->form_name('BuildQuery');
     $m->submit_form(
         fields => {
             $cf_op->name    => '>',
@@ -130,7 +130,7 @@ diag 'check search build page';
     $m->content_contains( 'Found 1 ticket', 'Found 1 ticket' );
 
     $m->get_ok( $baseurl . '/Search/Build.html?Query=Queue=1' );
-    $m->form_name('TicketModify');
+    $m->form_name('BuildQuery');
     $m->submit_form(
         fields => {
             $cf_op->name    => '=',
@@ -141,7 +141,7 @@ diag 'check search build page';
     $m->content_contains( 'Found 0 tickets', 'Found 0 tickets' );
 
     $m->get_ok( $baseurl . '/Search/Build.html?Query=Queue=1' );
-    $m->form_name('TicketModify');
+    $m->form_name('BuildQuery');
     $m->submit_form(
         fields => {
             $cf_op->name    => '<',
@@ -152,7 +152,7 @@ diag 'check search build page';
     $m->content_contains( 'Found 0 tickets', 'Found 0 tickets' );
 
     $m->get_ok( $baseurl . '/Search/Build.html?Query=Queue=1' );
-    $m->form_name('TicketModify');
+    $m->form_name('BuildQuery');
     $m->submit_form(
         fields => {
             $cf_op->name    => '>',
diff --git a/t/web/cf_datetime.t b/t/web/cf_datetime.t
index 33b868d..6019859 100644
--- a/t/web/cf_datetime.t
+++ b/t/web/cf_datetime.t
@@ -124,7 +124,7 @@ diag 'check search build page';
 {
     $m->get_ok( $baseurl . '/Search/Build.html?Query=Queue=1' );
 
-    $m->form_name('TicketModify');
+    $m->form_name('BuildQuery');
     my ($cf_op) =
       $m->find_all_inputs( type => 'option', name_regex => qr/test cf datetime/ );
     is_deeply(
@@ -159,7 +159,7 @@ diag 'check search build page';
     $m->login( 'shanghai', 'password', logout => 1 );
 
     $m->get_ok( $baseurl . '/Search/Build.html?Query=Queue=1' );
-    $m->form_name('TicketModify');
+    $m->form_name('BuildQuery');
     $m->submit_form(
         fields => {
             $cf_op->name    => '=',
@@ -170,7 +170,7 @@ diag 'check search build page';
     $m->content_contains( 'Found 1 ticket', 'Found 1 ticket' );
 
     $m->get_ok( $baseurl . '/Search/Build.html?Query=Queue=1' );
-    $m->form_name('TicketModify');
+    $m->form_name('BuildQuery');
     $m->submit_form(
         fields => {
             $cf_op->name    => '<',
@@ -181,7 +181,7 @@ diag 'check search build page';
     $m->content_contains( 'Found 2 ticket', 'Found 2 ticket' );
 
     $m->get_ok( $baseurl . '/Search/Build.html?Query=Queue=1' );
-    $m->form_name('TicketModify');
+    $m->form_name('BuildQuery');
     $m->submit_form(
         fields => {
             $cf_op->name    => '>',
@@ -192,7 +192,7 @@ diag 'check search build page';
     $m->content_contains( 'Found 2 tickets', 'Found 2 tickets' );
 
     $m->get_ok( $baseurl . '/Search/Build.html?Query=Queue=1' );
-    $m->form_name('TicketModify');
+    $m->form_name('BuildQuery');
     $m->submit_form(
         fields => {
             $cf_op->name    => '=',
@@ -203,7 +203,7 @@ diag 'check search build page';
     $m->content_contains( 'Found 1 ticket', 'Found 1 ticket' );
 
     $m->get_ok( $baseurl . '/Search/Build.html?Query=Queue=1' );
-    $m->form_name('TicketModify');
+    $m->form_name('BuildQuery');
     $m->submit_form(
         fields => {
             $cf_op->name    => '=',
diff --git a/t/web/dashboards-permissions.t b/t/web/dashboards-permissions.t
index bce51dd..dc66d8a 100644
--- a/t/web/dashboards-permissions.t
+++ b/t/web/dashboards-permissions.t
@@ -2,7 +2,7 @@
 use strict;
 use warnings;
 
-use RT::Test nodata => 1, tests => 7;
+use RT::Test nodata => 1, tests => 6;
 my ($baseurl, $m) = RT::Test->started_ok;
 
 my $url = $m->rt_base_url;
@@ -28,9 +28,8 @@ $user_obj->PrincipalObj->GrantRight(Right => $_, Object => $RT::System)
 
 ok $m->login(customer => 'customer'), "logged in";
 
-$m->get_ok("$url/Dashboards");
 
-$m->follow_link_ok({text => "New"});
+$m->follow_link_ok( {id => 'tools-dashboards-create'});
 $m->form_name('ModifyDashboard');
 is_deeply([$m->current_form->find_input('Privacy')->possible_values], ["RT::User-" . $user_obj->Id], "the only selectable privacy is user");
 $m->content_lacks('Delete', "Delete button hidden because we are creating");
diff --git a/t/web/dashboards.t b/t/web/dashboards.t
index 64f1370..a1ed228 100644
--- a/t/web/dashboards.t
+++ b/t/web/dashboards.t
@@ -64,7 +64,7 @@ $m->content_contains("Create");
 $m->get_ok($url."Dashboards/index.html");
 $m->content_contains("New", "'New' link because we now have ModifyOwnDashboard");
 
-$m->follow_link_ok({ id => 'Tools-Dashboards-Create'});
+$m->follow_link_ok({ id => 'tools-dashboards-create'});
 $m->form_name('ModifyDashboard');
 $m->field("Name" => 'different dashboard');
 $m->content_lacks('Delete', "Delete button hidden because we are creating");
@@ -141,7 +141,7 @@ $ticket->Create(
 	Subject   => 'dashboard test',
 );
 
-$m->follow_link_ok({text => 'different dashboard'});
+$m->follow_link_ok({id => 'page-show'});
 $m->content_contains("50 highest priority tickets I own");
 $m->content_contains("50 newest unowned tickets");
 $m->content_lacks("Bookmarked Tickets");
@@ -153,7 +153,7 @@ $m->content_contains("50 newest unowned tickets");
 $m->content_lacks("Bookmarked Tickets");
 $m->content_contains("dashboard test", "ticket subject");
 
-$m->get_ok("/Dashboards/Subscription.html?DashboardId=$id");
+$m->get_ok("/Dashboards/Subscription.html?id=$id");
 $m->form_name('SubscribeDashboard');
 $m->click_button(name => 'Save');
 $m->content_contains("Permission denied");
@@ -231,7 +231,7 @@ $m->click_button(value => 'Create');
 $m->content_lacks("No permission to create dashboards");
 $m->content_contains("Saved dashboard system dashboard");
 
-$m->follow_link_ok({text => 'Content'});
+$m->follow_link_ok({id => 'page-content'});
 
 $form = $m->form_name('Dashboard-Searches-body');
 @input = $form->find_input('Searches-body-Available');
@@ -244,7 +244,7 @@ $m->content_contains("Dashboard updated");
 
 $m->content_contains("The following queries may not be visible to all users who can see this dashboard.");
 
-$m->follow_link_ok({text => 'system dashboard'});
+$m->follow_link_ok({id => 'page-show'});
 $m->content_contains("personal search", "saved search shows up");
 $m->content_contains("dashboard test", "matched ticket shows up");
 
diff --git a/t/web/gnupg-select-keys-on-create.t b/t/web/gnupg-select-keys-on-create.t
index a7c603c..c53786d 100644
--- a/t/web/gnupg-select-keys-on-create.t
+++ b/t/web/gnupg-select-keys-on-create.t
@@ -50,7 +50,7 @@ diag "check that signing doesn't work if there is no key";
     RT::Test->clean_caught_mails;
 
     ok $m->goto_create_ticket( $queue ), "UI -> create ticket";
-    $m->form_name('TicketModify');
+    $m->form_name('TicketCreate');
     $m->tick( Sign => 1 );
     $m->field( Requestors => 'rt-test at example.com' );
     $m->field( Content => 'Some content' );
@@ -77,7 +77,7 @@ diag "check that things don't work if there is no key";
     RT::Test->clean_caught_mails;
 
     ok $m->goto_create_ticket( $queue ), "UI -> create ticket";
-    $m->form_name('TicketModify');
+    $m->form_name('TicketCreate');
     $m->tick( Encrypt => 1 );
     $m->field( Requestors => 'rt-test at example.com' );
     $m->field( Content => 'Some content' );
@@ -91,7 +91,7 @@ diag "check that things don't work if there is no key";
         'problems with keys'
     );
 
-    my $form = $m->form_name('TicketModify');
+    my $form = $m->form_name('TicketCreate');
     ok !$form->find_input( 'UseKey-rt-test at example.com' ), 'no key selector';
 
     my @mail = RT::Test->fetch_caught_mails;
@@ -115,7 +115,7 @@ diag "check that things still doesn't work if key is not trusted";
     RT::Test->clean_caught_mails;
 
     ok $m->goto_create_ticket( $queue ), "UI -> create ticket";
-    $m->form_name('TicketModify');
+    $m->form_name('TicketCreate');
     $m->tick( Encrypt => 1 );
     $m->field( Requestors => 'rt-test at example.com' );
     $m->field( Content => 'Some content' );
@@ -129,7 +129,7 @@ diag "check that things still doesn't work if key is not trusted";
         'problems with keys'
     );
 
-    my $form = $m->form_name('TicketModify');
+    my $form = $m->form_name('TicketCreate');
     ok my $input = $form->find_input( 'UseKey-rt-test at example.com' ), 'found key selector';
     is scalar $input->possible_values, 1, 'one option';
 
@@ -164,7 +164,7 @@ diag "check that things still doesn't work if two keys are not trusted";
     RT::Test->clean_caught_mails;
 
     ok $m->goto_create_ticket( $queue ), "UI -> create ticket";
-    $m->form_name('TicketModify');
+    $m->form_name('TicketCreate');
     $m->tick( Encrypt => 1 );
     $m->field( Requestors => 'rt-test at example.com' );
     $m->field( Content => 'Some content' );
@@ -178,7 +178,7 @@ diag "check that things still doesn't work if two keys are not trusted";
         'problems with keys'
     );
 
-    my $form = $m->form_name('TicketModify');
+    my $form = $m->form_name('TicketCreate');
     ok my $input = $form->find_input( 'UseKey-rt-test at example.com' ), 'found key selector';
     is scalar $input->possible_values, 2, 'two options';
 
@@ -211,7 +211,7 @@ diag "check that we see key selector even if only one key is trusted but there a
     RT::Test->clean_caught_mails;
 
     ok $m->goto_create_ticket( $queue ), "UI -> create ticket";
-    $m->form_name('TicketModify');
+    $m->form_name('TicketCreate');
     $m->tick( Encrypt => 1 );
     $m->field( Requestors => 'rt-test at example.com' );
     $m->field( Content => 'Some content' );
@@ -225,7 +225,7 @@ diag "check that we see key selector even if only one key is trusted but there a
         'problems with keys'
     );
 
-    my $form = $m->form_name('TicketModify');
+    my $form = $m->form_name('TicketCreate');
     ok my $input = $form->find_input( 'UseKey-rt-test at example.com' ), 'found key selector';
     is scalar $input->possible_values, 2, 'two options';
 
@@ -240,7 +240,7 @@ diag "check that key selector works and we can select trusted key";
     RT::Test->clean_caught_mails;
 
     ok $m->goto_create_ticket( $queue ), "UI -> create ticket";
-    $m->form_name('TicketModify');
+    $m->form_name('TicketCreate');
     $m->tick( Encrypt => 1 );
     $m->field( Requestors => 'rt-test at example.com' );
     $m->field( Content => 'Some content' );
@@ -254,7 +254,7 @@ diag "check that key selector works and we can select trusted key";
         'problems with keys'
     );
 
-    my $form = $m->form_name('TicketModify');
+    my $form = $m->form_name('TicketCreate');
     ok my $input = $form->find_input( 'UseKey-rt-test at example.com' ), 'found key selector';
     is scalar $input->possible_values, 2, 'two options';
 
@@ -274,7 +274,7 @@ diag "check encrypting of attachments";
     RT::Test->clean_caught_mails;
 
     ok $m->goto_create_ticket( $queue ), "UI -> create ticket";
-    $m->form_name('TicketModify');
+    $m->form_name('TicketCreate');
     $m->tick( Encrypt => 1 );
     $m->field( Requestors => 'rt-test at example.com' );
     $m->field( Content => 'Some content' );
@@ -289,7 +289,7 @@ diag "check encrypting of attachments";
         'problems with keys'
     );
 
-    my $form = $m->form_name('TicketModify');
+    my $form = $m->form_name('TicketCreate');
     ok my $input = $form->find_input( 'UseKey-rt-test at example.com' ), 'found key selector';
     is scalar $input->possible_values, 2, 'two options';
 
diff --git a/t/web/gnupg-select-keys-on-update.t b/t/web/gnupg-select-keys-on-update.t
index 9d57e0a..acc4802 100644
--- a/t/web/gnupg-select-keys-on-update.t
+++ b/t/web/gnupg-select-keys-on-update.t
@@ -62,7 +62,7 @@ diag "check that signing doesn't work if there is no key";
 
     ok $m->goto_ticket( $tid ), "UI -> ticket #$tid";
     $m->follow_link_ok( { text => 'Reply' }, 'ticket -> reply' );
-    $m->form_name('TicketModify');
+    $m->form_name('TicketUpdate');
     $m->tick( Sign => 1 );
     $m->field( UpdateCc => 'rt-test at example.com' );
     $m->field( UpdateContent => 'Some content' );
@@ -92,7 +92,7 @@ diag "check that things don't work if there is no key";
 
     ok $m->goto_ticket( $tid ), "UI -> ticket #$tid";
     $m->follow_link_ok( { text => 'Reply' }, 'ticket -> reply' );
-    $m->form_name('TicketModify');
+    $m->form_name('TicketUpdate');
     $m->tick( Encrypt => 1 );
     $m->field( UpdateCc => 'rt-test at example.com' );
     $m->field( UpdateContent => 'Some content' );
@@ -106,7 +106,7 @@ diag "check that things don't work if there is no key";
         'problems with keys'
     );
 
-    my $form = $m->form_name('TicketModify');
+    my $form = $m->form_name('TicketUpdate');
     ok !$form->find_input( 'UseKey-rt-test at example.com' ), 'no key selector';
 
     my @mail = RT::Test->fetch_caught_mails;
@@ -132,7 +132,7 @@ diag "check that things still doesn't work if key is not trusted";
 
     ok $m->goto_ticket( $tid ), "UI -> ticket #$tid";
     $m->follow_link_ok( { text => 'Reply' }, 'ticket -> reply' );
-    $m->form_name('TicketModify');
+    $m->form_name('TicketUpdate');
     $m->tick( Encrypt => 1 );
     $m->field( UpdateCc => 'rt-test at example.com' );
     $m->field( UpdateContent => 'Some content' );
@@ -146,7 +146,7 @@ diag "check that things still doesn't work if key is not trusted";
         'problems with keys'
     );
 
-    my $form = $m->form_name('TicketModify');
+    my $form = $m->form_name('TicketUpdate');
     ok my $input = $form->find_input( 'UseKey-rt-test at example.com' ), 'found key selector';
     is scalar $input->possible_values, 1, 'one option';
 
@@ -182,7 +182,7 @@ diag "check that things still doesn't work if two keys are not trusted";
 
     ok $m->goto_ticket( $tid ), "UI -> ticket #$tid";
     $m->follow_link_ok( { text => 'Reply' }, 'ticket -> reply' );
-    $m->form_name('TicketModify');
+    $m->form_name('TicketUpdate');
     $m->tick( Encrypt => 1 );
     $m->field( UpdateCc => 'rt-test at example.com' );
     $m->field( UpdateContent => 'Some content' );
@@ -196,7 +196,7 @@ diag "check that things still doesn't work if two keys are not trusted";
         'problems with keys'
     );
 
-    my $form = $m->form_name('TicketModify');
+    my $form = $m->form_name('TicketUpdate');
     ok my $input = $form->find_input( 'UseKey-rt-test at example.com' ), 'found key selector';
     is scalar $input->possible_values, 2, 'two options';
 
@@ -230,7 +230,7 @@ diag "check that we see key selector even if only one key is trusted but there a
 
     ok $m->goto_ticket( $tid ), "UI -> ticket #$tid";
     $m->follow_link_ok( { text => 'Reply' }, 'ticket -> reply' );
-    $m->form_name('TicketModify');
+    $m->form_name('TicketUpdate');
     $m->tick( Encrypt => 1 );
     $m->field( UpdateCc => 'rt-test at example.com' );
     $m->field( UpdateContent => 'Some content' );
@@ -244,7 +244,7 @@ diag "check that we see key selector even if only one key is trusted but there a
         'problems with keys'
     );
 
-    my $form = $m->form_name('TicketModify');
+    my $form = $m->form_name('TicketUpdate');
     ok my $input = $form->find_input( 'UseKey-rt-test at example.com' ), 'found key selector';
     is scalar $input->possible_values, 2, 'two options';
 
@@ -260,7 +260,7 @@ diag "check that key selector works and we can select trusted key";
 
     ok $m->goto_ticket( $tid ), "UI -> ticket #$tid";
     $m->follow_link_ok( { text => 'Reply' }, 'ticket -> reply' );
-    $m->form_name('TicketModify');
+    $m->form_name('TicketUpdate');
     $m->tick( Encrypt => 1 );
     $m->field( UpdateCc => 'rt-test at example.com' );
     $m->field( UpdateContent => 'Some content' );
@@ -274,7 +274,7 @@ diag "check that key selector works and we can select trusted key";
         'problems with keys'
     );
 
-    my $form = $m->form_name('TicketModify');
+    my $form = $m->form_name('TicketUpdate');
     ok my $input = $form->find_input( 'UseKey-rt-test at example.com' ), 'found key selector';
     is scalar $input->possible_values, 2, 'two options';
 
@@ -295,7 +295,7 @@ diag "check encrypting of attachments";
 
     ok $m->goto_ticket( $tid ), "UI -> ticket #$tid";
     $m->follow_link_ok( { text => 'Reply' }, 'ticket -> reply' );
-    $m->form_name('TicketModify');
+    $m->form_name('TicketUpdate');
     $m->tick( Encrypt => 1 );
     $m->field( UpdateCc => 'rt-test at example.com' );
     $m->field( UpdateContent => 'Some content' );
@@ -310,7 +310,7 @@ diag "check encrypting of attachments";
         'problems with keys'
     );
 
-    my $form = $m->form_name('TicketModify');
+    my $form = $m->form_name('TicketUpdate');
     ok my $input = $form->find_input( 'UseKey-rt-test at example.com' ), 'found key selector';
     is scalar $input->possible_values, 2, 'two options';
 
diff --git a/t/web/gnupg-tickyboxes.t b/t/web/gnupg-tickyboxes.t
index 9d6ee94..4596184 100644
--- a/t/web/gnupg-tickyboxes.t
+++ b/t/web/gnupg-tickyboxes.t
@@ -94,7 +94,7 @@ diag "check in read-only mode that queue's props influence create/update ticket
     foreach my $variant ( @variants ) {
         set_queue_crypt_options( %$variant );
         $m->get( $m->rt_base_url . "/Ticket/Update.html?Action=Respond&id=$id" );
-        $m->form_name('TicketModify');
+        $m->form_name('TicketUpdate');
         if ( $variant->{'Encrypt'} ) {
             ok $m->value('Encrypt', 2), "encrypt tick box is checked";
         } else {
diff --git a/t/web/search_rss.t b/t/web/search_rss.t
index da68dcf..d273e36 100644
--- a/t/web/search_rss.t
+++ b/t/web/search_rss.t
@@ -22,7 +22,7 @@ $agent->form_name('BuildQuery');
 $agent->field('idOp', '>');
 $agent->field('ValueOfid', '0');
 $agent->submit('DoSearch');
-$agent->follow_link_ok({text=>'Show Results'});
+$agent->follow_link_ok({id => 'search-current_search-results'});
 
 for ( 1 .. 5 ) {
     $agent->content_contains('Ticket ' . $_);
diff --git a/t/web/ticket-create-utf8.t b/t/web/ticket-create-utf8.t
index 49fe4ee..a43ee4c 100644
--- a/t/web/ticket-create-utf8.t
+++ b/t/web/ticket-create-utf8.t
@@ -32,7 +32,7 @@ ok $m->login, 'logged in';
 # create a ticket with a subject only
 foreach my $test_str ( $ru_test, $l1_test ) {
     ok $m->goto_create_ticket( $q ), "go to create ticket";
-    $m->form_name('TicketModify');
+    $m->form_name('TicketCreate');
     $m->field( Subject => $test_str );
     $m->submit;
 
@@ -49,7 +49,7 @@ foreach my $test_str ( $ru_test, $l1_test ) {
 foreach my $test_str ( $ru_test, $l1_test ) {
     foreach my $support_str ( $ru_support, $l1_support ) {
         ok $m->goto_create_ticket( $q ), "go to create ticket";
-        $m->form_name('TicketModify');
+        $m->form_name('TicketCreate');
         $m->field( Subject => $test_str );
         $m->field( Content => $support_str );
         $m->submit;
@@ -72,7 +72,7 @@ foreach my $test_str ( $ru_test, $l1_test ) {
 foreach my $test_str ( $ru_test, $l1_test ) {
     foreach my $support_str ( $ru_support, $l1_support ) {
         ok $m->goto_create_ticket( $q ), "go to create ticket";
-        $m->form_name('TicketModify');
+        $m->form_name('TicketCreate');
         $m->field( Subject => $test_str );
         $m->field( Content => $support_str );
         $m->submit;

commit 792b55bcfe44a24753db935f1f3fb7c3f0d67987
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Mon Nov 1 19:37:13 2010 -0400

    add personal saved searches to prefs menus

diff --git a/share/html/Elements/Tabs b/share/html/Elements/Tabs
index 3d30f35..e175114 100755
--- a/share/html/Elements/Tabs
+++ b/share/html/Elements/Tabs
@@ -221,12 +221,26 @@ if ( $request_path =~ qr{.*} ) {
         $about_me->child( about_me => title => loc('About me'), path => '/User/Prefs.html', );
         $about_me->child( search_options => title => loc('Search options'),
                           path => '/Prefs/SearchOptions.html', );
-        $about_me->child( myrt => title =>  loc('RT at a glance'), path => '/Prefs/MyRT.html',
-        );
-        $about_me->child( quicksearch => title => 'Quick search' => title => loc('Quick search'),
-                          path => '/Prefs/Quicksearch.html' );
-    }
+        $about_me->child( myrt => title => loc('RT at a glance'),
+                          path => '/Prefs/MyRT.html', );
+        $about_me->child( quicksearch => title => 'Quick search' => title =>
+                              loc('Quick search'),
+                          path => '/Prefs/Quicksearch.html'
+                        );
+
+        my $searches = [ $m->comp(
+                          "/Search/Elements/SearchesForObject",
+                          Object => RT::System->new( $session{'CurrentUser'} )) ];
+        my $i = 0;
+        for my $search (@$searches) {
+            $about_me->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') )

commit ed88c179720eeec81551e14e64c0bb4c96ad4579
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Mon Nov 1 19:37:40 2010 -0400

    perltidy

diff --git a/share/html/Elements/Tabs b/share/html/Elements/Tabs
index e175114..9bf1190 100755
--- a/share/html/Elements/Tabs
+++ b/share/html/Elements/Tabs
@@ -69,7 +69,7 @@ my $query_string = sub {
 };
 
 if ( $request_path =~ qr{.*} ) {
-    Menu->child( home => title =>  loc('HomePage'), path => '/' );
+    Menu->child( home => title => loc('HomePage'), path => '/' );
     my $tickets = Menu->child( search => title => loc('Tickets'),
                                path => '/Search/Build.html' );
     $tickets->child( simple => title => loc('Simple Search') => path =>
@@ -88,12 +88,14 @@ if ( $request_path =~ qr{.*} ) {
     }
 
     my $tools = Menu->child( loc('Tools'), path => '/Tools/index.html' );
-    my $dashes = $tools->child( loc('Dashboards'), path => '/Dashboards/index.html' );
+    my $dashes = $tools->child( loc('Dashboards'),
+                                path => '/Dashboards/index.html' );
 
     $dashes->child( loc('Select'), path => "/Dashboards/index.html" );
     my $dashboard = RT::Dashboard->new( $session{CurrentUser} );
     if ( $dashboard->_PrivacyObjects( create => 1 ) ) {
-        $dashes->child( loc('Create') => path => "/Dashboards/Modify.html?Create=1" );
+        $dashes->child(
+                loc('Create') => path => "/Dashboards/Modify.html?Create=1" );
     }
     my $reports = $tools->child( loc('Reports'),
                                  path => '/Tools/Reports/index.html' );
@@ -116,35 +118,46 @@ if ( $request_path =~ qr{.*} ) {
     {
         my $admin = Menu->child( Config => title => loc('Configuration'),
                                  path   => '/Admin/' );
-        my $users = $admin->child( loc('Users'),  path => '/Admin/Users/', );
+        my $users = $admin->child( loc('Users'), path => '/Admin/Users/', );
         $users->child( loc('Select'), path => "/Admin/Users/" );
-        $users->child( loc('Create'), path => "/Admin/Users/Modify.html?Create=1" );
+        $users->child( loc('Create'),
+                       path => "/Admin/Users/Modify.html?Create=1" );
 
-
-        my $groups = $admin->child( loc('Groups'), path => '/Admin/Groups/', );
+        my $groups
+            = $admin->child( loc('Groups'), path => '/Admin/Groups/', );
 
         $groups->child( loc('Select'), path => "/Admin/Groups/" );
-        $groups->child( loc('Create'), path => "/Admin/Groups/Modify.html?Create=1" );
-
+        $groups->child( loc('Create'),
+                        path => "/Admin/Groups/Modify.html?Create=1" );
 
-        my $queues = $admin->child( queues => title => loc('Queues'), path => '/Admin/Queues/', );
+        my $queues = $admin->child( queues => title => loc('Queues'),
+                                    path => '/Admin/Queues/', );
         $queues->child( loc('Select'), path => "/Admin/Queues/" );
-        $queues->child( loc('Create'), path => "/Admin/Queues/Modify.html?Create=1" );
-        my $cfs = $admin->child( 'custom-fields' => title => loc('Custom Fields'), path => '/Admin/CustomFields/',
-        );
-        $cfs->child( select => title => loc('Select'), path => "/Admin/CustomFields/" );
-        $cfs->child( create => title => loc('Create'), path => "/Admin/CustomFields/Modify.html?Create=1" );
-
-        my $admin_global
-            = $admin->child( global=> title => loc('Global'), path => '/Admin/Global/', );
-
-        my $scrips = $admin_global->child( loc('Scrips'), path => '/Admin/Global/Scripshtml', );
+        $queues->child( loc('Create'),
+                        path => "/Admin/Queues/Modify.html?Create=1" );
+        my $cfs = $admin->child(
+                             'custom-fields' => title => loc('Custom Fields'),
+                             path => '/Admin/CustomFields/', );
+        $cfs->child( select => title => loc('Select'),
+                     path   => "/Admin/CustomFields/" );
+        $cfs->child( create => title => loc('Create'),
+                     path => "/Admin/CustomFields/Modify.html?Create=1" );
+
+        my $admin_global =
+            $admin->child( global => title => loc('Global'),
+                           path   => '/Admin/Global/', );
+
+        my $scrips = $admin_global->child( loc('Scrips'),
+                                        path => '/Admin/Global/Scripshtml', );
         $scrips->child( loc('Select'), path => "/Admin/Global/Scrips.html" );
-        $scrips->child( loc('Create'), path => "/Admin/Global/Scrip.html?Create=1" );
+        $scrips->child( loc('Create'),
+                        path => "/Admin/Global/Scrip.html?Create=1" );
         my $templates = $admin_global->child( loc('Templates'),
-                              path => '/Admin/Global/Templates.html', );
-        $templates->child( loc('Select'), path => "/Admin/Global/Templates.html" );
-        $templates->child( loc('Create'), path => "/Admin/Global/Template.html?Create=1" );
+                                    path => '/Admin/Global/Templates.html', );
+        $templates->child( loc('Select'),
+                           path => "/Admin/Global/Templates.html" );
+        $templates->child( loc('Create'),
+                           path => "/Admin/Global/Template.html?Create=1" );
 
 #        my $workflows = $admin_global->child( loc('Workflows'), path => '/Admin/Global/Workflows/index.html', );
 #        {
@@ -206,7 +219,8 @@ if ( $request_path =~ qr{.*} ) {
     }
     my $about_me = Menu->child(
                     'preferences' => title =>
-                        loc('Logged in as <span class="current-user">[_1]</span>',
+                        loc(
+                        'Logged in as <span class="current-user">[_1]</span>',
                         $session{'CurrentUser'}->Name
                         ),
                     escape_title => 1,
@@ -217,8 +231,10 @@ if ( $request_path =~ qr{.*} ) {
                                                Object => $RT::System )
        )
     {
-        $about_me->child( settings => title => loc('Settings'), path => '/Prefs/Other.html', );
-        $about_me->child( about_me => title => loc('About me'), path => '/User/Prefs.html', );
+        $about_me->child( settings => title => loc('Settings'),
+                          path     => '/Prefs/Other.html', );
+        $about_me->child( about_me => title => loc('About me'),
+                          path     => '/User/Prefs.html', );
         $about_me->child( search_options => title => loc('Search options'),
                           path => '/Prefs/SearchOptions.html', );
         $about_me->child( myrt => title => loc('RT at a glance'),
@@ -261,7 +277,7 @@ if ( $request_path =~ qr'Dashboards/(\d+)?' ) {
             $tabs->child( loc('Content'),
                           path => "/Dashboards/Queries.html?id=" . $obj->id );
             $tabs->child( loc('Subscription'),
-                         path => "/Dashboards/Subscription.html?id=" . $obj->id )
+                      path => "/Dashboards/Subscription.html?id=" . $obj->id )
                 if $obj->CurrentUserCanSubscribe;
             $tabs->child( loc('Show'),
                         path => "/Dashboards/" . $obj->id . "/" . $obj->Name )
@@ -308,54 +324,67 @@ if ( $request_path =~ qr'/SelfService' ) {
 }
 
 if ( $request_path =~ qr'Admin/Queues' ) {
-    if ( $session{'CurrentUser'}->HasRight( Object => $RT::System, Right => 'AdminQueue' ) )
+    if ( $session{'CurrentUser'}
+         ->HasRight( Object => $RT::System, Right => 'AdminQueue' ) )
     {
     }
-    if ( my $id = $m->request_args->{'id'} ||$m->request_args->{'Queue'}) {
+    if ( my $id = $m->request_args->{'id'} || $m->request_args->{'Queue'} ) {
         my $queue_obj = RT::Queue->new( $session{'CurrentUser'} );
         $queue_obj->Load($id);
 
         my $queue = PageMenu();
-        $queue->child( basics => title =>loc('Basics'),
+        $queue->child( basics => title => loc('Basics'),
                        path => "/Admin/Queues/Modify.html?id=" . $id );
         $queue->child( people => title => loc('Watchers'),
                        path => "/Admin/Queues/People.html?id=" . $id );
-        my $templates = $queue->child( templates => title => loc('Templates'),
-                       path => "/Admin/Queues/Templates.html?id=" . $id );
-
-
-
-        $templates->child(select => title => loc('Select'), path => "/Admin/Queues/Templates.html?id=".$id
-);
-        $templates->child( create => title =>  loc('Create'), path  => "/Admin/Queues/Template.html?Create=1;Queue=".$id );
-
-        my $scrips = $queue->child( scrips => title => loc('Scrips'),
-                       path => "/Admin/Queues/Scrips.html?id=" . $id );
-
-
-
-        $scrips->child(select => title => loc('Select'), path => "/Admin/Queues/Scrips.html?id=".$id
-);
-        $scrips->child( create => title =>  loc('Create'), path  => "/Admin/Queues/Scrip.html?Create=1;Queue=".$id );
-
+        my $templates = $queue->child(
+                              templates => title => loc('Templates'),
+                              path => "/Admin/Queues/Templates.html?id=" . $id
+        );
 
+        $templates->child( select => title => loc('Select'),
+                           path => "/Admin/Queues/Templates.html?id=" . $id );
+        $templates->child(
+                   create => title => loc('Create'),
+                   path => "/Admin/Queues/Template.html?Create=1;Queue=" . $id
+        );
 
+        my $scrips = $queue->child(
+                                 scrips => title => loc('Scrips'),
+                                 path => "/Admin/Queues/Scrips.html?id=" . $id
+        );
 
+        $scrips->child( select => title => loc('Select'),
+                        path => "/Admin/Queues/Scrips.html?id=" . $id );
+        $scrips->child(
+                      create => title => loc('Create'),
+                      path => "/Admin/Queues/Scrip.html?Create=1;Queue=" . $id
+        );
 
-        my $ticket_cfs = $queue->child( loc('Ticket Custom Fields'), path => '/Admin/Queues/CustomFields.html?SubType=RT::Ticket&id=' . $id );
+        my $ticket_cfs = $queue->child( loc('Ticket Custom Fields'),
+              path => '/Admin/Queues/CustomFields.html?SubType=RT::Ticket&id='
+                  . $id );
 
-        my $txn_cfs = $queue->child( loc('Transaction Custom Fields'), path => '/Admin/Queues/CustomFields.html?SubType=RT::Ticket-RT::Transaction&id=' . $id );
+        my $txn_cfs = $queue->child( loc('Transaction Custom Fields'),
+            path =>
+                '/Admin/Queues/CustomFields.html?SubType=RT::Ticket-RT::Transaction&id='
+                . $id );
 
-        $queue->child( loc('Group Rights'), path => "/Admin/Queues/GroupRights.html?id=" . $id );
-        $queue->child( loc('User Rights'), path => "/Admin/Queues/UserRights.html?id=" . $id );
+        $queue->child( loc('Group Rights'),
+                       path => "/Admin/Queues/GroupRights.html?id=" . $id );
+        $queue->child( loc('User Rights'),
+                       path => "/Admin/Queues/UserRights.html?id=" . $id );
     }
 }
 
 if ( $request_path =~ qr'/Admin/Users' ) {
-    if ( $session{'CurrentUser'}->HasRight( Object => $RT::System, Right => 'AdminUsers' ) )
+    if ( $session{'CurrentUser'}
+         ->HasRight( Object => $RT::System, Right => 'AdminUsers' ) )
     {
-        PageMenu->child(select => title => loc('Select'), path => "/Admin/Users/" );
-        PageMenu->child( create => title =>  loc('Create'), path      => "/Admin/Users/Modify.html?Create=1");
+        PageMenu->child( select => title => loc('Select'),
+                         path   => "/Admin/Users/" );
+        PageMenu->child( create => title => loc('Create'),
+                         path => "/Admin/Users/Modify.html?Create=1" );
     }
     if ( my $id = $m->request_args->{'id'} ) {
         my $obj = RT::User->new( $session{'CurrentUser'} );
@@ -389,20 +418,20 @@ if ( $request_path =~ qr'Admin/Groups' ) {
     if ( my $id = $m->request_args->{'id'} ) {
         my $obj = RT::User->new( $session{'CurrentUser'} );
         $obj->Load($id);
-        if ($obj->id) {
-        my $tabs = PageMenu->child( $obj->Name,
+        if ( $obj->id ) {
+            my $tabs = PageMenu->child( $obj->Name,
                         path => "/Admin/CustomFields/Modify.html?id=" . $id );
-        $tabs->child( loc('Basics') => path => "/Admin/Groups/Modify.html?id="
-                      . $obj->id );
-        $tabs->child(
+            $tabs->child(
+                      loc('Basics') => path => "/Admin/Groups/Modify.html?id="
+                          . $obj->id );
+            $tabs->child(
                     loc('Members') => path => "/Admin/Groups/Members.html?id="
                         . $obj->id );
-        $tabs->child( loc('Group Rights') => path =>
-                      "/Admin/Groups/GroupRights.html?id=" . $obj->id );
-        $tabs->child(
-             loc('User Rights') => path => "/Admin/Groups/UserRights.html?id="
-                 . $obj->id );
-        $tabs->child(
+            $tabs->child( loc('Group Rights') => path =>
+                          "/Admin/Groups/GroupRights.html?id=" . $obj->id );
+            $tabs->child( loc('User Rights') => path =>
+                          "/Admin/Groups/UserRights.html?id=" . $obj->id );
+            $tabs->child(
                     loc('History') => path => "/Admin/Groups/History.html?id="
                         . $obj->id );
         }
@@ -448,8 +477,9 @@ if ( $request_path =~ qr'Admin/Rules' ) {
 }
 
 if ( $request_path =~ qr'(?:Ticket|Search)/' ) {
-    my $search = Menu()->child('search');
-    my $actions = PageMenu()->child( transitions => title => loc('Actions'), sort_order => 99 );
+    my $search  = Menu()->child('search');
+    my $actions = PageMenu()
+        ->child( transitions => title => loc('Actions'), sort_order => 99 );
     if ( ( $m->request_args->{'id'} || '' ) =~ /^(\d+)$/ ) {
         my $id  = $1;
         my $obj = RT::Ticket->new( $session{'CurrentUser'} );
@@ -503,9 +533,12 @@ if ( $request_path =~ qr'(?:Ticket|Search)/' ) {
                                          );
                 } else {
 
-                   $url .= "Display.html?" .$query_string->(Status => $next, id => $id );
+                    $url .= "Display.html?"
+                        . $query_string->( Status => $next, id => $id );
                 }
-                $actions->child( loc( $schema->transition_label( $current => $next ) ) => path => $url );
+                $actions->child(
+                      loc( $schema->transition_label( $current => $next ) ) =>
+                          path => $url );
             }
 
         }
@@ -573,7 +606,7 @@ if ( $request_path =~ qr'(?:Ticket|Search)/' ) {
     my $has_query = '';
 
     my $current_search = $session{"CurrentSearchHash"} || {};
-    my $search_id
+    my $search_id 
         = $m->request_args->{'SavedSearchId'}
         || $search->{'SearchId'}
         || '';
@@ -591,17 +624,20 @@ if ( $request_path =~ qr'(?:Ticket|Search)/' ) {
         Order => $m->request_args->{'Order'} || $current_search->{'Order'},
         Page  => $m->request_args->{'Page'}  || $current_search->{'Page'},
         RowsPerPage => ( defined $m->request_args->{'RowsPerPage'}
-                           ? $m->request_args->{'RowsPerPage'}
-                           : $current_search->{'RowsPerPage'}
-                         )
+                         ? $m->request_args->{'RowsPerPage'}
+                         : $current_search->{'RowsPerPage'}
+                       )
                      );
 
     $args = "?" . $query_string->(%query_args);
 
-
-        my $current_search_menu = $search->child( current_search => title => loc('Current Search'));
-        $current_search_menu->child( edit_search => title => loc('Edit Search') => path => "/Search/Build.html" . ( ($has_query) ? $args : '' ) );
-        $current_search_menu->child( loc('Advanced') => path => "/Search/Edit.html$args" );
+    my $current_search_menu
+        = $search->child( current_search => title => loc('Current Search') );
+    $current_search_menu->child(
+                   edit_search => title => loc('Edit Search') => path =>
+                       "/Search/Build.html" . ( ($has_query) ? $args : '' ) );
+    $current_search_menu->child(
+                        loc('Advanced') => path => "/Search/Edit.html$args" );
     if ($has_query) {
         if ($request_path =~ qr|^Search/Results.html|
             &&                        #XXX TODO better abstraction
@@ -611,67 +647,64 @@ if ( $request_path =~ qr'(?:Ticket|Search)/' ) {
         {
             my $shred_args =
                 URI->new->query_param(
-                               search          => 1,
-                               plugin          => 'Tickets',
-                               'Tickets:query' => $query_args{'Query'},
-                               'Tickets:limit' => $query_args{'RowsPerPage'}
+                                 search          => 1,
+                                 plugin          => 'Tickets',
+                                 'Tickets:query' => $query_args{'Query'},
+                                 'Tickets:limit' => $query_args{'RowsPerPage'}
                 );
 
-            $current_search_menu->child( 'shredder' => title => loc('Shredder'),
-                            path => 'Admin/Tools/Shredder/?' . $shred_args );
+            $current_search_menu->child(
+                                'shredder' => title => loc('Shredder'),
+                                path => 'Admin/Tools/Shredder/?' . $shred_args
+            );
         }
 
-        $current_search_menu->child( results => title =>
-                 loc('Show Results') => path => "/Search/Results.html$args" );
+        $current_search_menu->child(
+                            results => title => loc('Show Results') => path =>
+                                "/Search/Results.html$args" );
 
-        $current_search_menu->child( bulk => title =>
-                     loc('Bulk Update') => path => "/Search/Bulk.html$args" );
+        $current_search_menu->child(
+                                bulk => title => loc('Bulk Update') => path =>
+                                    "/Search/Bulk.html$args" );
 
     }
 
 }
 
+if ( $request_path =~ /^\/(?:index.html|$)/ ) {
 
-    if ( $request_path =~ /^\/(?:index.html|$)/ ) {
+    my @dashboards = $m->comp("/Dashboards/Elements/ListOfDashboards");
+    my $limit      = 7;
 
-        my @dashboards = $m->comp("/Dashboards/Elements/ListOfDashboards");
-        my $limit      = 7;
-
-        $m->callback( Dashboards   => \@dashboards,
-                      Limit        => \$limit,
-                      CallbackName => 'MassageDashboards',
-                    );
+    $m->callback( Dashboards   => \@dashboards,
+                  Limit        => \$limit,
+                  CallbackName => 'MassageDashboards',
+                );
 
-        my $more = 0;
-        if ( @dashboards > $limit ) {
-            $more = 1;
-            splice @dashboards, $limit;
-        }
+    my $more = 0;
+    if ( @dashboards > $limit ) {
+        $more = 1;
+        splice @dashboards, $limit;
+    }
 
-        my $position = 0;
+    my $position = 0;
 
-        for my $dash (@dashboards) {
-            PageMenu->child(
-                        'dashboard-' . $dash->id,
+    for my $dash (@dashboards) {
+        PageMenu->child('dashboard-' . $dash->id,
                         title => $dash->Name,
                         path => 'Dashboards/' . $dash->id . '/' . $dash->Name,
-            );
-        }
-
-        PageMenu()->child( home => title => loc('Home'), path => 'index.html' );
-
-        if ($more) {
-            $tabs->{"D-more"} = { title => loc('More'),
-                                  path  => 'Dashboards/index.html',
-                                };
-        }
-
+                       );
     }
 
+    PageMenu()->child( home => title => loc('Home'), path => 'index.html' );
 
+    if ($more) {
+        $tabs->{"D-more"} = { title => loc('More'),
+                              path  => 'Dashboards/index.html',
+                            };
+    }
 
-
-
+}
 
 
 </%INIT>

commit dba4af6ba5a02cd744fa99dc889a88f6d22c4a68
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Mon Nov 1 19:37:58 2010 -0400

    two more test files now passing

diff --git a/t/web/cf_access.t b/t/web/cf_access.t
index 9630d2b..2f87cdc 100644
--- a/t/web/cf_access.t
+++ b/t/web/cf_access.t
@@ -1,7 +1,7 @@
 #!/usr/bin/perl -w
 use strict;
 
-use RT::Test tests => 26;
+use RT::Test tests => 25;
 $RT::Test::SKIP_REQUEST_WORK_AROUND = 1;
 
 my ($baseurl, $m) = RT::Test->started_ok;
@@ -150,8 +150,7 @@ diag "create a ticket with an image";
 }
 
 $m->get( $m->rt_base_url );
-$m->follow_link( text => 'Tickets' );
-$m->follow_link( text => 'New Query' );
+$m->follow_link( id => 'search-new-query');
 
 $m->title_is(q/Query Builder/, 'Query building');
 $m->submit_form(
diff --git a/t/web/dashboards-groups.t b/t/web/dashboards-groups.t
index 2f75eda..4f90e77 100644
--- a/t/web/dashboards-groups.t
+++ b/t/web/dashboards-groups.t
@@ -1,7 +1,7 @@
 #!/usr/bin/perl -w
 use strict;
 
-use RT::Test nodata => 1, tests => 40;
+use RT::Test nodata => 1, tests => 39;
 my ($baseurl, $m) = RT::Test->started_ok;
 
 my $url = $m->rt_base_url;
@@ -53,16 +53,16 @@ ok($inner_group->HasMemberRecursively($user_obj->PrincipalId), "inner has user r
 
 ok $m->login(customer => 'customer'), "logged in";
 
-$m->get_ok("$url/Dashboards");
 
-$m->follow_link_ok({text => "New"});
+$m->follow_link_ok({ id => 'tools-dashboards-create'});
 $m->form_name('ModifyDashboard');
 is_deeply([$m->current_form->find_input('Privacy')->possible_values], ["RT::User-" . $user_obj->Id], "the only selectable privacy is user");
 $m->content_lacks('Delete', "Delete button hidden because we are creating");
 
 $user_obj->PrincipalObj->GrantRight(Right => 'CreateGroupDashboard', Object => $inner_group);
+$user_obj->PrincipalObj->GrantRight(Right => 'SeeGroupDashboard', Object => $inner_group);
 
-$m->follow_link_ok({text => "New"});
+$m->follow_link_ok({ id => 'tools-dashboards-create'});
 $m->form_name('ModifyDashboard');
 is_deeply([$m->current_form->find_input('Privacy')->possible_values], ["RT::User-" . $user_obj->Id, "RT::Group-" . $inner_group->Id], "the only selectable privacies are user and inner group (not outer group)");
 $m->field("Name" => 'inner dashboard');
@@ -73,7 +73,6 @@ $m->click_button(value => 'Create');
 $m->content_lacks("No permission to create dashboards");
 $m->content_contains("Saved dashboard inner dashboard");
 $m->content_lacks('Delete', "Delete button hidden because we lack DeleteDashboard");
-
 my $dashboard = RT::Dashboard->new($currentuser);
 my ($id) = $m->content =~ /name="id" value="(\d+)"/;
 ok($id, "got an ID, $id");

commit a8d1fcb88143ec7b072df412ea47f4fde1b888d5
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Mon Nov 1 20:03:46 2010 -0400

    added ids to template modification code

diff --git a/share/html/Admin/Global/Template.html b/share/html/Admin/Global/Template.html
index 86d93a7..ef206ff 100755
--- a/share/html/Admin/Global/Template.html
+++ b/share/html/Admin/Global/Template.html
@@ -53,7 +53,7 @@
     Title => $title &>
 <& /Elements/ListActions, actions => \@results &>
 
-<form method="post" name="ModifyTemplate" action="Template.html">
+<form method="post" name="ModifyTemplate" id="ModifyTemplate" action="Template.html">
 %if ($Create ) {
 <input type="hidden" class="hidden" name="Template" value="new" />
 % } else {
diff --git a/share/html/Admin/Queues/Template.html b/share/html/Admin/Queues/Template.html
index d3295b9..a46390d 100755
--- a/share/html/Admin/Queues/Template.html
+++ b/share/html/Admin/Queues/Template.html
@@ -51,7 +51,7 @@
      Title => $title &>
 <& /Elements/ListActions, actions => \@results &>
 
-<form method="post" name="ModifyTemplate" action="Template.html">
+<form method="post" name="ModifyTemplate" id="ModifyTemplate" action="Template.html">
 %if ($Create ) {
 <input type="hidden" class="hidden" name="Template" value="new" />
 % } else {

commit 6f92ae28f6a0b1eee2ac1c85d4c8cfe89077c0ee
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Mon Nov 1 20:05:42 2010 -0400

    add back a couple now-missing tabs

diff --git a/share/html/Elements/Tabs b/share/html/Elements/Tabs
index 9bf1190..fe4e3e2 100755
--- a/share/html/Elements/Tabs
+++ b/share/html/Elements/Tabs
@@ -106,7 +106,11 @@ if ( $request_path =~ qr{.*} ) {
     $reports->child( loc('Created in a date range'),
                      path => '/Tools/Reports/CreatedByDates.html', );
 
-    $tools->child( loc('My Day'), path => '/Tools/MyDay.html' );
+    $tools->child( my_day => title => loc('My Day'), path => '/Tools/MyDay.html' );
+
+    $tools->child( offline => title => loc('Offline'), path => '/Tools/Offline.html');
+    $tools->child( watching => title => loc('Watching Queues'), path => '/Tools/Watching.html');
+
     if ( $session{'CurrentUser'}
          ->HasRight( Right => 'ShowApprovalsTab', Object => $RT::System ) )
     {

commit 4d7d66b9ea5b24c425f119890f566930225b4ebe
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Mon Nov 1 20:06:28 2010 -0400

    two more passing test files

diff --git a/t/web/cf_select_one.t b/t/web/cf_select_one.t
index fd57883..207ffe8 100644
--- a/t/web/cf_select_one.t
+++ b/t/web/cf_select_one.t
@@ -3,7 +3,7 @@
 use strict;
 use warnings;
 
-use RT::Test tests => 46;
+use RT::Test tests => 43;
 
 my ($baseurl, $m) = RT::Test->started_ok;
 ok $m->login, 'logged in as root';
@@ -13,11 +13,7 @@ my $cf_name = 'test select one value';
 my $cfid;
 diag "Create a CF";
 {
-    $m->follow_link( text => 'Configuration' );
-    $m->title_is(q/RT Administration/, 'admin screen');
-    $m->follow_link( text => 'Custom Fields' );
-    $m->title_is(q/Select a Custom Field/, 'admin-cf screen');
-    $m->follow_link( text => 'Create' );
+    $m->follow_link( id => 'config-custom-fields-create');
     $m->submit_form(
         form_name => "ModifyCustomField",
         fields => {
@@ -54,12 +50,11 @@ ok $queue && $queue->id, 'loaded or created queue';
 
 diag "apply the CF to General queue";
 {
-    $m->follow_link( text => 'Queues' );
-    $m->title_is(q/Admin queues/, 'admin-queues screen');
+    $m->follow_link( id => 'config-queues');
     $m->follow_link( text => 'General' );
-    $m->title_is(q/Editing Configuration for queue General/, 'admin-queue: general');
-    $m->follow_link( text => 'Ticket Custom Fields' );
-    $m->title_is(q/Edit Custom Fields for General/, 'admin-queue: general cfid');
+    $m->title_is(q/Configuration for queue General/, 'admin-queue: general');
+    $m->follow_link( id => 'page-ticket-custom-fields');
+    $m->title_is(q/Custom Fields for queue General/, 'admin-queue: general cfid');
 
     $m->form_name('EditCustomFields');
     $m->tick( "AddCustomField" => $cfid );
@@ -91,7 +86,7 @@ diag "create a ticket using API with 'asd'(not 'ASD') as value of the CF";
 diag "check that values of the CF are case insensetive(asd vs. ASD)";
 {
     ok $m->goto_ticket( $tid ), "opened ticket's page";
-    $m->follow_link( text => 'Custom Fields' );
+    $m->follow_link( id => 'page-basics');
     $m->title_like(qr/Modify ticket/i, 'modify ticket');
     $m->content_contains($cf_name, 'CF on the page');
 
@@ -113,7 +108,7 @@ diag "check that values of the CF are case insensetive(asd vs. ASD)";
 diag "check that 0 is ok value of the CF";
 {
     ok $m->goto_ticket( $tid ), "opened ticket's page";
-    $m->follow_link( text => 'Custom Fields' );
+    $m->follow_link( id => 'page-basics');
     $m->title_like(qr/Modify ticket/i, 'modify ticket');
     $m->content_contains($cf_name, 'CF on the page');
 
@@ -137,7 +132,7 @@ diag "check that 0 is ok value of the CF";
 diag "check that we can set empty value when the current is 0";
 {
     ok $m->goto_ticket( $tid ), "opened ticket's page";
-    $m->follow_link( text => 'Custom Fields' );
+    $m->follow_link( id => 'page-basics');
     $m->title_like(qr/Modify ticket/i, 'modify ticket');
     $m->content_contains($cf_name, 'CF on the page');
 
diff --git a/t/web/html_template.t b/t/web/html_template.t
index 99c72b0..fccd368 100644
--- a/t/web/html_template.t
+++ b/t/web/html_template.t
@@ -3,7 +3,7 @@
 use strict;
 use warnings;
 
-use RT::Test tests => 18;
+use RT::Test tests => 16;
 use Encode;
 my ( $baseurl, $m ) = RT::Test->started_ok;
 ok $m->login, 'logged in as root';
@@ -17,13 +17,10 @@ diag('make Autoreply template a html one and add utf8 chars')
   if $ENV{TEST_VERBOSE};
 
 {
-    $m->follow_link_ok( { text => 'Configuration' }, '-> Configuration' );
-    $m->follow_link_ok( { text => 'Global' },        '-> Global' );
-    $m->follow_link_ok( { text => 'Templates' },     '-> Templates' );
+    $m->follow_link_ok( { id => 'config-global-templates' },     '-> Templates' );
     $m->follow_link_ok( { text => 'Autoreply' },     '-> Autoreply' );
-
     $m->submit_form(
-
+        form_name => 'ModifyTemplate',
         fields => {
             Content => <<'EOF',
 Subject: AutoReply: {$Ticket->Subject}

commit 5b6d6a273b55f37fca07f0fd4fc067f4f94fed5a
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Mon Nov 1 21:55:00 2010 -0400

    further test updates

diff --git a/share/html/Elements/Tabs b/share/html/Elements/Tabs
index fe4e3e2..e2ff9bb 100755
--- a/share/html/Elements/Tabs
+++ b/share/html/Elements/Tabs
@@ -632,6 +632,12 @@ if ( $request_path =~ qr'(?:Ticket|Search)/' ) {
                          : $current_search->{'RowsPerPage'}
                        )
                      );
+    for my $field (qw(Order OrderBy)) {
+        if (ref($query_args{$field}) eq 'ARRAY') {
+        $query_args{$field} = join("|",@{$query_args{$field}});
+        }
+    }
+
 
     $args = "?" . $query_string->(%query_args);
 
diff --git a/t/web/cf_access.t b/t/web/cf_access.t
index 2f87cdc..2a183a8 100644
--- a/t/web/cf_access.t
+++ b/t/web/cf_access.t
@@ -1,7 +1,7 @@
 #!/usr/bin/perl -w
 use strict;
 
-use RT::Test tests => 25;
+use RT::Test tests => 23;
 $RT::Test::SKIP_REQUEST_WORK_AROUND = 1;
 
 my ($baseurl, $m) = RT::Test->started_ok;
@@ -107,7 +107,7 @@ diag "check that we have no the CF on the create"
     $tid = $1 if $m->content =~ /Ticket (\d+) created/i;
     ok $tid, "a ticket is created succesfully";
 
-    $m->follow_link( text => 'Custom Fields' );
+    $m->follow_link( id => 'page-basics');
     $m->content_lacks('Upload multiple images', 'has no upload image field');
     $form = $m->form_name('TicketModify');
     $upload_field = "Object-RT::Ticket-$tid-CustomField-$cfid-Upload";
@@ -150,8 +150,7 @@ diag "create a ticket with an image";
 }
 
 $m->get( $m->rt_base_url );
-$m->follow_link( id => 'search-new-query');
-
+$m->follow_link( id => 'search-new');
 $m->title_is(q/Query Builder/, 'Query building');
 $m->submit_form(
     form_name => "BuildQuery",
diff --git a/t/web/cf_datetime.t b/t/web/cf_datetime.t
index 6019859..5b67579 100644
--- a/t/web/cf_datetime.t
+++ b/t/web/cf_datetime.t
@@ -3,7 +3,7 @@
 use strict;
 use warnings;
 
-use RT::Test tests => 44;
+use RT::Test tests => 42;
 RT->Config->Set( 'Timezone' => 'EST5EDT' ); # -04:00
 
 my ($baseurl, $m) = RT::Test->started_ok;
@@ -16,11 +16,7 @@ my $cf_name = 'test cf datetime';
 my $cfid;
 diag "Create a CF";
 {
-    $m->follow_link( text => 'Configuration' );
-    $m->title_is(q/RT Administration/, 'admin screen');
-    $m->follow_link( text => 'Custom Fields' );
-    $m->title_is(q/Select a Custom Field/, 'admin-cf screen');
-    $m->follow_link( text => 'Create' );
+    $m->follow_link( id => 'config-custom-fields-create');
     $m->submit_form(
         form_name => "ModifyCustomField",
         fields => {
@@ -42,9 +38,9 @@ ok $queue && $queue->id, 'loaded or created queue';
     $m->follow_link( text => 'Queues' );
     $m->title_is(q/Admin queues/, 'admin-queues screen');
     $m->follow_link( text => 'General' );
-    $m->title_is(q/Editing Configuration for queue General/, 'admin-queue: general');
+    $m->title_is(q/Configuration for queue General/, 'admin-queue: general');
     $m->follow_link( text => 'Ticket Custom Fields' );
-    $m->title_is(q/Edit Custom Fields for General/, 'admin-queue: general cfid');
+    $m->title_is(q/Custom Fields for queue General/, 'admin-queue: general cfid');
 
     $m->form_name('EditCustomFields');
     $m->tick( "AddCustomField" => $cfid );
diff --git a/t/web/cf_onqueue.t b/t/web/cf_onqueue.t
index 86eaa4d..511606d 100644
--- a/t/web/cf_onqueue.t
+++ b/t/web/cf_onqueue.t
@@ -1,18 +1,14 @@
 #!/usr/bin/perl -w
 use strict;
 
-use RT::Test tests => 14;
+use RT::Test tests => 12;
 my ($baseurl, $m) = RT::Test->started_ok;
 
 ok $m->login, 'logged in';
 
 diag "Create a queue CF";
 {
-    $m->follow_link( text => 'Configuration' );
-    $m->title_is(q/RT Administration/, 'admin screen');
-    $m->follow_link( text => 'Custom Fields' );
-    $m->title_is(q/Select a Custom Field/, 'admin-cf screen');
-    $m->follow_link( text => 'Create' );
+    $m->follow_link( id => 'config-custom-fields-create');
     $m->submit_form(
         form_name => "ModifyCustomField",
         fields => {
@@ -47,7 +43,7 @@ diag "Edit the CF value for default queue";
     $m->follow_link( url => '/Admin/Queues/' );
     $m->title_is(q/Admin queues/, 'queues configuration screen');
     $m->follow_link( text => "1" );
-    $m->title_is(q/Editing Configuration for queue General/, 'default queue configuration screen');
+    $m->title_is(q/Configuration for queue General/, 'default queue configuration screen');
     $m->content_contains('QueueCFTest', 'CF QueueCFTest displayed on default queue' );
     $m->submit_form(
         form_number => 3,

commit a4674e559c7254633943e2b23033ebde9523ea99
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Mon Nov 1 22:07:19 2010 -0400

    added a property to menuing to determine whether to <a> menu items

diff --git a/lib/RT/Interface/Web/Menu.pm b/lib/RT/Interface/Web/Menu.pm
index f996358..b70dda7 100644
--- a/lib/RT/Interface/Web/Menu.pm
+++ b/lib/RT/Interface/Web/Menu.pm
@@ -58,6 +58,7 @@ use Scalar::Util qw(weaken);
 
 __PACKAGE__->mk_accessors(qw(
     title sort_order link target escape_title class render_children_inline
+    link_item
     raw_html key
 ));
 
@@ -221,10 +222,11 @@ sub child {
             $child->parent($self);
         } else {
             $child = $proto->new(
-                {   parent     => $self,
+                {   parent      => $self,
                     key         => $key,
-                    title        => $key,
-                    escape_title => 1,
+                    title       => $key,
+                    escape_title=> 1,
+                    link_item   => 1,
                     %args
                 }
             );
diff --git a/share/html/Elements/Menu b/share/html/Elements/Menu
index b34e063..eb507a9 100755
--- a/share/html/Elements/Menu
+++ b/share/html/Elements/Menu
@@ -51,13 +51,17 @@
 %   my $item_id = lc(($parent_id? $parent_id."-" : "") .$child->key);
 %   $item_id =~ s/\s/-/g;
 <%" " x ($depth+1)%><li>\
+% if ($child->link_item) {
 <a id="<%$item_id%>" <% $child->path ? ' href="'.RT->Config->Get('WebPath').$child->path.'"' : '' |n%>>\
+% }
 % if ($child->escape_title) { 
-<%$child->title |n%>\
-% } else {
 <%$child->title%>\
+% } else {
+<%$child->title |n%>\
 % }
+% if ($child->link_item) {
 </a>\
+% }
 % if ($child->has_children) {
 <& Menu, menu => $child, toplevel => 0, parent_id => ($parent_id? $parent_id."-": '').$child->key, depth=> ($depth+1) &>
 <%" " x ($depth+1)%></li>

commit c31ef29049667f7074072f18713a18db9e47168f
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Mon Nov 1 22:07:55 2010 -0400

    bring back "star" links.

diff --git a/share/html/Elements/Tabs b/share/html/Elements/Tabs
index e2ff9bb..41bf8e5 100755
--- a/share/html/Elements/Tabs
+++ b/share/html/Elements/Tabs
@@ -227,7 +227,7 @@ if ( $request_path =~ qr{.*} ) {
                         'Logged in as <span class="current-user">[_1]</span>',
                         $session{'CurrentUser'}->Name
                         ),
-                    escape_title => 1,
+                    escape_title => 0,
                     sort_order   => 99
     );
     if ( $session{'CurrentUser'}->UserObj
@@ -491,6 +491,7 @@ if ( $request_path =~ qr'(?:Ticket|Search)/' ) {
 
         my $tabs = PageMenu()
             ; #->child( "#" . $id => class => "currentnav",path => "/Ticket/Display.html?id=" . $id);
+        $tabs->child ( bookmark => title => $m->scomp( '/Ticket/Elements/Bookmark', id => $id ), escape_title => 0, link_item => 0);
 
         $tabs->child(
                  loc('Display') => path => "/Ticket/Display.html?id=" . $id );
@@ -567,7 +568,6 @@ if ( $request_path =~ qr'(?:Ticket|Search)/' ) {
                              "/Ticket/Update.html?action=comment&id=" . $id );
         }
 
-# $actions->{'_ZZ'} = { html => $m->scomp( '/Ticket/Elements/Bookmark', id => $obj->id ), };
 
         if ( defined $session{"tickets"} ) {
 

commit 4ea455428995526a7199ff65e8cb9f8e45f360fc
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Mon Nov 1 22:15:32 2010 -0400

    fix more t/ navigation

diff --git a/t/web/ticket_owner_autocomplete.t b/t/web/ticket_owner_autocomplete.t
index e5d5604..84cf0a9 100644
--- a/t/web/ticket_owner_autocomplete.t
+++ b/t/web/ticket_owner_autocomplete.t
@@ -128,7 +128,7 @@ diag "on reply correct owner is selected";
     is $ticket->Owner, $user_b->id, 'correct owner';
 
     $agent_a->goto_ticket( $id );
-    $agent_a->follow_link_ok({id => 'basics'}, 'Ticket -> Basics');
+    $agent_a->follow_link_ok({id => 'page-basics'}, 'Ticket -> Basics');
 
     my $form = $agent_a->form_name('TicketModify');
     is $form->value('Owner'), '', 'empty value selected';

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


More information about the Rt-commit mailing list