[Rt-commit] rt branch, 4.2/searches-tab, created. rt-4.1.6-165-gfded535
Kevin Falcone
falcone at bestpractical.com
Fri Feb 8 16:44:50 EST 2013
The branch, 4.2/searches-tab has been created
at fded5357d16833963de7b7dbf0de748f32ad30f7 (commit)
- Log -----------------------------------------------------------------
commit 6110993e59e9567e1738291d9173324434e6772a
Author: Kevin Falcone <falcone at bestpractical.com>
Date: Tue Feb 5 18:25:24 2013 -0500
Allow ListMenu to show 2 levels of menus
For Searches, it's kind of tedious to only see Tickets/Articles/Users,
really we want to maintain the older links to New Search and Simple
Search, etc. This is less needed in the /Admin/ tabs where you are
expected to navigate to another Admin/Foo/index.html, but in Search
where you jump right in to Build.html or Simple.html, it helps to see
all the options.
diff --git a/share/html/Elements/ListMenu b/share/html/Elements/ListMenu
index 34ef1c7..df04202 100644
--- a/share/html/Elements/ListMenu
+++ b/share/html/Elements/ListMenu
@@ -47,6 +47,7 @@
%# END BPS TAGGED BLOCK }}}
<%args>
$menu
+$nested => undef
</%args>
<ul class="list-menu">
% for my $child ($menu->children) {
@@ -55,6 +56,9 @@ $menu
<span class="description"><% $description %></span>\
% }
</li>
+% if ($nested && $child->children) {
+<& /Elements/ListMenu, menu => $child &>
+% }
% }
</ul>
commit 5c759d5c0553037b8d0786f078d8b315959800cc
Author: Kevin Falcone <falcone at bestpractical.com>
Date: Fri Feb 8 16:29:12 2013 -0500
Rejigger Tickets and Articles under a Searches tab
I think this is clearer than remembering that 'Tickets' is where you
click to search. It does bury the Prev/Next links for navigating a
search deeper, but we may want to make those more accessible instead of
burying them up here (such as in the floating actions).
This also means that Searches wants a top level tab like /Admin/ has.
Showing more than one level of menus resulted in the css top margin
looking really gappy and raggedy so that's been snugged up a bit.
diff --git a/share/html/Elements/Tabs b/share/html/Elements/Tabs
index 14536ae..b65a42b 100644
--- a/share/html/Elements/Tabs
+++ b/share/html/Elements/Tabs
@@ -483,15 +483,18 @@ my $build_main_nav = sub {
$dashes->child('dashboard_create' => title => loc('New Dashboard'), path => "/Dashboards/Modify.html?Create=1" );
}
- my $tickets = Menu->child( search => title => loc('Tickets'), path => '/Search/Build.html' );
+ my $searches = Menu->child( searches => title => loc('Searches'), path => '/Search/' );
+
+ my $tickets = $searches->child( tickets => title => loc('Tickets'), path => '/Search/Build.html' );
$tickets->child( simple => title => loc('Simple Search'), path => "/Search/Simple.html" );
$tickets->child( new => title => loc('New Search'), path => "/Search/Build.html?NewQuery=1" );
+ $searches->child( articles => title => loc('Articles'), path => "/Articles/Article/Search.html" );
+
my $tools = Menu->child( tools => title => loc('Tools'), path => '/Tools/index.html' );
my $articles = $tools->child( articles => title => loc('Articles'), path => "/Articles/index.html");
$articles->child( articles => title => loc('Overview'), path => "/Articles/index.html" );
- $articles->child( search => title => loc('Search'), path => "/Articles/Article/Search.html" );
$articles->child( topics => title => loc('Topics'), path => "/Articles/Topics.html" );
$tools->child( my_day =>
@@ -710,7 +713,7 @@ my $build_main_nav = sub {
$session{"tickets"}->PrepForSerialization();
}
- my $search = Menu()->child('search');
+ my $search = Menu()->child('searches')->child('tickets');
# Don't display prev links if we're on the first ticket
if ( $item_map->{$id}->{prev} ) {
$search->child( first =>
@@ -739,7 +742,7 @@ my $build_main_nav = sub {
&& $DECODED_ARGS->{'q'} )
)
{
- my $search = Menu()->child('search');
+ my $search = Menu()->child('searches')->child('tickets');
my $args = '';
my $has_query = '';
my $current_search = $session{"CurrentSearchHash"} || {};
diff --git a/share/html/NoAuth/css/base/admin.css b/share/html/NoAuth/css/base/admin.css
index 7df2f91..926cacc 100644
--- a/share/html/NoAuth/css/base/admin.css
+++ b/share/html/NoAuth/css/base/admin.css
@@ -53,7 +53,8 @@ ul.list-menu {
width: 35%;
}
ul.list-menu > li {
- margin-bottom: 1em;
+ margin-bottom: .5em;
+ margin-top: .5em;
}
ul.list-menu .description {
font-style: italic;
diff --git a/share/html/NoAuth/css/base/admin.css b/share/html/Search/index.html
similarity index 71%
copy from share/html/NoAuth/css/base/admin.css
copy to share/html/Search/index.html
index 7df2f91..9e538ee 100644
--- a/share/html/NoAuth/css/base/admin.css
+++ b/share/html/Search/index.html
@@ -45,60 +45,6 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-ul.list-menu .menu-item {
- font-size: 1.25em;
-}
-ul.list-menu {
- list-style: none;
- width: 35%;
-}
-ul.list-menu > li {
- margin-bottom: 1em;
-}
-ul.list-menu .description {
- font-style: italic;
- display: block;
- padding: 0.2em 0 0 1em;
-}
-
-ul.list-menu ul {
- list-style: none;
- padding: 0.25em 0 0 1em;
-}
-ul.list-menu ul li {
- display: inline;
- margin-right: 0.5em;
-}
-
-#rt-portal .titlebox iframe {
- height: 100%;
- width: 100%;
- border: 0;
-}
-
-#rt-portal .titlebox {
- position: absolute;
- top: 1em;
- right: 1em;
- bottom: 3em;
- width: 55%;
- padding-bottom: 1em;
-}
-
-#rt-portal .titlebox-content {
- height: 100%;
- padding: 0;
-}
-
-#rt-portal .titlebox.rolled-up {
- bottom: auto;
- padding-bottom: 0;
-}
-
-.admin-hint {
- font-style: italic;
-}
-
-h2 + .admin-hint {
- margin-top: -1em;
-}
+<& /Admin/Elements/Header, Title => loc('Searches') &>
+<& /Elements/Tabs &>
+<& /Elements/ListMenu, menu => Menu()->child('searches'), nested => 1 &>
commit fded5357d16833963de7b7dbf0de748f32ad30f7
Author: Kevin Falcone <falcone at bestpractical.com>
Date: Fri Feb 8 16:32:21 2013 -0500
Repair the (shockingly few) failing tests
/Articles/ began matching the search instead of the top level articles
UI and the id of the 'New Search' link changed.
diff --git a/t/articles/interface.t b/t/articles/interface.t
index cb2ea72..198162f 100644
--- a/t/articles/interface.t
+++ b/t/articles/interface.t
@@ -161,7 +161,7 @@ ok($ret, "Test ticket for articles created: $msg");
isa_ok($m, 'Test::WWW::Mechanize');
ok($m->login, 'logged in');
-$m->follow_link_ok( { text => 'Articles', url_regex => qr!^/Articles/! },
+$m->follow_link_ok( { text => 'Articles', url_regex => qr!^/Articles/index.html! },
'UI -> Articles' );
$m->content_contains($article3->Name);
diff --git a/t/web/cf_access.t b/t/web/cf_access.t
index ec095c0..d836a1a 100644
--- a/t/web/cf_access.t
+++ b/t/web/cf_access.t
@@ -215,7 +215,7 @@ diag "create a ticket with an image";
}
$m->get( $m->rt_base_url );
-$m->follow_link( id => 'search-new');
+$m->follow_link( id => 'searches-tickets-new');
$m->title_is(q/Query Builder/, 'Query building');
$m->submit_form(
form_name => "BuildQuery",
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list