[Rt-commit] rt branch, 4.6/header-redesign, created. rt-4.4.4-490-ge4e6f0dcaa

Jim Brandt jbrandt at bestpractical.com
Mon Nov 4 16:42:01 EST 2019


The branch, 4.6/header-redesign has been created
        at  e4e6f0dcaae6f6db1862670519db29bf05ccdc39 (commit)

- Log -----------------------------------------------------------------
commit da493b18613dfe522ffbe138a831f7e30eab5bdb
Author: Jim Brandt <jbrandt at bestpractical.com>
Date:   Thu Oct 24 16:06:58 2019 -0400

    Restyle page menu with shadow like Helm design

diff --git a/lib/RT/Interface/Web.pm b/lib/RT/Interface/Web.pm
index 33380fe73b..d147ae8f8e 100644
--- a/lib/RT/Interface/Web.pm
+++ b/lib/RT/Interface/Web.pm
@@ -1938,6 +1938,7 @@ sub RenderMenu {
             if ( $tmp = $child->class ) {
                 $res .= ' '. $interp->apply_escapes($tmp, 'h');
             }
+            $res .= ' btn' if ( defined $id && $id eq 'page-menu' );
             $res .= '"';
 
             my $path = $child->path;
diff --git a/share/html/Elements/PageLayout b/share/html/Elements/PageLayout
index cea11f408f..4e1abd9a0b 100644
--- a/share/html/Elements/PageLayout
+++ b/share/html/Elements/PageLayout
@@ -51,7 +51,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', 'parent_id' => 'page' &></div>
+<div id="page-navigation" class="btn-group page-nav-shadow"><& /Elements/Menu, menu => PageMenu(), id => 'page-menu', 'parent_id' => 'page' &></div>
 % }
 <div id="topactions"><& /Elements/WidgetBar, menu => PageWidgets() &></div>
 
diff --git a/share/static/css/elevator-light/nav.css b/share/static/css/elevator-light/nav.css
index 47419e619f..2e33205cdd 100644
--- a/share/static/css/elevator-light/nav.css
+++ b/share/static/css/elevator-light/nav.css
@@ -92,12 +92,18 @@ ul.sf-menu li {
 #page-navigation {
     position: absolute;
     top: 6.5em;
-    right: 0;
-    left: 0;
-    padding-right: 3em;
-    font-size: 0.9em;
-    border-bottom: 1px solid #ccc;
-    background-color: #eee;
+    right: 4em;
+}
+
+.page-nav-shadow {
+    border: none;
+    border-radius: 4px;
+    box-shadow: 0 2px 5px rgba(23, 69, 102, 0.26);
+}
+
+.page-nav-shadow .btn {
+    border-top: none;
+    border-bottom: none;
 }
 
 #page-navigation #page-menu {
@@ -318,6 +324,22 @@ ul.sf-menu li {
 #app-nav.sf-menu,
 #page-menu.sf-menu {
     white-space: nowrap;
+    margin-bottom: 0;
+}
+
+#page-menu.sf-menu a {
+    padding-top: .3em;
+    padding-bottom: .3em;
+}
+
+#page-menu.sf-menu li {
+    float: left;
+    display: inline-block;
+    border-color: #E0E6EC;
+    border-right-style: solid;
+    border-right-width: 1px;
+    border-left-style: solid;
+    border-left-width: 1px;
 }
 
 /* restore wrapping for submenus */

commit 083f3e3ce83cd31f77f8d8b0983116007c8c11d8
Author: Jim Brandt <jbrandt at bestpractical.com>
Date:   Fri Nov 1 16:30:46 2019 -0400

    Move search and new ticket controls up into top menu bar
    
    Create new ticket now pops up a dialog to select the queue.
    It's one extra click from the autosubmit behavior, but
    reclaims the space from the dropdown.
    
    Also move the RT name info into the user menu.

