Bugzilla – Attachment 91603 Details for
Bug 23343
Koha::Library->selected()
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 23343 - Koha::Library->selected()
Bug-23343---KohaLibrary-selected.patch (text/plain), 1.40 KB, created by
Olli-Antti Kivilahti
on 2019-07-18 17:51:05 UTC
(
hide
)
Description:
Bug 23343 - Koha::Library->selected()
Filename:
MIME Type:
Creator:
Olli-Antti Kivilahti
Created:
2019-07-18 17:51:05 UTC
Size:
1.40 KB
patch
obsolete
>From 0fa66c65657c9cdab22a2bcd09b3f01b2adc5bb8 Mon Sep 17 00:00:00 2001 >From: Olli-Antti Kivilahti <olli-antti.kivilahti@hypernova.fi> >Date: Thu, 18 Jul 2019 19:51:39 +0300 >Subject: [PATCH] Bug 23343 - Koha::Library->selected() > >Adds a generic ->selected() to Koha::Library so the Koha::Object can be transparently >used with Template::Toolkit to distinguish the currently selected library from a list >of other libraries in a <select> -html element. > >Sponsored-by: The National Library of Finland >--- > Koha/Library.pm | 22 ++++++++++++++++++++++ > 1 file changed, 22 insertions(+) > >diff --git a/Koha/Library.pm b/Koha/Library.pm >index f1a5597305..90e169f1d5 100644 >--- a/Koha/Library.pm >+++ b/Koha/Library.pm >@@ -77,6 +77,28 @@ sub library_groups { > return Koha::Library::Groups->_new_from_dbic( $rs ); > } > >+=head3 selected >+ >+Is the library selected in the context of the selection? >+For example: >+ Can be used to show that, >+ this specific library >+ is the one currently selected, >+ on the user interface >+ from a list of other libraries. >+ >+ @param1 Any, Context specific variable >+ @returns Any, explaining the type of selection in the context of the selection. >+ or undef, when this Library is not selected. >+ >+=cut >+ >+sub selected { >+ my ( $self, $selected ) = @_; >+ $self->{_koha_selected} = $selected if $selected; >+ return $self->{_koha_selected}; >+} >+ > =head2 Internal methods > > =head3 _type >-- >2.17.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 23343
: 91603