Bug 33070: Remove use of can_edit_items
[srvgit] / koha-tmpl / intranet-tmpl / prog / en / includes / catalogue / itemsearch_item.json.inc
1 [%- USE Branches -%]
2 [%- USE Koha -%]
3 [%- USE KohaDates -%]
4 [%- USE To -%]
5 [%- USE ItemTypes -%]
6 [%- USE AuthorisedValues -%]
7 [%- biblio = item.biblio -%]
8 [%- biblioitem = item.biblioitem -%]
9 [
10   "[% FILTER escape_quotes = replace('"', '\"') ~%]
11     <input type="checkbox" name="itemnumber" value="[% item.itemnumber | html %]"/>
12   [%~ END %]",
13   "[% FILTER escape_quotes ~%]
14     <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblio.biblionumber | uri %]" title="Go to record detail page">[% INCLUDE 'biblio-title.inc' | trim | collapse %]</a>[% IF ( Koha.Preference( 'marcflavour' ) == 'UNIMARC' && biblio.author ) %] by[% END %] [% biblio.author | html %]
15   [%~ END %]",
16   "[% (biblioitem.publicationyear || biblio.copyrightdate) | html %]",
17   "[% biblioitem.publishercode | html | $To %]",
18   "[% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.ccode', authorised_value => item.ccode ) | html %]",
19   "[% FILTER escape_quotes ~%]
20     <a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% biblio.biblionumber | uri %]#item[% item.itemnumber | uri %]" title="Go to item details">[% item.barcode | html %]</a>
21   [%~ END %]",
22   "[% item.enumchron | html %]",
23   "[% item.itemcallnumber | html %]",
24   "[% Branches.GetName(item.homebranch) | html %]",
25   "[% Branches.GetName(item.holdingbranch) | html %]",
26   "[% AuthorisedValues.GetDescriptionByKohaField( frameworkcode => biblio.frameworkcode, kohafield => 'items.location', authorised_value => item.location) | html %]",
27   "[% ItemTypes.GetDescription(item.itype) | html %]",
28   "[% item.stocknumber | html %]",
29   "[% AuthorisedValues.GetDescriptionByKohaField( frameworkcode => biblio.frameworkcode, kohafield => 'items.notforloan', authorised_value => item.notforloan) | html %]",
30   "[% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.itemlost', authorised_value => item.itemlost ) || "" | html %]",
31   "[% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.withdrawn', authorised_value => item.withdrawn ) || "" | html %]",
32   "[% (item.issues || 0) | html %]",
33   "[% IF item.checkout %][% item.checkout.date_due | $KohaDates %][% END %]",
34   "[% FILTER escape_quotes ~%]
35     <div class="btn-group dropup"><button type="button" class="btn btn-xs btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> <i class="fa fa-pencil"></i> Edit <span class="caret"></span> </button> <ul class="dropdown-menu pull-right"> [% IF user.can_edit_items_from( item.homebranch ) %]<li><a href="/cgi-bin/koha/cataloguing/additem.pl?op=edititem&biblionumber=[% item.biblionumber | uri %]&itemnumber=[% item.itemnumber | uri %]">Edit item</a></li>[% END %] <li><a href="/cgi-bin/koha/cataloguing/addbiblio.pl?biblionumber=[% item.biblionumber | html %]">Edit record</a></li> </ul> </div>
36   [%~ END %]"
37 ]