Bug 17417 [Revised] Correct invalid markup around news on the staff client home page
authorOwen Leonard <oleonard@myacpl.org>
Mon, 10 Oct 2016 12:10:29 +0000 (08:10 -0400)
committerKyle M Hall <kyle@bywatersolutions.com>
Fri, 28 Oct 2016 11:45:48 +0000 (11:45 +0000)
This patch fixes two minor errors in the markup around displaying news
on the staff client home page: Adding a missing "class" attribute, and
changing the container around news items from <p> to <div> (because news
items might contain <p> and nesting them is incorrect).

To test, apply the patch and view the staff client home page with news
items showing. Validate the page and confirm that there are no errors.

Signed-off-by: Marc <veron@veron.ch>
Revision for QA removes an extra </div> from elsewhere in the template
to make the validator return no errors.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
koha-tmpl/intranet-tmpl/prog/en/modules/intranet-main.tt

index 33e6259..060ba39 100644 (file)
@@ -189,11 +189,11 @@ var MSG_CONFIRM_DELETE = _("Are you sure you want to delete this news item? This
     <div class="yui-b"><!-- YOUR NAVIGATION GOES HERE -->
     [% IF ( koha_news_count ) %]
         <div id="area-news">
-            <h3><span="news_title">News</span></h3>
+            <h3><span class="news_title">News</span></h3>
             [% SET newsdisp = Koha.Preference('NewsAuthorDisplay') %]
             [% FOREACH koha_new IN koha_news %]
                 <div class="newsitem" id="news[% koha_new.idnew %]"><h4>[% koha_new.title %]</h4>
-                    <p>[% koha_new.new %]</p>
+                    <div class="newsbody">[% koha_new.new %]</div>
                     <p class="newsfooter"> Posted on [% koha_new.newdate %][% IF( ( newsdisp == 'staff' || newsdisp == 'both' ) && koha_new.borrowernumber ) %] by <span class="newsauthor_title">[% koha_new.author_title %] </span>[% koha_new.author_firstname %] [% koha_new.author_surname %]<br />[% END %]
                         [% IF ( CAN_user_tools ) %]
                             <a href="/cgi-bin/koha/tools/koha-news.pl?op=add_form&amp;id=[% koha_new.idnew %]">Edit</a>
@@ -206,7 +206,6 @@ var MSG_CONFIRM_DELETE = _("Are you sure you want to delete this news item? This
         </div><!-- /koha-news -->
     [% END %]
     </div>
-    </div>
 </div>
 
 <!-- the main div is closed in intranet-bottom.inc -->