With bug 13388 we added a page with details for each library.. problem is, they don't always want to display all the information we display.. or display the libraries page at all. We should put the display of the whole thing under a system preference, and when enabled we should allow the individual elements for display to be picked optionally.
I think we should add a 'public' field to the libraries table.. so you can hide/show whole libraries in this interface.. then perhaps a checkbox for exposing/hiding email address... Not so sure about any of the other fields.. to me it wouldn't really make much sense to display a library but hide it's address..
+1 Some customers ask to hide some libraries that are not a "real" place. A "public" or "show in OPAC" flag would be great.
+1
Created attachment 126997 [details] [review] Bug 27360: Add public field to branches table
Created attachment 126998 [details] [review] Bug 27360: DBIC Build
Created attachment 126999 [details] [review] Bug 27360: Use 'public' to filter libraries for opac display This patch adds the ability to set a library as 'public' or not; this allows librarians to hide back office library branches from the opac. Test plan 1/ Set a library as public from `admin > libraries`. 2/ Navigate to the `Libraries` page in the OPAC 3/ Note that only `public` libraries are displayed.
Created attachment 127000 [details] [review] Bug 27360: Use 'public' to filter libraries for opac display This patch adds the ability to set a library as 'public' or not; this allows librarians to hide back office library branches from the opac. Test plan 1/ Set a library as public from `admin > libraries`. 2/ Navigate to the `Libraries` page in the OPAC 3/ Note that only `public` libraries are displayed.
Created attachment 127007 [details] [review] Bug 27360: Add public field to branches table Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>
Created attachment 127008 [details] [review] Bug 27360: DBIC Build Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>
Created attachment 127009 [details] [review] Bug 27360: Use 'public' to filter libraries for opac display This patch adds the ability to set a library as 'public' or not; this allows librarians to hide back office library branches from the opac. Test plan 1/ Set a library as public from `admin > libraries`. 2/ Navigate to the `Libraries` page in the OPAC 3/ Note that only `public` libraries are displayed. Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>
Created attachment 127011 [details] [review] Bug 27360: Add public field to branches table Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov> Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org>
Created attachment 127012 [details] [review] Bug 27360: DBIC Build Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov> Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org>
Created attachment 127013 [details] [review] Bug 27360: Use 'public' to filter libraries for opac display This patch adds the ability to set a library as 'public' or not; this allows librarians to hide back office library branches from the opac. Test plan 1/ Set a library as public from `admin > libraries`. 2/ Navigate to the `Libraries` page in the OPAC 3/ Note that only `public` libraries are displayed. Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov> Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org>
(In reply to Martin Renvoize from comment #1) > I think we should add a 'public' field to the libraries table.. so you can > hide/show whole libraries in this interface.. then perhaps a checkbox for > exposing/hiding email address... E-mail does not seem to be revealed in general. Nothing in this patch touches e-mail addresses as an option to hide OR reveal.
Blimey.. I wasn't expecting that one to move so quickly! I kept it simple to start with by just adding the proposed 'public' flag. Do you think email is the only field that would need to be optionally hidden on top of this?
As far as I can see, e-mails don't even show. I checked our production server on 20.05, and I don't see it in master. Since it was mentioned in the original description to be able to allow individual elements, and another comment mentioning the e-mail specifically, I thought it would be wise to address. I like the patch as is. I think if someone wants to reveal the e-mail address, it could be addressed in another patch. I would just state that individual elements are not going to be addressed in this bug.
Some problems noted by the QA script, can you please fix? FAIL installer/data/mysql/atomicupdate/bug_27360.pl OK critic FAIL file permissions File must have the exec flag OK forbidden patterns OK git manipulation OK pod OK spelling OK valid FAIL installer/data/mysql/kohastructure.sql OK boolean_vs_tinyint OK charset_collate OK git manipulation FAIL tinyint_has_boolean_flag The new column branches.public is using TINYINT(1) as type but is not defined as boolean in the schema file (Koha/Schema/Result/Branch.pm), see the SQL12 coding guideline
Created attachment 127144 [details] [review] Bug 27360: Add public field to branches table Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov> Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org>
Created attachment 127145 [details] [review] Bug 27360: DBIC Build Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov> Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org>
Created attachment 127146 [details] [review] Bug 27360: Use 'public' to filter libraries for opac display This patch adds the ability to set a library as 'public' or not; this allows librarians to hide back office library branches from the opac. Test plan 1/ Set a library as public from `admin > libraries`. 2/ Navigate to the `Libraries` page in the OPAC 3/ Note that only `public` libraries are displayed. Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov> Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org>
Created attachment 127147 [details] [review] Bug 27360: (follow-up) Mark public as boolean
Thanks Kyle, all fixed :) Thanks for the quick testing everyone, glad the email field wasn't a blocker. :)
While I am testing this: I am not sure about using "Public" to describe this feature as it only affects the libraries page in the OPAC right now. I think we should at least add a hint about what it really does to the input/edit form for libraries.
Created attachment 127158 [details] [review] Bug 27360: (follow-up) Add hint
Created attachment 127159 [details] [review] Bug 27360: Add public field to branches table Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov> Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Created attachment 127160 [details] [review] Bug 27360: DBIC Build Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov> Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Created attachment 127161 [details] [review] Bug 27360: Use 'public' to filter libraries for opac display This patch adds the ability to set a library as 'public' or not; this allows librarians to hide back office library branches from the opac. Test plan 1/ Set a library as public from `admin > libraries`. 2/ Navigate to the `Libraries` page in the OPAC 3/ Note that only `public` libraries are displayed. Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov> Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Created attachment 127162 [details] [review] Bug 27360: (follow-up) Mark public as boolean Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Created attachment 127163 [details] [review] Bug 27360: Add hint to input field Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
We could think it will hide them from Hea, but it won't!
Created attachment 127253 [details] [review] Bug 27360: Prevent crash if branchcode does not exist
(In reply to Jonathan Druart from comment #30) > We could think it will hide them from Hea, but it won't! Does the hint not help enough with that?
(In reply to Martin Renvoize from comment #32) > (In reply to Jonathan Druart from comment #30) > > We could think it will hide them from Hea, but it won't! > > Does the hint not help enough with that? I guess it does. But a "non public library" could have their info shared with Hea. I just wanted to highlight it, not requested something :)
Pushed to master for 21.11, thanks to everybody involved!
*** Bug 29479 has been marked as a duplicate of this bug. ***
Created attachment 127629 [details] [review] Bug 27360: (follow-up) DBRev 21.06.00.041
(In reply to Jonathan Druart from comment #36) > Created attachment 127629 [details] [review] [review] > Bug 27360: (follow-up) DBRev 21.06.00.041 Pushed to master.
*** Bug 26834 has been marked as a duplicate of this bug. ***
(In reply to Katrin Fischer from comment #23) > While I am testing this: I am not sure about using "Public" to describe this > feature as it only affects the libraries page in the OPAC right now. I > think we should at least add a hint about what it really does to the > input/edit form for libraries. I think we could leverage this flag to not display library branches in dropdown menus as well (for the masthead dropdown and advanced search dropdowns specifically)
(In reply to David Cook from comment #39) > (In reply to Katrin Fischer from comment #23) > > While I am testing this: I am not sure about using "Public" to describe this > > feature as it only affects the libraries page in the OPAC right now. I > > think we should at least add a hint about what it really does to the > > input/edit form for libraries. > > I think we could leverage this flag to not display library branches in > dropdown menus as well (for the masthead dropdown and advanced search > dropdowns specifically) Not sure if it should be the same flag, but it could be: see bug 12242.