diff --git a/lib/RT/Interface/Web/MenuBuilder.pm b/lib/RT/Interface/Web/MenuBuilder.pm
index 809c32cd8f..e8d95f64c1 100644
--- a/lib/RT/Interface/Web/MenuBuilder.pm
+++ b/lib/RT/Interface/Web/MenuBuilder.pm
@@ -83,7 +83,7 @@ sub BuildMainNav {
         $widgets->child( asset_search => raw_html => $HTML::Mason::Commands::m->scomp('/Asset/Elements/Search') );
     } else {
         $widgets->child( simple_search => raw_html => $HTML::Mason::Commands::m->scomp('SimpleSearch') );
-        $widgets->child( create_ticket => raw_html => $HTML::Mason::Commands::m->scomp('CreateTicket') );
+        $widgets->child( create_ticket => raw_html => $HTML::Mason::Commands::m->scomp('CreateTicket', ButtonOnly => 1) );
     }
 
     my $home = $top->child( home => title => loc('Homepage'), path => '/' );
@@ -250,6 +250,7 @@ sub BuildMainNav {
         sort_order   => 99,
     );
 
+    $about_me->child( rt_name => title => loc("RT for [_1]", RT->Config->Get('rtname')), path => '/' );
 
     if ( $current_user->UserObj
          && $current_user->HasRight( Right => 'ModifySelf', Object => RT->System )) {
diff --git a/share/html/Helpers/CreateInQueue b/share/html/Elements/CreateInQueue
similarity index 75%
copy from share/html/Helpers/CreateInQueue
copy to share/html/Elements/CreateInQueue
index e6189c6bb5..fc0540e0e5 100644
--- a/share/html/Helpers/CreateInQueue
+++ b/share/html/Elements/CreateInQueue
@@ -2,7 +2,7 @@
 %#
 %# COPYRIGHT:
 %#
-%# This software is Copyright (c) 1996-2016 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2019 Best Practical Solutions, LLC
 %#                                          <sales at bestpractical.com>
 %#
 %# (Except where explicitly superseded by other copyright notices)
@@ -45,8 +45,18 @@
 %# those contributions and any derivatives thereof.
 %#
 %# END BPS TAGGED BLOCK }}}
-<& /Elements/CreateTicket,
-    IncludeExplanation => 1,
-    Hyperlink          => RT->Config->Get('WebPath') . '/Ticket/Create.html?Queue=',
-&>
-% $m->abort;
+<form action="<% RT->Config->Get("WebPath") %>/Ticket/Create.html" id="TicketCreateInQueue">
+  <div class="form-row">
+    <div class="col-md-12 text-center">
+      <&|/l&>Select a queue for your new ticket.</&>
+      <div class="d-inline-block">
+        <& /Elements/SelectQueue, Name => 'Queue', ShowNullOption => 0, AutoSubmit => 1 &>
+      </div>
+    </div>
+  </div>
+  <div class="form-row">
+    <div class="col-md-12">
+      <& /Elements/Submit, Label => loc("Go"), Caption => loc("This will take you to the Create Ticket page.") &>
+    </div>
+  </div>
+</form>
diff --git a/share/html/Elements/CreateTicket b/share/html/Elements/CreateTicket
index 2d3a3e7a88..aa9ae034cb 100644
--- a/share/html/Elements/CreateTicket
+++ b/share/html/Elements/CreateTicket
@@ -55,12 +55,18 @@
 
 % my $button_start = '<input type="submit" class="button btn btn-primary form-control" value="';
 % my $button_start_modal = '<input type="submit" class="button btn btn-primary form-control ticket-create-modal" value="';
+% my $button_only_start_modal = '<input type="submit" class="btn btn-primary ticket-create-modal" value="';
 % my $button_end = '" />';
 % my $queue_selector = $m->scomp('/Elements/SelectNewTicketQueue', AutoSubmit => 1, SendTo => $SendTo, Placeholder => loc('Queue'), Hyperlink => $Hyperlink );
 
 % if ($Hyperlink) {
 <% $queue_selector |n %>
 % }
+% elsif ($ButtonOnly) {
+<div class="create-ticket-button">
+<&|/l_unsafe, $button_only_start_modal, $button_end &>[_1]Create new ticket[_2]</&>
+</div>
+% }
 % else {
 <div class="create-wide">
 <&|/l_unsafe, $button_start, $button_end, $queue_selector &>[_1]New ticket in[_2] [_3]</&>
@@ -80,4 +86,5 @@
 $SendTo => '/Ticket/Create.html',
 $IncludeExplanation => 0
 $Hyperlink => undef
+$ButtonOnly => undef
 </%ARGS>
diff --git a/share/html/Elements/Logo b/share/html/Elements/Logo
index ad6aa9c740..14c0db3c3e 100644
--- a/share/html/Elements/Logo
+++ b/share/html/Elements/Logo
@@ -83,7 +83,7 @@ if ($OnlyCustom
 }
 </%INIT>
 <%ARGS>
-$ShowName => 1
+$ShowName => 0
 $OnlyCustom => 0
 $Name => undef
 $id => 'logo'
diff --git a/share/html/Helpers/CreateInQueue b/share/html/Helpers/CreateInQueue
index e6189c6bb5..b1ab4b8f46 100644
--- a/share/html/Helpers/CreateInQueue
+++ b/share/html/Helpers/CreateInQueue
@@ -45,8 +45,17 @@
 %# those contributions and any derivatives thereof.
 %#
 %# END BPS TAGGED BLOCK }}}
-<& /Elements/CreateTicket,
-    IncludeExplanation => 1,
-    Hyperlink          => RT->Config->Get('WebPath') . '/Ticket/Create.html?Queue=',
-&>
+<div class="modal-dialog modal-dialog-centered" role="document">
+  <div class="modal-content">
+    <div class="modal-header">
+      <h5 class="modal-title"><&|/l&>Select Queue</&></h5>
+      <a href="javascript:void(0)" class="close" data-dismiss="modal" aria-label="Close">
+        <span aria-hidden="true">×</span>
+      </a>
+    </div>
+    <div class="modal-body">
+      <& /Elements/CreateInQueue &>
+    </div>
+  </div>
+</div>
 % $m->abort;
diff --git a/share/static/css/elevator-light/nav.css b/share/static/css/elevator-light/nav.css
index 2e33205cdd..a5a64566ee 100644
--- a/share/static/css/elevator-light/nav.css
+++ b/share/static/css/elevator-light/nav.css
@@ -173,8 +173,8 @@ ul.sf-menu li {
 }
 
 #topactions form {
-    display: block;
-    float: right;
+    display: inline;
+    float: left;
     margin-left: 1em;
     text-align: right;
     margin-top: 0.5em;
@@ -203,18 +203,15 @@ ul.sf-menu li {
 #topactions {
     position: absolute;
     background: transparent;
-    top: 3.2em;
-    right: 0em;
-    padding-right: 0.7em;
+    top: 0;
+    right: 18em;
     width: auto;
-    min-width: 42em;
+    min-width: 20em;
     font-size: 0.9em;
     z-index: 99;
 }
 
 #topactions input[type="search"] {
-    border: none;
-
     /* turn off webkit input[type=search] styling */
     -webkit-appearance: textfield;
 }
@@ -248,7 +245,7 @@ ul.sf-menu li {
     padding-right: 0.5em;
     vertical-align: middle;
 
-    width: 8em;
+    width: 10em;
     -webkit-transition: width 0.25s ease-in-out;
     -moz-transition: width 0.25s ease-in-out;
     -ms-transition: width 0.25s ease-in-out;
diff --git a/share/static/js/util.js b/share/static/js/util.js
index cf21975f64..dd20af4a19 100644
--- a/share/static/js/util.js
+++ b/share/static/js/util.js
@@ -41,6 +41,10 @@ var showModal = function(html) {
     modal.bind('modal:close', function(ev) { modal.remove(); })
     modal.on('hide.bs.modal', function(ev) { modal.remove(); })
     modal.modal('show');
+
+    // We need to refresh the select picker plugin on AJAX calls
+    // since the plugin only runs on page load.
+    jQuery('.selectpicker').selectpicker('refresh');
 };
 
 /* Classes */

commit 2bf6b897f887f563fd5d9f5c9f13eaf073839cbe
Author: Jim Brandt <jbrandt at bestpractical.com>
Date:   Mon Nov 4 15:53:53 2019 -0500

    Update page title display and move subnav up
    
    Clear the background color on the page title and move
    the subnav up into the now-white space.

diff --git a/share/html/Elements/Header b/share/html/Elements/Header
index b9538e66f8..aacba5408c 100644
--- a/share/html/Elements/Header
+++ b/share/html/Elements/Header
@@ -98,7 +98,8 @@
 
 </head>
   <body class="<% join( ' ',@{$ARGS{'BodyClass'}}, RT->Config->Get('WebDefaultStylesheet', $session{CurrentUser}) =~ /-dark$/ ? 'darkmode' : ()) %>" <% $id && qq[id="comp-$id"] |n %>>
-
+% # The close div for this is in PageLayout right before the rt body div
+<div id='rt-header-container'>
 % if ($ShowBar) {
 <& /Elements/Logo, %ARGS &>
 
diff --git a/share/html/Elements/PageLayout b/share/html/Elements/PageLayout
index 4e1abd9a0b..998aba06bf 100644
--- a/share/html/Elements/PageLayout
+++ b/share/html/Elements/PageLayout
@@ -58,7 +58,8 @@
 % if ($m->comp_exists($aftermenu_plugin) ) {
 <& $aftermenu_plugin &>
 % }
-
+% # Close div for rt-header-container started in Header
+</div>
 <div id="body">
 % $m->callback( %ARGS, CallbackName => 'BeforeBody' );
 % $m->flush_buffer(); # we've got the page laid out, let's flush the buffer;
diff --git a/share/static/css/elevator-light/layout.css b/share/static/css/elevator-light/layout.css
index ca630eb912..d05a164209 100644
--- a/share/static/css/elevator-light/layout.css
+++ b/share/static/css/elevator-light/layout.css
@@ -4,8 +4,14 @@ html {
     font-size: 13px;
 }
 
+div#rt-header-container {
+    padding: 5px 5px 5px 5px;
+    box-shadow: 0px 3px 6px #70899929;
+    height: 3em;
+}
+
 div#body {
-    padding: 3em;
+    padding: 0 2.5em;
     margin-top: 4em;
     margin-right: 0;
     margin-bottom: 0em;
@@ -106,21 +112,22 @@ div#quickbar {
 
 div#header {
     position: absolute;
-    top: 2.8em;
+    top: 3.5em;
     left: 0;
     right: 0;
     height: 3.2em;
-    background: #547CCC;
+    border-bottom-color: #547CCC;
+    border-bottom-width: 3px;
+    border-bottom-style: solid;
 }
 
 div#header h1 {
     position: absolute;
-    left: 1em;
+    left: 2em;
     right: 20em;
     top: 0.5em;
     height: 1.4em;
     font-size: 1.4em;
-    color: #fff;
     white-space: nowrap;
     overflow: hidden;
     text-overflow: ellipsis;
diff --git a/share/static/css/elevator-light/nav.css b/share/static/css/elevator-light/nav.css
index a5a64566ee..890be754c9 100644
--- a/share/static/css/elevator-light/nav.css
+++ b/share/static/css/elevator-light/nav.css
@@ -91,8 +91,8 @@ ul.sf-menu li {
 
 #page-navigation {
     position: absolute;
-    top: 6.5em;
-    right: 4em;
+    top: 3.6em;
+    right: 2em;
 }
 
 .page-nav-shadow {

commit e4e6f0dcaae6f6db1862670519db29bf05ccdc39
Author: Jim Brandt <jbrandt at bestpractical.com>
Date:   Mon Nov 4 16:14:14 2019 -0500

    Set consistent spacing between header and content boxes

diff --git a/share/static/css/elevator-light/ticket.css b/share/static/css/elevator-light/ticket.css
index fb8464af8d..5bf0a1df7e 100644
--- a/share/static/css/elevator-light/ticket.css
+++ b/share/static/css/elevator-light/ticket.css
@@ -64,6 +64,18 @@
     font-style: normal;
 }
 
+.summary {
+    padding-top: .1em;
+}
+
+div#body .ticket-info-basics,
+div#body .ticket-info-people,
+div#body .ticket-info-dates,
+div#body .ticket-info-links,
+div#body .ticket-info-reminders {
+    padding-top: .1em;
+}
+
 .unread-messages .titlebox-content :link {
     text-decoration: underline;
 }

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


More information about the rt-commit mailing list