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="[% themelang %]/css/datatables.css" />
8 [% INCLUDE 'datatables.inc' %]
9 <script type="text/javascript">//<![CDATA[
10 $(document).ready(function() {
11 $("#newst").dataTable($.extend(true, {}, dataTablesDefaults, {
14 { "aTargets": [ 0,-1,-2 ], "bSortable": false, "bSearchable": false }
17 null,null,null,{ "sType": "title-string" },{ "sType": "title-string" },null,null,null
25 <script language="javascript" type="text/javascript" src="[% interface %]/lib/tiny_mce/tiny_mce.js"></script>
26 <script type="text/javascript">//<![CDATA[
27 var MSG_CONFIRM_DELETE_NEWS = _("Are you sure you want to delete the selected news?");
33 relative_urls : false,
34 content_css : "[% themelang %]/css/tinymce.css",
35 plugins : "table,save,advhr,advlink,searchreplace,print,contextmenu",
36 theme_advanced_buttons1 : "save,|,bold,italic,|,cut,copy,paste,|,search,replace,|,justifyleft,justifycenter,justifyright,justifyfull,|,formatselect,|,link,unlink,anchor,cleanup,help,code,advhr,|,print",
37 theme_advanced_buttons2 : "tablecontrols,|,bullist,numlist,|,outdent,indent,|,undo,redo,|,removeformat,|,visualaid,|,sub,sup,|,charmap",
38 theme_advanced_buttons3 : "",
39 theme_advanced_toolbar_location : "top",
40 theme_advanced_toolbar_align : "left",
41 theme_advanced_path_location : "bottom",
42 theme_advanced_resizing : true,
43 plugin_insertdate_dateFormat : "%Y-%m-%d",
44 plugin_insertdate_timeFormat : "%H:%M:%S",
45 apply_source_formatting : true,
53 <body id="tools_koha-news" class="tools">
54 [% INCLUDE 'header.inc' %]
55 [% INCLUDE 'cat-search.inc' %]
57 <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 ) %]
58 Edit news item[% ELSE %]Add news item[% END %][% ELSE %]News[% END %]</div>
60 [% IF ( add_form ) %]<div id="doc" class="yui-t7">[% ELSE %]<div id="doc3" class="yui-t2">[% END %]
65 [% UNLESS ( add_form ) %]
66 <div id="toolbar" class="btn-toolbar">
67 <a class="btn btn-small" id="newentry" href="/cgi-bin/koha/tools/koha-news.pl?op=add_form&lang=[% lang %]"><i class="icon-plus"></i> New entry</a>
72 [% IF ( op == 'add' ) %][% default_lang = lang %]
73 [% ELSE %][% default_lang = new_detail.lang %]
75 <form name="add_form" method="post" action="/cgi-bin/koha/tools/koha-news.pl" >
76 <input type="hidden" name="op" value="[% op %]" />
77 <input type="hidden" name="id" value="[% id %]" />
78 <fieldset class="rows">
79 <legend>OPAC and Koha news</legend>
81 <label for="lang">Display location</label>
82 <select id="lang" name="lang">
83 [% IF ( default_lang == "" ) %]
84 <option value="" selected>All</option>
86 <option value="" >All</option>
88 [% IF ( default_lang == "koha" ) %]
89 <option value="koha" selected>Librarian interface</option>
91 <option value="koha" >Librarian interface</option>
93 [% IF ( default_lang == "slip" ) %]
94 <option value="slip" selected>Slip</option>
96 <option value="slip" >Slip</option>
98 [% FOREACH lang_lis IN lang_list %]
99 [% IF ( lang_lis.language == default_lang ) %]
100 <option value="[% lang_lis.language %]" selected>OPAC ([% lang_lis.language %])</option>
102 <option value="[% lang_lis.language %]" >OPAC ([% lang_lis.language %])</option>
108 <label for="branch">Library: </label>
109 <select id="branch" name="branch">
110 [% IF ( new_detail.branchcode == '' ) %]
111 <option value="" selected>All Libraries</option>
113 <option value="" >All Libraries</option>
115 [% FOREACH branch_item IN branch_list %]
116 [% IF ( branch_item.value.branchcode == new_detail.branchcode ) %]
117 <option value="[% branch_item.value.branchcode %]" selected>[% branch_item.value.branchname %]</option>
119 <option value="[% branch_item.value.branchcode %]">[% branch_item.value.branchname %]</option>
125 <label for="title">Title: </label>
126 <input id="title" size="30" type="text" name="title" value="[% new_detail.title %]" />
129 <label for="from">Publication date: </label>
130 <input id="from" type="text" name="timestamp" size="15" value="[% new_detail.timestamp %]" class="datepickerfrom" />
131 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
134 <label for="to">Expiration date: </label>
135 <input id="to" type="text" name="expirationdate" size="15" value="[% new_detail.expirationdate %]" class="datepickerto" />
136 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
139 <label for="number">Appear in position: </label>
140 [% IF ( new_detail.number ) %]
141 <input id="number" size="3" name="number" type="text" checked="checked" value="[% new_detail.number %]" />
143 <input id="number" size="3" name="number" type="text" />
146 <li><label for="new">News: </label>
147 <textarea name="new" id="new" cols="75" rows="10">[% new_detail.new %]</textarea></li>
151 <fieldset class="action"><input class="button" type="submit" value="Submit" /> <a class="cancel" href="/cgi-bin/koha/tools/koha-news.pl">Cancel</a></fieldset>
154 <div style="margin-bottom:5px;">
155 <form name="add_form" method="post" action="/cgi-bin/koha/tools/koha-news.pl" >
156 <label for="lang">Display location:</label>
157 <select name="lang" id="lang">
158 [% IF ( lang == "" ) %]
159 <option value="" selected>All</option>
161 <option value="" >All</option>
163 [% IF ( lang == "koha" ) %]
164 <option value="koha" selected>Librarian interface</option>
166 <option value="koha" >Librarian interface</option>
168 [% IF ( lang == "slip" ) %]
169 <option value="slip" selected>Slip</option>
171 <option value="slip" >Slip</option>
173 [% FOREACH lang_lis IN lang_list %]
174 [% IF ( lang_lis.language == lang ) %]
175 <option value="[% lang_lis.language %]" selected>OPAC ([% lang_lis.language %])</option>
177 <option value="[% lang_lis.language %]" >OPAC ([% lang_lis.language %])</option>
181 <label for="branch">Library: </label>
182 <select id="branch" name="branch">
183 [% IF ( branchcode == "" ) %]
184 <option value="" selected>All Libraries</option>
186 <option value="" >All Libraries</option>
188 [% FOREACH branch_item IN branch_list %]
189 [% IF ( branch_item.value.branchcode == branchcode ) %]
190 <option value="[% branch_item.value.branchcode %]"
191 selected>[% branch_item.value.branchname %]
194 <option value="[% branch_item.value.branchcode %]"
195 >[% branch_item.value.branchname %]
200 <input type="submit" class="button" value="Filter" />
203 [% IF ( opac_news_count ) %]
204 <form name="del_form" method="post" action="/cgi-bin/koha/tools/koha-news.pl" onsubmit='return confirm(MSG_CONFIRM_DELETE_NEWS)'>
211 <th>Creation date</th>
212 <th>Expiration date</th>
217 <tbody>[% FOREACH opac_new IN opac_news %]
218 [% IF ( opac_new.expired ) %]
224 <input type="checkbox" name="ids" value="[% opac_new.idnew %]" />
226 <td>[% SWITCH opac_new.lang %]
234 OPAC ([% opac_new.lang %])
237 <td>[% IF ( opac_new.branchcode == "" ) -%]
239 [% ELSE %][% opac_new.branchname %]
241 <td>[% opac_new.number %]</td>
242 <td><span title="[% opac_new.newdate %]">[% opac_new.newdate | $KohaDates %]</span></td>
243 <td><span title="[% opac_new.expirationdate %]">[% opac_new.expirationdate | $KohaDates %] [% IF ( opac_new.expired ) %](<span class="expired">expired</span>)[% END %]</span></td>
244 <td>[% opac_new.title %]</td>
248 <td><a href="/cgi-bin/koha/tools/koha-news.pl?op=add_form&id=[% opac_new.idnew %]">Edit</a></td>
252 <input type="hidden" name="op" value="del" />
253 <fieldset class="action"><input type="submit" class="button" value="Delete selected" /></fieldset>
256 <p>No news loaded</p>
261 [% UNLESS ( add_form ) %]
262 <div class="yui-b noprint">
263 [% INCLUDE 'tools-menu.inc' %]
267 [% INCLUDE 'intranet-bottom.inc' %]