Commit graph

44 commits

Author SHA1 Message Date
Jenny Way
3f6a7933b8 Bug 19992: use Modern::Perl in Admin perl scripts
Test plan:
Check use warnings; use strict doesn't exist and use Modern::Perl is written instead in the following files:

admin/admin-home.pl
admin/aqcontract.pl
admin/aqplan.pl
admin/auth_tag_structure.pl
admin/branch_transfer_limits.pl
admin/check_budget_parent.pl
admin/check_parent_total.pl
admin/checkmarc.pl
admin/classsources.pl
admin/clone-rules.pl
admin/didyoumean.pl
admin/edi_accounts.pl
admin/edi_ean_accounts.pl
admin/import_export_framework.pl
admin/item_circulation_alerts.pl
admin/marctagstructure.pl
admin/matching-rules.pl
admin/printers.pl
admin/smart-rules.pl
admin/systempreferences.pl
admin/transport-cost-matrix.pl

Signed-off-by: Jon Knight <J.P.Knight@lboro.ac.uk>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2018-02-05 09:45:46 -03:00
5359488528 Bug 12227: Remove the demo functionality
This is a legacy mode that did not really work.

Test plan:
Play with frameworks and sysprefs and confirm the changes
(add/del/update) are taken into account.

Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2017-12-11 11:34:20 -03:00
9f47bd8825 Bug 18854: Protect few other occurrences of offset
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2017-07-14 12:02:04 -03:00
285dd88356 Bug 18376: Do not need to prepare a single statement, use do
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2017-05-19 09:53:14 -04:00
6a82ff4b89 Bug 18376 - authority framework creation fails under Plack
With plack, when creating a new authority framework from another, you get the error :
Can't call method "prepare" on an undefined value at (...)/src/admin/auth_tag_structure.pl line 267.

Looks like plack does not like when the var $dbh from the script is called inside a sub.

This patch adds a local var $dbh inside sub duplicate_auth_framework(), like in sub StringSearch().

Also correctes a redefine of my $sth.

Test plan:
- Go to Administration > Authority types
- Create a new type
- On this new type click on Actions > MARC Structure
- Select another type and click OK
=> You must get a table filled with the tag structure
Check with and without plack
You may not be able to reproduce the error with plack.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2017-05-19 09:53:14 -04:00
e6e09c540f Bug 15803: Koha::AuthorisedValues - Remove C4::Koha::GetAuthorisedValueCategories
The subroutine C4::Koha::GetAuthorisedValueCategories just retrieves all
the authorised value categories.
We already have a method in the Koha::AuthorisedValues module to do this
job, let's use it!

Technical explanations:
The new subroutine of the AuthorisedValues TT plugin will allow to get
the authorised value categories from the templates.
The new html_helpers include file will get rid of the if selected else
end statements. Bug 15758 already uses this file, see the commit
description for more informations.

Test plan:
1/ Create or edit a new fund (aqbudgets.pl), the fields "statistic 1"
and "statistic 2" should be correctly filled with the list of authorised
value categories
2/ Edit subfields for a biblio and authority framework.
The "Authorized value" dropdown list should be correctly filled on both
pages
3/ Create new items search fields (from the administration area), same
as previously, the authorised value category dropdown list should be
correctly filled
4/ Add and edit patron attribute types, check the authorised value
category list.

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-10-28 16:35:52 +00:00
7283069a9d Bug 15381: Remove getauthtypes and getauthtype
These 2 subroutines are now not necessary anymore, we can use
Koha::Authority::Types to retrieve the authority types.

This patch won't be easy to test. Indeed, a lot of file are updated.
To test it I would suggest to focus on the merge authority

You should also confirm that the authtypecode and the authtypetext
values are correctly displayed when navigating in the authority module.

Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
2015-12-31 18:59:02 +00: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
Bernardo Gonzalez Kriegel
2326f1c5f1 Bug 12612: Remove CGI::scrolling_list from auth_tag_structure.pl
This patch removes the only instance in this file.

Don't know if the feature is of some utility, seems
that does not work (no use of auth values as indicators
on MARC authority editor)

To test:
1. Apply the patch
2. Go to Administration > Authority types
3. Clic on MARC structure of any fw
4. Clic Edit on any tag
5. On tag editor check the pulldown 'Authorised value', that was replaced
6. Check for regressions: select a value, save, verify the value, change
again, etc.

Note: removed a SELECT, using now C4::Koha::GetAuthorisedValueCategories

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as expected, no regressions found.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-07-29 11:31:09 -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
5ee8268a8d Bug 11767 - Use validation plugin when creating new authority framework tag
The page for adding a new tag to an authority framework includes some
custom form validation JavaScript which can be removed in favor of HTML5
validation attributes and Koha's built-in validation plugin. This patch
does so.

The patch also moves some tag markup out of the script and into the
template where it belongs.

To test, apply the patch and go to Administration -> Authority types ->
MARC structure -> New tag. Try submitting the form without entering a
tag number. This should trigger a validation warning.

