Bug 14272: (follow-up) Fixing layout issues and expiration date hint
authorAleisha Amohia <aleishaamohia@hotmail.com>
Tue, 28 Aug 2018 22:32:28 +0000 (22:32 +0000)
committerroot <root@f1ebe1bec408>
Tue, 19 Feb 2019 13:52:15 +0000 (13:52 +0000)
Misunderstood the first time.

I've added the hint to the news form on staff side.
I've fixed the layout on OPAC.
The RSS feed shows on the main page, but is hidden if there is no news
and if viewing one news item.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
koha-tmpl/intranet-tmpl/prog/en/modules/tools/koha-news.tt
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-main.tt

index be90763..0287522 100644 (file)
@@ -98,7 +98,10 @@ Edit news item[% ELSE %]Add news item[% END %][% ELSE %]News[% END %]</div>
             <li>
                 <label for="to">Expiration date: </label>
                 <input id="to" type="text" name="expirationdate" size="15" value="[% new_detail.expirationdate | html %]" class="datepickerto" />
-                               <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
+                <div class="hint">
+                    [% INCLUDE 'date-format.inc' %]
+                    <br>News will still be accessible by direct URL if expired.
+                </div>
             </li>
             <li>
                 <label for="number">Appear in position: </label>
index 8df8709..17f5b6f 100644 (file)
@@ -79,7 +79,7 @@
                     <div class="newsitem">
                         <a name="newsitem[% koha_new.idnew | html %]" href="/cgi-bin/koha/opac-main.pl?news_id=[% koha_new.idnew %]"><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 | html %][% 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 ( koha_new.expirationdate ) %], expiry on [% koha_new.expirationdate %][% END %])</div>
+                        <div class="newsfooter">(published on [% koha_new.timestamp | $KohaDates with_hours = 1 | html %][% 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 %]
             </div>
 
+            [% END %] <!-- single news item -->
+
+        [% ELSE %] <!-- koha news -->
+            [% IF Koha.Preference( 'OpacNewsLibrarySelect' ) %]
+                <div id="news" class="newscontainer">
+                    <div class="newsitem">
+                        <div class="newsbody">No news to display.</div>
+                        <div class="newsfooter"></div>
+                    </div>
+                </div>
+            [% END %]
+
             [% IF ( display_daily_quote && daily_quote ) %]
                 <div id="daily-quote">
                     <h3>Quote of the day</h3>
 
             [% IF ( OpacMainUserBlock ) %]<div id="opacmainuserblock">[% OpacMainUserBlock | $raw %]</div>[% END %]
 
-            [% END %] <!-- single news item -->
-        [% ELSE %] <!-- koha news -->
-            [% IF Koha.Preference( 'OpacNewsLibrarySelect' ) %]
-                <div id="news" class="newscontainer">
-                    <div class="newsitem">
-                        <div class="newsbody">No news to display.</div>
-                        <div class="newsfooter"></div>
-                    </div>
-                </div>
-            [% END %]
-        [% END %]
+        [% END %] <!-- koha news -->
         </div> <!-- / .span 7/9 -->
 
         [% IF ( ( Koha.Preference( 'opacuserlogin' ) == 1 ) || OpacNavRight ) %]