Koha/koha-tmpl/intranet-tmpl/prog/en/includes/acquisitions-toolbar.inc
Owen Leonard 9ea7fbcb30
Bug 25002: JS Includes should be wrapped with template comments
This patch adds HTML comments to Template::Toolkit include files which
contain <script> tags so that it is clear where the embedded scripts can
be found in the code.

To test, apply the patch and view source on the following pages to
verify the presence of the comments:

Acquisitions home page:
  - acquisitions-toolbar.inc
  - validtor-strings.inc
  - js_includes.inc
  - format-price.inc
Acquisitions -> Add order from new record,
Acquisitions -> Receive order:
  - additem.js.inc
Cataloging -> Add/Edit item:
  - columns_settings.inc
  - strings.inc
  - select2.inc
  - calendar.inc
  - str/cataloging_additem.inc
Authorities home page:
  - authorities_js.inc
Bibliographic detail page:
  - catalog-strings.inc
Cataloging -> Advanced editor:
  - cateditor-ui.inc
  - cateditor-widgets-marc21.inc
Administration -> Item types:
  - greybox.inc
ILL requests:
  - ill-list-table-strings.inc
Web installer
  - installer-intranet-bottom.inc
Web installer -> Onboarding
  - installer-strings.inc
Lists -> List contents -> Merge records
  - merge-record-strings.inc
Patrons -> Patron -> Change password
  - password_check.inc
  - str/members-menu.inc
Patrons -> Patron -> Print summary
  - slip-print.inc
Circulation -> Check out
  - timepicker.inc
Administration -> System preferences:
  - str/tinymce_i18n.inc
  - wysiwyg-systempreferences.inc
Cataloging -> Z39.50 Search:
  - z3950_search.inc

Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-04-29 17:15:20 +01:00

41 lines
2.3 KiB
HTML

[% INCLUDE 'blocking_errors.inc' %]
<!-- acquisitions-toolbar.inc -->
<script>
function confirm_deletion() {
if (confirm(_("Are you sure you want to delete this vendor?"))) {
window.location="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid | html %]&op=delete";
}
}
</script>
<div id="toolbar" class="btn-toolbar">
[% IF ( booksellerid ) %]
<div class="btn-group">
<a class="btn btn-default dropdown-toggle" data-toggle="dropdown" href="#"><i class="fa fa-plus"></i> New
<span class="caret"></span>
</a>
<ul class="dropdown-menu">
[% IF CAN_user_acquisition_order_manage && active %]
<li><a href="/cgi-bin/koha/acqui/basketheader.pl?booksellerid=[% booksellerid | uri %]&amp;op=add_form">Basket</a></li>
[% END %]
[% IF CAN_user_acquisition_contracts_manage && active %]
<li><a href="/cgi-bin/koha/admin/aqcontract.pl?op=add_form&amp;booksellerid=[% booksellerid | uri %]">Contract</a></li>
[% END %]
[% IF ( CAN_user_acquisition_vendors_manage ) %]
<li><a href="/cgi-bin/koha/acqui/supplier.pl?op=enter">Vendor</a></li>
[% END %]
</ul>
</div>
[% IF ( CAN_user_acquisition_vendors_manage ) %]
<div class="btn-group"><a class="btn btn-default" id="editsupplier" href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid | html %]&amp;op=enter"><i class="fa fa-pencil"></i> Edit vendor</a></div>
[% UNLESS ( basketcount OR subscriptioncount ) %]
<div class="btn-group"><a class="btn btn-default" id="deletesupplier" href="javascript:confirm_deletion()"><i class="fa fa-trash"></i> Delete vendor</a></div>
[% END %]
[% END %]
[% IF CAN_user_acquisition_order_receive && basketcount %]
<div class="btn-group"><a class="btn btn-default" id="receive" href="/cgi-bin/koha/acqui/parcels.pl?booksellerid=[% booksellerid | html %]"><i class="fa fa-inbox"></i> Receive shipments</a></div>
[% END %]
[% ELSE %]
<div class="btn-group"><a class="btn btn-default" href="/cgi-bin/koha/acqui/supplier.pl?op=enter"><i class="fa fa-plus"></i> New vendor</a></div>
[% END %]
</div>
<!-- / acquisitions-toolbar.inc -->