5 "sEcho": [% sEcho | html %],
6 "iTotalRecords": [% iTotalRecords | html %],
7 "iTotalDisplayRecords": [% iTotalDisplayRecords | html %],
9 [% FOREACH data IN aaData %]
12 "[% data.type | html %]",
14 "<a href='/cgi-bin/koha/virtualshelves/shelves.pl?op=view&shelfnumber=[% data.shelfnumber | html %]'>[% To.json(data.shelfname) | html%]</a>",
16 "[% data.count | html %] item(s)",
18 "[% IF data.type == 2 %]Public[% ELSIF data.is_shared %]Shared[% ELSE %]Private[% END %]",
20 "<a href='/cgi-bin/koha/members/moremember.pl?borrowernumber=[% data.owner | html %]'>[% To.json(data.firstname) | html %] [% To.json(data.surname) | html %]</a>",
22 [% IF data.sortby == "author" %]"Author"[% ELSIF data.sortby == "copyrightdate" %]"Year"[% ELSIF data.sortby == "itemcallnumber" %]"Call number"[% ELSIF data.sortby == "dateadded" %]"Date added"[% ELSE %]"Title"[% END %],
24 "[% data.created_on | $KohaDates %]",
25 "dt_modification_time":
26 "[% data.modification_time | $KohaDates %]",
28 "[% PROCESS action_form shelfnumber=data.shelfnumber can_manage_shelf=data.can_manage_shelf can_delete_shelf=data.can_delete_shelf type=data.type %]"
29 }[% UNLESS loop.last %],[% END %]
34 [% BLOCK action_form -%]
35 [%~ SET action_block = '' ~%]
36 [%~ IF can_manage_shelf OR can_delete_shelf ~%]
37 [%~ shelfnumber = shelfnumber | html ~%]
38 [%~ type = type | html ~%]
39 [%~ IF can_manage_shelf ~%]
40 [%~ action_block = '<form action="shelves.pl" method="get">' ~%]
41 [%~ action_block = action_block _ '<input type="hidden" name="shelfnumber" value="' _ shelfnumber _ '" />' ~%]
42 [%~ action_block = action_block _ '<input type="hidden" name="op" value="edit_form" />' ~%]
43 [%~ action_block = action_block _ '<input type="hidden" name="category" value="' _ type _ '" />' ~%]
44 [%~ action_block = action_block _ '<input type="hidden" name="referer" value="list" />' ~%]
45 [%~ action_block = action_block _ '<button class="editshelf btn btn-default btn-xs"><i class="fa fa-pencil"></i> Edit</button>' ~%]
46 [%~ action_block = action_block _ '</form> ' ~%]
48 [%~ IF can_manage_shelf OR can_delete_shelf ~%]
49 [%~ action_block = action_block _ ' <form action="shelves.pl" method="post">' ~%]
50 [%~ action_block = action_block _ '<input type="hidden" name="shelves" value="1" />' ~%]
51 [%~ action_block = action_block _ '<input type="hidden" name="op" value="delete" />' ~%]
52 [%~ action_block = action_block _ '<input type="hidden" name="shelfnumber" value="' _ shelfnumber _ '" />' ~%]
53 [%~ action_block = action_block _ '<input type="hidden" name="category" value="' _ type _ '" />' ~%]
54 [%~ action_block = action_block _ '<input type="hidden" name="referer" value="list" />' ~%]
55 [%~ action_block = action_block _ '<button type="submit" class="deleteshelf btn btn-default btn-xs"><i class="fa fa-trash"></i> Delete</button>' ~%]
56 [%~ action_block = action_block _ '</form>' ~%]
59 [%~ SET action_block = 'None' ~%]
61 [%~ To.json(action_block) | $raw ~%]