Commit graph

35 commits

Author SHA1 Message Date
2164fce41f Bug 10306: (QA follow-up) More feedback for admins in koha2marclinks
As requested by Tomas, this patch does:

[1] Add a js alert when you did not type field,subfield
[2] Print a yellow alert div when the field,subfield is not found.
[3] Bonus: Make it little bit more secure by demanding a POST. (Leaving
    CSRF etc. for another report.)

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2017-12-07 14:44:15 -03:00
9dfff3ab19 Bug 10306: Support for multiple mappings in koha2marclinks
This actually refactors koha2marclinks.pl in order to support multiple
mappings per kohafield.

Instead of three separate mapping pages for biblio, biblioitems and items,
the script now lists them together. This gives a complete overview of all
mappings rightaway. Changes are applied immediately across all frameworks.

Note: This report handles the Default mappings just like it did before.
In this script Koha already considered them as authoritative, although
other parts of Koha did not. Follow-up report 19096 makes Default
mappings authoritative throughout all Koha.

On each line two buttons are provided, Add and Remove, in order to add or
remove an individual mapping. We do no longer provide a separate form with
the names of MARC tags. Since this form is targeted for administrators,
it should be enough to ask for a field tag and subfield code.

Note: The mappings for biblionumber, biblioitemnumber and itemnumber are
so vital that this form marks them as readonly. It is not recommended to
change them.

Test plan:
[1] Add a mapping. Verify via Frameworks or mysql command line that the
    kohafield is saved to the other frameworks too.
[2] Remove the mapping again. Check Frameworks or mysql cl again.
[3] Test adding a second mapping. Map copyrightdate to 260c and 264c.
    And map biblioitems.place to 260a and 264a.
[4] Edit biblio record 1: Put 1980 in 260c. Do not include 264c.
    Edit biblio record 2: Put 1990 in 264c. Do not include 260c.
    Edit biblio record 3: Put 2000 in both 260c and 264c. Put CityA in 260a
    and in 264a.
    Edit biblio record 4: Put 2010 in 260c, and 2015 in 264c (which you
    should refuse normally). Put CityA in 260a, and CityB in 264a.
[5] Create a report that shows biblioitems.place and biblio.copyrightdate
    for those biblio records.
    Record 4 should have 2010 in copyrightdate (since TransformMarcToKoha
    picks the first year for copyrightdate).
    Record 3 should have place CityA; record 4 should have CityA | CityB.
    Note: The CityA | CityB example illustrates that we should add some
    additional handling in TransformMarcToKoha for multiple 264s.
[6] Add these four biblio records to a new list. Sort by Year.
    With OPACXSLTListsDisplay==default, check if the order = 1,2,3,4.
    (The order is based on biblio.copyrightdate.)
    Note that (RDA) record 2 would be on top without this patch set, since
    copyrightdate would have been null.

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2017-12-07 14:44:15 -03:00
f753220701 Bug 17189: Add the ability to define several memcached namespaces - replace existing occurrences
s/Koha::Cache->get_instance/Koha::Caches->get_instance

Signed-off-by: Jacek Ablewicz <abl@biblos.pk.edu.pl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

https://bugs.koha-community.org/show_bug.cgi?id=11921

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-09-08 10:24:46 +00:00
ff1579de6d Bug 15258: Fix Perl scripts declaring unused variables
Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

All affected files tested with `perl -c`.
Signed-off-by: Jesse Weaver <jweaver@bywatersolutions.com>
2015-12-30 17:24:45 -07:00
Jonathan Druart
a6c9bd0eb5 Bug 9978: Replace license header with the correct license (GPLv3+)
Signed-off-by: Chris Nighswonger <cnighswonger@foundations.edu>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>

