[Rt-commit] rt branch, 4.6/article-styling, created. rt-4.4.4-581-gfd9c0e3bd2
Michel Rodriguez
michel at bestpractical.com
Tue Jan 14 11:47:27 EST 2020
The branch, 4.6/article-styling has been created
at fd9c0e3bd234bf8ac56b65674233f5e8d9682bda (commit)
- Log -----------------------------------------------------------------
commit a91d0f2a8b50e79893af009f0d48c71b849965c6
Author: michel <michel at bestpractical.com>
Date: Thu Jan 2 11:35:32 2020 -0500
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 2273108993..eb8a6e1db6 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 e3216b1c2a..70f81f3ff8 100644
--- a/t/articles/search-interface.t
+++ b/t/articles/search-interface.t
@@ -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 78be6309bfcd6272e9ecabd0f445fa0309120354
Author: michel <michel at bestpractical.com>
Date: Thu Jan 9 16:14:29 2020 -0500
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 f0fa4c7001..31aee2f531 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">
@@ -68,13 +70,13 @@
<span class="current-value"><%$Article->Id%></span>
</div>
<div class="col-md-4 value text-left">
- <span class="current-value"><a href="<% RT->Config->Get('WebPath') %>/Articles/Article/Display.html?id=<%$Article->Id%>"><%$Article->Name || loc('(no name)')%></a></span>
+ <span class="current-value article-name"><a href="<% RT->Config->Get('WebPath') %>/Articles/Article/Display.html?id=<%$Article->Id%>"><%$Article->Name || loc('(no name)')%></a></span>
</div>
<div class="col-md-4 value text-left">
<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 article-update"><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">
@@ -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 f69328033a..947e6a3a5d 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">
@@ -69,13 +70,13 @@
<span class="current-value"><%$Article->Id%></span>
</div>
<div class="col-md-4 value text-left">
- <span class="current-value"><a href="<% RT->Config->Get('WebPath') %>/Articles/Article/Display.html?id=<%$Article->Id%>"><%$Article->Name || loc('(no name)')%></a></span>
+ <span class="current-value article-name"><a href="<% RT->Config->Get('WebPath') %>/Articles/Article/Display.html?id=<%$Article->Id%>"><%$Article->Name || loc('(no name)')%></a></span>
</div>
<div class="col-md-4 value text-left">
<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 article-update"><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>
diff --git a/share/static/css/elevator-light/articles.css b/share/static/css/elevator-light/articles.css
index 1e0d907eab..a4cbd5cdf2 100644
--- a/share/static/css/elevator-light/articles.css
+++ b/share/static/css/elevator-light/articles.css
@@ -1,3 +1,8 @@
#articles-needs-setup a {
text-decoration: underline;
}
+
+#article-list span.article-name,
+#article-list span.article-update {
+ font-weight: bold;
+}
commit f119723add50fcb72b7343429cde4b7037460c69
Author: michel <michel at bestpractical.com>
Date: Thu Jan 2 16:31:01 2020 -0500
Fix the heading format in the Article search results
diff --git a/share/html/Articles/Article/Elements/ShowSearchCriteria b/share/html/Articles/Article/Elements/ShowSearchCriteria
index 3d9a54a1ee..e24794d998 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>
+<span class="article-advanced-search-header"><&|/l&>Basics</&></span>
</div>
<div class="form-row">
@@ -100,7 +100,7 @@
</div>
<div class="form-row label">
- <h2><&|/l&>Content</&></h2>
+ <span class="article-advanced-search-header"><&|/l&>Content</&></span>
</div>
<div class="form-row">
@@ -145,7 +145,7 @@
% }
<div class="form-row label">
- <h2><&|/l&>Dates</&></h2>
+ <span class="article-advanced-search-header"><&|/l&>Dates</&></span>
</div>
<div class="form-row">
@@ -181,7 +181,7 @@
</div>
<div class="form-row label">
- <h2><&|/l&>Links</&></h2>
+ <span class="article-advanced-search-header"><&|/l&>Links</&></span>
</div>
<div class="form-row">
@@ -209,7 +209,7 @@
</div>
<div class="form-row label">
- <h2><&|/l&>Topics</&></h2>
+ <span class="article-advanced-search-header"><&|/l&>Topics</&></span>
</div>
diff --git a/share/static/css/elevator-light/articles.css b/share/static/css/elevator-light/articles.css
index a4cbd5cdf2..1ed065d1ec 100644
--- a/share/static/css/elevator-light/articles.css
+++ b/share/static/css/elevator-light/articles.css
@@ -6,3 +6,8 @@
#article-list span.article-update {
font-weight: bold;
}
+
+span.article-advanced-search-header {
+ font-size: 1.05em ;
+ font-weight: bold;
+}
commit d913747e7be2eb6035a9508450ab8ecae9b1a8ee
Author: michel <michel at bestpractical.com>
Date: Thu Jan 2 17:28:39 2020 -0500
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 eb8a6e1db6..cea9684aaa 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 2263373b48a5992fc580e93af3e9b0d6366b8181
Author: michel <michel at bestpractical.com>
Date: Fri Jan 3 08:49:36 2020 -0500
Change headers in articles search results.
diff --git a/share/html/Articles/Article/Search.html b/share/html/Articles/Article/Search.html
index cea9684aaa..0563be207e 100644
--- a/share/html/Articles/Article/Search.html
+++ b/share/html/Articles/Article/Search.html
@@ -45,7 +45,7 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<& /Elements/Header, Title => loc("Search for articles") &>
+<& /Elements/Header, Title => loc("Article search") &>
<& /Elements/Tabs &>
% unless ( keys %ARGS ) {
@@ -93,7 +93,6 @@
</div>
% if ($articles->BuildSelectCountQuery =~ /WHERE/i) {
-<h2><&|/l&>Search results</&></h2>
<& /Elements/CollectionList,
Collection => $articles,
AllowSorting => 1,
diff --git a/t/articles/search-interface.t b/t/articles/search-interface.t
index 70f81f3ff8..1d9d46ea47 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');
}
commit fd9c0e3bd234bf8ac56b65674233f5e8d9682bda
Author: michel <michel at bestpractical.com>
Date: Mon Jan 6 18:32:06 2020 -0500
Add formating to Topics in the article search results.
diff --git a/share/html/Articles/Article/Search.html b/share/html/Articles/Article/Search.html
index 0563be207e..7456816ba1 100644
--- a/share/html/Articles/Article/Search.html
+++ b/share/html/Articles/Article/Search.html
@@ -93,6 +93,7 @@
</div>
% if ($articles->BuildSelectCountQuery =~ /WHERE/i) {
+<div id="article-search">
<& /Elements/CollectionList,
Collection => $articles,
AllowSorting => 1,
@@ -102,7 +103,7 @@
GenericQueryArgs => { %filtered, Format => $format, },
&>
% }
-
+</div>
<br />
<br />
<br />
diff --git a/share/static/css/elevator-light/articles.css b/share/static/css/elevator-light/articles.css
index 1ed065d1ec..c429f7eabf 100644
--- a/share/static/css/elevator-light/articles.css
+++ b/share/static/css/elevator-light/articles.css
@@ -11,3 +11,7 @@ span.article-advanced-search-header {
font-size: 1.05em ;
font-weight: bold;
}
+#article-search th.collection-as-table
+ {
+ color: #3858a3;
+}
-----------------------------------------------------------------------
More information about the rt-commit
mailing list