[Rt-commit] rt branch, 4.6/article-styling, created. rt-5.0.0alpha1-18-g15f5dad40

Michel Rodriguez michel at bestpractical.com
Fri Mar 6 09:31:51 EST 2020


The branch, 4.6/article-styling has been created
        at  15f5dad40be85b348563e4031dafa9c9d4c6e2fc (commit)

- Log -----------------------------------------------------------------
commit 566926c3d2ded2a0ad822cba3870b81a5852a742
Author: michel <michel at bestpractical.com>
Date:   Mon Mar 2 23:06:19 2020 +0100

    Convert linked classes in Articles > Search to a portlet.

diff --git a/share/html/Articles/Article/Search.html b/share/html/Articles/Article/Search.html
index 227310899..eb8a6e1db 100644
--- a/share/html/Articles/Article/Search.html
+++ b/share/html/Articles/Article/Search.html
@@ -56,11 +56,13 @@
 % } elsif (not @classes) {
 <i><&|/l&>You don't have permission to view Articles in any Class</&></i>
 % } else {
+<& /Widgets/TitleBoxStart, title => loc('Select Class') &>
 <ul class="list-group list-group-compact">
 % for my $class (@classes) {
-<li class="list-group-item"><a href="<%RT->Config->Get('WebPath')%>/Articles/Article/Search.html?<% $m->comp('/Elements/QueryString', %filtered, Class => $class->id) %>"><&|/l, $class->Name&>in class [_1]</&></a></li>
+<li class="list-group-item"><a href="<%RT->Config->Get('WebPath')%>/Articles/Article/Search.html?<% $m->comp('/Elements/QueryString', %filtered, Class => $class->id) %>"><&|/l, $class->Name&>[_1]</&></a></li>
 % }
 </ul>
+<& /Widgets/TitleBoxEnd &>
 % }
   </div>
   <div class="col-md-6">
