[Rt-commit] rt branch, 4.6/header-redesign, updated. rt-4.4.4-499-g5732109146

? sunnavy sunnavy at bestpractical.com
Thu Nov 7 15:44:36 EST 2019


The branch, 4.6/header-redesign has been updated
       via  5732109146c7e739c8a615f65f0a2bc3001c77a2 (commit)
       via  d8264ee708cfef63085ad3e72c689647669c7d38 (commit)
       via  4cc76db18a9404fa2dd4d042b09b88267eca7d29 (commit)
       via  9f87b4a4042212e957c8a5933d675440520d2821 (commit)
       via  5e83d8ad1fb7abd0ddeb951a5d959d24cd19ab2b (commit)
       via  3bc1bfae1563a208447bba8630361077ce2d5898 (commit)
       via  31fbdbcf4db0b8ec1c6defeff0c0218f0b0650b8 (commit)
       via  11a813c0207114b36e7dc707f89fbac4347903d0 (commit)
       via  bf51c83d2f6130ab681e22eeae29079176e6c2a7 (commit)
      from  e4e6f0dcaae6f6db1862670519db29bf05ccdc39 (commit)

Summary of changes:
 lib/RT/Interface/Web/MenuBuilder.pm                | 10 ++++-----
 .../Elements/CreateArticleButton}                  | 10 ++++-----
 .../Elements/CreateInClass}                        |  8 ++++----
 .../Helpers/CreateInClass}                         |  4 ++--
 .../Spinner => Asset/Elements/CreateAsset}         | 10 ++++-----
 share/html/Asset/Elements/CreateInCatalog          |  4 ++--
 share/html/Elements/Header                         |  3 +++
 share/html/Elements/Login                          |  2 ++
 share/static/css/elevator-light/layout.css         |  2 +-
 share/static/css/elevator-light/login.css          |  1 +
 share/static/css/elevator-light/nav.css            |  5 +++--
 share/static/css/elevator-light/ticket-timer.css   |  5 +----
 share/static/js/assets.js                          |  2 +-
 share/static/js/util.js                            |  8 ++++++++
 t/articles/interface.t                             |  6 +++---
 t/articles/queue-specific-class.t                  |  2 +-
 t/articles/search-interface.t                      |  2 +-
 t/articles/upload-customfields.t                   |  2 +-
 t/web/action-results.t                             |  3 +--
 t/web/installer.t                                  |  4 ++--
 t/web/owner_disabled_group_19221.t                 | 24 ++++------------------
 t/web/queue_caching.t                              |  4 +---
 t/web/ticket_owner.t                               | 12 ++---------
 t/web/ticket_owner_autocomplete.t                  | 12 ++---------
 t/web/ticket_owner_issues_16656.t                  |  6 +-----
 t/web/ticket_txn_subject.t                         |  9 ++------
 26 files changed, 62 insertions(+), 98 deletions(-)
 copy share/html/{Widgets/Spinner => Articles/Elements/CreateArticleButton} (89%)
 copy share/html/{Asset/Elements/CreateInCatalog => Articles/Elements/CreateInClass} (88%)
 copy share/html/{Asset/Helpers/CreateInCatalog => Articles/Helpers/CreateInClass} (95%)
 copy share/html/{Widgets/Spinner => Asset/Elements/CreateAsset} (90%)

- Log -----------------------------------------------------------------
commit bf51c83d2f6130ab681e22eeae29079176e6c2a7
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Wed Nov 6 04:19:07 2019 +0800

    Tweak login page work for the new header
    
    Now the spacing between login box and header is the same as the one
    between the first widget and header on homepage.

diff --git a/share/html/Elements/Login b/share/html/Elements/Login
index 21a40c64ac..cd9a7acde2 100644
--- a/share/html/Elements/Login
+++ b/share/html/Elements/Login
@@ -47,6 +47,8 @@
 %# END BPS TAGGED BLOCK }}}
 % $m->callback( %ARGS, CallbackName => 'Header' );
 <& /Elements/Header, Title => loc('Login'), Focus => '#user', RichText => 0 &>
