Kyle M Hall
a8942c2884
Revert "DBRev to make notes of the XSS patches and the new important dependency." This reverts commite140603a59
. Revert "Bug 13618: Specific for branches.opac_info" This reverts commit06e4a50f00
. Revert "Bug 13618: (follow-up) Specific for other prefs" This reverts commitd6475a111f
. Revert "Bug 13618: Fix for debarredcomment and patron messages" This reverts commitdd98c9df92
. Revert "Bug 13618: Do not display html tags in patron's notices" This reverts commita065b243fe
. Revert "Bug 13618: Do not display and html tags in item fields content" This reverts commitbaeeaffbf8
. Revert "Bug 13618: Fix for system preference description" This reverts commita967a09261
. Revert "Bug 13618: Remove html filters for newly pushed code" This reverts commit0e98662b10
. Revert "Bug 13618: (follow-up) add missing lines for opac-shelves" This reverts commitfc2fb605e5
. Revert "Bug 13618: (follow-up) Specific for ColumnsSettings" This reverts commitbc308fdd9c
. Revert "Bug 13618: Fix for edit biblios and items" This reverts commit811c4e8402
. Revert "Bug 13618: followup to remove tabs" This reverts commitca8e8c397c
. Revert "Bug 13618: Fix last occurrences recently introduced to master" This reverts commitbb417b256b
. Revert "Bug 13618: Fix for news" This reverts commitae5b98020a
. Revert "Bug 13618: Fix escape on sending baskets or shelves by email" This reverts commita7731ffe25
. Revert "Bug 13618: Specific for XSLTBloc" This reverts commit11fa38dc29
. Revert "Bug 13618: Specific for Salutation on editing a patron" This reverts commit36c07ad6d3
. Revert "Bug 13618: Specific for other prefs" This reverts commite6ea281a3b
. Revert "Bug 13618 - memberentrygen.tt errors Not a GLOB reference" This reverts commit7824874557
. Revert "Bug 13618: Specific for ColumnsSettings" This reverts commit1834da3da3
. Revert "Bug 13618: Specific for IntranetUser* and OPACUser* prefs" This reverts commit21ae62b253
. Revert "Bug 13618: Fix error 'Not a GLOB reference'" This reverts commit602bdbab4c
. Revert "Bug 13618: Specific for the ISBD view" This reverts commitd254362435
. Revert "Bug 13618: Specific for pagination_bar" This reverts commit8837a8ae68
. Revert "Bug 13618: Specific places where we don't need to escape variables - intra" This reverts commit00eff140b3
. Revert "Bug 13618: Remove html filters at the intranet" This reverts commit7db851ff03
. Revert "Bug 13618: Specific places where we don't need to escape variables" This reverts commit49a3738b8d
. Revert "Bug 13618: Remove html filters at the OPAC" This reverts commitcedaa0e23e
. Revert "Bug 13618: Use Template::Stash::AutoEscaping to use the html filter" This reverts commit01b38d3b13
. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
271 lines
13 KiB
Text
271 lines
13 KiB
Text
[% USE KohaDates %]
|
|
[% INCLUDE 'doc-head-open.inc' %]
|
|
<title>Koha › Tools › News</title>
|
|
[% INCLUDE 'doc-head-close.inc' %]
|
|
[% INCLUDE 'calendar.inc' %]
|
|
[% IF ( opac_news_count ) %]
|
|
<link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" />
|
|
[% INCLUDE 'datatables.inc' %]
|
|
<script type="text/javascript">//<![CDATA[
|
|
$(document).ready(function() {
|
|
$("#newst").dataTable($.extend(true, {}, dataTablesDefaults, {
|
|
"aoColumnDefs": [
|
|
{ "aTargets": [ 0,-1,-2 ], "bSortable": false },
|
|
{ "aTargets": [ 0, -1 ], "bSearchable": false },
|
|
{ 'sType': "title-string", 'aTargets' : [ 'title-string'] }
|
|
],
|
|
"sPaginationType": "full_numbers"
|
|
}));
|
|
});
|
|
//]]>
|
|
</script>
|
|
[% END %]
|
|
<script type="text/javascript" src="[% interface %]/lib/tiny_mce/tiny_mce.js"></script>
|
|
<script type="text/javascript">//<![CDATA[
|
|
var MSG_CONFIRM_DELETE_NEWS = _("Are you sure you want to delete the selected news?");
|
|
|
|
tinyMCE.init({
|
|
mode : "textareas",
|
|
theme : "advanced",
|
|
convert_urls : false,
|
|
relative_urls : false,
|
|
content_css : "[% themelang %]/css/tinymce.css",
|
|
plugins : "table,save,advhr,advlink,searchreplace,print,contextmenu",
|
|
theme_advanced_buttons1 : "save,|,bold,italic,|,cut,copy,paste,|,search,replace,|,justifyleft,justifycenter,justifyright,justifyfull,|,formatselect,|,link,unlink,anchor,cleanup,help,code,advhr,|,print",
|
|
theme_advanced_buttons2 : "tablecontrols,|,bullist,numlist,|,outdent,indent,|,undo,redo,|,removeformat,|,visualaid,|,sub,sup,|,charmap",
|
|
theme_advanced_buttons3 : "",
|
|
theme_advanced_toolbar_location : "top",
|
|
theme_advanced_toolbar_align : "left",
|
|
theme_advanced_path_location : "bottom",
|
|
theme_advanced_resizing : true,
|
|
plugin_insertdate_dateFormat : "%Y-%m-%d",
|
|
plugin_insertdate_timeFormat : "%H:%M:%S",
|
|
apply_source_formatting : true,
|
|
height : "300",
|
|
width : "700"
|
|
//]]>
|
|
});
|
|
//]]>
|
|
</script>
|
|
</head>
|
|
<body id="tools_koha-news" class="tools">
|
|
[% INCLUDE 'header.inc' %]
|
|
[% INCLUDE 'cat-search.inc' %]
|
|
|
|
<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 ) %]
|
|
Edit news item[% ELSE %]Add news item[% END %][% ELSE %]News[% END %]</div>
|
|
|
|
[% IF ( add_form ) %]<div id="doc" class="yui-t7">[% ELSE %]<div id="doc3" class="yui-t2">[% END %]
|
|
<div id="bd">
|
|
<div id="yui-main">
|
|
<div class="yui-b">
|
|
|
|
[% UNLESS ( add_form ) %]
|
|
[% IF error_message == 'title_missing' %]
|
|
<div class="dialog alert">Error: Required news title missing!</div>
|
|
[% END %]
|
|
<div id="toolbar" class="btn-toolbar">
|
|
<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>
|
|
</div>
|
|
[% END %]
|
|
|
|
[% IF ( add_form ) %]
|
|
[% IF ( op == 'add' ) %][% default_lang = lang %]
|
|
[% ELSE %][% default_lang = new_detail.lang %]
|
|
[% END %]
|
|
<form name="add_form" method="post" action="/cgi-bin/koha/tools/koha-news.pl" >
|
|
<input type="hidden" name="op" value="[% op %]" />
|
|
<input type="hidden" name="id" value="[% id %]" />
|
|
<fieldset class="rows">
|
|
<legend>OPAC and Koha news</legend>
|
|
<ol> <li>
|
|
<label for="lang">Display location</label>
|
|
<select id="lang" name="lang">
|
|
[% IF ( default_lang == "" ) %]
|
|
<option value="" selected="selected">All</option>
|
|
[% ELSE %]
|
|
<option value="" >All</option>
|
|
[% END %]
|
|
[% IF ( default_lang == "koha" ) %]
|
|
<option value="koha" selected="selected">Librarian interface</option>
|
|
[% ELSE %]
|
|
<option value="koha" >Librarian interface</option>
|
|
[% END %]
|
|
[% IF ( default_lang == "slip" ) %]
|
|
<option value="slip" selected="selected">Slip</option>
|
|
[% ELSE %]
|
|
<option value="slip" >Slip</option>
|
|
[% END %]
|
|
[% FOREACH lang_lis IN lang_list %]
|
|
[% IF ( lang_lis.language == default_lang ) %]
|
|
<option value="[% lang_lis.language %]" selected="selected">OPAC ([% lang_lis.language %])</option>
|
|
[% ELSE %]
|
|
<option value="[% lang_lis.language %]" >OPAC ([% lang_lis.language %])</option>
|
|
[% END %]
|
|
[% END %]
|
|
</select>
|
|
</li>
|
|
<li>
|
|
<label for="branch">Library: </label>
|
|
<select id="branch" name="branch">
|
|
[% IF ( new_detail.branchcode == '' ) %]
|
|
<option value="" selected="selected">All libraries</option>
|
|
[% ELSE %]
|
|
<option value="" >All libraries</option>
|
|
[% END %]
|
|
[% FOREACH branch_item IN branch_list %]
|
|
[% IF ( branch_item.value.branchcode == new_detail.branchcode ) %]
|
|
<option value="[% branch_item.value.branchcode %]" selected="selected">[% branch_item.value.branchname %]</option>
|
|
[% ELSE %]
|
|
<option value="[% branch_item.value.branchcode %]">[% branch_item.value.branchname %]</option>
|
|
[% END %]
|
|
[% END %]
|
|
</select>
|
|
</li>
|
|
<li>
|
|
<label for="title" class="required">Title: </label>
|
|
<input id="title" size="30" type="text" name="title" value="[% new_detail.title %]" required="required" class="required" /> <span class="required">Required</span>
|
|
</li>
|
|
<li>
|
|
<label for="from">Publication date: </label>
|
|
<input id="from" type="text" name="timestamp" size="15" value="[% new_detail.timestamp %]" class="datepickerfrom" />
|
|
<div class="hint">[% INCLUDE 'date-format.inc' %]</div>
|
|
</li>
|
|
<li>
|
|
<label for="to">Expiration date: </label>
|
|
<input id="to" type="text" name="expirationdate" size="15" value="[% new_detail.expirationdate %]" class="datepickerto" />
|
|
<div class="hint">[% INCLUDE 'date-format.inc' %]</div>
|
|
</li>
|
|
<li>
|
|
<label for="number">Appear in position: </label>
|
|
[% IF ( new_detail.number ) %]
|
|
<input id="number" size="3" name="number" type="text" value="[% new_detail.number %]" />
|
|
[% ELSE %]
|
|
<input id="number" size="3" name="number" type="text" />
|
|
[% END %]
|
|
</li>
|
|
<li><label for="new">News: </label>
|
|
<textarea name="new" id="new" cols="75" rows="10">[% new_detail.new %]</textarea>
|
|
</li>
|
|
</ol>
|
|
</fieldset>
|
|
|
|
<fieldset class="action"><input class="button" type="submit" value="Submit" /> <a class="cancel" href="/cgi-bin/koha/tools/koha-news.pl">Cancel</a></fieldset>
|
|
</form>
|
|
[% ELSE %]
|
|
<div style="margin-bottom:5px;">
|
|
<form name="add_form" method="post" action="/cgi-bin/koha/tools/koha-news.pl" >
|
|
<label for="lang">Display location:</label>
|
|
<select name="lang" id="lang">
|
|
[% IF ( lang == "" ) %]
|
|
<option value="" selected="selected">All</option>
|
|
[% ELSE %]
|
|
<option value="" >All</option>
|
|
[% END %]
|
|
[% IF ( lang == "koha" ) %]
|
|
<option value="koha" selected="selected">Librarian interface</option>
|
|
[% ELSE %]
|
|
<option value="koha" >Librarian interface</option>
|
|
[% END %]
|
|
[% IF ( lang == "slip" ) %]
|
|
<option value="slip" selected="selected">Slip</option>
|
|
[% ELSE %]
|
|
<option value="slip" >Slip</option>
|
|
[% END %]
|
|
[% FOREACH lang_lis IN lang_list %]
|
|
[% IF ( lang_lis.language == lang ) %]
|
|
<option value="[% lang_lis.language %]" selected="selected">OPAC ([% lang_lis.language %])</option>
|
|
[% ELSE %]
|
|
<option value="[% lang_lis.language %]" >OPAC ([% lang_lis.language %])</option>
|
|
[% END %]
|
|
[% END %]
|
|
</select>
|
|
<label for="branch">Library: </label>
|
|
<select id="branch" name="branch">
|
|
[% IF ( branchcode == "" ) %]
|
|
<option value="" selected="selected">All libraries</option>
|
|
[% ELSE %]
|
|
<option value="" >All libraries</option>
|
|
[% END %]
|
|
[% FOREACH branch_item IN branch_list %]
|
|
[% IF ( branch_item.value.branchcode == branchcode ) %]
|
|
<option value="[% branch_item.value.branchcode %]"
|
|
selected="selected">[% branch_item.value.branchname %]
|
|
</option>
|
|
[% ELSE %]
|
|
<option value="[% branch_item.value.branchcode %]"
|
|
>[% branch_item.value.branchname %]
|
|
</option>
|
|
[% END %]
|
|
[% END %]
|
|
</select>
|
|
<input type="submit" class="button" value="Filter" />
|
|
</form>
|
|
</div>
|
|
[% IF ( opac_news_count ) %]
|
|
<form name="del_form" method="post" action="/cgi-bin/koha/tools/koha-news.pl" onsubmit='return confirm(MSG_CONFIRM_DELETE_NEWS)'>
|
|
<table id="newst">
|
|
<thead> <tr>
|
|
<th> </th>
|
|
<th>Location</th>
|
|
<th>Library</th>
|
|
<th>Number</th>
|
|
<th class="title-string">Publication date</th>
|
|
<th class="title-string">Expiration date</th>
|
|
<th>Title</th>
|
|
<th>Author</th>
|
|
<th>News</th>
|
|
<th> </th>
|
|
</tr></thead>
|
|
<tbody>[% FOREACH opac_new IN opac_news %]
|
|
[% IF ( opac_new.expired ) %]
|
|
<tr class="expired">
|
|
[% ELSE %]
|
|
<tr>
|
|
[% END %]
|
|
<td>
|
|
<input type="checkbox" name="ids" value="[% opac_new.idnew %]" />
|
|
</td>
|
|
<td>[% SWITCH opac_new.lang %]
|
|
[% CASE "koha" %]
|
|
Librarian interface
|
|
[% CASE "slip" %]
|
|
Slip
|
|
[% CASE "" %]
|
|
All
|
|
[% CASE %]
|
|
OPAC ([% opac_new.lang %])
|
|
[% END %]
|
|
</td>
|
|
<td>[% IF ( opac_new.branchcode == "" ) -%]
|
|
All libraries
|
|
[% ELSE %][% opac_new.branchname %]
|
|
[% END %]</td>
|
|
<td>[% opac_new.number %]</td>
|
|
<td><span title="[% opac_new.newdate %]">[% opac_new.newdate | $KohaDates %]</span></td>
|
|
<td><span title="[% opac_new.expirationdate %]">[% opac_new.expirationdate | $KohaDates %] [% IF ( opac_new.expired ) %](<span class="expired">expired</span>)[% END %]</span></td>
|
|
<td>[% opac_new.title %]</td>
|
|
<td>[% opac_new.author_title %] [% opac_new.author_firstname %] [% opac_new.author_surname %]</td>
|
|
<td>
|
|
[% opac_new.new %]
|
|
</td>
|
|
<td><a href="/cgi-bin/koha/tools/koha-news.pl?op=add_form&id=[% opac_new.idnew %]">Edit</a></td>
|
|
</tr>
|
|
[% END %]</tbody>
|
|
</table>
|
|
<input type="hidden" name="op" value="del" />
|
|
<fieldset class="action"><input type="submit" class="button" value="Delete selected" /></fieldset>
|
|
</form>
|
|
[% ELSE %]
|
|
<p>No news loaded</p>
|
|
[% END %]
|
|
[% END %]
|
|
</div>
|
|
</div>
|
|
[% UNLESS ( add_form ) %]
|
|
<div class="yui-b noprint">
|
|
[% INCLUDE 'tools-menu.inc' %]
|
|
</div>
|
|
[% END %]
|
|
</div>
|
|
[% INCLUDE 'intranet-bottom.inc' %]
|