http://bugs.koha-community.org/show_bug.cgi?id=9987

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-04-20 09:59:38 -03:00
Jonathan Druart
e20270fec4 Bug 11944: use CGI( -utf8 ) everywhere
Signed-off-by: Paola Rossi <paola.rossi@cineca.it>
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Dobrica Pavlinusic <dpavlin@rot13.org>

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-01-13 13:07:21 -03:00
Jonathan Druart
75f0cc5771 Bug 11944: Some refresh don't indicate the charset to use
This patch replaces occurrences of META HTTP-EQUIV=Refresh with a
redirection.

Note:
 The list of modified files has been got with the following grep:
  git grep Content-Type | grep -v -i utf | grep Refresh | grep -v translator | grep -v \.js

Test plan:
1) admin/auth_tag_structure.pl
- Go on an authority MARC framework for an authority type
(admin/auth_tag_structure.pl?authtypecode=CO for instance)
- Click on the "Add a new tag" button
- Fill fields
- Save
- You should be redirected on the auth_tag_structure.pl page
- Try to modify an existing tag
- The redirection should be done

2) admin/auth_subfields_structure.pl
- From the previous page, click on a "subfields" link
- Edit/Add a new subfields
- Save
- You should be redirected to the subfield list
- Delete a subfield
- You should be redirected to the subfield list

3) admin/authorised_values.pl
- Add/Edit an authorised value
- Save
- You should be redirected to the authorised value list (with the
  right category selected)

4) admin/categorie.pl
- Add/Edit a patron category
- Save
- You should be redirected to the category list
- Delete a patron category
- You should be redirected to the category list

5) admin/koha2marclinks.pl
- Go on the Koha to MARC mapping configuration page
- Edit a field
- Map a field and click on "OK"
- You should be redirected to the list

6) admin/marc_subfields_structure.pl
- Go on the MARC frameworks page
- Click on "MARC structure" for one on the list
- Click on "Subfields" for one on the list
- Add/Edit a subfield
- Save
- You should be redirected to the subfield list

7) admin/systempreferences.pl
- Go on the system preferences admin page
- Click on the "Local use" tab
- Add/Edit a pref
- Save
- You shold be redirected to the Local use preference list

8) serials/subscription-detail.pl
- Go on a subscription detail page
- Delete the subscription (using Edit > Delete subscription)
- You should be redirected on the serials home page

Signed-off-by: Paola Rossi <paola.rossi@cineca.it>
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Dobrica Pavlinusic <dpavlin@rot13.org>

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-01-13 13:07:09 -03:00
Robin Sheat
71ba269136 Bug 11842 - fix framework caching with memcache/plack
This changes the existing framework caching, which was using memoisation
if memcached was available, and memory in all cases, to use the
Koha::Cache system. This uses memcache if possible, and in-memory
otherwise. However it also clears the cache when the framework updates,
making sure that the changed version will be picked up.

Note that the in-memory cache clears itself after 10 seconds, so that if
memcached isn't available, this is the longest that old versions will
hang around.

Test plan:
* work through
  http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11842#c0
  and make sure that the erronious result doesn't occur.

Note:
* The patch on bug 12041 is required for this to work.

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-08-19 12:53:44 -03:00
Bernardo Gonzalez Kriegel
9db4eb85f3 Bug 12613: Remove CGI::scrolling_list from koha2marclinks.pl
This patch removes all (2) instances from koha2marclinks.pl.
Also changes dropdowns width on mapping editor, from an
ugly ragged right to a fixed width view.

