| 
      
            Lines 72-78
          
      
      
        Link Here
      
     | 
  
        
          | 72 | 
                  <h1 class="sr-only">Koha home</h1>  | 
          72 | 
                  <h1 class="sr-only">Koha home</h1>  | 
        
        
          | 73 | 
           | 
          73 | 
           | 
        
        
          | 74 | 
                  [% IF Koha.Preference( 'OpacNewsLibrarySelect' ) %]  | 
          74 | 
                  [% IF Koha.Preference( 'OpacNewsLibrarySelect' ) %]  | 
        
          
            
              | 75 | 
                          [% UNLESS news_item %]  | 
              75 | 
                          [% UNLESS news_id %]  | 
            
        
          | 76 | 
                          <form id="news-branch-select" class="form-inline" name="news-branch-select" method="get" action="/cgi-bin/koha/opac-main.pl">  | 
          76 | 
                          <form id="news-branch-select" class="form-inline" name="news-branch-select" method="get" action="/cgi-bin/koha/opac-main.pl">  | 
        
        
          | 77 | 
                              <legend class="sr-only">News</legend>  | 
          77 | 
                              <legend class="sr-only">News</legend>  | 
        
        
          | 78 | 
                              <label for="news-branch">Display news for: </label>  | 
          78 | 
                              <label for="news-branch">Display news for: </label>  | 
        
  
    | 
      
            Lines 88-154
          
      
      
        Link Here
      
     | 
  
        
          | 88 | 
                      [% END %]  | 
          88 | 
                      [% END %]  | 
        
        
          | 89 | 
                  [% END %]  | 
          89 | 
                  [% END %]  | 
        
        
          | 90 | 
           | 
          90 | 
           | 
        
          
            
              | 91 | 
                      [% IF koha_news.count %]  | 
              91 | 
                      [% IF news_id %]  | 
            
            
              | 92 | 
               | 
              92 | 
                          [% SET koha_news = AdditionalContents.get_opac_news_by_id( news_id => news_id ) %]  | 
            
            
              | 93 | 
                          [% IF single_news_error %]  | 
              93 | 
                      [% ELSE %]  | 
            
            
              | 94 | 
               | 
              94 | 
                          [% SET koha_news = AdditionalContents.get( category => 'news', location => ['opac_only', 'staff_and_opac'], lang => lang, library => branchcode ) %]  | 
            
            
              | 95 | 
                              <div class="alert alert-error">  | 
              95 | 
                      [% END %]  | 
            
            
              | 96 | 
                                  This news item does not exist.  | 
              96 | 
                      [% IF koha_news.content.count %]  | 
            
            
              | 97 | 
                              </div>  | 
              97 | 
                          <div id="news" class="newscontainer">  | 
            
            
              | 98 | 
               | 
              98 | 
                              [% SET show_author = Koha.Preference('NewsAuthorDisplay') == 'opac' || Koha.Preference('NewsAuthorDisplay') == 'both' %] | 
            
            
              | 99 | 
                          [% ELSE %]  | 
              99 | 
                              [% FOREACH koha_new IN koha_news.content %]  | 
            
            
               | 
               | 
              100 | 
                                  <div class="newsitem">  | 
            
            
              | 101 | 
                                      <h4 class="newsheader">  | 
            
            
              | 102 | 
                                          [% IF ( news_item ) %]  | 
            
            
              | 103 | 
                                              [% koha_new.title | html %]  | 
            
            
              | 104 | 
                                          [% ELSE %]  | 
            
            
              | 105 | 
                                              <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>  | 
            
            
              | 106 | 
                                          [% END %]  | 
            
            
              | 107 | 
                                      </h4>  | 
            
            
              | 108 | 
                                      <div class="newsbody">[% koha_new.content | $raw %]</div>  | 
            
            
              | 109 | 
                                      <div class="newsfooter">  | 
            
            
              | 110 | 
                                          Published on [% koha_new.published_on | $KohaDates %]  | 
            
            
              | 111 | 
                                          [% IF ( show_author && koha_new.author ) %]  | 
            
            
              | 112 | 
                                              by <span class="newsauthor">[% INCLUDE 'patron-title.inc' patron=koha_new.author %]</span>  | 
            
            
              | 113 | 
                                          [% END %]  | 
            
            
              | 114 | 
                                          [% IF ( news_id ) %]  | 
            
            
              | 115 | 
                                              • <a href="/cgi-bin/koha/opac-main.pl">Show all news</a>  | 
            
            
              | 116 | 
                                          [% END %]  | 
            
            
              | 117 | 
                                      </div>  | 
            
            
              | 118 | 
                                  </div>  | 
            
            
              | 119 | 
                              [% END %]  | 
            
        
          | 100 | 
           | 
          120 | 
           | 
        
          
            
              | 101 | 
                              <div id="news" class="newscontainer">  | 
              121 | 
                              [% UNLESS news_id %]  | 
            
            
              | 102 | 
                                  [% SET show_author = Koha.Preference('NewsAuthorDisplay') == 'opac' || Koha.Preference('NewsAuthorDisplay') == 'both' %] | 
              122 | 
                                  <div id="rssnews-container">  | 
            
            
              | 103 | 
                                  [% FOREACH koha_new IN koha_news %]  | 
              123 | 
                                      <!-- Logged in users have a branch code or it could be explicitly set -->  | 
            
            
              | 104 | 
                                  [% IF koha_new.category == 'news' %]  | 
              124 | 
                                      <a href="[% OPACBaseURL | url %]/cgi-bin/koha/opac-news-rss.pl?branchcode=[% branchcode | uri %]">  | 
            
            
              | 105 | 
                                      <div class="newsitem">  | 
              125 | 
                                          <i class="fa fa-rss" aria-hidden="true"></i>  | 
            
            
              | 106 | 
                                          <h4 class="newsheader">  | 
              126 | 
                                          [% IF Branches.all.size == 1 %]  | 
            
            
              | 107 | 
                                              [% IF ( news_item ) %]  | 
              127 | 
                                              [% IF branchcode %]  | 
            
            
              | 108 | 
                                                  [% koha_new.title | html %]  | 
              128 | 
                                                  <span>RSS feed for [% Branches.GetName( branchcode ) | html %] library news</span>  | 
            
        
          | 109 | 
                                          [% ELSE %]  | 
          129 | 
                                          [% ELSE %]  | 
        
          
            
              | 110 | 
                                                  <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>  | 
              130 | 
                                                  <span>RSS feed for library news</span>  | 
            
            
              | 111 | 
                                              [% END %]  | 
               | 
               | 
            
            
              | 112 | 
                                          </h4>  | 
            
            
              | 113 | 
                                          <div class="newsbody">[% koha_new.content | $raw %]</div>  | 
            
            
              | 114 | 
                                          <div class="newsfooter">  | 
            
            
              | 115 | 
                                              Published on [% koha_new.published_on | $KohaDates %]  | 
            
            
              | 116 | 
                                              [% IF ( show_author && koha_new.author ) %]  | 
            
            
              | 117 | 
                                                  by <span class="newsauthor">[% INCLUDE 'patron-title.inc' patron=koha_new.author %]</span>  | 
            
            
              | 118 | 
                                              [% END %]  | 
            
            
              | 119 | 
                                              [% IF ( news_item ) %]  | 
            
            
              | 120 | 
                                                  • <a href="/cgi-bin/koha/opac-main.pl">Show all news</a>  | 
            
        
          | 121 | 
                                          [% END %]  | 
          131 | 
                                          [% END %]  | 
        
          
            
              | 122 | 
                                          </div>  | 
              132 | 
                                          [% ELSE %]  | 
            
            
              | 123 | 
                                      </div>  | 
              133 | 
                                              [% IF branchcode %]  | 
            
            
              | 124 | 
                                  [% END %]  | 
              134 | 
                                                  <span>RSS feed for [% Branches.GetName( branchcode ) | html %] and system-wide library news</span>  | 
            
            
              | 125 | 
                                  [% END %]  | 
               | 
               | 
            
            
              | 126 | 
               | 
            
            
              | 127 | 
                                  [% UNLESS news_item %]  | 
            
            
              | 128 | 
                                      <div id="rssnews-container">  | 
            
            
              | 129 | 
                                          <!-- Logged in users have a branch code or it could be explicitly set -->  | 
            
            
              | 130 | 
                                          <a href="[% OPACBaseURL | url %]/cgi-bin/koha/opac-news-rss.pl?branchcode=[% branchcode | uri %]">  | 
            
            
              | 131 | 
                                              <i class="fa fa-rss" aria-hidden="true"></i>  | 
            
            
              | 132 | 
                                              [% IF Branches.all.size == 1 %]  | 
            
            
              | 133 | 
                                                  [% IF branchcode %]  | 
            
            
              | 134 | 
                                                      <span>RSS feed for [% Branches.GetName( branchcode ) | html %] library news</span>  | 
            
            
              | 135 | 
                                                  [% ELSE %]  | 
            
            
              | 136 | 
                                                      <span>RSS feed for library news</span>  | 
            
            
              | 137 | 
                                                  [% END %]  | 
            
        
          | 138 | 
                                          [% ELSE %]  | 
          135 | 
                                          [% ELSE %]  | 
        
          
            
              | 139 | 
                                                  [% IF branchcode %]  | 
              136 | 
                                                  <span>RSS feed for system-wide library news</span>  | 
            
            
              | 140 | 
                                                      <span>RSS feed for [% Branches.GetName( branchcode ) | html %] and system-wide library news</span>  | 
               | 
               | 
            
            
              | 141 | 
                                                  [% ELSE %]  | 
            
            
              | 142 | 
                                                      <span>RSS feed for system-wide library news</span>  | 
            
            
              | 143 | 
                                                  [% END %]  | 
            
        
          | 144 | 
                                          [% END %]  | 
          137 | 
                                          [% END %]  | 
        
          
            
              | 145 | 
                                          </a>  | 
              138 | 
                                          [% END %]  | 
            
            
              | 146 | 
                                      </div>  | 
              139 | 
                                      </a>  | 
            
            
              | 147 | 
                                  [% END %]  | 
              140 | 
                                  </div>  | 
            
            
              | 148 | 
                              </div>  | 
              141 | 
                              [% END %]  | 
            
            
              | 149 | 
               | 
              142 | 
                          </div>  | 
            
            
              | 150 | 
                          [% END # /IF single_news_error %]  | 
              143 | 
                      [% ELSIF news_id %] <!-- news_id but no koha_news.content -->  | 
            
            
              | 151 | 
               | 
              144 | 
                          <div class="alert alert-error">  | 
            
            
               | 
               | 
              145 | 
                              This news item does not exist.  | 
            
            
              | 146 | 
                          </div>  | 
            
        
          | 152 | 
                  [% ELSE %] <!-- koha news -->  | 
          147 | 
                  [% ELSE %] <!-- koha news -->  | 
        
        
          | 153 | 
                      [% IF Koha.Preference( 'OpacNewsLibrarySelect' ) %]  | 
          148 | 
                      [% IF Koha.Preference( 'OpacNewsLibrarySelect' ) %]  | 
        
        
          | 154 | 
                          <div id="news" class="newscontainer">  | 
          149 | 
                          <div id="news" class="newscontainer">  |