+% # Close div for rt-header-container started in Header
+</div>
 
 <div id="body" class="login-body">
 
diff --git a/share/static/css/elevator-light/login.css b/share/static/css/elevator-light/login.css
index fe5705f2f9..0440293a87 100644
--- a/share/static/css/elevator-light/login.css
+++ b/share/static/css/elevator-light/login.css
@@ -3,6 +3,7 @@
   max-width: 30em;
   margin-left: auto;
   margin-right: auto;
+  margin-top: 5em;
 }
 
 

commit 11a813c0207114b36e7dc707f89fbac4347903d0
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Wed Nov 6 04:34:33 2019 +0800

    Thinner border-bottom of header
    
    3px seems too thick.

diff --git a/share/static/css/elevator-light/layout.css b/share/static/css/elevator-light/layout.css
index d05a164209..f5852e0bb5 100644
--- a/share/static/css/elevator-light/layout.css
+++ b/share/static/css/elevator-light/layout.css
@@ -117,7 +117,7 @@ div#header {
     right: 0;
     height: 3.2em;
     border-bottom-color: #547CCC;
-    border-bottom-width: 3px;
+    border-bottom-width: 2px;
     border-bottom-style: solid;
 }
 

commit 31fbdbcf4db0b8ec1c6defeff0c0218f0b0650b8
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Wed Nov 6 04:57:49 2019 +0800

    Tweak ticket timer page for the new header
    
    2 main changes:
    
    * Don't render div#rt-header-container
    * Use white background color

diff --git a/share/html/Elements/Header b/share/html/Elements/Header
index aacba5408c..77629c5d7a 100644
--- a/share/html/Elements/Header
+++ b/share/html/Elements/Header
@@ -99,7 +99,10 @@
 </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
+% if ( $ShowBar || $ShowTitle ) {
 <div id='rt-header-container'>
+% }
+
 % if ($ShowBar) {
 <& /Elements/Logo, %ARGS &>
 
diff --git a/share/static/css/elevator-light/ticket-timer.css b/share/static/css/elevator-light/ticket-timer.css
index 36fb802f60..2469e3ce31 100644
--- a/share/static/css/elevator-light/ticket-timer.css
+++ b/share/static/css/elevator-light/ticket-timer.css
@@ -21,17 +21,14 @@
     white-space: nowrap;
     overflow: hidden;
     text-overflow: ellipsis;
-    background: #547CCC;
     padding: 0.33em 1em;
     margin-bottom: 0;
 
     /* for text-overflow: ellipsis */
-    color: white;
     font-weight: bold;
 }
 
 .ticket-timer .ticket-link a {
-    color: #fff;
     font-size: 1.1em;
     font-weight: bold;
 }
@@ -83,4 +80,4 @@
     border-bottom: 1px solid #ccc;
     background-color: #eee;
     padding: 0.5em;
-}
\ No newline at end of file
+}

commit 3bc1bfae1563a208447bba8630361077ce2d5898
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Wed Nov 6 05:27:15 2019 +0800

    Add asset create top action just like ticket

diff --git a/lib/RT/Interface/Web/MenuBuilder.pm b/lib/RT/Interface/Web/MenuBuilder.pm
index e8d95f64c1..ad91484beb 100644
--- a/lib/RT/Interface/Web/MenuBuilder.pm
+++ b/lib/RT/Interface/Web/MenuBuilder.pm
@@ -81,6 +81,7 @@ sub BuildMainNav {
 
     if ($request_path =~ m{^/Asset/}) {
         $widgets->child( asset_search => raw_html => $HTML::Mason::Commands::m->scomp('/Asset/Elements/Search') );
+        $widgets->child( create_asset => raw_html => $HTML::Mason::Commands::m->scomp('/Asset/Elements/CreateAsset') );
     } 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', ButtonOnly => 1) );
diff --git a/share/html/Asset/Elements/CreateAsset b/share/html/Asset/Elements/CreateAsset
new file mode 100644
index 0000000000..b57b1c13ec
--- /dev/null
+++ b/share/html/Asset/Elements/CreateAsset
@@ -0,0 +1,52 @@
+%# BEGIN BPS TAGGED BLOCK {{{
+%#
+%# COPYRIGHT:
+%#
+%# This software is Copyright (c) 1996-2019 Best Practical Solutions, LLC
+%#                                          <sales 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 }}}
+<form action="<% RT->Config->Get('WebPath') %>/Asset/CreateInCatalog.html">
+  <div class="create-asset-button">
+    <input type="submit" class="btn btn-primary asset-create-modal" value="<&|/l&>Create new asset</&>" />
+  </div>
+</form>
diff --git a/share/static/js/assets.js b/share/static/js/assets.js
index 7aebda6590..3131d269eb 100644
--- a/share/static/js/assets.js
+++ b/share/static/js/assets.js
@@ -46,7 +46,7 @@ jQuery(function() {
             showModal
         );
     });
