Bugzilla – Attachment 87428 Details for
Bug 13782
RSS for news needs a bit of styling
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 13782: RSS for news needs a bit of styling
Bug-13782-RSS-for-news-needs-a-bit-of-styling.patch (text/plain), 9.53 KB, created by
Katrin Fischer
on 2019-04-04 21:41:00 UTC
(
hide
)
Description:
Bug 13782: RSS for news needs a bit of styling
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2019-04-04 21:41:00 UTC
Size:
9.53 KB
patch
obsolete
>From cbede8e967754b88ef4bfb7f6b3ceb404c17853d Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Fri, 22 Mar 2019 18:16:33 +0000 >Subject: [PATCH] Bug 13782: RSS for news needs a bit of styling > >This patch makes a number of updates to the display of news in the OPAC. >I hope that this makes OPAC news nicer/easier to read. It includes style >changes to make the RSS link look better too. > >To test, apply the patch and regenerate the OPAC CSS. You should have >multiple active news items. View the OPAC news with varied values of >NewsAuthorDisplay and OpacNewsLibrarySelect. > >Test the single news item view. Test with Quotes on and off, and with >OpacMainUserBlock populated or not. > >Signed-off-by: Liz Rea <wizzyrea@gmail.com> >--- > koha-tmpl/opac-tmpl/bootstrap/css/src/opac.scss | 30 ++++-- > .../opac-tmpl/bootstrap/en/modules/opac-main.tt | 103 ++++++++++++--------- > 2 files changed, 82 insertions(+), 51 deletions(-) > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/css/src/opac.scss b/koha-tmpl/opac-tmpl/bootstrap/css/src/opac.scss >index a4c135f84c..20fc1cd5d6 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/css/src/opac.scss >+++ b/koha-tmpl/opac-tmpl/bootstrap/css/src/opac.scss >@@ -515,29 +515,41 @@ th { > > #news { > margin: .5em 0; >+ padding: 1em; >+ >+ .newsitem { >+ &:last-child { >+ .newsfooter { >+ border-bottom: 0; >+ } >+ } >+ } > } > > .newscontainer { > border: 1px solid #DDD; >- border-bottom-width: 0; > } > > .newsheader { >- background-color: #f0f3f3; >- border-bottom: 1px solid #DDD; >- color: #727272; > margin: 0; >- padding: 8px; >+ padding: 8px 0; > } > > .newsbody { >- padding: 8px; >+ padding: 8px 0; > } > > .newsfooter { >- border-bottom: 1px solid #DDD; >- font-style: italic; >- padding: 4px 8px; >+ border-bottom: 1px solid #EEE; >+ color: #727272; >+ font-size: 90%; >+ margin-bottom: .5em; >+ padding-bottom: .5em; >+} >+ >+#rssnews-container { >+ color: #727272; >+ font-size: 90%; > } > > #rssnews-container { >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-main.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-main.tt >index e02635fc41..46768ca7d5 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-main.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-main.tt >@@ -49,19 +49,22 @@ > [% ELSE %] > <div class="span12"> > [% END %] >- [% IF Koha.Preference( 'OpacNewsLibrarySelect' ) %] >+ >+ [% IF Koha.Preference( 'OpacNewsLibrarySelect' ) %] >+ [% UNLESS news_item %] > <form id="news-branch-select" class="form-inline" name="news-branch-select" method="get" action="/cgi-bin/koha/opac-main.pl"> >- <label for="news-branch">Display news for: </label> >- <select id="news-branch" name="branch"> >- [% IF ( branchcode == "" ) %] >- <option value="" selected="selected">system-wide only</option> >- [% ELSE %] >- <option value="" >system-wide only</option> >- [% END %] >- [% PROCESS options_for_libraries libraries => Branches.all( selected => branchcode, unfiltered => 1, ) %] >- </select> >+ <label for="news-branch">Display news for: </label> >+ <select id="news-branch" name="branch"> >+ [% IF ( branchcode == "" ) %] >+ <option value="" selected="selected">System-wide only</option> >+ [% ELSE %] >+ <option value="">System-wide only</option> >+ [% END %] >+ [% PROCESS options_for_libraries libraries => Branches.all( selected => branchcode, unfiltered => 1, ) %] >+ </select> > </form> > [% END %] >+ [% END %] > > [% IF ( koha_news ) %] > >@@ -73,41 +76,54 @@ > > [% ELSE %] > >- <div id="news" class="newscontainer"> >- [% SET newsdisp = ( Koha.Preference('NewsAuthorDisplay') ) %] >- [% FOREACH koha_new IN koha_news %] >- <div class="newsitem"> >- <a name="newsitem[% koha_new.idnew | html %]" href="/cgi-bin/koha/opac-main.pl?news_id=[% koha_new.idnew | uri %]"><h4 class="newsheader">[% koha_new.title | html %]</h4></a> >- <div class="newsbody">[% koha_new.content | $raw %]</div> >- <div class="newsfooter">(published on [% koha_new.timestamp | $KohaDates with_hours = 1 %][% IF ( (newsdisp == 'opac' || newsdisp == 'both') && koha_new.borrowernumber ) %] by <span class="newsauthor_title">[% koha_new.author_title | html %] </span>[% koha_new.author_firstname | html %] [% koha_new.author_surname | html %][% END %])</div> >- </div> >- [% END %] >- </div> >- >- [% END %] >- >- [% UNLESS news_item %] <!-- unless single news item --> >+ <div id="news" class="newscontainer"> >+ [% SET newsdisp = ( Koha.Preference('NewsAuthorDisplay') ) %] >+ [% FOREACH koha_new IN koha_news %] >+ <div class="newsitem"> >+ <h4 class="newsheader"> >+ [% IF ( news_item ) %] >+ [% koha_new.title | html %] >+ [% ELSE %] >+ <a name="newsitem[% koha_new.idnew | html %]" href="/cgi-bin/koha/opac-main.pl?news_id=[% koha_new.idnew | uri %]">[% koha_new.title | html %]</a> >+ [% END %] >+ </h4> >+ <div class="newsbody">[% koha_new.content | $raw %]</div> >+ <div class="newsfooter"> >+ Published on [% koha_new.timestamp | $KohaDates with_hours = 1 %] >+ [% IF ( (newsdisp == 'opac' || newsdisp == 'both') && koha_new.borrowernumber ) %] >+ by <span class="newsauthor_title">[% koha_new.author_title | html %] </span>[% koha_new.author_firstname | html %] [% koha_new.author_surname | html %] >+ [% END %] >+ [% IF ( news_item ) %] >+ • <a href="/cgi-bin/koha/opac-main.pl">Show all news</a> >+ [% END %] >+ </div> >+ </div> > >- <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 %]"><i class="fa fa-rss"></i> >- [% IF Branches.all.size == 1 %] >- [% IF branchcode %] >- RSS feed for [% Branches.GetName( branchcode ) | html %] library news. >- [% ELSE %] >- RSS feed for library news. > [% END %] >- [% ELSE %] >- [% IF branchcode %] >- RSS feed for [% Branches.GetName( branchcode ) | html %] and system-wide library news. >- [% ELSE %] >- RSS feed for system-wide library news. >+ [% UNLESS news_item %] >+ <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 %]"> >+ <i class="fa fa-rss"></i> >+ [% IF Branches.all.size == 1 %] >+ [% IF branchcode %] >+ RSS feed for [% Branches.GetName( branchcode ) | html %] library news >+ [% ELSE %] >+ RSS feed for library news >+ [% END %] >+ [% ELSE %] >+ [% IF branchcode %] >+ RSS feed for [% Branches.GetName( branchcode ) | html %] and system-wide library news >+ [% ELSE %] >+ RSS feed for system-wide library news >+ [% END %] >+ [% END %] >+ </a> >+ </div> > [% END %] >- [% END %] >- </a> >- </div> >+ </div> > >- [% END %] <!-- single news item --> >+ [% END # /IF single_news_error %] > > [% ELSE %] <!-- koha news --> > [% IF Koha.Preference( 'OpacNewsLibrarySelect' ) %] >@@ -119,6 +135,9 @@ > </div> > [% END %] > >+ [% END # IF koha_news %] >+ >+ [% UNLESS news_item # Don't show under single news item %] > [% IF ( display_daily_quote && daily_quote ) %] > <div id="daily-quote"> > <h3>Quote of the day</h3> >@@ -129,8 +148,8 @@ > [% END %] > > [% IF ( OpacMainUserBlock ) %]<div id="opacmainuserblock">[% OpacMainUserBlock | $raw %]</div>[% END %] >+ [% END %] > >- [% END %] <!-- koha news --> > </div> <!-- / .span 7/9 --> > > [% IF ( ( Koha.Preference( 'opacuserlogin' ) == 1 ) || OpacNavRight ) %] >-- >2.11.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 13782
:
36387
|
86925
|
87424
| 87428