[Rt-commit] rt branch, 4.0/restore-article-quicksearch, created. rt-4.0.10-8-g0758c14

Kevin Falcone falcone at bestpractical.com
Thu Jan 31 21:44:10 EST 2013


The branch, 4.0/restore-article-quicksearch has been created
        at  0758c145aa35796a8d595afeff32da21deca75cf (commit)

- Log -----------------------------------------------------------------
commit 1c82e3e55e48c38adff2dce58cfe1d76cc0d88c6
Author: Kevin Falcone <falcone at bestpractical.com>
Date:   Thu Jan 31 18:46:15 2013 +0000

    Move PageWidgets definition earlier in Elements/Tabs
    
    By defining them at the end, nothing could change them when you click
    into a different part of the UI.  Articles used to provide a default
    search under /Articles/ and this allows that to work again.

diff --git a/share/html/Elements/Tabs b/share/html/Elements/Tabs
index 1887cfc..1cde2dd 100644
--- a/share/html/Elements/Tabs
+++ b/share/html/Elements/Tabs
@@ -388,6 +388,9 @@ my $build_admin_menu = sub {
 
 my $build_main_nav = sub {
 
+    PageWidgets()->child( simple_search => raw_html => $m->scomp('SimpleSearch') );
+    PageWidgets()->child( create_ticket => raw_html => $m->scomp('CreateTicket') );
+
     my $home = Menu->child( home => title => loc('Homepage'), path => '/' );
     # We explicitly exclude superusers; otherwise the dashboards for
     # groups you're not in (but can see the dashboards of by dint of
@@ -825,9 +828,6 @@ my $build_main_nav = sub {
         PageMenu()->child( edit => title => loc('Edit'), path => '/Prefs/MyRT.html' );
     }
 
-    PageWidgets()->child( simple_search => raw_html => $m->scomp('SimpleSearch') );
-    PageWidgets()->child( create_ticket => raw_html => $m->scomp('CreateTicket') );
-
     $m->callback( CallbackName => 'Privileged' );
 };
 

commit 6f2e68c5766e9cab576f68ddb759e10d9c188557
Author: Kevin Falcone <falcone at bestpractical.com>
Date:   Thu Jan 31 19:03:01 2013 +0000

    Update GotoArticle to act more like GotoTicket
    
    This removes the button and hints in the box what to search for instead.

diff --git a/share/html/Articles/Elements/GotoArticle b/share/html/Articles/Elements/GotoArticle
index c8934f0..d15d489 100644
--- a/share/html/Articles/Elements/GotoArticle
+++ b/share/html/Articles/Elements/GotoArticle
@@ -47,7 +47,7 @@
 %# END BPS TAGGED BLOCK }}}
 <form ACTION="<% RT->Config->Get('WebPath') %>/Articles/Article/Search.html">
 <input type="hidden" name="HideOptions" value="1" />
-<input size="12" name="q" accesskey="0" />
+<input size="12" name="q" accesskey="0" value="<&|/l&>Search Articles</&>..." onfocus="if (this.value=='<&|/l&>Search Articles</&>...') this.value=''"  />
 % if ($class or $topic) {
 <input type="hidden" name="ExpandTopics" value="1" />
 <select name="Topics">
@@ -65,7 +65,6 @@
 <option value="">in all topics</option>
 </select>
 % }
-<input type="submit" value="<&|/l&>Search Articles</&>" /> 
 </form>
 <%args>
 $topic => ""

commit afe1b9fa86f59bda9aded442dbc7ea0cb948b099
Author: Kevin Falcone <falcone at bestpractical.com>
Date:   Thu Jan 31 19:03:53 2013 +0000

    Add GotoArticle and remove the Ticket page widgets when in /Articles
    
    This means you can't trivially create a ticket when working on Articles,
    but having two search boxes and moving the two normal search boxes
    around felt even more confusing.

diff --git a/share/html/Elements/Tabs b/share/html/Elements/Tabs
index 1cde2dd..0b128aa 100644
--- a/share/html/Elements/Tabs
+++ b/share/html/Elements/Tabs
@@ -801,6 +801,10 @@ my $build_main_nav = sub {
     }
 
     if ( $request_path =~ m{^/Articles/} ) {
+        PageWidgets()->child( article_search => raw_html => $m->scomp('/Articles/Elements/GotoArticle') );
+        PageWidgets()->delete('create_ticket');
+        PageWidgets()->delete('simple_search');
+
         my $tabs = PageMenu();
         $tabs->child( search => title => loc("Search"),       path => "/Articles/Article/Search.html" );
         $tabs->child( create => title => loc("New Article" ), path => "/Articles/Article/PreCreate.html" );

commit 0758c145aa35796a8d595afeff32da21deca75cf
Author: Kevin Falcone <falcone at bestpractical.com>
Date:   Thu Jan 31 19:20:32 2013 +0000

    Removing CreateTicket/SimpleSearch renumbered forms
    
    The article tests are made of form_number and want to start using
    form_name, but I didn't want to tackle it all on this branch.

diff --git a/t/articles/interface.t b/t/articles/interface.t
index 85782bf..779127f 100644
--- a/t/articles/interface.t
+++ b/t/articles/interface.t
@@ -191,10 +191,10 @@ $m->follow_link_ok( { text => 'Extract Article' }, '-> Extract Article' );
 $m->content_contains($class->Name);
 $m->follow_link_ok( { text => $class->Name }, 'Extract Article -> '. $class->Name );
 $m->content_like(qr/Select topics for this article/i, 'selecting topic');
-$m->form_number(3);
+$m->form_number(2);
 $m->set_visible([option => $topic1->Name]);
 $m->submit;
-$m->form_number(3);
+$m->form_number(2);
 $m->set_visible([option => $answerCF->Name]);
 $m->click();
 $m->title_like(qr/Create a new article/, "got edit page from extraction");
diff --git a/t/articles/queue-specific-class.t b/t/articles/queue-specific-class.t
index 706d2e5..5cd0429 100644
--- a/t/articles/queue-specific-class.t
+++ b/t/articles/queue-specific-class.t
@@ -34,7 +34,7 @@ for my $name ( keys %class ) {
         'article create page' );
 
     $m->submit_form(
-        form_number => 3,
+        form_number => 2,
         fields      => { Name => "article $name" }
     );
 
diff --git a/t/articles/search-interface.t b/t/articles/search-interface.t
index 1e17c29..e957a6c 100644
--- a/t/articles/search-interface.t
+++ b/t/articles/search-interface.t
@@ -152,7 +152,7 @@ sub DoArticleSearch{
   $m->text_contains('First article');
 
   $m->submit_form_ok( {
-            form_number => 3,
+            form_number => 2,
             fields      => {
                 'Article~' => $search_text
             },

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


More information about the Rt-commit mailing list