@@ -, +, @@ - Fixing merge conflicts - adding String::Similariry to list of dependencies - font-awesome icons and adding consistency to formatting - removing original use of onclick - moving help text out of main page and into a new help file install libstring-similarity-perl) --- C4/Installer/PerlDependencies.pm | 5 + help.pl | 5 + .../intranet-tmpl/prog/en/includes/admin-menu.inc | 1 + .../prog/en/modules/admin/marc-permissions.tt | 227 +++------------------ .../prog/en/modules/help/admin/marc-permissions.tt | 148 ++++++++++++++ 5 files changed, 187 insertions(+), 199 deletions(-) create mode 100644 koha-tmpl/intranet-tmpl/prog/en/modules/help/admin/marc-permissions.tt --- a/C4/Installer/PerlDependencies.pm +++ a/C4/Installer/PerlDependencies.pm @@ -847,6 +847,11 @@ our $PERL_DEPS = { required => 1, min_ver => '0.058', }, + 'String::Similarity' => { + usage => 'cataloguing', + required => 1, + min_version => '1.04', + }, }; 1; --- a/help.pl +++ a/help.pl @@ -24,6 +24,7 @@ use C4::Output; # use C4::Auth; use C4::Context; use CGI qw ( -utf8 ); +use C4::Biblio; sub _help_template_file_of_url { my $url = shift; @@ -75,4 +76,8 @@ if ( $help_version =~ m|^(\d+)\.(\d{2}).*$| ) { } $template->param( helpVersion => $help_version ); +my $rules = GetMarcPermissionsRules(); +my $modules = GetMarcPermissionsModules(); +$template->param( rules => $rules, modules => $modules ); + output_html_with_http_headers $query, "", $template->output; --- a/koha-tmpl/intranet-tmpl/prog/en/includes/admin-menu.inc +++ a/koha-tmpl/intranet-tmpl/prog/en/includes/admin-menu.inc @@ -47,6 +47,7 @@
Rules are evaluated from least specific to most specific. This means that a more specific rule will override a less specific rule. * is less specific than a regular expression. A regular expression is less specific than a normal field name (e.g. 245). A Subfield tag is more specific than a Tag.
+To add a field-specific rule (i.e. not a subfield), leave the Subfield tag field blank.
+ +Default action when no rules exist is to replace the old record with the new record. Same as if MARCPermissions is disabled.
+Default action when no matching rule is found is to leave a field unchanged (skip). If you wish to changed the default actions for fields and subfields, please add wildcard rules.
+ +* can be used as a wildcard for Tag, Subfield tag and Filter. * is considered less specific than a non wildcard value, and thus will be overridden by a non wildcard value (e.g. "100", "a", etc).
+ +Regular expressions can be used in both the Tag and Subfield tag fields. Beware though, using regular expressions may create overlapping matches, in which case they will be applied in a sorted order.
+ +Following is an example rule set in order of specificity.
+ +Tag | +Subfield tag | +Module | +Filter | +Description | +
---|---|---|---|---|
* | ++ | [% modules.0.name %] | +* | +Match any field regardless of [% modules.0.name %] | +
* | +* | +[% modules.0.name %] | +* | +Match any subfield regardless of [% modules.0.name %] | +
245 | +* | +[% modules.0.name %] | +z39.50 | +Match any subfield under 245 when [% modules.0.name %] is z39.50 | +
* | +b | +[% modules.0.name %] | +z39.50 | +Match subfield b regardless of field when [% modules.0.name %] is z39.50 | +
500 | +[a-d] | +[% modules.0.name %] | +z39.50 | +Match subfields a, b, c, d when field is 500 and [% modules.0.name %] is z39.50 | +
5.. | +a | +[% modules.0.name %] | +z39.50 | +Match subfield a when field matches the regular expression 5.. (500-599) and [% modules.0.name %] is z39.50 | +
245 | +a | +[% modules.0.name %] | +z39.50 | +Match subfield a when field is 500 and [% modules.0.name %] is z39.50 | +
Filters cannot be regular expressions. Please use a single * as a wildcard if need.
+ +Specificity | +Module | +Description | +
---|---|---|
[% module.specificity %] | +[% module.name %] | +[% module.description %] | +
The following sources currently implement MARCPermissions.
+ +Name | +Description | +
---|---|
bulkmarcimport | +bin/migration_tools/bulkmarcimport.pl | +
import_lexile | +bin/migration_tools/import_lexile.pl | +
z39.50 | +Import from Z39.50 search in browser | +
intranet | +Modifications from intranet in browser | +
batchmod | +Batch record modification in browser | +
Indicators can be addressed as i1 and i2 in the Subfield tag field. Some actions might not be available for indicators, in which case they will be disabled.
+ +If MARCPermissionsLog is enabled, log entries for each record modification will be available in the Modification log in the Catalog module under the Modify action. This can be very helpful when debugging rule sets.
+The administration area is where you set all of your preferences for the system. Preference are broken down into several categories, detailed below.
+ +See the full documentation for Koha in the manual (online).
+ +[% INCLUDE 'help-bottom.inc' %] --