diff --git a/t/articles/search-interface.t b/t/articles/search-interface.t
index e3216b1c2..1d9d46ea4 100644
--- a/t/articles/search-interface.t
+++ b/t/articles/search-interface.t
@@ -121,25 +121,25 @@ $m->follow_link_ok( { text => 'Articles', url_regex => qr!^/Articles/! },
 
 # Case sensitive search on small field.
 DoArticleSearch($m, $class->Name, 'Africa');
-$m->text_contains('Search results'); # Did we do a search?
+$m->text_contains('Last Updated'); # Did we do a search?
 $m->text_contains('blah blah 1');
 
 # Case insensitive search on small field.
 DoArticleSearch($m, $class->Name, 'africa');
-$m->text_contains('Search results'); # Did we do a search?
+$m->text_contains('Last Updated'); # Did we do a search?
 $m->text_contains('blah blah 1');
 
 # Case sensitive search on large field.
 DoArticleSearch($m, $class->Name, 'ipsum');
-$m->text_contains('Search results'); # Did we do a search?
+$m->text_contains('Last Updated'); # Did we do a search?
 $m->text_contains('hoi polloi 4');
 
 # Case insensitive search on large field.
 DoArticleSearch($m, $class->Name, 'lorem');
-$m->text_contains('Search results'); # Did we do a search?
 TODO:{
     local $TODO = 'Case insensitive search on LONGBLOB not available in MySQL'
       if RT->Config->Get('DatabaseType') eq 'mysql';
+    $m->text_contains('Last Updated'); # Did we do a search?
     $m->text_contains('hoi polloi 4');
 }
 
@@ -153,7 +153,7 @@ sub DoArticleSearch{
   my $search_text = shift;
 
   $m->follow_link_ok( {text => 'Articles'}, 'Articles Search');
-  $m->follow_link_ok( {text => 'in class '. $class_name}, 'Articles in class '. $class_name);
+  $m->follow_link_ok( {text => $class_name}, 'Articles in class '. $class_name);
   $m->text_contains('First article');
 
   $m->submit_form_ok( {

commit cb19223313a51e7ae48e38055bf396eec38aedd7
Author: michel <michel at bestpractical.com>
Date:   Mon Mar 2 23:19:08 2020 +0100

    Make [Update] in Articles > Overview look like Take link in ticket searches.

diff --git a/share/html/Articles/Elements/NewestArticles b/share/html/Articles/Elements/NewestArticles
index 48b5f3493..523cb9b12 100644
--- a/share/html/Articles/Elements/NewestArticles
+++ b/share/html/Articles/Elements/NewestArticles
@@ -61,6 +61,7 @@
      
   </div>
 </div>
+
 % while (my $Article = $MyArticles->Next) {
 % $i++;
 <div class="<% $i%2 ? 'oddline' : 'evenline'%> form-row article-metadata">
@@ -74,7 +75,7 @@
     <span class="current-value"><%$Article->CreatorObj->Name%></span>
   </div>
   <div class="col-md-3 value text-left">
-    <span class="current-value">[<a href="<% RT->Config->Get('WebPath') %>/Articles/Article/Edit.html?id=<%$Article->Id%>"><&|/l&>Update</&></a>]</span>
+    <span class="current-value font-weight-bold"><a href="<% RT->Config->Get('WebPath') %>/Articles/Article/Edit.html?id=<%$Article->Id%>"><&|/l&>Update</&></a></span>
   </div>
 </div>
 <div class="<% $i%2 ? 'oddline' : 'evenline'%> form-row article-summary">
@@ -83,6 +84,7 @@
   </div>
 </div>
 % }
+
 <& /Widgets/TitleBoxEnd &>
 <%INIT>
 my $rows = 10;
diff --git a/share/html/Articles/Elements/UpdatedArticles b/share/html/Articles/Elements/UpdatedArticles
index 405239f86..2cac32a9a 100644
--- a/share/html/Articles/Elements/UpdatedArticles
+++ b/share/html/Articles/Elements/UpdatedArticles
@@ -75,7 +75,7 @@
     <span class="current-value"><%$Article->CreatorObj->Name%></span>
   </div>
   <div class="col-md-3 value text-left">
-    <span class="current-value">[<a href="<% RT->Config->Get('WebPath') %>/Articles/Article/Edit.html?id=<%$Article->Id%>"><&|/l&>Update</&></a>]</span>
+    <span class="current-value font-weight-bold"><a href="<% RT->Config->Get('WebPath') %>/Articles/Article/Edit.html?id=<%$Article->Id%>"><&|/l&>Update</&></a></span>
   </div>
 </div>
 

commit c1eaad24f1ea1bbb43ed35ca9ea50667d6b261dd
Author: michel <michel at bestpractical.com>
Date:   Mon Mar 2 23:21:50 2020 +0100

    Make headers smaller in Article search results.

diff --git a/share/html/Articles/Article/Elements/ShowSearchCriteria b/share/html/Articles/Article/Elements/ShowSearchCriteria
index 3d9a54a1e..56a8e1545 100644
--- a/share/html/Articles/Article/Elements/ShowSearchCriteria
+++ b/share/html/Articles/Article/Elements/ShowSearchCriteria
@@ -51,7 +51,7 @@
 <& /Widgets/TitleBoxStart, title => loc('Advanced search') &>
 % }
 <div class="form-row">
-<h2><&|/l&>Basics</&></h2>
+<h5><&|/l&>Basics</&></h5>
 </div>
 
 <div class="form-row">
@@ -100,7 +100,7 @@
 </div>
 
 <div class="form-row label">
-  <h2><&|/l&>Content</&></h2>
+  <h5><&|/l&>Content</&></h5>
 </div>
 
 <div class="form-row">
@@ -145,7 +145,7 @@
 % }
 
 <div class="form-row label">
-  <h2><&|/l&>Dates</&></h2>
+  <h5><&|/l&>Dates</&></h5>
 </div>
 
 <div class="form-row">
@@ -181,7 +181,7 @@
 </div>
 
 <div class="form-row label">
-  <h2><&|/l&>Links</&></h2>
+  <h5><&|/l&>Links</&></h5>
 </div>
 
 <div class="form-row">
@@ -209,7 +209,7 @@
 </div>
 
 <div class="form-row label">
-  <h2><&|/l&>Topics</&></h2>
+  <h5><&|/l&>Topics</&></h5>
 </div>
 
 

commit 1bb5cc9f488a0f41b9acd63bd4088e1387b6d4ea
Author: michel <michel at bestpractical.com>
Date:   Mon Mar 2 23:43:41 2020 +0100

    Change "Modify this search" to the gear icon in the article search.

diff --git a/share/html/Articles/Article/Search.html b/share/html/Articles/Article/Search.html
index eb8a6e1db..4440ee365 100644
--- a/share/html/Articles/Article/Search.html
+++ b/share/html/Articles/Article/Search.html
@@ -85,7 +85,12 @@
 % }
 
 <& /Elements/ListActions, actions => \@results &>
-<div style="float:right;margin-top:15px"><a href="#criteria"><&|/l&>Modify this search...</&></a></div>
+% my $alt = loc( 'Modify this search');
+<div style="float:right;margin-top:15px">
+  <a href="#criteria">
+    <span class="fas fa-cog icon-bordered fa-2x" alt="<% $alt %>" data-toggle="tooltip" data-placement="top" data-original-title="<% $alt %>"></span>
+  </a>
+</div>
 
 % if ($articles->BuildSelectCountQuery =~ /WHERE/i) {
 <h2><&|/l&>Search results</&></h2>

commit 66a3a817111dc338dc2fd786e21a8920c058d68f
Author: michel <michel at bestpractical.com>
Date:   Tue Mar 3 12:51:58 2020 +0100

    Add formatting to the "Topics" heading in article search results.
    
    Since you cannot sort on topics the header does not get the same
    formatting as the other headers (blue/bold). Add blue and bolder.
    
    This fix also adds the same format tp other collection-as-table
    headers.

diff --git a/share/static/css/elevator-light/ticket-lists.css b/share/static/css/elevator-light/ticket-lists.css
index 70609e098..5c81fd27d 100644
--- a/share/static/css/elevator-light/ticket-lists.css
+++ b/share/static/css/elevator-light/ticket-lists.css
@@ -20,6 +20,12 @@ table.queue-summary th.collection-as-table a {
     color: #3858a3
 }
 
+table.collection-as-table th.collection-as-table,
+table.queue-summary th.collection-as-table {
+    color: #3858a3;
+    font-weight: 500; /* 500 is between regular (400) and bold (700) */
+}
+
 table.queue-summary th.collection-as-table {
     text-align: right
 }

commit d31f8cf0e2b04285993bba94261aa9048b595911
Author: michel <michel at bestpractical.com>
Date:   Fri Mar 6 15:06:12 2020 +0100

    Remove "Search results" header in the article search result page.

diff --git a/share/html/Articles/Article/Search.html b/share/html/Articles/Article/Search.html
index 4440ee365..5813622fd 100644
--- a/share/html/Articles/Article/Search.html
+++ b/share/html/Articles/Article/Search.html
@@ -93,7 +93,6 @@
 </div>
 
 % if ($articles->BuildSelectCountQuery =~ /WHERE/i) {
-<h2><&|/l&>Search results</&></h2>
 <& /Elements/CollectionList,
     Collection => $articles, 
     AllowSorting => 1,

commit 15f5dad40be85b348563e4031dafa9c9d4c6e2fc
Author: michel <michel at bestpractical.com>
Date:   Fri Mar 6 15:24:57 2020 +0100

    Format newest/most recently updated article headers.
    
    Those 2 lists are created with specific elements, tagged differently than the
    usual collection-as-table. This gives their headers the same format as regular
    result lists.

diff --git a/share/static/css/elevator-light/ticket-lists.css b/share/static/css/elevator-light/ticket-lists.css
index 5c81fd27d..73673070e 100644
--- a/share/static/css/elevator-light/ticket-lists.css
+++ b/share/static/css/elevator-light/ticket-lists.css
@@ -21,7 +21,8 @@ table.queue-summary th.collection-as-table a {
 }
 
 table.collection-as-table th.collection-as-table,
-table.queue-summary th.collection-as-table {
+table.queue-summary th.collection-as-table,
+.article-headers .label {
     color: #3858a3;
     font-weight: 500; /* 500 is between regular (400) and bold (700) */
 }

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


More information about the rt-commit mailing list