This patch adds an input named 'branch' to opac-main.pl that
allows overriding the home library to view news from any branch.
This is part of the 'Use Koha as a CMS' development.
To reviewers: Does this create any security implications?
The column is text; it is possbile to push SQL
statemens into the DB via the opac-membership.pl
page, but all the code there seems to use DBIx::Class
and prepared statements. When attemped, accepting the
changes were rejected because of the foreign key
constraint placed on the main borrowers table.
It is recommended to use this patch in conjunction with 11584
which adds a WYSIWYG editor to System Preferences.
Test plan:
* Make sure your Koha installation has multiple branches:
* Log in to the Staff interface and select 'Koha administration'
* Select 'Libraries and groups', the first item in the list
* Add an extra branch named 'BRANCH1':
* Press the 'New library' button
* Set 'Library code' to 'BRANCH1'
* Enter an arbitrary name
* Press 'Submit'
* Add at least two news items with different branches:
* Log in to the Staff interface and select 'Tools'
* Under 'Additional tools' select 'News'
* On the 'Koha news' page, create a news item for all libraries:
* Press the 'New entry' button
* Set 'Library' to 'All libraries' and enter a title.
* Press 'Submit'
* On the 'Koha news' page, create a news item for one library:
* Press the 'New entry' button
* Set 'Library' to 'BRANCH1' and enter a title
* Press 'Submit'
* Add links to OPAC to select branch:
* Select 'System preferences' and then the 'OPAC' tab
* Scroll down to the 'OpacNav' preference and click 'Click to Edit'
* Create two hyperlinks with a parameter named 'branch':
* '<a href="?branch=BRANCH1">BRANCH1</a>'
* '<a href="?branch=">none</a>'
* Click 'Save all OPAC preferences'
* Test OPAC:
* By default, global news and news for home branch should show.
* When clicking the 'BRANCH1' link, you should see global news
plus news for the BRANCH1 branch.
* When the parameter 'branch' is set but has no value,
news from the home branch should be shown.
Issues: Tricky to create a link to the same page
which removes existing paramters.
The user normally has a home branch set.
We can override it with the parameter.
If undefined, the home branch should be shown.
Sponsored-by: Halland County Library
http://bugs.koha-community.org/show_bug.cgi?id=14305
Changed 2015-12-14: Whitespace fix
Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
This fix changes the RSS link to reflect the URL paramter override.
This is less elegant than the existing solution which uses the
Branches TT module, perhaps there is a better way?
Sponsored-By: Halland County Library
Test plan:
* Follow instructions in the original patch but also check the
URLs and contents of the RSS link at the bottom the OPAC page.
Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
The borrow permission was used but uselessly.
For instance, at the opac, the flagsrequired parameter was set to
'borrow' but the 'authnotrequired' was set also (which means no auth
required).
At the end, this permission was used at only 1 place: for the basket,
intranet side.
This can be replaced with the catalogue permission (which is used to
search).
Test plan:
1/ Confirm that you are able to show/download/sent the cart (intranet side)
with the catalogue permission.
2/ At the OPAC, you should be able to access the same pages as before
with any other permissions.
Concretely it is quite difficult to test this patch, you should have a
look at the code.
Signed-off-by: Nick Clemens <nick@quecheelibrary.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
- Local fallback was not very well implemented, this patch adds
better handling for such cases allowing clearer failure messages
- This patch also adds the ability to use single sign on via the
top bar menu in the bootstrap theme.
BUG8446, Follow up: Adds perldoc documentation
- Add some documentation to the Auth_with_Shibboleth module
including some guidance as to configuration.
BUG8446, Follow up: Correct filenames to match guidlines
- Moved Auth_with_Shibboleth.pm to Auth_with_shibboleth.pm to match
other files present on the system.
BUG8446, Follow up: Correct paths after file rename
BUG8446, Follow up: Implemented single sign out
- This follow up rebases the code against 3.16+ which managed to break
some of the original logic.
- As a side effect of the rebasing, we've also implemented the single
sign out element. Upon logout, koha will request that the shibboleth
session is destroyed, and then clear the local koha session upon
return to koha. Due to the nature of shibboleth however, you will
only truly be signed out of the IdP if they properly support Single
Sign Out (which many do not). As a consequence, although you may
appear to be logged out in koha, you might find that upon clicking
'login' the IdP does NOT request your login details again, but instead
logs you silently back into your koha session. This is NOT a koha bug,
but a shibboleth implementation issue that is well known.
BUG8446, Follow up: Fixed bootstrap login via modal
- The bootstrap theme enable login from any opac page via modal. To
enable this with shibboleth we had to make some template parameters
globally accessible when shibboleth is enabled.
BUG8446, Follow up: Add template rules for Shibboleth and CAS
- Add template rules so that CAS and Shibboleth can coexist.
BUG8446, Follow up: Added default config to config file
BUG8446, Follow up: Embellished perldoc documentation
- Updated perldoc to correct detail about configuring shibboleth
authentication.
- Updated perldoc to include subroutines and their respective functions.
BUG8446, Follow up: Enable configuration of match field
- Added clearer, more flexible, configuration of shibboleth attribute to
koha borrower field matching for authentication
- Correcting of documentation to make it more clear to the current
implementation
- Minor refactoring of code to reduce some code duplication
Signed-off-by: Matthias Meusburger <matthias.meusburger@biblibre.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Matthias Meusburger <matthias.meusburger@biblibre.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
- Use the shibbolethAuthentication syspref to enable Shibboleth authentication
- Configure the shibbolethLoginAttribute to specify which shibboleth user
attribute matches the koha login
- Make sure the OPACBaseURL is correctly set
BUG8446, Follow-up: Adds Shibboleth authentication
- Fix logout bug: shibboleth logout now occurs only when
the session is a shibboleth one.
- Do some refactoring: getting shibboleth username is now
done in C4::Auth_with_Shibboleth.pm (get_login_shib function)
BUG8446, Follow-up: Adds Shibboleth authentication
- Adds redirect to opac after logout
BUG8446, Follow-up: Adds Shibboleth authentication
- Shibboleth is not compatible with basic http authentication
in C4/Auth.pm. This patch fixes that.
BUG8446, Follow-up: Adds Shibboleth authentication
- Use ENV{'SERVER_NAME'} instead of syspref OpacBaseURL in order to work with
multiple vhosts.
BUG8446, Follow-up: Adds Shibboleth authentication
- Adds missing protocol for $ENV{'SERVER_NAME'}
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jesse Weaver <pianohacker@gmail.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Tested with the feide idp.
- LDAP login and logout are working
- local login/logout are still working
- CAS login/logout are still working
Instructions for setup can be found on the wiki:
http://wiki.koha-community.org/wiki/Shibboleth_Configuration
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Since we switched to Template Toolkit we don't need to stick with the
sufix we used for HTML::Template::Pro.
This patch changes the occurences of '.tmpl' in favour of '.tt'.
To test:
- Apply the patch
- Install koha, and verify that every page can be accesed
Regards
To+
P.S. a followup will remove the glue code.
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
This adds the ability to specify whether staff, OPAC,
or slip news entries apply to all libraries or just a
particular library.
With the branch parameter added to key functions in
C4/NewsChannels.pm, function calls in C4/Members.pm,
mainpage.pl, opac/opac-main.pl, tools/koha-news.pl, and
t/db_dependent/NewsChannels.t were needed.
Some license texts were updated.
Templates were modified to display, allow for entry and editing
of the branches selected.
TEST PLAN
---------
1) Having logged into the staff client, is the news displaying
correctly? Have you entered a news item which should not
display for this branch of logged in user?
2) Find a patron (with some items checked out?)
3) Print a slip
- News which is labelled 'All Branches' or for the same branch
as the one printing the slip should display on the slip.
- THIS DOES NOT AFFECT QUICK SLIPS
4) Home -> Tools -> News
- Can you edit a news item?
- Does the change save correctly?
- Can you filter based on location and branch correctly?
- Can you add a new entry correctly?
- Can you delete an entry correctly?
5) Open an OPAC client.
- Does only the news for all branches display?
6) Log into the OPAC client.
- Does the news for all branches and the specific branch display?
7) prove -v t/db_dependent/NewsChannels.t
- Does it run and all succeed?
- Does the code seem to catch the required cases?
8) Comparing the patched and unpatched versions of files affected,
are the license changes missing anything?
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
This problem happens because there isn't a operator "phr" in the values
of callnumber and standard number search. So many results aren't the
corrects ones.
Test plan:
- Apply the patch
- In the dropbox search menu of OPAC main page header, the callnum
should have only callnum
- In OPAC advanced search the callnumber and standard number options
shouldn't have "phr"
- In staff client advanced search the callnumber and standard number
options shouldn't have "phr"
- Change OPACNumbersPreferPhrase and IntranetNumbersPreferPhrase to "use"
- The options listed before should use now the operator "phr"
- This will resolve the problems with the searches of callnumbers and
standard numbers in OPAC and staff client (spaces problems, no
results, inconsistent results, etc...)
Sponsored-by: KEEP SOLUTIONS
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
I don't know how to reproduce the searching problems described in the
bug, but I can confirm that the patch works correctly to enable/disable
the use of 'phr' in the searches described in the test plan.
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
System preferences work as described, switching indexes in
OPAC and staff.
All tests and QA script pass.
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
This patch does the following:
1) Enables fallback for includes between different themes and different
languages (with the exact same precedence as for .tt files)
2) Enable fallback for XSLT files between different themes and different
languages (again, same precedence)
3) Change the semantics of the TT [% themelang %] variable so that it always
refers to the preferred theme and language, rather than the fallback
theme/language. As a result, all themes must include all javascript,
css and image resources they use.
Note that these changes actually have no impact whatsoever on an
installation where the default (prog) themes are in use.
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Mason James <mtj@kohaaloha.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
This feature will add the option of displaying a select quote
for the day on the OPAC homepage. It will include the addition
of a QOTD editor in the tools section of the staff interface
which will allow the addition, editing, and deletion of quotes.
A single system preference will enable/disable the display of
the QOTD on the OPAC homepage. A new granular permission will
also be added to conrol user access to the QOTD editor tool.
Possible extentions to this would be code to allow alternate
quote selection algorithms to be added to vary how the currently
displayed quote is selected from the table of quotes.
This patch is a squash of the following work:
--Adding quotes table to kohastructure.sql and updatedatabase.pl
Note: This patch is intended for a MySQL based installation only.
That means that it includes backticks because that is what is required
at this point in history to install Koha correctly on a MySQL based
installation.
Feel free to port this over to the Pg stuff in the data/Pg directory.
--Adding system preference to control display of QOTD on OPAC main page
--Adding sample quote data
These quotes are taken from various US presidents. I'm not sure these
are applicable to the rest of the world, so I'm leaving it to translators
and others to add sample quote data for other languages.
--Adding edit_quotes user permissions
--Squash with other db related patches in this series
--Adding quotes editor pages to tools
--Adding QOTD editor link to tools homepage
--Integration of DataTables into QOTD Editor
--Impleminting jEditable into the quote editor
--Adding delete and add option to editor
--Fixing OPAC display so the QOTD div does not show if no quote is returned
--Also removing useless code from tools/quotes.pl
--Adding spans around QOTD foo in opac-main.tt
--Also fixing quote selection logic to accomodate the possibility of
a single quote in the db a litte better.
--Changing timestamp column header to a more user-friendly 'Last Displayed'
--Fixing bug in quote selection logic. This bug caused a situation where
when the table had only a single quote with an id greater than 1 in it,
no quote would be selected.
--Fixing up sorting in the quote editor table. --jcamins
--Adding span element to quote separator --jcamins
--Overriding the default empty table message supplied by datatables-strings.inc
--Adds missing page heading
--Adds beginning of click-for-help elements.
--Refactors delete functionality to allow selecting of quotes to delete,
enabling multi-delete.
--Refactors saving added quote functionality so that striking <Enter>
saves the new quote.
--Refactors canceling aded quote functionality so that striking <Esc>
cancels the new quote.
--Removing debug console.log statements
--Implementng the YUI button widget/toolbar used on other pages.
--Adds a 5px radius to all YUI buttons to bring them into
conformity with the general trend toward rounded corners
--Fixes capitalization in quote editor
--Implements improvements suggested by jcamins and oleonard
--Adds DataTables Plugin dataTables.fnReloadAjax.js
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Signed-off-by: Mason James <mtj@kohaaloha.com>
Removes the textmessaging parameter from opac/opac-main.pl and
opac/opac-user.pl, since it's not utilized anywhere in the templates, and is
sourced from a field that no longer exists in the borrower
table (textmessaging).
This also removes a dependency on C4/Members.pm from opac-main.pl
To Test: Login to the OPAC, and view both opac-user.pl and opac-main.pl. Both
pages should still render properly.
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
This patch solves the situation that news is in another language than
the Koha interface AND makes that themelanguage routine is always called
the same way in order to prevent mixed display.
It fixes also a bug related to language preselection based on web
browser prefered language.
September 9: Adjusted with input of Frederic Demians.
Septembre 10: Avoid circular dependency, as pointed by Chris Cormack.
Templates related functions are moved from C4::Output to C4::Templates
Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>
Signed-off-by: Ian Walls <ian.walls@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
applied to git tag 'v3.02.00-rc'
Frédéric Demians:
- Rebased this patch to HEAD
- Solved a merge conflict
- The patch works as described here:
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=4289
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
Signed-off-by: Jared Camins-Esakov <jcamins@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
This update the way Member is added and editing so that import and Edition
could be best automatized
GetMember evolves and allow ppl to serach on a hash of data
Adding SQLHelper A new package to deal with INSERT UPDATE and SELECT
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
This is available only on the masthead search box in the OPAC.
User has to enter a word in english and press space or return to transliterate the word. The destination language can be selected from a drop down list. User can temporarily turn on/off the feature by using "ctrl +g".
A system preference - GoogleIndicTransliteration can be used to turn on this feature.
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Most Perl scripts (as opposed to modules) do
not need to require Exporter.
No user-visible or documentation changes.
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
On bottom of each OPAC pages, a languages selector is displayed
(depending of syspref). But this selector wasn't available
on OPAC home page.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
If the SearchMyLibraryFirst is set, then a logged user will automatically limit the search
to it's own library.
I also did some code cleaning
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
Authority display hierarchy had a problem.
Feature porting :
Adding SearchMyLibraryFirst feature to OPAC
It select the user's library for research by default
- updating templates to have tmpl_process3.pl running without any errors
- adding a drupal-like css for prog templates (with 3 small images)
- fixing some bugs in circulation & other scripts
- updating french translation
- fixing some typos in templates
So this implies quite a change for files.
Sorry about conflicts which will be caused.
directory Interface::CGI should now be dropped.
I noticed that many scripts (reports ones, but also some circ/stats.pl or opac-topissues) still use Date::Manip.
- checkaccount and getborraccountno => GetBorrowerAcctRecord
Many changes in names,
some changes in function signature.
Will be detailed in a mail to kohadevel.
Seems not to break too many things, but i'm probably wrong here.
at least, new features/bugfixes from 2.2.5 are here (tested on some features on my head local copy)
- removing useless directories (koha-html and koha-plucene)