[Rt-commit] rt branch, 5.0-trunk, updated. rt-5.0.0alpha1-235-g5badda662d

Jim Brandt jbrandt at bestpractical.com
Tue May 5 18:00:41 EDT 2020


The branch, 5.0-trunk has been updated
       via  5badda662ddc2bc958153491daa6cb4bb43e3458 (commit)
       via  017aa9aab1a53ca007cffd4dbfbc1a476056ea50 (commit)
       via  ef962f58b98e927fed6beecb51127878fb4178e1 (commit)
       via  a9c70a1cbe4d15b26a7c4d0fc258c47f5bb637f8 (commit)
       via  8e99f1269dec16377e262df26291e84951774148 (commit)
       via  9c8fee46842264feb651ffafe35c5406a0db9977 (commit)
      from  fffd8195148f27a427c52ff4f00aab1f820092f1 (commit)

Summary of changes:
 devel/third-party/fontawesome/index.js          | 10 ++++
 lib/RT/Interface/Web.pm                         | 10 +++-
 lib/RT/Interface/Web/MenuBuilder.pm             | 78 ++++++++++++++++++++-----
 share/html/Elements/PageLayout                  |  2 +-
 share/html/NoAuth/css/elevator-light/AfterMenus |  2 +-
 share/html/Ticket/Display.html                  |  8 ++-
 share/static/css/elevator-dark/main.css         |  9 +--
 share/static/css/elevator-light/nav.css         | 48 ++++++++++-----
 share/static/css/elevator-light/print.css       |  2 +-
 share/static/js/fontawesome.min.js              |  2 +-
 10 files changed, 130 insertions(+), 41 deletions(-)

- Log -----------------------------------------------------------------
commit 017aa9aab1a53ca007cffd4dbfbc1a476056ea50
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Tue May 5 06:44:56 2020 +0800

    Migrate to fontawesome icons for ticket search navigation page menu
    
    The angle icons are relatively small, instead of attaching tooltips to
    these icons, we attach tooltips to the outer <a> elements, thus users
    can see the tooltips more easily.

diff --git a/lib/RT/Interface/Web/MenuBuilder.pm b/lib/RT/Interface/Web/MenuBuilder.pm
index 72fd1da43c..0f1020bf46 100644
--- a/lib/RT/Interface/Web/MenuBuilder.pm
+++ b/lib/RT/Interface/Web/MenuBuilder.pm
@@ -456,18 +456,54 @@ sub BuildMainNav {
 
                     # Don't display prev links if we're on the first ticket
                     if ( $item_map->{$id}->{prev} ) {
-                        $search->child( first =>
-                            title => '<< ' . loc('First'), class => "nav", path => "/Ticket/Display.html?id=" . $item_map->{first});
-                        $search->child( prev =>
-                            title => '< ' . loc('Prev'),   class => "nav", path => "/Ticket/Display.html?id=" . $item_map->{$id}->{prev});
+                        $search->child(
+                            first        => title => q{<span class="fas fa-angle-double-left"></span>},
+                            escape_title => 0,
+                            class        => "nav",
+                            path         => "/Ticket/Display.html?id=" . $item_map->{first},
+                            attributes   => {
+                                'data-toggle'         => 'tooltip',
+                                'data-original-title' => loc('First'),
+                                alt                   => loc('First'),
+                            },
+                        );
+                        $search->child(
+                            prev         => title => q{<span class="fas fa-angle-left"></span>},
+                            escape_title => 0,
+                            class        => "nav",
+                            path         => "/Ticket/Display.html?id=" . $item_map->{$id}->{prev},
+                            attributes   => {
+                                'data-toggle'         => 'tooltip',
+                                'data-original-title' => loc('Prev'),
+                                alt                   => loc('Prev'),
+                            },
+                        );
                     }
                     # Don't display next links if we're on the last ticket
                     if ( $item_map->{$id}->{next} ) {
-                        $search->child( next =>
-                            title => loc('Next') . ' >',  class => "nav", path => "/Ticket/Display.html?id=" . $item_map->{$id}->{next});
+                        $search->child(
+                            next         => title => q{<span class="fas fa-angle-right"></span>},
+                            escape_title => 0,
+                            class        => "nav",
+                            path         => "/Ticket/Display.html?id=" . $item_map->{$id}->{next},
+                            attributes   => {
+                                'data-toggle'         => 'tooltip',
+                                'data-original-title' => loc('Next'),
+                                alt                   => loc('Next'),
+                            },
+                        );
                         if ( $item_map->{last} ) {
-                            $search->child( last =>
-                                title => loc('Last') . ' >>', class => "nav", path => "/Ticket/Display.html?id=" . $item_map->{last});
+                            $search->child(
+                                last         => title => q{<span class="fas fa-angle-double-right"></span>},
+                                escape_title => 0,
+                                class        => "nav",
+                                path         => "/Ticket/Display.html?id=" . $item_map->{last},
+                                attributes   => {
+                                    'data-toggle'         => 'tooltip',
+                                    'data-original-title' => loc('Last'),
+                                    alt                   => loc('Last'),
+                                },
+                            );
                         }
                     }
                 }
@@ -588,9 +624,15 @@ sub BuildMainNav {
 
             if ( $search_results_page_menu && $has_query ) {
                 $search_results_page_menu->child(
-                    current_search => title => loc('Back to Search'),
+                    current_search => title => q{<span class="fas fa-list"></span>},
+                    escape_title   => 0,
                     sort_order     => -1,
                     path           => "/Search/Results.html$args",
+                    attributes     => {
+                        'data-toggle'         => 'tooltip',
+                        'data-original-title' => loc('Return to Search Results'),
+                        alt                   => loc('Return to Search Results'),
+                    },
                 );
             }
         }

commit 5badda662ddc2bc958153491daa6cb4bb43e3458
Merge: fffd819514 017aa9aab1
Author: Jim Brandt <jbrandt at bestpractical.com>
Date:   Tue May 5 17:52:11 2020 -0400

    Merge branch '5.0/search-nav-on-ticket-display' into 5.0-trunk


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


More information about the rt-commit mailing list