sub library {
my ( $self ) = @_;
return Koha::Library->_new_from_dbic($self->_result->branchcode);
return Koha::Library->_new_from_dbic($self->_result->library);
}
=head3 sms_provider
# Created by DBIx::Class::Schema::Loader v0.07051 @ 2024-05-02 11:36:36
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:jUOMoSonNmA3KwtZKVxqOA
__PACKAGE__->belongs_to(
"library",
"Koha::Schema::Result::Branch",
{ branchcode => "branchcode" },
{ is_deferrable => 1, on_delete => "RESTRICT", on_update => "RESTRICT" },
);
__PACKAGE__->has_many(
"restrictions",
"Koha::Schema::Result::BorrowerDebarment",
},
[% END %]
{
data: "me.holding_library_id:holding_library.name",
data: "holding_library.name:me.holding_library_id",
className: "location",
searchable: true,
orderable: true,
data: "me.home_library_id:home_library.name",
data: "home_library.name:me.home_library_id",
className: "homebranch",
[% CASE 'branch' %]
"data": "library_id",
"data": "library.name:me.library_id",
"searchable": true,
"orderable": true,
"render": function( data, type, row, meta ) {
let library_name = libraries_map[data].branchname
if( !singleBranchMode && row.library.library_id == logged_in_library_id ) {
if( !singleBranchMode && data == logged_in_library_id ) {
return "<span class=\"currentlibrary\">" + escape_str(row.library.name) + "</span>";
return "<span class=\"currentlibrary\">" + escape_str(library_name) + "</span>";
} else {
return escape_str(library_name);
return escape_str(row.library.name);
-