Koha/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/tables/shelves_results.tt
Jonathan Druart 66bc6a38d6 Bug 13421: Add the creation time for virtual shelves
Test plan:
1/ Execute the updatedb entry
2/ Create a list
3/ Go on the shelve list and confirm that the creation and last
modification time are now displayed.
4/ Confirm that you are able to sort the list by creation/modification
time.

Applied on top of 13419 (rebased updatedatabase.pl)
Works as expected.
Signed-off-by: Marc Veron <veron@veron.ch>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-05-04 12:31:51 -03:00

36 lines
2.3 KiB
Text

[% USE KohaDates %]
{
"sEcho": [% sEcho %],
"iTotalRecords": [% iTotalRecords %],
"iTotalDisplayRecords": [% iTotalDisplayRecords %],
"aaData": [
[% FOREACH data IN aaData %]
{
"dt_type":
"[% data.type %]",
"dt_shelfname":
"<a href='/cgi-bin/koha/virtualshelves/shelves.pl?viewshelf=[% data.shelfnumber %]'>[% data.shelfname %]</a>",
"dt_count":
"[% data.count %] item(s)",
"dt_owner":
"<a href='/cgi-bin/koha/members/moremember.pl?borrowernumber=[% data.owner %]'>[% data.firstname %] [% data.surname %]</a>",
"dt_sortby":
[% IF data.sortby == "author" %]"Author"[% ELSIF data.sortby == "copyrightdate" %]"Year"[% ELSIF data.sortby == "itemcallnumber" %]"Call number"[% ELSE %]"Title"[% END %],
"dt_creation_time":
"[% data.creation_time | $KohaDates %]",
"dt_modification_time":
"[% data.modification_time | $KohaDates %]",
"dt_action":
"<a style=\"cursor:pointer\">[% PROCESS action_form shelfnumber=data.shelfnumber can_manage_shelf=data.can_manage_shelf can_delete_shelf=data.can_delete_shelf type=data.type %]</a>"
}[% UNLESS loop.last %],[% END %]
[% END %]
]
}
[% BLOCK action_form -%]
[%- IF can_manage_shelf -%]
<form action='shelves.pl' method='get'><input type='hidden' name='shelfnumber' value='[% shelfnumber %]' /><input type='hidden' name='op' value='modif' /><input type='submit' class='editshelf' value='Edit' /></form>[% IF can_manage_shelf OR can_delete_shelf %]<form action='shelves.pl' method='post'><input type='hidden' name='shelfoff' value='[% shelfoff %]' /><input type='hidden' name='shelves' value='1' /><input type='hidden' name='DEL-[% shelfnumber %]' value='1' /><input type='hidden' name='CONFIRM-[% shelfnumber %]' value='1' />[% IF type == 1 %]<input type='hidden' name='display' value='privateshelves' />[% ELSE %]<input type='hidden' name='display' value='publicshelves' />[% END %]<input type='submit' class='deleteshelf' onclick='return confirmDelete(MSG_CONFIRM_DELETE_LIST)' value='Delete' /></form>[% END %]
[%- ELSE -%]
None
[%- END -%]
[%- END %]