Lines 340-463
Link Here
|
340 |
</span> |
340 |
</span> |
341 |
|
341 |
|
342 |
[% IF additional_contents.count %] |
342 |
[% IF additional_contents.count %] |
343 |
<form id="del_form" method="post" action="/cgi-bin/koha/tools/additional-contents.pl"> |
343 |
<div class="page-section"> |
344 |
<table id="table_additional_contents"> |
344 |
<form id="del_form" method="post" action="/cgi-bin/koha/tools/additional-contents.pl"> |
345 |
<thead> |
345 |
<table id="table_additional_contents"> |
346 |
<tr> |
346 |
<thead> |
347 |
<th class="NoSort"> </th> |
347 |
<tr> |
348 |
<th>Location</th> |
348 |
<th class="NoSort"> </th> |
349 |
<th>Library</th> |
349 |
<th>Location</th> |
350 |
<th>Number</th> |
350 |
<th>Library</th> |
351 |
<th>Publication date</th> |
351 |
<th>Number</th> |
352 |
<th>Expiration date</th> |
352 |
<th>Publication date</th> |
353 |
<th class="anti-the">Title</th> |
353 |
<th>Expiration date</th> |
354 |
<th>Author</th> |
354 |
<th class="anti-the">Title</th> |
355 |
[% IF category == 'pages' %] |
355 |
<th>Author</th> |
356 |
<th>Page URL</th> |
356 |
[% IF category == 'pages' %] |
357 |
<th class="anti-the">Page</th> |
357 |
<th>Page URL</th> |
358 |
[% ELSE %] |
358 |
<th class="anti-the">Page</th> |
359 |
<th class="anti-the">News</th> |
|
|
360 |
[% END %] |
361 |
<th class="NoSort noExport">Actions</th> |
362 |
</tr> |
363 |
</thead> |
364 |
<tbody> |
365 |
[% FOREACH c IN additional_contents%] |
366 |
[% IF ( c.is_expired ) %]<tr class="expired">[% ELSE %]<tr>[% END %] |
367 |
<td> |
368 |
<input type="checkbox" name="ids" value="[% c.idnew | html %]" /> |
369 |
</td> |
370 |
<td> |
371 |
[% IF c.category == 'news' || c.category == 'pages' %] |
372 |
[% IF c.location == 'staff_and_opac' %]<span>All</span> |
373 |
[% ELSIF c.location == 'staff_only' %]<span>Librarian interface</span> |
374 |
[% ELSIF c.location == 'opac_only' %]<span>OPAC</span> |
375 |
[% ELSIF c.location == 'slip' %]<span>Slip</span> |
376 |
[% ELSE %]<span>Unknown ('[% location | html %]')</span> |
377 |
[% END %] |
378 |
[% ELSE %] |
359 |
[% ELSE %] |
379 |
[% c.location | html %] |
360 |
<th class="anti-the">News</th> |
380 |
[% END %] |
361 |
[% END %] |
381 |
</td> |
362 |
<th class="NoSort noExport">Actions</th> |
382 |
<td> |
363 |
</tr> |
383 |
[% IF ( c.branchcode == "" ) -%] |
364 |
</thead> |
384 |
All libraries |
365 |
<tbody> |
385 |
[% ELSE %][% c.library.branchname | html %] |
366 |
[% FOREACH c IN additional_contents%] |
386 |
[% END %] |
367 |
[% IF ( c.is_expired ) %]<tr class="expired">[% ELSE %]<tr>[% END %] |
387 |
</td> |
368 |
<td> |
388 |
<td>[% c.number | html %]</td> |
369 |
<input type="checkbox" name="ids" value="[% c.idnew | html %]" /> |
389 |
<td data-order="[% c.published_on | html %]">[% c.published_on | $KohaDates %]</td> |
370 |
</td> |
390 |
<td data-order="[% c.expirationdate | html %]">[% c.expirationdate | $KohaDates %] [% IF ( c.is_expired ) %](<span class="expired">expired</span>)[% END %]</td> |
371 |
<td> |
391 |
<td>[% c.title | html %]</td> |
372 |
[% IF c.category == 'news' || c.category == 'pages' %] |
392 |
<td>[% IF ( c.author) %][% INCLUDE 'patron-title.inc' patron=c.author %][% END %]</td> |
373 |
[% IF c.location == 'staff_and_opac' %]<span>All</span> |
393 |
[% IF category == 'pages' %] |
374 |
[% ELSIF c.location == 'staff_only' %]<span>Librarian interface</span> |
394 |
<td class="actions"> |
375 |
[% ELSIF c.location == 'opac_only' %]<span>OPAC</span> |
395 |
[% IF c.location == 'opac_only' OR c.location == 'staff_and_opac' %] |
376 |
[% ELSIF c.location == 'slip' %]<span>Slip</span> |
396 |
<strong>OPAC</strong>: |
377 |
[% ELSE %]<span>Unknown ('[% location | html %]')</span> |
397 |
<a target="_blank" href="[% Koha.Preference('OPACBaseURL') | url %]/cgi-bin/koha/opac-page.pl?page_id=[% c.idnew | url %]" title="View on OPAC">Default</a> |
378 |
[% END %] |
398 |
OR |
379 |
[% ELSE %] |
399 |
<a target="_blank" href="[% Koha.Preference('OPACBaseURL') | url %]/cgi-bin/koha/opac-page.pl?code=[% c.code | url %]" title="View on OPAC">Current language</a> |
380 |
[% c.location | html %] |
400 |
[% END %] |
381 |
[% END %] |
401 |
[% IF c.location == 'staff_only' OR c.location == 'staff_and_opac' %] |
382 |
</td> |
402 |
[% IF c.location == 'staff_and_opac' %]<br/>[% END %] |
383 |
<td> |
403 |
<strong>Librarian interface</strong>: |
384 |
[% IF ( c.branchcode == "" ) -%] |
404 |
<a href="/cgi-bin/koha/tools/page.pl?page_id=[% c.idnew | url %]" title="View on librarian interface">Default</a> |
385 |
All libraries |
405 |
OR |
386 |
[% ELSE %][% c.library.branchname | html %] |
406 |
<a href="/cgi-bin/koha/tools/page.pl?code=[% c.code | url %]" title="View on librarian interface">Current language</a> |
|
|
407 |
[% END %] |
387 |
[% END %] |
408 |
</td> |
388 |
</td> |
409 |
[% END %] |
389 |
<td>[% c.number | html %]</td> |
410 |
<td> |
390 |
<td data-order="[% c.published_on | html %]">[% c.published_on | $KohaDates %]</td> |
411 |
<div class="btn-group"> |
391 |
<td data-order="[% c.expirationdate | html %]">[% c.expirationdate | $KohaDates %] [% IF ( c.is_expired ) %](<span class="expired">expired</span>)[% END %]</td> |
412 |
<a class="preview_news btn btn-default btn-xs" data-number="[% loop.count | html %]"><i class="fa fa-eye" aria-hidden="true"></i> Preview content</a> |
392 |
<td>[% c.title | html %]</td> |
413 |
</div> |
393 |
<td>[% IF ( c.author) %][% INCLUDE 'patron-title.inc' patron=c.author %][% END %]</td> |
414 |
<div id="contentModal[% loop.count | html %]" class="modal" tabindex="-1" role="dialog" data-number="[% loop.count | html %]"> |
394 |
[% IF category == 'pages' %] |
415 |
<div class="modal-dialog" role="document"> |
395 |
<td class="actions"> |
416 |
<div class="modal-content modal-lg"> |
396 |
[% IF c.location == 'opac_only' OR c.location == 'staff_and_opac' %] |
417 |
<div class="modal-header"> |
397 |
<strong>OPAC</strong>: |
418 |
<h5 class="modal-title">Preview of: "[% c.title | html %]"</h5> |
398 |
<a target="_blank" href="[% Koha.Preference('OPACBaseURL') | url %]/cgi-bin/koha/opac-page.pl?page_id=[% c.idnew | url %]" title="View on OPAC">Default</a> |
|
|
399 |
OR |
400 |
<a target="_blank" href="[% Koha.Preference('OPACBaseURL') | url %]/cgi-bin/koha/opac-page.pl?code=[% c.code | url %]" title="View on OPAC">Current language</a> |
401 |
[% END %] |
402 |
[% IF c.location == 'staff_only' OR c.location == 'staff_and_opac' %] |
403 |
[% IF c.location == 'staff_and_opac' %]<br/>[% END %] |
404 |
<strong>Librarian interface</strong>: |
405 |
<a href="/cgi-bin/koha/tools/page.pl?page_id=[% c.idnew | url %]" title="View on librarian interface">Default</a> |
406 |
OR |
407 |
<a href="/cgi-bin/koha/tools/page.pl?code=[% c.code | url %]" title="View on librarian interface">Current language</a> |
408 |
[% END %] |
409 |
</td> |
410 |
[% END %] |
411 |
<td> |
412 |
<div class="btn-group"> |
413 |
<a class="preview_news btn btn-default btn-xs" data-number="[% loop.count | html %]"><i class="fa fa-eye" aria-hidden="true"></i> Preview content</a> |
414 |
</div> |
415 |
<div id="contentModal[% loop.count | html %]" class="modal" tabindex="-1" role="dialog" data-number="[% loop.count | html %]"> |
416 |
<div class="modal-dialog" role="document"> |
417 |
<div class="modal-content modal-lg"> |
418 |
<div class="modal-header"> |
419 |
<h5 class="modal-title">Preview of: "[% c.title | html %]"</h5> |
420 |
</div> |
421 |
<div class="modal-body"> |
422 |
[% c.content | $raw %] |
423 |
</div> |
424 |
<div class="modal-footer"> |
425 |
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button> |
419 |
</div> |
426 |
</div> |
420 |
<div class="modal-body"> |
|
|
421 |
[% c.content | $raw %] |
422 |
</div> |
423 |
<div class="modal-footer"> |
424 |
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button> |
425 |
</div> |
427 |
</div> |
426 |
</div> |
428 |
</div> |
427 |
</div> |
429 |
</td> |
428 |
</td> |
430 |
<td class="actions"> |
429 |
<td class="actions"> |
431 |
<div class="btn-group dropup"> |
430 |
<div class="btn-group dropup"> |
432 |
<a href="/cgi-bin/koha/tools/additional-contents.pl?op=add_form&id=[% c.idnew | uri %]&editmode=[% editmode | uri %]" class="btn btn-default btn-xs"> <i class="fa fa-pencil"></i> Edit</a><button class="btn btn-default btn-xs dropdown-toggle" data-toggle="dropdown"> |
431 |
<a href="/cgi-bin/koha/tools/additional-contents.pl?op=add_form&id=[% c.idnew | uri %]&editmode=[% editmode | uri %]" class="btn btn-default btn-xs"> <i class="fa fa-pencil"></i> Edit</a><button class="btn btn-default btn-xs dropdown-toggle" data-toggle="dropdown"> |
433 |
<span class="caret"></span> |
432 |
<span class="caret"></span> |
434 |
</button> |
433 |
</button> |
435 |
<ul class="dropdown-menu pull-right"> |
434 |
<ul class="dropdown-menu pull-right"> |
436 |
<li> |
435 |
<li> |
437 |
[% IF ( wysiwyg ) %] |
436 |
[% IF ( wysiwyg ) %] |
438 |
<a href="/cgi-bin/koha/tools/additional-contents.pl?op=add_form&id=[% c.idnew | uri %]&editmode=text"><i class="fa fa-pencil"></i> Edit with text editor</a> |
437 |
<a href="/cgi-bin/koha/tools/additional-contents.pl?op=add_form&id=[% c.idnew | uri %]&editmode=text"><i class="fa fa-pencil"></i> Edit with text editor</a> |
439 |
[% ELSE %] |
438 |
[% ELSE %] |
440 |
<a href="/cgi-bin/koha/tools/additional-contents.pl?op=add_form&id=[% c.idnew | uri %]&editmode=wysiwyg"><i class="fa fa-pencil"></i> Edit with WYSIWYG editor</a> |
439 |
<a href="/cgi-bin/koha/tools/additional-contents.pl?op=add_form&id=[% c.idnew | uri %]&editmode=wysiwyg"><i class="fa fa-pencil"></i> Edit with WYSIWYG editor</a> |
441 |
[% END %] |
440 |
[% END %] |
442 |
</li> |
441 |
</li> |
443 |
</ul> |
442 |
</ul> |
444 |
</div> |
443 |
</div> |
445 |
<div class="btn-group"> |
444 |
<div class="btn-group"> |
446 |
<a href="#" class="delete_news btn btn-default btn-xs" data-idnew="[% c.idnew | html %]"><i class="fa fa-trash"></i> Delete</a> |
445 |
<a href="#" class="delete_news btn btn-default btn-xs" data-idnew="[% c.idnew | html %]"><i class="fa fa-trash"></i> Delete</a> |
447 |
</div> |
446 |
</div> |
448 |
</td> |
447 |
</td> |
449 |
</tr> |
448 |
</tr> |
450 |
[% END %] |
449 |
[% END %] |
451 |
</tbody> |
450 |
</tbody> |
452 |
</table> |
451 |
</table> |
453 |
<input type="hidden" name="op" value="delete_confirmed" /> |
452 |
<input type="hidden" name="op" value="delete_confirmed" /> |
454 |
<input type="hidden" name="category" value="[% category | html %]" /> |
453 |
<input type="hidden" name="category" value="[% category | html %]" /> |
455 |
<fieldset class="action"><input type="submit" class="btn btn-primary" value="Delete selected" /></fieldset> |
454 |
<fieldset class="action"><input type="submit" class="btn btn-primary" value="Delete selected" /></fieldset> |
456 |
</form> |
455 |
</form> |
457 |
<form action="/cgi-bin/koha/tools/additional-contents.pl" method="post" id="delete_single"> |
456 |
<form action="/cgi-bin/koha/tools/additional-contents.pl" method="post" id="delete_single"> |
458 |
<input type="hidden" id="del_op" name="op" value="delete_confirmed" /> |
457 |
<input type="hidden" id="del_op" name="op" value="delete_confirmed" /> |
459 |
<input type="hidden" id="del_category" name="category" value="[% category | html %]" /> |
458 |
<input type="hidden" id="del_category" name="category" value="[% category | html %]" /> |
460 |
<input type="hidden" id="del_ids" name="ids" /> |
459 |
<input type="hidden" id="del_ids" name="ids" /> |
461 |
</form> |
460 |
</form> |
462 |
</div> <!-- /.page-section --> |
461 |
[% ELSE %] |
463 |
[% ELSE %] |
462 |
<div class="dialog message">There are no additional contents.</div> |
464 |
<div class="dialog message">There are no additional contents.</div> |
463 |
[% END %] |
465 |
[% END %] |