Bug 22568: Replace RSS icon in the OPAC with Font Awesome
authorOwen Leonard <oleonard@myacpl.org>
Fri, 22 Mar 2019 16:43:51 +0000 (16:43 +0000)
committerNick Clemens <nick@bywatersolutions.com>
Sat, 23 Mar 2019 09:40:29 +0000 (09:40 +0000)
This patch removes the RSS icon image (feed-icon-16x16.png) from the
OPAC and replaces it with Font Awesome icons styled to match.

To test, apply the patch and regenerate the OPAC CSS. View the
following pages, confirming that the RSS icon looks correct:

 - OPAC home page (RSS news icon)
 - Search results page (Subscribe to search)
 - Recent comments
 - Search history
 - Lists -> View list

Signed-off-by: Liz Rea <wizzyrea@gmail.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

koha-tmpl/opac-tmpl/bootstrap/css/src/opac.scss
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-main.tt
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-search-history.tt
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-showreviews.tt
koha-tmpl/opac-tmpl/bootstrap/images/feed-icon-16x16.png [deleted file]

index 0b26283..a4c135f 100644 (file)
@@ -540,6 +540,31 @@ th {
     padding: 4px 8px;
 }
 
+#rssnews-container {
+    font-size: 90%;
+    padding: .5em 0;
+}
+
+.rsssearchlink {
+    &:hover {
+        text-decoration: none;
+    }
+}
+
+.fa {
+    &.fa-rss {
+        background: linear-gradient(135deg, #DA5E2A 0%, #FA9C39 50%, #DA5E2A 100%);
+        border-radius: 3px;
+        color: #FFF;
+        padding: 2px 3px;
+        text-shadow: 1px 0 1px rgba(0, 0, 0, .25);
+
+        &.rsssearchicon {
+            font-size: 90%;
+        }
+    }
+}
+
 #opacheader {
     background-color: #fcf9fc;
 }
index 82b0240..e02635f 100644 (file)
@@ -90,7 +90,7 @@
 
             <div id="rssnews-container">
                 <!-- Logged in users have a branch code or it could be explicitly set -->
-                <a href="[% OPACBaseURL | url %]/cgi-bin/koha/opac-news-rss.pl?branchcode=[% branchcode | uri %]"><img src="[% interface | html %]/[% theme | html %]/images/feed-icon-16x16.png"></a>
+                <a href="[% OPACBaseURL | url %]/cgi-bin/koha/opac-news-rss.pl?branchcode=[% branchcode | uri %]"><i class="fa fa-rss"></i>
                 [% IF Branches.all.size == 1 %]
                     [% IF branchcode %]
                         RSS feed for [% Branches.GetName( branchcode ) | html %] library news.
                         RSS feed for system-wide library news.
                     [% END %]
                 [% END %]
+                </a>
             </div>
 
             [% END %] <!-- single news item -->
index 501ceb2..2e233f1 100644 (file)
                         <strong>No results found!</strong>
                         <p>
                             [% IF ( searchdesc ) %]
-                                No results found for that in [% LibraryName | html %] catalog. <a href="[% OPACBaseURL | url %]/cgi-bin/koha/opac-search.pl?[% query_cgi | $raw %][% limit_cgi | $raw %]&amp;format=rss2" class="rsssearchlink noprint"><img src="[% interface | html %]/[% theme | html %]/images/feed-icon-16x16.png" alt="Subscribe to this search" title="Subscribe to this search" border="0" class="rsssearchicon"/></a>
+                                No results found for that in [% LibraryName | html %] catalog.
+                                <a href="[% OPACBaseURL | url %]/cgi-bin/koha/opac-search.pl?[% query_cgi | $raw %][% limit_cgi | $raw %]&amp;format=rss2" class="rsssearchlink noprint">
+                                    <i class="fa fa-rss rsssearchicon" title="Subscribe to this search"></i>
+                                </a>
                             [% ELSE %]
                                 You did not specify any search criteria.
                             [% END %]
                                 [% END %]
                             ).
                         [% END %]