-    jQuery("#assets-create").click(function(ev){
+    jQuery("#assets-create, .asset-create-modal").click(function(ev){
         ev.preventDefault();
         jQuery.get(
             RT.Config.WebHomePath + "/Asset/Helpers/CreateInCatalog",

commit 5e83d8ad1fb7abd0ddeb951a5d959d24cd19ab2b
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Wed Nov 6 06:18:39 2019 +0800

    Make article create a modal and add corresponding button to top action
    
    With the top action button, the "New Article" page menu is not necessary
    any more.

diff --git a/lib/RT/Interface/Web/MenuBuilder.pm b/lib/RT/Interface/Web/MenuBuilder.pm
index ad91484beb..31921447ea 100644
--- a/lib/RT/Interface/Web/MenuBuilder.pm
+++ b/lib/RT/Interface/Web/MenuBuilder.pm
@@ -82,6 +82,10 @@ sub BuildMainNav {
     if ($request_path =~ m{^/Asset/}) {
         $widgets->child( asset_search => raw_html => $HTML::Mason::Commands::m->scomp('/Asset/Elements/Search') );
         $widgets->child( create_asset => raw_html => $HTML::Mason::Commands::m->scomp('/Asset/Elements/CreateAsset') );
+    }
+    elsif ($request_path =~ m{^/Articles/}) {
+        $widgets->child( article_search => raw_html => $HTML::Mason::Commands::m->scomp('/Articles/Elements/GotoArticle') );
+        $widgets->child( create_article => raw_html => $HTML::Mason::Commands::m->scomp('/Articles/Elements/CreateArticleButton') );
     } 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', ButtonOnly => 1) );
@@ -583,12 +587,7 @@ sub BuildMainNav {
     }
 
     if ( $request_path =~ m{^/Articles/} ) {
-        $widgets->child( article_search => raw_html => $HTML::Mason::Commands::m->scomp('/Articles/Elements/GotoArticle') );
-        $widgets->delete('create_ticket');
-        $widgets->delete('simple_search');
-
         $page->child( search => title => loc("Search"),       path => "/Articles/Article/Search.html" );
-        $page->child( create => title => loc("New Article" ), path => "/Articles/Article/PreCreate.html" );
         if ( $request_path =~ m{^/Articles/Article/} and ( $HTML::Mason::Commands::DECODED_ARGS->{'id'} || '' ) =~ /^(\d+)$/ ) {
             my $id  = $1;
             my $obj = RT::Article->new( $current_user );
diff --git a/share/html/Articles/Elements/CreateArticleButton b/share/html/Articles/Elements/CreateArticleButton
new file mode 100644
index 0000000000..bbcb13096c
--- /dev/null
+++ b/share/html/Articles/Elements/CreateArticleButton
@@ -0,0 +1,52 @@
+%# BEGIN BPS TAGGED BLOCK {{{
+%#
+%# COPYRIGHT:
+%#
+%# This software is Copyright (c) 1996-2019 Best Practical Solutions, LLC
+%#                                          <sales 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 }}}
+<form action="<% RT->Config->Get('WebPath') %>/Articles/Article/PreCreate.html">
+  <div class="create-article-button">
+    <input type="submit" class="btn btn-primary article-create-modal" value="<&|/l&>Create new article</&>" />
+  </div>
+</form>
diff --git a/share/html/Articles/Elements/CreateInClass b/share/html/Articles/Elements/CreateInClass
new file mode 100644
index 0000000000..7c48c43d6b
--- /dev/null
+++ b/share/html/Articles/Elements/CreateInClass
@@ -0,0 +1,62 @@
+%# BEGIN BPS TAGGED BLOCK {{{
+%#
+%# COPYRIGHT:
+%#
+%# This software is Copyright (c) 1996-2019 Best Practical Solutions, LLC
+%#                                          <sales 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 }}}
+<form action="<% RT->Config->Get("WebPath") %>/Articles/Article/Edit.html" id="ArticleCreateInClass">
+  <div class="form-row">
+    <div class="col-md-12 text-center">
+      <&|/l&>Select a class for your new article.</&>
+      <div class="d-inline-block">
+        <& /Articles/Elements/SelectClass, Name => 'Class', ShowNullOption => 0 &>
+      </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 Article page.") &>
+    </div>
+  </div>
+</form>
diff --git a/share/html/Articles/Helpers/CreateInClass b/share/html/Articles/Helpers/CreateInClass
new file mode 100644
index 0000000000..0099d9ce7c
--- /dev/null
+++ b/share/html/Articles/Helpers/CreateInClass
@@ -0,0 +1,61 @@
+%# BEGIN BPS TAGGED BLOCK {{{
+%#
+%# COPYRIGHT:
+%#
+%# This software is Copyright (c) 1996-2019 Best Practical Solutions, LLC
+%#                                          <sales 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 }}}
+<div class="modal-dialog modal-dialog-centered" role="document">
+  <div class="modal-content">
+    <div class="modal-header">
+      <h5 class="modal-title"><&|/l&>Create Article</&></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">
+        <& /Articles/Elements/CreateInClass &>
+    </div>
+  </div>
+</div>
+% $m->abort;
diff --git a/share/static/js/util.js b/share/static/js/util.js
index dd20af4a19..683427c19e 100644
--- a/share/static/js/util.js
+++ b/share/static/js/util.js
@@ -542,6 +542,14 @@ jQuery(function() {
         );
     });
 
+    jQuery("#articles-create, .article-create-modal").click(function(ev){
+        ev.preventDefault();
+        jQuery.get(
+            RT.Config.WebHomePath + "/Articles/Helpers/CreateInClass",
+            showModal
+        );
+    });
+
     jQuery(".card .card-header .toggle").each(function() {
         var e = jQuery(jQuery(this).attr('data-target'));
         e.on('hide.bs.collapse', function () {

commit 9f87b4a4042212e957c8a5933d675440520d2821
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Thu Nov 7 22:19:57 2019 +0800

    Fix the width of ticket's actions menu
    
    With "display: inline-block", the actions menu was set to 30em wide,
    instead of based on the text of actions.
    
    It seems this css rule was copied from other superfish menu rules, and
    removing it doesn't break anything from my tests.

diff --git a/share/static/css/elevator-light/nav.css b/share/static/css/elevator-light/nav.css
index 890be754c9..551d2394a5 100644
--- a/share/static/css/elevator-light/nav.css
+++ b/share/static/css/elevator-light/nav.css
@@ -331,7 +331,6 @@ ul.sf-menu li {
 
 #page-menu.sf-menu li {
     float: left;
-    display: inline-block;
     border-color: #E0E6EC;
     border-right-style: solid;
     border-right-width: 1px;

commit 4cc76db18a9404fa2dd4d042b09b88267eca7d29
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Thu Nov 7 22:54:45 2019 +0800

    Smaller padding only for the top-level actions in page menu
    
    For nested level ones like in "Actions", it's nicer to stick to the
    padding in #main-navigation.

diff --git a/share/static/css/elevator-light/nav.css b/share/static/css/elevator-light/nav.css
index 551d2394a5..f07b3e808d 100644
--- a/share/static/css/elevator-light/nav.css
+++ b/share/static/css/elevator-light/nav.css
@@ -70,6 +70,7 @@ ul.sf-menu li {
     text-color: #000;
 }
 
+#page-menu.sf-menu a,
 #main-navigation .sf-menu a,
 #main-navigation .sf-menu a:hover {
     padding-top: 0.5em;
@@ -324,7 +325,8 @@ ul.sf-menu li {
     margin-bottom: 0;
 }
 
-#page-menu.sf-menu a {
+#page-menu.sf-menu > li > span > a,
+#page-menu.sf-menu > li > a {
     padding-top: .3em;
     padding-bottom: .3em;
 }

commit d8264ee708cfef63085ad3e72c689647669c7d38
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Fri Nov 8 03:23:40 2019 +0800

    Consistent text for create asset modal like ticket/article

diff --git a/share/html/Asset/Elements/CreateInCatalog b/share/html/Asset/Elements/CreateInCatalog
index dc3a1269e6..58f966a20e 100644
--- a/share/html/Asset/Elements/CreateInCatalog
+++ b/share/html/Asset/Elements/CreateInCatalog
@@ -48,7 +48,7 @@
 <form action="<% RT->Config->Get("WebPath") %>/Asset/Create.html" id="AssetCreateInCatalog">
   <div class="form-row">
     <div class="col-md-12 text-center">
-      <&|/l&>Create a new asset in the catalog</&>:
+      <&|/l&>Select a catalog for your new asset.</&>
       <div class="d-inline-block">
         <& /Asset/Elements/SelectCatalog &>
       </div>
@@ -56,7 +56,7 @@
   </div>
   <div class="form-row">
     <div class="col-md-12">
-      <& /Elements/Submit, Label => loc("Go"), Caption => loc("This will take you to a partially prefilled asset creation form.") &>
+      <& /Elements/Submit, Label => loc("Go"), Caption => loc("This will take you to the Create Asset page.") &>
     </div>
   </div>
 </form>

commit 5732109146c7e739c8a615f65f0a2bc3001c77a2
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Fri Nov 8 03:56:06 2019 +0800

    Update tests for the header redesign update

diff --git a/t/articles/interface.t b/t/articles/interface.t
index 0aeefe7ca2..3f914d74a0 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(2);
+$m->form_number(3);
 $m->set_visible([option => $topic1->Name]);
 $m->submit;
-$m->form_number(2);
+$m->form_number(3);
 $m->set_visible([option => $answerCF->Name]);
 $m->click();
 $m->title_like(qr/Create a new article/, "got edit page from extraction");
@@ -209,7 +209,7 @@ diag("Test creating a ticket in Class2 and make sure we don't see Class1 Topics"
 {
 $m->follow_link_ok( { text => 'Articles', url_regex => qr!^/Articles/! },
     'UI -> Articles' );
-$m->follow_link_ok( {text => 'New Article' }, 'Articles -> New Article' );
+$m->follow_link_ok( {text => 'Create' }, 'Articles -> New Article' );
 $m->follow_link_ok( {text => 'in class '.$class2->Name }, 'New Article -> in class '.$class2->Name );
 $m->content_lacks( $topic1->Name, "Topic1 from Class1 isn't shown" );
 $m->content_lacks( $topic11->Name, "Topic11 from Class1 isn't shown" );
diff --git a/t/articles/queue-specific-class.t b/t/articles/queue-specific-class.t
index 83570e0a80..0adb9a65f6 100644
--- a/t/articles/queue-specific-class.t
+++ b/t/articles/queue-specific-class.t
@@ -35,7 +35,7 @@ for my $name ( keys %class ) {
         'article create page' );
 
     $m->submit_form(
-        form_number => 2,
+        form_number => 3,
         fields      => { Name => "article $name",
                          'Summary' => "$name summary",
                          'Object-RT::Article--CustomField-1-Values' => "$name content"}
diff --git a/t/articles/search-interface.t b/t/articles/search-interface.t
index d604a99d43..e3216b1c2a 100644
--- a/t/articles/search-interface.t
+++ b/t/articles/search-interface.t
@@ -157,7 +157,7 @@ sub DoArticleSearch{
   $m->text_contains('First article');
 
   $m->submit_form_ok( {
-            form_number => 2,
+            form_number => 3,
             fields      => {
                 'Article~' => $search_text
             },
diff --git a/t/articles/upload-customfields.t b/t/articles/upload-customfields.t
index 6ff042b7be..20b8cef186 100644
--- a/t/articles/upload-customfields.t
+++ b/t/articles/upload-customfields.t
@@ -59,7 +59,7 @@ $m->content_contains("Globally added custom field img$$", 'TCF added to the queu
 
 $m->follow_link_ok( { text => 'Articles', url_regex => qr!^/Articles/! },
     'UI -> Articles' );
-$m->follow_link( text => 'New Article');
+$m->follow_link( text => 'Create');
 
 $m->follow_link( url_regex => qr/Edit.html\?Class=1/ );
 $m->title_is(qq/Create a new article/);
diff --git a/t/web/action-results.t b/t/web/action-results.t
index 1cd1b1f465..2826e2f999 100644
--- a/t/web/action-results.t
+++ b/t/web/action-results.t
@@ -12,8 +12,7 @@ for my $quick (1, 0) {
     diag $quick ? "Quick ticket creation" : "Normal ticket creation";
 
     $m->get_ok("/");
-    $m->submit_form_ok({ form_name => 'CreateTicketInQueue' }, "Create new ticket form")
-        unless $quick;
+    $m->get_ok( '/Ticket/Create.html?Queue=1', "Create new ticket form" ) unless $quick;
     $m->submit_form_ok({
         with_fields => {
             Subject => "The Plants",
diff --git a/t/web/installer.t b/t/web/installer.t
index 900a4d715d..b3a40f3f6b 100644
--- a/t/web/installer.t
+++ b/t/web/installer.t
@@ -26,7 +26,7 @@ diag "Testing language change";
         },
         'change language to french'
     );
-    $m->content_like(qr/RT\s+pour\s+example\.com/i);
+    $m->content_like(qr/Pour commencer/);
     $m->submit_form_ok(
         {
             with_fields => {
@@ -36,7 +36,7 @@ diag "Testing language change";
         },
         'change language to english'
     );
-    $m->content_like(qr/RT\s+for\s+example\.com/i);
+    $m->content_like(qr/Getting started/);
 }
 
 diag "Walking through install screens setting defaults";
diff --git a/t/web/owner_disabled_group_19221.t b/t/web/owner_disabled_group_19221.t
index 74297a5d2a..552e70b6e5 100644
--- a/t/web/owner_disabled_group_19221.t
+++ b/t/web/owner_disabled_group_19221.t
@@ -31,11 +31,7 @@ ok $m->login, 'logged in';
 
 diag "user from group shows up in create form";
 {
-    $m->get_ok('/', 'open home page');
-    $m->form_name('CreateTicketInQueue');
-    $m->select( 'Queue', $queue->id );
-    $m->submit;
-
+    $m->get_ok('/Ticket/Create.html?Queue=' . $queue->id, 'open ticket create page');
     $m->content_contains('Create a new ticket', 'opened create ticket page');
     my $form = $m->form_name('TicketCreate');
     my $input = $form->find_input('Owner');
@@ -48,11 +44,7 @@ diag "user from disabled group DOESN'T shows up in create form";
     ($ok, $msg) = $group->SetDisabled(1);
     ok($ok, $msg);
 
-    $m->get_ok('/', 'open home page');
-    $m->form_name('CreateTicketInQueue');
-    $m->select( 'Queue', $queue->id );
-    $m->submit;
-
+    $m->get_ok('/Ticket/Create.html?Queue=' . $queue->id, 'open ticket create page');
     $m->content_contains('Create a new ticket', 'opened create ticket page');
     my $form = $m->form_name('TicketCreate');
     my $input = $form->find_input('Owner');
@@ -84,11 +76,7 @@ diag "Disable the middle group";
     ($ok, $msg) = $group->SetDisabled(1);
     ok($ok, "Disabled group: $msg");
 
-    $m->get_ok('/', 'open home page');
-    $m->form_name('CreateTicketInQueue');
-    $m->select( 'Queue', $queue->id );
-    $m->submit;
-
+    $m->get_ok('/Ticket/Create.html?Queue=' . $queue->id, 'open ticket create page');
     $m->content_contains('Create a new ticket', 'opened create ticket page');
     my $form = $m->form_name('TicketCreate');
     my $input = $form->find_input('Owner');
@@ -103,11 +91,7 @@ diag "Disable the top group";
     ($ok, $msg) = $super->SetDisabled(1);
     ok($ok, "Disabled supergroup: $msg");
 
-    $m->get_ok('/', 'open home page');
-    $m->form_name('CreateTicketInQueue');
-    $m->select( 'Queue', $queue->id );
-    $m->submit;
-
+    $m->get_ok('/Ticket/Create.html?Queue=' . $queue->id, 'open ticket create page');
     $m->content_contains('Create a new ticket', 'opened create ticket page');
     my $form = $m->form_name('TicketCreate');
     my $input = $form->find_input('Owner');
diff --git a/t/web/queue_caching.t b/t/web/queue_caching.t
index 6cc5c4fa79..80de354cff 100644
--- a/t/web/queue_caching.t
+++ b/t/web/queue_caching.t
@@ -80,7 +80,6 @@ diag( "Test a user who has only CreateTicket right" );
 
     my $b_m = RT::Test::Web->new;
     ok $b_m->login( 'user_b', 'password' ), 'logged in as user B';
-
     check_queues( $b_m, [], [] );
 }
 
@@ -254,10 +253,9 @@ sub internal_queues {
 sub check_queues {
     my ($browser, $queue_id_list, $queue_name_list, $url, $form_name) = @_;
     $url ||= $baseurl;
-    $form_name ||= 'CreateTicketInQueue';
 
     $browser->get_ok( $url, "Navigated to $url" );
-    ok( my $form = $browser->form_name( $form_name ), "Found form $form_name" );
+    ok( my $form = $browser->form_with_fields( 'Subject' ), "Found form" );
     my ( @queue_ids, @queue_names );
     if ( !$queue_id_list || @$queue_id_list > 0 ) {
         ok(my $queuelist = $form->find_input('Queue','option'), "Found queue select");
diff --git a/t/web/ticket_owner.t b/t/web/ticket_owner.t
index abce05a825..080c7d1c90 100644
--- a/t/web/ticket_owner.t
+++ b/t/web/ticket_owner.t
@@ -34,11 +34,7 @@ ok $agent_a->login('user_a', 'password'), 'logged in as user A';
 
 diag "current user has no right to own, nobody selected as owner on create";
 {
-    $agent_a->get_ok('/', 'open home page');
-    $agent_a->form_name('CreateTicketInQueue');
-    $agent_a->select( 'Queue', $queue->id );
-    $agent_a->submit;
-
+    $agent_a->get_ok('/Ticket/Create.html?Queue=' . $queue->id, 'open ticket create page');
     $agent_a->content_contains('Create a new ticket', 'opened create ticket page');
     my $form = $agent_a->form_name('TicketCreate');
     is $form->value('Owner'), RT->Nobody->id, 'correct owner selected';
@@ -58,11 +54,7 @@ diag "current user has no right to own, nobody selected as owner on create";
 
 diag "user can chose owner of a new ticket";
 {
-    $agent_a->get_ok('/', 'open home page');
-    $agent_a->form_name('CreateTicketInQueue');
-    $agent_a->select( 'Queue', $queue->id );
-    $agent_a->submit;
-
+    $agent_a->get_ok('/Ticket/Create.html?Queue=' . $queue->id, 'open ticket create page');
     $agent_a->content_contains('Create a new ticket', 'opened create ticket page');
     my $form = $agent_a->form_name('TicketCreate');
     is $form->value('Owner'), RT->Nobody->id, 'correct owner selected';
diff --git a/t/web/ticket_owner_autocomplete.t b/t/web/ticket_owner_autocomplete.t
index 040aa73238..72628394b6 100644
--- a/t/web/ticket_owner_autocomplete.t
+++ b/t/web/ticket_owner_autocomplete.t
@@ -30,11 +30,7 @@ ok $agent_a->login('user_a', 'password'), 'logged in as user A';
 
 diag "current user has no right to own, nobody selected as owner on create";
 {
-    $agent_a->get_ok('/', 'open home page');
-    $agent_a->form_name('CreateTicketInQueue');
-    $agent_a->select( 'Queue', $queue->id );
-    $agent_a->submit;
-
+    $agent_a->get_ok('/Ticket/Create.html?Queue=' . $queue->id, 'open ticket create page');
     $agent_a->content_contains('Create a new ticket', 'opened create ticket page');
     my $form = $agent_a->form_name('TicketCreate');
     is $form->value('Owner'), RT->Nobody->Name, 'correct owner selected';
@@ -53,11 +49,7 @@ diag "current user has no right to own, nobody selected as owner on create";
 
 diag "user can chose owner of a new ticket";
 {
-    $agent_a->get_ok('/', 'open home page');
-    $agent_a->form_name('CreateTicketInQueue');
-    $agent_a->select( 'Queue', $queue->id );
-    $agent_a->submit;
-
+    $agent_a->get_ok('/Ticket/Create.html?Queue=' . $queue->id, 'open ticket create page');
     $agent_a->content_contains('Create a new ticket', 'opened create ticket page');
     my $form = $agent_a->form_name('TicketCreate');
     is $form->value('Owner'), RT->Nobody->Name, 'correct owner selected';
diff --git a/t/web/ticket_owner_issues_16656.t b/t/web/ticket_owner_issues_16656.t
index c9fc7830e2..3248f19a84 100644
--- a/t/web/ticket_owner_issues_16656.t
+++ b/t/web/ticket_owner_issues_16656.t
@@ -26,11 +26,7 @@ ok $agent_root->login('root', 'password'), 'logged in as user root';
 
 diag "user_a doesn't show up in create form";
 {
-    $agent_root->get_ok('/', 'open home page');
-    $agent_root->form_name('CreateTicketInQueue');
-    $agent_root->select( 'Queue', '1' );
-    $agent_root->submit;
-
+    $agent_root->get_ok('/Ticket/Create.html?Queue=1', 'open ticket create page');
     $agent_root->content_contains('Create a new ticket', 'opened create ticket page');
     my $form = $agent_root->form_name('TicketCreate');
     my $input = $form->find_input('Owner');
diff --git a/t/web/ticket_txn_subject.t b/t/web/ticket_txn_subject.t
index 553c0b59df..67129d5a78 100644
--- a/t/web/ticket_txn_subject.t
+++ b/t/web/ticket_txn_subject.t
@@ -22,10 +22,7 @@ diag "create a ticket via the API";
 
 diag "create a ticket via the web";
 {
-    $m->submit_form_ok({
-        form_name => "CreateTicketInQueue",
-        fields    => { Queue => 1 },
-    }, 'create ticket in Queue');
+    $m->get_ok('/Ticket/Create.html?Queue=1', 'open ticket create page');
     $m->submit_form_ok({
         with_fields => {
             Subject => Encode::decode("UTF-8",'bad subject #2‽'),
@@ -37,9 +34,7 @@ diag "create a ticket via the web";
 
 diag "create a ticket via the web without a unicode subject";
 {
-    $m->submit_form_ok({
-        with_fields => { Queue => 1 },
-    }, 'create ticket in Queue');
+    $m->get_ok('/Ticket/Create.html?Queue=1', 'open ticket create page');
     $m->submit_form_ok({
         with_fields => {
             Subject => 'a fine subject #3',

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


More information about the rt-commit mailing list