To test:
1. Apply the patch
2. Go to Administration > Koha to MARC mapping
3. Pulldown in this view has been replaced, check
for regressions: change table type and press Ok,
verify you get Koha fields and tag/subfield appropriate
for each table.
4. Now press 'Edit' on any field, go into mapping editor
5. Check that all pulldowns show tag/subtags relevant
for each group ( 000s ... 900s )
6. Check that current mapping is displayed correctly
7. Check for regressions: unmap, remap, press Ok,
verify, change again.
8. If you can, check display of mapping editor on several
browsers, just in case.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
I have tested with Firefox/Iceweasel only.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script.
Also tested in Chromium.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-07-29 11:30:51 -03:00
afd2418d73 Bug 11349: Change .tmpl -> .tt in scripts using templates
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>
2014-07-17 11:05:49 -03:00
Srdjan
c1e5462db1 bug_8083: parameters subpermissions: manage_circ_rules and parameters_remaining_permissions
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2012-07-23 10:43:59 +02:00
Paul Poulain
c3fe3af209 Using only default framework for koha2marclinks
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-03-16 21:27:20 -04:00
Lars Wirzenius
2c67656108 Fix FSF address in directory admin/
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-03-16 20:17:50 -04:00
Colin Campbell
7f0f83a6ec Enable warnings in koha2marclinks.pl
Fix code generating warnings with warnings enabled

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-02-08 21:25:47 -05:00
Garry Collum
fc8b7c27bb Bug 2889: Removed toggle variable from koha2marclinks.tmpl. Used template __odd__ variable.
Removed toggle variable from koha2marclinks.tmpl and koh2marclinks.pl.  Used template __odd__ variable instead.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-06-08 16:47:55 -05:00
b43c829027 More markup corrections for better validation.
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-09-02 17:36:05 -05:00
905c5de9c8 Fixing some markup issues and alternating table row colors.
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2007-12-18 16:40:05 -06:00
Paul POULAIN
8b7085a8ab removing useless code
the 3 parameters :
intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"),
intranetstylesheet => C4::Context->preference("intranetstylesheet"),
IntranetNav => C4::Context->preference("IntranetNav"),

are filled by Auth.pm automatically, removing them in templates

Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2007-10-24 17:03:38 -05:00
hdl
100e6a9808 functions that were in C4::Interface::CGI::Output are now in C4::Output.
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.
2007-04-24 13:54:28 +00:00
tipaul
7bd99ef365 removing all useless %env / $env 2007-04-18 17:00:14 +00:00
tipaul
f8e9fb6445 rel_3_0 moved to HEAD (introducing new files) 2007-03-09 15:34:17 +00:00
tgarip1957
fe59c6c516 New framework handling. New koha_attr table for mapping MARC to koha 2006-09-01 22:03:00 +00:00
toins
cc9524a875 Head & rel_2_2 merged 2006-07-04 14:36:51 +00:00
hdl
b810e2d71e changing parameters template directory to admin 2006-02-24 11:15:01 +00:00
tipaul
3635a596cf synch'ing 2.0.0 branch and head 2004-02-11 08:35:31 +00:00
tipaul
7457de546a synch'ing with rel_2_0 version 2004-01-12 16:55:05 +00:00
oleonard
8cb1182ddb Changes to generated HTML to allow proper validation (&amp;) 2003-12-30 17:47:10 +00:00
tipaul
bae44ceac7 (partial ?) fix for #512 2003-07-02 13:51:31 +00:00
acli
52a5fd4bbd Moved C4/Charset.pm to C4/Interface/CGI/Output.pm
Create output_html_with_http_headers function to contain the "print $query
->header(-type => guesstype...),..." call. This is in preparation for
non-HTML output (e.g., text/xml) and charset conversion before output in
the future.

Created C4/Interface/CGI/Template.pm to hold convenience functions specific
to the CGI interface using HTML::Template

Modified moremembers.pl to make the "sex" field localizable for languages
where M and F doesn't make sense
2003-02-02 07:18:37 +00:00
tipaul
61368cb390 # cleaning 2003-01-20 13:48:50 +00:00
acli
125c7f9c7e Handle meta tags for non-latin1 charsets 2003-01-20 07:39:27 +00:00
tipaul
5f3749d437 adding authentification with Auth.pm
(note : i want to stay the 1st commiter in december as in november :-) )
2002-12-10 17:35:27 +00:00
tipaul
a4c791f56c small bugfix 2002-11-18 09:42:54 +00:00
arensb
24b7b9a73d Removed trailing whitespace. 2002-10-13 09:31:35 +00:00
tipaul
bf1b862180 with this script, it's easy to see which koha-DB fields are not mapped to MARC-DB and map them. 2002-10-11 14:23:28 +00:00