-                        <a href="[% OPACBaseURL | url %]/cgi-bin/koha/opac-search.pl?[% query_cgi | $raw %][% limit_cgi | $raw %]&amp;count=[% countrss | uri %]&amp;sort_by=acqdate_dsc&amp;format=rss2" class="rsssearchlink noprint"><img src="[% interface | html %]/[% theme | html %]/images/feed-icon-16x16.png" alt="Subscribe to this search" title="Subscribe to this search" class="rsssearchicon"/></a>
+                        <a href="[% OPACBaseURL | url %]/cgi-bin/koha/opac-search.pl?[% query_cgi | $raw %][% limit_cgi | $raw %]&amp;format=rss2" class="rsssearchlink noprint">
+                            <i class="fa fa-rss rsssearchicon" title="Subscribe to this search"></i>
+                        </a>
                     [% END # / IF total %]
                     </p>
                 [% END # / IF searchdesc %]
index ff9f72d..098f532 100644 (file)
                                                     <tr>
                                                         <td><input type="checkbox" name="id" value="[% s.id | html %]" /></td>
                                                         <td><span title="[% s.time | html %]">[% s.time |$KohaDates  with_hours => 1 %]</span></td>
-                                                        <td><a href="[% OPACBaseURL | url %]/cgi-bin/koha/opac-search.pl?[% query_cgi | $raw %][% limit_cgi | $raw %]&amp;[% s.query_cgi | $raw %]&amp;count=[% countrss | uri %]&amp;sort_by=acqdate_dsc&amp;format=rss2" class="rsssearchlink"><img src="[% interface | html %]/[% theme | html %]/images/feed-icon-16x16.png" alt="Subscribe to this search" title="Subscribe to this search" class="rsssearchicon"/></a> <a href="/cgi-bin/koha/opac-search.pl?[% s.query_cgi | $raw %]">[% s.query_desc | html %]</a></td>
+                                                        <td>
+                                                            <a href="[% OPACBaseURL | url %]/cgi-bin/koha/opac-search.pl?[% query_cgi | $raw %][% limit_cgi | $raw %]&amp;[% s.query_cgi | $raw %]&amp;count=[% countrss | uri %]&amp;sort_by=acqdate_dsc&amp;format=rss2" class="rsssearchlink">
+                                                                <i class="fa fa-rss rsssearchicon" title="Subscribe to this search"></i>
+                                                            </a>
+                                                            <a href="/cgi-bin/koha/opac-search.pl?[% s.query_cgi | $raw %]">[% s.query_desc | html %]</a>
+                                                        </td>
                                                         <td>[% s.total | html %]</td>
                                                     </tr>
                                                 [% END %]
                                                 <tr>
                                                     <td><input type="checkbox" name="id" value="[% s.id | html %]" /></td>
                                                     <td><span title="[% s.time | html %]">[% s.time |$KohaDates  with_hours => 1 %]</span></td>
-                                                    <td><a href="[% OPACBaseURL | url %]/cgi-bin/koha/opac-search.pl?[% query_cgi | $raw %][% limit_cgi | $raw %]&amp;[% s.query_cgi | $raw %]&amp;count=[% countrss | uri %]&amp;sort_by=acqdate_dsc&amp;format=rss2" class="rsssearchlink"><img src="[% interface | html %]/[% theme | html %]/images/feed-icon-16x16.png" alt="Subscribe to this search" title="Subscribe to this search" class="rsssearchicon"/></a> <a href="/cgi-bin/koha/opac-search.pl?[% s.query_cgi | $raw %]">[% s.query_desc | html %]</a></td>
+                                                    <td>
+                                                        <a href="[% OPACBaseURL | url %]/cgi-bin/koha/opac-search.pl?[% query_cgi | $raw %][% limit_cgi | $raw %]&amp;[% s.query_cgi | $raw %]&amp;count=[% countrss | uri %]&amp;sort_by=acqdate_dsc&amp;format=rss2" class="rsssearchlink">
+                                                            <i class="fa fa-rss rsssearchicon" title="Subscribe to this search"></i>
+                                                        </a>
+                                                        <a href="/cgi-bin/koha/opac-search.pl?[% s.query_cgi | $raw %]">
+                                                            [% s.query_desc | html %]
+                                                        </a>
+                                                    </td>
                                                     <td>[% s.total | html %]</td>
                                                 </tr>
                                             [% END %]
index 3f97aa6..10d452d 100644 (file)
                         <h3>
                             [% shelf.shelfname | html %]
                             <a href="[% OPACBaseURL | url %]/cgi-bin/koha/opac-shelves.pl?rss=1&amp;op=view&amp;shelfnumber=[% shelf.shelfnumber | uri %]" class="rss-list-link noprint">
-                                <img src="[% interface | html %]/[% theme | html %]/images/feed-icon-16x16.png" alt="Subscribe to this list" title="Subscribe to this list" border="0" class="rsssearchicon"/>
+                                <i class="fa fa-rss rsssearchicon" title="Subscribe to this list"></i>
                             </a>
                         </h3>
 
index 80d55ef..e510e1a 100644 (file)
@@ -29,7 +29,7 @@
                     <div class="span12">
                 [% END %]
                    <div id="showreviews" class="searchresults maincontent">
-                        <h3>Recent comments <a href="[% OPACBaseURL | url %]/cgi-bin/koha/opac-showreviews.pl?format=rss" class="rsssearchlink"><img src="[% interface | html %]/[% theme | html %]/images/feed-icon-16x16.png" alt="Subscribe to recent comments" title="Subscribe to recent comments" border="0" class="rsssearchicon"/></a></h3>
+                        <h3>Recent comments <a href="[% OPACBaseURL | url %]/cgi-bin/koha/opac-showreviews.pl?format=rss" class="rsssearchlink"><i class="fa fa-rss rsssearchicon" title="Subscribe to recent comments"></i></a></h3>
                         <table class="table table-striped">
                             [% SET AdlibrisEnabled = Koha.Preference('AdlibrisCoversEnabled') %]
                             [% SET AdlibrisURL = Koha.Preference('AdlibrisCoversURL') %]
diff --git a/koha-tmpl/opac-tmpl/bootstrap/images/feed-icon-16x16.png b/koha-tmpl/opac-tmpl/bootstrap/images/feed-icon-16x16.png
deleted file mode 100644 (file)
index 1679ab0..0000000
Binary files a/koha-tmpl/opac-tmpl/bootstrap/images/feed-icon-16x16.png and /dev/null differ