This patch moves the error messages to translatable strings
Also includes capitalization fixes and POD adjustment
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
To test:
1 - Enable AdvancedCatalogingEditor
2 - Add some macros (they don't need to be valid, just have content)
3 - Apply patches
4 - updatedatabase
5 - Set user to have 'create_shared_macros' and 'delete_shared_macros'
6 - Load the advanced editor (Cataloging->Advanced editor)
7 - Click on 'Macros'
8 - Previous macros should not show, but you should have a 'Convert' button
9 - Convert old macros and confirm they show
10 - Edit the macros, changing content and the public checkbox, confirm 'Saved' shows in the top right of editor when updating
11 - Have at least on valid macro and run it, e.g.:
new 100=Testing this out
12 - Run the macro, confirm it runs
13 - Try a macro with gibberish, confirm there is an error when running
14 - Ensure you have a few macros marked public
15 - In a private browser window sign in as a patron with neither shared macro permission
16 - Confirm the public macros load, but cannot be edited
17 - Grant create_shared_macros permission to this patron
18 - Reload editor, they should now be able to edit shared macros
19 - Confirm they cannot delete shared macros
20 - Grant delete_shared_macros permission
21 - Reload editor
22 - Confirm they can now delete shared macros
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Heather Hernandez <Heather_Hernandez@nps.gov>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
String sorrounded by "__()"
To test:
1) create translation files for a language
(cd misc/translator; ./translate create xx-YY)
2) Check string
egrep -l "No cover image available" misc/translator/po/xx-YY-*
present in 2 files, opac-bootstrap and staf-prog
3) Apply patch
4) Create files again
(cd misc/translator; rm -f po/xx-YY*; ./translate create xx-YY)
5) Check again
egrep -l "No cover image available" misc/translator/po/xx-YY-*
present in 3 files, new in messages-js
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This new patch set is adding a new DB field is_system to distinguish
internal categories.
The list of internal categories is in the patch "DB changes - set
is_system for categories" and can be discussed/extended.
Test plan:
0.
- Apply patch
- updatedabase
1.
- Create a new AV category
- Create an authorised value
- List the AVs for this category
- Remove all the AVs for this category
=> You see 2 buttons "Add a new authorised value" and "Delete category
'XXX'"
- Click the delete button
=> You get a popup
- Accept
=> The category is deleted
2.
- List the AV for Asort1 (internal category)
/cgi-bin/koha/admin/authorised_values.pl?searchfield=Asort1
- Delete the AVs for this category (if there is any)
=> You do not see the "Delete category" button
3.
- Create a new AV category 'foo'
- Create an authorised value
- Hit /admin/authorised_values.pl?op=delete_category&categor_name=foo
=> You get an error message (expected because the category cannot be
deleted if it has AV linked)
=> message text:
=> An error occurred when deleting this authorized value category. Check the logs.
4.
- Hit /admin/authorised_values.pl?op=delete_category&categor_name=Asort1
=> You get an error message (expected because the category Asort1 cannot
be deleted, it's an internal category.
=> message text:
=> An error occurred when deleting this authorized value category. Check the logs.
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This patch adds a new authorised_value_category.is_system boolean/tinyint(1)
DB field.
Name 'is_system' is coming from existing tables account_credit_types and
account_debit_types and should not be discussed here (if you disagree
fill a new bug report and deal with naming issue separately)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Use of patron-title.inc on the checkin page is inconsistent, resulting
in patron names being displayed differently under different
circumstances. This patch makes it more consistent.
To test, apply the patch and check in items with the following statuses:
- On hold for a patron at your library
- On hold for a patron not at your library
- On hold and already marked 'Waiting'
- On hold while HoldsAutoFill preference is enabled
- An item which has been marked with a LOST status in the
'ClaimReturnedLostValue' system preference.
- An item which was checked out to a manually-restricted patron and
checked in with a back-dated checkin date. See test plan on Bug
24776.
Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Test plan:
1) Before the patch when one checks in something using the KOCT the last seen
date is not updated.
2) After the patch when one checks in something using the KOCT the last seen
date is updated.
Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Deactivating a from Course Reserves reverts Item's Shelving Location
correctly, then deleting the same course reverts the Course Reserve
Items to old shelving location values.
Test Plan:
1) Add items to a Course - make sure they all have shelving locations
prior to being added to the course.
2) When adding items change their shelving location to something else.
See that Shelving Location has changed; permanent location in
parentheses
3) Deactivated course
See that Shelving Location has changed back to its original location
4) Deleted course
See that Shelving Location has changed back to what was picked during
adding it to the Course.
5) Apply this patch, restart all the things!
6) Repeat steps 1-4, note the shelvig location is not lost!
NOTE: Empty commit simply to restore the updated test plan and QA signoff
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Hannah Olsen <holsen@duncanville.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Deactivating a from Course Reserves reverts Item's Shelving Location
correctly, then deleting the same course reverts the Course Reserve
Items to old shelving location values.
Test Plan:
1) Add items to a Course - make sure they all have shelving locations
prior to being added to the course.
2) When adding items change their shelving location to something else.
See that Shelving Location has changed; permanent location in
parentheses
3) Deactivated course
See that Shelving Location has changed back to its original location
4) Deleted course
See that Shelving Location has changed back to what was picked during
adding it to the Course.
5) Apply this patch, restart all the things!
6) Repeat steps 1-4, note the shelvig location is not lost!
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Hannah Olsen <holsen@duncanville.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
When paying or writing off a single line from the list of pending charges,
the account type displayed the code instead of the description.
And when bug 23483 fixed the display of the description, 2 variables where
missed. This change is only visible when looking at the page source:
<input type="hidden" name="description" id="description" value="" />
With the patch applied, the value will be filled with the description.
To test:
- Create one or more manual invoices of different types
- Try to pay/write off using the buttons within the table
- Verify the account type shows as code, not description
- Apply patch
- Repeat
- Bonus points: Check the source code for the hidden input with description.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This patch builds on Bug 22318 to move the OpacMainUserBlock system
preference into the Koha news system, making it possible to have
language- and library-specific content.
To test you should have some content in the OpacMainUserBlock system
preference. Apply the patch and run the database update process.
- Go to the OPAC and confirm that the content which was previously in
the OpacMainUserBlock system preference now displays correctly where
it was before.
- In the staff client, go to Tools -> News and verify that the content
from OpacMainUserBlock is now stored in news items. There should be
one entry for each of the enabled translations in your system, for
instance 'opacmainuserblock_en', 'opacmainuserblock_fr-FR',
'opacmainuserblock_cs-CZ'
- Go to Administration -> System preferences and confirm that the
OpacMainUserBlock preference has been removed.
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This patch makes the return values for 'current_item_level_holds'
consistent: they will always be a Koha::Holds iterator.
To test:
1. Apply the regression tests
2. Run:
$ kshell
k$ prove t/db_dependent/Koha/Acquisition/Order.t
=> FAIL: It doesn't work as expected, cannot call ->count on undef, etc
3. Apply this patch
4. Repeat 2.
=> SUCCESS: Tests pass!
5. Sign off :-D
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This patch prevents a timezone from being assigned to the js moment if
the input string is only at the full-date and not date-time resolution
To test:
1. Do not apply this patch
2. Set your system time zone to CET
3. Apply previous patch (It's just for test)
4. In your browser go to koha main page, open a console and type $date('2020-03-25', {tz:
'UTC'})
CHECK => you sould get '03/24/2020' (notice day is 24 instead of 25)
5. Apply this patch and reload the browser
6. repeat step 4
SUCCESS => now you get '03/25/2020' (day is correct)
7. Sing off
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Agustin Moyano <agustinmoyano@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Test plan:
1) Apply first patch, and have the same requests as in previous patch
test plan
2) Load ill requests list
2a) You can see another TypeError in console
2b) You can notice, the Placed on and Updated on columns have prepended
another columns with unformatted dates and without header label
3) Apply this patch
4) Reload page (be sure it is not loaded from cache - Ctrl+F5)
5) Errors from 2a and 2b are gone
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This patch modifies the way in which a request's status name is
retrieved. I think the previous way it was done (which can never have
worked properly) must have come from a time when we weren't embedding
the request's backend capabilities in each request. So now we can just use
the current row.
Test plan:
1. *Before applying the patch*:
2. Ensure you have at least two requests, from two different backends.
One of the backends you are using must have a possible status that
doesn't exist in the other. For example, the BLDSS backend has a status
of STAT, that doesn't not exist in any other backends.
3. Ensure that the request who's backend has the unique status is *not*
the first request in the returned list.
4. Load the "View ILL requests" page
5. Observe that the page JS fails with a "Cannot read property 'name' of
undefined" error
6. Apply the patch
7. Reload the page (maybe doing a hard reload to ensure the JS is not
cached)
8. TEST: Observe that the error no longer occurs and the requests all
have their statuses displayed correctly.
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
In case we already started to iterate.
This fixes a failing tests in t/db_dependent/Koha/Biblios.t
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
If we call Koha::Libraries->delete but Koha::Library->delete exists
(ie. Koha::Object->delete is overridden), then we Koha::Objects->delete
will be called and the overridden will not be executed.
This patch suggests to test if the method is overridden (using
Class::Inspector->function_exists). If so we loop on the different
objects of the set in a transaction and call the overridden ->delete method.
Existing tests widely cover this change.
t/db_dependent/Koha/Objects.t
subtest 'Return same values as DBIx::Class' => sub {
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
In OO we would usually instantiate the class and then interact with it
like in:
my $rs = Koha::Patrons->new;
$rs->empty;
Koha's practice is to call things like Koha::Patrons->search without
instantiating the Koha::Patrons class. To keep consistency, this patch
instantiates the resultset object on behalf of the caller if required.
To test:
1. Apply the tests patch
2. Run:
$ kshell
$k prove t/db_dependent/Koha/Objects.t
=> FAIL: Tests fail because it is expected to have the class
instantiated
3. Apply this patch
4. Repeat 2.
=> SUCCESS: Tests pass, instantiation happens implicitly.
5. Sign off :-D
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This patch adds a new ->empty method to Koha::Objects, that can be used
to make the underlying DBIC resultset empty. This way, we can have
consistency in our method's return values without the need to build
a query that we know in advance that will be empty. No need to hit the
DB at all.
To test:
1. Apply this patches
2. Notice the tests cover what is expected
3. Run:
$ kshell
k$ prove t/db_dependent/Koha/Objects.t
=> SUCCESS: Tests pass! Yay!
4. Sign off :-D
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This patch fixes a simple typo
Test plan:
1) Go to Administration -> MARC bibliographic framework
2) Select a framework and add plugin unimarc_field_130.pl to 130 field
3) Open cataloguing screen
4) Go to 130 field and check if for subfield a shows value for
'unknown' select it and close the window, check on value on 130$a at
position 8 to have the value 'd'.
5) Repeat step 4 and select the value 'mixed emulsion' close the plugin
window and check at position 8 to have the value 'u'
6) Apply the patch
7) Go to field 130, open the plugin window and select value 'unknown'
close the window and check at position 8 to have the value 'u'
8) Go to field 130, open the plugin window and select value 'mixed
emulsion', close the window and check at position 8 to have the
value 'v'
https://www.ifla.org/files/assets/uca/unimarc_updates/BIBLIOGRAPHIC/b_130_update2017.pdf
Mentored-by: Andreas Roussos
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This patch adds JavaScript to the OPAC cart view so that the toolbar at
the top of the display "floats" as you scroll down.
The patch also makes a minor correction to the OPAC SCSS affecting the
display of the buttons in the cart toolbar.
To test, apply the patch and rebuild the OPAC CSS
(https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client).
- Add some items to a cart in the OPAC.
- Open the cart and confirm that the toolbar sticks to the top of the
window as you scroll down.
- Confirm that it works in the "More details" view.
- Confirm that other JavaScript-based operations are not affected:
table sorting and all the various toolbar buttons.
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This patch adds aria attributes to Font Awesome icons generated by
JavaScript. The icons won't appear under normal circumstances because
the code for displaying the modal dialog should replace the icons with a
text label. The icons are a fallback.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Font Awesome's accessibility guidelines
(https://fontawesome.com/v4.7.0/accessibility/) suggest that we include
'aria-hidden="true"' in the icon markup. This prevents screen
readers from trying to read the icon. This patch adds the attribute.
To test apply the patch and browse the OPAC looking for any problems
with icons: On search results, bibliographic details page, the cart,
lists, etc.
Check the source and verify that Font Awesome icons have the
"aria-hidden" attribute.
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Attribute present, all looks good. The 'aria-label' attribute is
not translatable, but it's another problem.
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This patch adds logic to the OPAC suggestions template so that when the
OPACViewOthersSuggestions system preference is enabled and the logged-in
user is viewing other users' suggestions, the "Delete selected" button
is only displayed when there are suggestions the user can delete.
To test you should have suggestions in your system from at least two
users.
- Set the OPACViewOthersSuggestions preference to "Show"
- Log in to the OPAC as a user who hasn't submitted any suggestions
- Go to the suggestions page (with "?suggested_by_anyone=1" appended to
the URL if necessary, see Bug 22515).
- In the table of suggetions, there should be no titles with a checkbox
in the first column.
- At the bottom of the table there should be no "Delete selected"
button.
- Log in to the OPAC as a user with suggestions.
- Return to the suggestions page and view all suggestions.
- There should be titles with corresponding checkboxes and the "Delete
selected" button should appear at the bottom.
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>