3 [% INCLUDE 'doc-head-open.inc' %]
4 <title>Koha › Tools › News</title>
5 [% INCLUDE 'doc-head-close.inc' %]
6 [% INCLUDE 'calendar.inc' %]
7 [% IF ( opac_news_count ) %]
8 <link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" />
9 [% INCLUDE 'datatables.inc' %]
10 <script type="text/javascript">//<![CDATA[
11 $(document).ready(function() {
12 $("#newst").dataTable($.extend(true, {}, dataTablesDefaults, {
14 { "aTargets": [ 0,-1,-2 ], "bSortable": false },
15 { "aTargets": [ 0, -1 ], "bSearchable": false },
16 { 'sType': "title-string", 'aTargets' : [ 'title-string'] }
18 "sPaginationType": "full_numbers"
20 $(".delete_news").on("click", function(){
21 return confirmDelete( _("Are you sure you want to delete this news item? This cannot be undone.") );
23 $("#del_form").on("submit",function(){
24 return confirmDelete( _("Are you sure you want to delete the selected news?") );
30 <script type="text/javascript" src="[% interface %]/lib/tiny_mce/tiny_mce.js"></script>
31 <script type="text/javascript">//<![CDATA[
36 relative_urls : false,
37 content_css : "[% interface %]/[% theme %]/css/tinymce.css",
38 plugins : "table,save,advhr,advlink,searchreplace,print,contextmenu",
39 theme_advanced_buttons1 : "save,|,bold,italic,|,cut,copy,paste,|,search,replace,|,justifyleft,justifycenter,justifyright,justifyfull,|,formatselect,|,link,unlink,anchor,cleanup,help,code,advhr,|,print",
40 theme_advanced_buttons2 : "tablecontrols,|,bullist,numlist,|,outdent,indent,|,undo,redo,|,removeformat,|,visualaid,|,sub,sup,|,charmap",
41 theme_advanced_buttons3 : "",
42 theme_advanced_toolbar_location : "top",
43 theme_advanced_toolbar_align : "left",
44 theme_advanced_path_location : "bottom",
45 theme_advanced_resizing : true,
46 plugin_insertdate_dateFormat : "%Y-%m-%d",
47 plugin_insertdate_timeFormat : "%H:%M:%S",
48 apply_source_formatting : true,
56 <body id="tools_koha-news" class="tools">
57 [% INCLUDE 'header.inc' %]
58 [% INCLUDE 'cat-search.inc' %]
60 <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 ) %]
61 Edit news item[% ELSE %]Add news item[% END %][% ELSE %]News[% END %]</div>
63 [% IF ( add_form ) %]<div id="doc" class="yui-t7">[% ELSE %]<div id="doc3" class="yui-t2">[% END %]
68 [% UNLESS ( add_form ) %]
69 [% IF error_message == 'title_missing' %]
70 <div class="dialog alert">Error: Required news title missing!</div>
72 <div id="toolbar" class="btn-toolbar">
73 <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>
78 [% IF ( op == 'add' ) %][% default_lang = lang %]
79 [% ELSE %][% default_lang = new_detail.lang %]
81 <form name="add_form" method="post" action="/cgi-bin/koha/tools/koha-news.pl" >
82 <input type="hidden" name="op" value="[% op %]" />
83 <input type="hidden" name="id" value="[% id %]" />
84 <fieldset class="rows">
85 <legend>OPAC and Koha news</legend>
87 <label for="lang">Display location:</label>
88 <select id="lang" name="lang">
89 [% IF ( default_lang == "" ) %]
90 <option value="" selected="selected">All</option>
92 <option value="" >All</option>
94 [% IF ( default_lang == "koha" ) %]
95 <option value="koha" selected="selected">Librarian interface</option>
97 <option value="koha" >Librarian interface</option>
99 [% IF ( default_lang == "slip" ) %]
100 <option value="slip" selected="selected">Slip</option>
102 <option value="slip" >Slip</option>
104 [% FOREACH lang_lis IN lang_list %]
105 [% IF ( lang_lis.language == default_lang ) %]
106 <option value="[% lang_lis.language %]" selected="selected">OPAC ([% lang_lis.language %])</option>
108 <option value="[% lang_lis.language %]" >OPAC ([% lang_lis.language %])</option>
114 <label for="branch">Library: </label>
115 <select id="branch" name="branch">
116 [% IF ( new_detail.branchcode == '' ) %]
117 <option value="" selected="selected">All libraries</option>
119 <option value="" >All libraries</option>
121 [% PROCESS options_for_libraries libraries => Branches.all( selected => new_detail.branchcode, unfiltered => 1, ) %]
125 <label for="title" class="required">Title: </label>
126 <input id="title" size="30" type="text" name="title" value="[% new_detail.title %]" required="required" class="required" /> <span class="required">Required</span>
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" 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>
152 <fieldset class="action"><input class="button" type="submit" value="Submit" /> <a class="cancel" href="/cgi-bin/koha/tools/koha-news.pl">Cancel</a></fieldset>
155 <div style="margin-bottom:5px;">
156 <form name="add_form" method="post" action="/cgi-bin/koha/tools/koha-news.pl" >
157 <label for="lang">Display location:</label>
158 <select name="lang" id="lang">
159 [% IF ( lang == "" ) %]
160 <option value="" selected="selected">All</option>
162 <option value="" >All</option>
164 [% IF ( lang == "koha" ) %]
165 <option value="koha" selected="selected">Librarian interface</option>
167 <option value="koha" >Librarian interface</option>
169 [% IF ( lang == "slip" ) %]
170 <option value="slip" selected="selected">Slip</option>
172 <option value="slip" >Slip</option>
174 [% FOREACH lang_lis IN lang_list %]
175 [% IF ( lang_lis.language == lang ) %]
176 <option value="[% lang_lis.language %]" selected="selected">OPAC ([% lang_lis.language %])</option>
178 <option value="[% lang_lis.language %]" >OPAC ([% lang_lis.language %])</option>
182 <label for="branch">Library: </label>
183 <select id="branch" name="branch">
184 [% IF ( branchcode == "" ) %]
185 <option value="" selected="selected">All libraries</option>
187 <option value="" >All libraries</option>
189 [% PROCESS options_for_libraries libraries => Branches.all( selected => branchcode, unfiltered => 1, ) %]
191 <input type="submit" class="button" value="Filter" />
194 [% IF ( opac_news_count ) %]
195 <form id="del_form" method="post" action="/cgi-bin/koha/tools/koha-news.pl">
202 <th class="title-string">Publication date</th>
203 <th class="title-string">Expiration date</th>
209 <tbody>[% FOREACH opac_new IN opac_news %]
210 [% IF ( opac_new.expired ) %]
216 <input type="checkbox" name="ids" value="[% opac_new.idnew %]" />
218 <td>[% SWITCH opac_new.lang %]
226 OPAC ([% opac_new.lang %])
229 <td>[% IF ( opac_new.branchcode == "" ) -%]
231 [% ELSE %][% opac_new.branchname %]
233 <td>[% opac_new.number %]</td>
234 <td><span title="[% opac_new.newdate %]">[% opac_new.newdate | $KohaDates %]</span></td>
235 <td><span title="[% opac_new.expirationdate %]">[% opac_new.expirationdate | $KohaDates %] [% IF ( opac_new.expired ) %](<span class="expired">expired</span>)[% END %]</span></td>
236 <td>[% opac_new.title %]</td>
237 <td>[% opac_new.author_title %] [% opac_new.author_firstname %] [% opac_new.author_surname %]</td>
242 <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>
243 <a href="/cgi-bin/koha/tools/koha-news.pl?op=del&ids=[% opac_new.idnew %]" class="delete_news btn btn-mini"><i class="fa fa-trash"></i> Delete</a>
248 <input type="hidden" name="op" value="del" />
249 <fieldset class="action"><input type="submit" class="button" value="Delete selected" /></fieldset>
252 <div class="dialog message">There are no news items.</div>
257 [% UNLESS ( add_form ) %]
258 <div class="yui-b noprint">
259 [% INCLUDE 'tools-menu.inc' %]
263 [% INCLUDE 'intranet-bottom.inc' %]