Lines 49-67
Link Here
|
49 |
[% ELSE %] |
49 |
[% ELSE %] |
50 |
<div class="span12"> |
50 |
<div class="span12"> |
51 |
[% END %] |
51 |
[% END %] |
52 |
[% IF Koha.Preference( 'OpacNewsLibrarySelect' ) %] |
52 |
|
|
|
53 |
[% IF Koha.Preference( 'OpacNewsLibrarySelect' ) %] |
54 |
[% UNLESS news_item %] |
53 |
<form id="news-branch-select" class="form-inline" name="news-branch-select" method="get" action="/cgi-bin/koha/opac-main.pl"> |
55 |
<form id="news-branch-select" class="form-inline" name="news-branch-select" method="get" action="/cgi-bin/koha/opac-main.pl"> |
54 |
<label for="news-branch">Display news for: </label> |
56 |
<label for="news-branch">Display news for: </label> |
55 |
<select id="news-branch" name="branch"> |
57 |
<select id="news-branch" name="branch"> |
56 |
[% IF ( branchcode == "" ) %] |
58 |
[% IF ( branchcode == "" ) %] |
57 |
<option value="" selected="selected">system-wide only</option> |
59 |
<option value="" selected="selected">System-wide only</option> |
58 |
[% ELSE %] |
60 |
[% ELSE %] |
59 |
<option value="" >system-wide only</option> |
61 |
<option value="">System-wide only</option> |
60 |
[% END %] |
62 |
[% END %] |
61 |
[% PROCESS options_for_libraries libraries => Branches.all( selected => branchcode, unfiltered => 1, ) %] |
63 |
[% PROCESS options_for_libraries libraries => Branches.all( selected => branchcode, unfiltered => 1, ) %] |
62 |
</select> |
64 |
</select> |
63 |
</form> |
65 |
</form> |
64 |
[% END %] |
66 |
[% END %] |
|
|
67 |
[% END %] |
65 |
|
68 |
|
66 |
[% IF ( koha_news ) %] |
69 |
[% IF ( koha_news ) %] |
67 |
|
70 |
|
Lines 73-113
Link Here
|
73 |
|
76 |
|
74 |
[% ELSE %] |
77 |
[% ELSE %] |
75 |
|
78 |
|
76 |
<div id="news" class="newscontainer"> |
79 |
<div id="news" class="newscontainer"> |
77 |
[% SET newsdisp = ( Koha.Preference('NewsAuthorDisplay') ) %] |
80 |
[% SET newsdisp = ( Koha.Preference('NewsAuthorDisplay') ) %] |
78 |
[% FOREACH koha_new IN koha_news %] |
81 |
[% FOREACH koha_new IN koha_news %] |
79 |
<div class="newsitem"> |
82 |
<div class="newsitem"> |
80 |
<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> |
83 |
<h4 class="newsheader"> |
81 |
<div class="newsbody">[% koha_new.content | $raw %]</div> |
84 |
[% IF ( news_item ) %] |
82 |
<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> |
85 |
[% koha_new.title | html %] |
83 |
</div> |
86 |
[% ELSE %] |
84 |
[% END %] |
87 |
<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> |
85 |
</div> |
88 |
[% END %] |
86 |
|
89 |
</h4> |
87 |
[% END %] |
90 |
<div class="newsbody">[% koha_new.content | $raw %]</div> |
88 |
|
91 |
<div class="newsfooter"> |
89 |
[% UNLESS news_item %] <!-- unless single news item --> |
92 |
Published on [% koha_new.timestamp | $KohaDates with_hours = 1 %] |
|
|
93 |
[% IF ( (newsdisp == 'opac' || newsdisp == 'both') && koha_new.borrowernumber ) %] |
94 |
by <span class="newsauthor_title">[% koha_new.author_title | html %] </span>[% koha_new.author_firstname | html %] [% koha_new.author_surname | html %] |
95 |
[% END %] |
96 |
[% IF ( news_item ) %] |
97 |
• <a href="/cgi-bin/koha/opac-main.pl">Show all news</a> |
98 |
[% END %] |
99 |
</div> |
100 |
</div> |
90 |
|
101 |
|
91 |
<div id="rssnews-container"> |
|
|
92 |
<!-- Logged in users have a branch code or it could be explicitly set --> |
93 |
<a href="[% OPACBaseURL | url %]/cgi-bin/koha/opac-news-rss.pl?branchcode=[% branchcode | uri %]"><i class="fa fa-rss"></i> |
94 |
[% IF Branches.all.size == 1 %] |
95 |
[% IF branchcode %] |
96 |
RSS feed for [% Branches.GetName( branchcode ) | html %] library news. |
97 |
[% ELSE %] |
98 |
RSS feed for library news. |
99 |
[% END %] |
102 |
[% END %] |
100 |
[% ELSE %] |
103 |
[% UNLESS news_item %] |
101 |
[% IF branchcode %] |
104 |
<div id="rssnews-container"> |
102 |
RSS feed for [% Branches.GetName( branchcode ) | html %] and system-wide library news. |
105 |
<!-- Logged in users have a branch code or it could be explicitly set --> |
103 |
[% ELSE %] |
106 |
<a href="[% OPACBaseURL | url %]/cgi-bin/koha/opac-news-rss.pl?branchcode=[% branchcode | uri %]"> |
104 |
RSS feed for system-wide library news. |
107 |
<i class="fa fa-rss"></i> |
|
|
108 |
[% IF Branches.all.size == 1 %] |
109 |
[% IF branchcode %] |
110 |
RSS feed for [% Branches.GetName( branchcode ) | html %] library news |
111 |
[% ELSE %] |
112 |
RSS feed for library news |
113 |
[% END %] |
114 |
[% ELSE %] |
115 |
[% IF branchcode %] |
116 |
RSS feed for [% Branches.GetName( branchcode ) | html %] and system-wide library news |
117 |
[% ELSE %] |
118 |
RSS feed for system-wide library news |
119 |
[% END %] |
120 |
[% END %] |
121 |
</a> |
122 |
</div> |
105 |
[% END %] |
123 |
[% END %] |
106 |
[% END %] |
124 |
</div> |
107 |
</a> |
|
|
108 |
</div> |
109 |
|
125 |
|
110 |
[% END %] <!-- single news item --> |
126 |
[% END # /IF single_news_error %] |
111 |
|
127 |
|
112 |
[% ELSE %] <!-- koha news --> |
128 |
[% ELSE %] <!-- koha news --> |
113 |
[% IF Koha.Preference( 'OpacNewsLibrarySelect' ) %] |
129 |
[% IF Koha.Preference( 'OpacNewsLibrarySelect' ) %] |
Lines 119-124
Link Here
|
119 |
</div> |
135 |
</div> |
120 |
[% END %] |
136 |
[% END %] |
121 |
|
137 |
|
|
|
138 |
[% END # IF koha_news %] |
139 |
|
140 |
[% UNLESS news_item # Don't show under single news item %] |
122 |
[% IF ( display_daily_quote && daily_quote ) %] |
141 |
[% IF ( display_daily_quote && daily_quote ) %] |
123 |
<div id="daily-quote"> |
142 |
<div id="daily-quote"> |
124 |
<h3>Quote of the day</h3> |
143 |
<h3>Quote of the day</h3> |
Lines 129-136
Link Here
|
129 |
[% END %] |
148 |
[% END %] |
130 |
|
149 |
|
131 |
[% IF ( OpacMainUserBlock ) %]<div id="opacmainuserblock">[% OpacMainUserBlock | $raw %]</div>[% END %] |
150 |
[% IF ( OpacMainUserBlock ) %]<div id="opacmainuserblock">[% OpacMainUserBlock | $raw %]</div>[% END %] |
|
|
151 |
[% END %] |
132 |
|
152 |
|
133 |
[% END %] <!-- koha news --> |
|
|
134 |
</div> <!-- / .span 7/9 --> |
153 |
</div> <!-- / .span 7/9 --> |
135 |
|
154 |
|
136 |
[% IF ( ( Koha.Preference( 'opacuserlogin' ) == 1 ) || OpacNavRight ) %] |
155 |
[% IF ( ( Koha.Preference( 'opacuserlogin' ) == 1 ) || OpacNavRight ) %] |
137 |
- |
|
|