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

Michel Rodriguez michel at bestpractical.com
Tue Mar 3 09:38:02 EST 2020


The branch, 4.6/article-styling has been created
        at  c70e58e91bc4a36967320f75d152232403389ac2 (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 4fb9578e8dad0a7311e096475fab0aae12eed1d4
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..b8ac55e31 100644
--- a/share/html/Articles/Elements/NewestArticles
+++ b/share/html/Articles/Elements/NewestArticles
@@ -61,6 +61,8 @@
      
   </div>
 </div>
+
+<div id="article-list">
 % while (my $Article = $MyArticles->Next) {
 % $i++;
 <div class="<% $i%2 ? 'oddline' : 'evenline'%> form-row article-metadata">
@@ -74,7 +76,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 +85,8 @@
   </div>
 </div>
 % }
+</div>
+
 <& /Widgets/TitleBoxEnd &>
 <%INIT>
 my $rows = 10;
diff --git a/share/html/Articles/Elements/UpdatedArticles b/share/html/Articles/Elements/UpdatedArticles
index 405239f86..5d78d6aea 100644
--- a/share/html/Articles/Elements/UpdatedArticles
+++ b/share/html/Articles/Elements/UpdatedArticles
@@ -62,6 +62,7 @@
   </div>
 </div>
 
+<div id="article-list">
 % while (my $Article = $MyArticles->Next) {
 % $i++;
 <div class="<% $i%2 ? 'oddline' : 'evenline'%> form-row article-metadata">
@@ -75,7 +76,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>
 
@@ -85,6 +86,7 @@
   </div>
 </div>
 % }
+</div>
 
 <& /Widgets/TitleBoxEnd &>
 <%INIT>

commit 9fee12484c77e3395ac89fb45fd6fb3adfd4f43a
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 6e2351a5b59651a248d174232f950393eec543ba
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 c70e58e91bc4a36967320f75d152232403389ac2
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 (but not bold).

diff --git a/share/html/Articles/Article/Search.html b/share/html/Articles/Article/Search.html
index 4440ee365..26b2695db 100644
--- a/share/html/Articles/Article/Search.html
+++ b/share/html/Articles/Article/Search.html
@@ -93,7 +93,7 @@
 </div>
 
 % if ($articles->BuildSelectCountQuery =~ /WHERE/i) {
-<h2><&|/l&>Search results</&></h2>
+<div id="article-search">
 <& /Elements/CollectionList,
     Collection => $articles, 
     AllowSorting => 1,
@@ -103,6 +103,7 @@
     GenericQueryArgs => { %filtered, Format => $format, },
     &>
 % }
+</div>
 
 <br />
 <br />
diff --git a/share/static/css/elevator-light/articles.css b/share/static/css/elevator-light/articles.css
index 7e4a0f8a3..255c0fc1b 100644
--- a/share/static/css/elevator-light/articles.css
+++ b/share/static/css/elevator-light/articles.css
@@ -21,3 +21,8 @@
 #comp-Articles .form-row.article-summary {
     border-bottom: 1px solid #dee2e6;
 }
+
+#article-search th.collection-as-table
+ {
+    color: #3858a3;
+}

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


More information about the rt-commit mailing list