Submission of the form with valid data should work correctly. Editing an
existing tag should also work correctly.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-02-19 15:51:12 +00:00
Galen Charlton
ce9f504c79 Bug 10038: (follow-up) fix tabs
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-18 04:47:12 +00:00
Jonathan Druart
b04118df82 Bug 10038: fix doubled 'default' entry when creating a new authority type
Test plan:
- Create a new authority type
- Click MARC structure
- Verify the pull down has only 1 entry for Default
- Go on the authority type home (admin/authtypes.pl)
- Click on the "MARC structure" link for the default type
- Verify the pull down has only 1 entry for Default

This patch adds a sort (on the authtypecode) for these 2 lists.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Comment: Works as described. No koha-qa errors.

When creating a new framework it would be better to have Default
on top, but one is way better than two :)

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Agreed, one is better than two :)
All tests and QA script pass.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-18 04:43:28 +00: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
Colin Campbell
df6ba9bc5f Bug 5453: Move declarations out of conditionals
Patch admin/*.pl scripts

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-07-15 15:50:20 +12:00
Frère Sébastien Marie
55af15be84 Use placeholders in sql
Signed-off-by: Frère Sébastien Marie <semarie-koha@latrappe.fr>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-02-28 08:41:38 +13:00
Christopher Hall
f03000f50f Bug 5462: modified intranet scripts to match templates
Signed-off-by: Colin Campbell <colin.campbell@ptfs-europe.com>
2011-02-03 09:57:24 +00:00
Stéphane Delaune
fbfe0276a0 (MT #1654) followup : Adding jquery.tablesorter and jquery.tablesorter.pager support for auth_tag_structure.pl 2010-12-21 21:18:12 +13:00
Donovan Jones
bce3e2e619 Bug 2505 - Add commented use warnings where missing in the admin/ directory 2010-04-21 20:20:11 +12: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
Garry Collum
f18df06e5d Bug 2889: Removed toggle variable from auth_tag_structure.pl and auth_subfields_structure.pl
Removed toggle variable from auth_tag_structure.pl and .tmpl.  Used template __odd__ in auth_tag_structure.tmpl.

Removed toggle variable from auth_subfields_structure.pl and .tmpl. Use __odd__. Removed a type in the highlight class definition. Fixed a minor xhtml error.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-06-12 10:47:52 -05:00
Galen Charlton
11916ad734 followup - restore correct conditional
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-06-12 10:46:11 -05:00
Joe Atzberger
f4ec623939 Cleanup - admin scripts
Fixed useless redirect statements that weren't even printed.
Removed unused javascript and script variables;
Removed sth->finish.  Use get instead of post on "cancel" button (no data to post).
Reduce duplicative variables (e.g. scriptname and script_name).

Many other problems are still in the scripts, including use of META-REFRESH instead of
redirect, and the whole idea of redirecting back to the same page for no valid reason.
We should be able to formulate the right response on THIS pass, not ask the browser to start over.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-06-12 09:58:07 -05:00
Paul Poulain
6cc99a3f1c fix for #918
In authorities, you can create frameworks like for biblio.
But in these it's impossible to delete useless fields, because when you click on
delete button, you go back to the default framework.
SO if you confirm your deletion, it delete your field in the default framework
and so in all the framwork (I think...).

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-04-18 14:58:58 -05:00
Nahuel ANGELINETTI
cfa2143b28 (bug #2917) editing authority marc field structure doesn't workl
This patch add a field in the ->execute() statement which was missing.
The sql request have 8 args, and only 7 was passed.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-03-04 10:50:58 -06:00
Henri-Damien LAURENT
8b9a04269a Bug Fix : Creating a new authority type would fail on creating subfield_structure
removing "link" field which has been removed from table auth_subfield_structure
Removing a $dbh->disconnect

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-05-29 07:16:53 -05:00
Paul POULAIN
8b4072a007 #1546 REPLACE statements (continued)
- biblio framework
- marc tag
- auth tag

Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2007-11-20 16:06:26 -06:00
Paul POULAIN
04f1f36a77 small fix for a variable out of scope
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2007-11-08 17:52:47 -06:00
Paul POULAIN
5b4d5b6a0e #1546 REPLACE statements (continued)
- biblio framework
- marc tag
- auth tag

Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2007-11-08 17:50:12 -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
f35745d40e Formatting admin entry forms, improving breadcrumb navigation.
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2007-10-18 16:25:47 -05:00
a453c16632 Finishing cleanup of Admin templates: - Corrected markup generated by scripts. - Added standard or custom resident search form on all pages. - Add breadcrumb navigation to all pages
Signed-off-by: Chris Cormack <crc@liblime.com>
2007-09-14 17:47:17 -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
2ffd5b7228 rel_3_0 moved to HEAD 2007-03-09 14:28:54 +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
tgarip1957
fe631a8205 Authority tables are modified to be compatible with new MARC frameworks. This change is part of Authority Linking & Zebra authorities. Requires change in Mysql database. It will break head unless all changes regarding this is implemented. This warning will take place on all commits regarding this 2006-05-19 17:58:40 +00:00
hdl
b810e2d71e changing parameters template directory to admin 2006-02-24 11:15:01 +00:00
tipaul
93ff09d081 merging 2.2 branch with head. Sorry for not making it before, many many commits done here 2005-03-01 13:40:35 +00:00
tipaul
5cf0a788a1 MARC authority management (continued) 2004-06-10 08:58:34 +00:00
tipaul
a9f96d62d6 MARC authorities management (1st draft) 2004-05-28 08:23:03 +00:00