[Rt-commit] rt branch, 4.6/article-styling, created. rt-4.4.4-582-g3c70d6a96b
Michel Rodriguez
michel at bestpractical.com
Tue Jan 7 09:45:30 EST 2020
The branch, 4.6/article-styling has been created
at 3c70d6a96ba40b08addc99412450b335228cd3b1 (commit)
- Log -----------------------------------------------------------------
commit 3f917fc4069c923e3f1f5737f69c6ba4956b928d
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 466138bdc4dcf32686edc9b1cde7915fb6936855
Author: michel <michel at bestpractical.com>
Date: Thu Jan 2 15:38:05 2020 -0500
Make [Update] in Articles > Overview look like Take link in ticket searches.
This is done using <b> tags.
A better solution is probably to use the /Elements/CollectionList
widget, with a proper format for article search results, instead
of a custom formating.
diff --git a/share/html/Articles/Elements/NewestArticles b/share/html/Articles/Elements/NewestArticles
index f0fa4c7001..efbea56034 100644
--- a/share/html/Articles/Elements/NewestArticles
+++ b/share/html/Articles/Elements/NewestArticles
@@ -68,13 +68,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>
+ <b><span class="current-value"><a href="<% RT->Config->Get('WebPath') %>/Articles/Article/Display.html?id=<%$Article->Id%>"><%$Article->Name || loc('(no name)')%></a></span></b>
</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>
+ <b><span class="current-value"><a href="<% RT->Config->Get('WebPath') %>/Articles/Article/Edit.html?id=<%$Article->Id%>"><&|/l&>Update</&></a></span></b>
</div>
</div>
<div class="<% $i%2 ? 'oddline' : 'evenline'%> form-row">
diff --git a/share/html/Articles/Elements/UpdatedArticles b/share/html/Articles/Elements/UpdatedArticles
index f69328033a..9f6bf47afe 100644
--- a/share/html/Articles/Elements/UpdatedArticles
+++ b/share/html/Articles/Elements/UpdatedArticles
@@ -69,13 +69,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>
+ <b><span class="current-value"><a href="<% RT->Config->Get('WebPath') %>/Articles/Article/Display.html?id=<%$Article->Id%>"><%$Article->Name || loc('(no name)')%></a></span></b>
</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>
+ <b><span class="current-value"><a href="<% RT->Config->Get('WebPath') %>/Articles/Article/Edit.html?id=<%$Article->Id%>"><&|/l&>Update</&></a></span></b>
</div>
</div>
commit 0331880db6cc8a16b79dfdf4233781323f90a2ec
Author: michel <michel at bestpractical.com>
Date: Thu Jan 2 16:31:01 2020 -0500
Fix the heading format in the Article search results, in the Advanced
search section.
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 1e0d907eab..a800b1d253 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;
}
+
+span.article-advanced-search-header {
+ font-size: 1.05em ;
+ font-weight: bold;
+}
commit 22cfa8770883f0af9dfacb461becf576751b196e
Author: michel <michel at bestpractical.com>
Date: Thu Jan 2 17:19:49 2020 -0500
Add formating to Topics in the article search results.
diff --git a/share/static/css/elevator-light/articles.css b/share/static/css/elevator-light/articles.css
index a800b1d253..a79065f2ed 100644
--- a/share/static/css/elevator-light/articles.css
+++ b/share/static/css/elevator-light/articles.css
@@ -6,3 +6,7 @@ span.article-advanced-search-header {
font-size: 1.05em ;
font-weight: bold;
}
+
+th.collection-as-table {
+ color: #3858a3;
+}
commit b3014163c99cb253854a2a58383563871800b9cb
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
result page.
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 56387cc4d6038b1a0cf0640d60183dbdd66aa2d0
Author: michel <michel at bestpractical.com>
Date: Fri Jan 3 08:49:36 2020 -0500
Change "Search for articles" to "Article search" and remove "Search
results" 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 3c70d6a96ba40b08addc99412450b335228cd3b1
Author: michel <michel at bestpractical.com>
Date: Mon Jan 6 18:32:06 2020 -0500
Add div#article-search around article search results with a more
specific CSS rule.
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 a79065f2ed..50b9b7de27 100644
--- a/share/static/css/elevator-light/articles.css
+++ b/share/static/css/elevator-light/articles.css
@@ -7,6 +7,7 @@ span.article-advanced-search-header {
font-weight: bold;
}
-th.collection-as-table {
+#article-search th.collection-as-table
+ {
color: #3858a3;
}
-----------------------------------------------------------------------
More information about the rt-commit
mailing list