2 [% INCLUDE 'doc-head-open.inc' %]
3 <title>Koha › Tools › News</title>
4 [% INCLUDE 'doc-head-close.inc' %]
5 [% INCLUDE 'calendar.inc' %]
6 [% IF ( opac_news_count ) %]
7 <link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" />
8 [% INCLUDE 'datatables.inc' %]
9 <script type="text/javascript">//<![CDATA[
10 $(document).ready(function() {
11 $("#newst").dataTable($.extend(true, {}, dataTablesDefaults, {
13 { "aTargets": [ 0,-1,-2 ], "bSortable": false },
14 { "aTargets": [ 0, -1 ], "bSearchable": false },
15 { 'sType': "title-string", 'aTargets' : [ 'title-string'] }
17 "sPaginationType": "full_numbers"
23 <script type="text/javascript" src="[% interface %]/lib/tiny_mce/tiny_mce.js"></script>
24 <script type="text/javascript">//<![CDATA[
25 var MSG_CONFIRM_DELETE_NEWS = _("Are you sure you want to delete the selected news?");
26 var MSG_CONFIRM_DELETE_SINGLE = _("Are you sure you want to delete this news item? This cannot be undone.");
32 relative_urls : false,
33 content_css : "[% interface %]/[% theme %]/css/tinymce.css",
34 plugins : "table,save,advhr,advlink,searchreplace,print,contextmenu",
35 theme_advanced_buttons1 : "save,|,bold,italic,|,cut,copy,paste,|,search,replace,|,justifyleft,justifycenter,justifyright,justifyfull,|,formatselect,|,link,unlink,anchor,cleanup,help,code,advhr,|,print",
36 theme_advanced_buttons2 : "tablecontrols,|,bullist,numlist,|,outdent,indent,|,undo,redo,|,removeformat,|,visualaid,|,sub,sup,|,charmap",
37 theme_advanced_buttons3 : "",
38 theme_advanced_toolbar_location : "top",
39 theme_advanced_toolbar_align : "left",
40 theme_advanced_path_location : "bottom",
41 theme_advanced_resizing : true,
42 plugin_insertdate_dateFormat : "%Y-%m-%d",
43 plugin_insertdate_timeFormat : "%H:%M:%S",
44 apply_source_formatting : true,
52 <body id="tools_koha-news" class="tools">
53 [% INCLUDE 'header.inc' %]
54 [% INCLUDE 'cat-search.inc' %]
56 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a> › [% IF ( add_form ) %]<a href="/cgi-bin/koha/tools/koha-news.pl">News</a> › [% IF ( id ) %]
57 Edit news item[% ELSE %]Add news item[% END %][% ELSE %]News[% END %]</div>
59 [% IF ( add_form ) %]<div id="doc" class="yui-t7">[% ELSE %]<div id="doc3" class="yui-t2">[% END %]
64 [% UNLESS ( add_form ) %]
65 [% IF error_message == 'title_missing' %]
66 <div class="dialog alert">Error: Required news title missing!</div>
68 <div id="toolbar" class="btn-toolbar">
69 <a class="btn btn-small" id="newentry" href="/cgi-bin/koha/tools/koha-news.pl?op=add_form&lang=[% lang %]"><i class="fa fa-plus"></i> New entry</a>
74 [% IF ( op == 'add' ) %][% default_lang = lang %]
75 [% ELSE %][% default_lang = new_detail.lang %]
77 <form name="add_form" method="post" action="/cgi-bin/koha/tools/koha-news.pl" >
78 <input type="hidden" name="op" value="[% op %]" />
79 <input type="hidden" name="id" value="[% id %]" />
80 <fieldset class="rows">
81 <legend>OPAC and Koha news</legend>
83 <label for="lang">Display location:</label>
84 <select id="lang" name="lang">
85 [% IF ( default_lang == "" ) %]
86 <option value="" selected="selected">All</option>
88 <option value="" >All</option>
90 [% IF ( default_lang == "koha" ) %]
91 <option value="koha" selected="selected">Librarian interface</option>
93 <option value="koha" >Librarian interface</option>
95 [% IF ( default_lang == "slip" ) %]
96 <option value="slip" selected="selected">Slip</option>
98 <option value="slip" >Slip</option>
100 [% FOREACH lang_lis IN lang_list %]
101 [% IF ( lang_lis.language == default_lang ) %]
102 <option value="[% lang_lis.language %]" selected="selected">OPAC ([% lang_lis.language %])</option>
104 <option value="[% lang_lis.language %]" >OPAC ([% lang_lis.language %])</option>
110 <label for="branch">Library: </label>
111 <select id="branch" name="branch">
112 [% IF ( new_detail.branchcode == '' ) %]
113 <option value="" selected="selected">All libraries</option>
115 <option value="" >All libraries</option>
117 [% FOREACH branch_item IN branch_list %]
118 [% IF ( branch_item.value.branchcode == new_detail.branchcode ) %]
119 <option value="[% branch_item.value.branchcode %]" selected="selected">[% branch_item.value.branchname %]</option>
121 <option value="[% branch_item.value.branchcode %]">[% branch_item.value.branchname %]</option>
127 <label for="title" class="required">Title: </label>
128 <input id="title" size="30" type="text" name="title" value="[% new_detail.title %]" required="required" class="required" /> <span class="required">Required</span>
131 <label for="from">Publication date: </label>
132 <input id="from" type="text" name="timestamp" size="15" value="[% new_detail.timestamp %]" class="datepickerfrom" />
133 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
136 <label for="to">Expiration date: </label>
137 <input id="to" type="text" name="expirationdate" size="15" value="[% new_detail.expirationdate %]" class="datepickerto" />
138 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
141 <label for="number">Appear in position: </label>
142 [% IF ( new_detail.number ) %]
143 <input id="number" size="3" name="number" type="text" value="[% new_detail.number %]" />
145 <input id="number" size="3" name="number" type="text" />
148 <li><label for="new">News: </label>
149 <textarea name="new" id="new" cols="75" rows="10">[% new_detail.new %]</textarea>
154 <fieldset class="action"><input class="button" type="submit" value="Submit" /> <a class="cancel" href="/cgi-bin/koha/tools/koha-news.pl">Cancel</a></fieldset>
157 <div style="margin-bottom:5px;">
158 <form name="add_form" method="post" action="/cgi-bin/koha/tools/koha-news.pl" >
159 <label for="lang">Display location:</label>
160 <select name="lang" id="lang">
161 [% IF ( lang == "" ) %]
162 <option value="" selected="selected">All</option>
164 <option value="" >All</option>
166 [% IF ( lang == "koha" ) %]
167 <option value="koha" selected="selected">Librarian interface</option>
169 <option value="koha" >Librarian interface</option>
171 [% IF ( lang == "slip" ) %]
172 <option value="slip" selected="selected">Slip</option>
174 <option value="slip" >Slip</option>
176 [% FOREACH lang_lis IN lang_list %]
177 [% IF ( lang_lis.language == lang ) %]
178 <option value="[% lang_lis.language %]" selected="selected">OPAC ([% lang_lis.language %])</option>
180 <option value="[% lang_lis.language %]" >OPAC ([% lang_lis.language %])</option>
184 <label for="branch">Library: </label>
185 <select id="branch" name="branch">
186 [% IF ( branchcode == "" ) %]
187 <option value="" selected="selected">All libraries</option>
189 <option value="" >All libraries</option>
191 [% FOREACH branch_item IN branch_list %]
192 [% IF ( branch_item.value.branchcode == branchcode ) %]
193 <option value="[% branch_item.value.branchcode %]"
194 selected="selected">[% branch_item.value.branchname %]
197 <option value="[% branch_item.value.branchcode %]"
198 >[% branch_item.value.branchname %]
203 <input type="submit" class="button" value="Filter" />
206 [% IF ( opac_news_count ) %]
207 <form name="del_form" method="post" action="/cgi-bin/koha/tools/koha-news.pl" onsubmit='return confirm(MSG_CONFIRM_DELETE_NEWS)'>
214 <th class="title-string">Publication date</th>
215 <th class="title-string">Expiration date</th>
221 <tbody>[% FOREACH opac_new IN opac_news %]
222 [% IF ( opac_new.expired ) %]
228 <input type="checkbox" name="ids" value="[% opac_new.idnew %]" />
230 <td>[% SWITCH opac_new.lang %]
238 OPAC ([% opac_new.lang %])
241 <td>[% IF ( opac_new.branchcode == "" ) -%]
243 [% ELSE %][% opac_new.branchname %]
245 <td>[% opac_new.number %]</td>
246 <td><span title="[% opac_new.newdate %]">[% opac_new.newdate | $KohaDates %]</span></td>
247 <td><span title="[% opac_new.expirationdate %]">[% opac_new.expirationdate | $KohaDates %] [% IF ( opac_new.expired ) %](<span class="expired">expired</span>)[% END %]</span></td>
248 <td>[% opac_new.title %]</td>
249 <td>[% opac_new.author_title %] [% opac_new.author_firstname %] [% opac_new.author_surname %]</td>
254 <a href="/cgi-bin/koha/tools/koha-news.pl?op=add_form&id=[% opac_new.idnew %]" class="btn btn-mini"><i class="fa fa-pencil"></i> Edit</a>
255 <a href="/cgi-bin/koha/tools/koha-news.pl?op=del&ids=[% opac_new.idnew %]" onclick="return confirm(MSG_CONFIRM_DELETE_SINGLE);" class="btn btn-mini"><i class="fa fa-trash"></i> Delete</a>
260 <input type="hidden" name="op" value="del" />
261 <fieldset class="action"><input type="submit" class="button" value="Delete selected" /></fieldset>
264 <p>No news loaded</p>
269 [% UNLESS ( add_form ) %]
270 <div class="yui-b noprint">
271 [% INCLUDE 'tools-menu.inc' %]
275 [% INCLUDE 'intranet-bottom.inc' %]