From 1caccbf1ca3dea832412d2ad7cc702727e28a79d Mon Sep 17 00:00:00 2001 From: tipaul Date: Fri, 28 May 2004 08:33:41 +0000 Subject: [PATCH] hidding hidden & isurl constraints into MARC subfield structure --- MARCdetail.pl | 14 +- .../parameters/auth_subfields_structure.tmpl | 134 +++++++++++++ .../en/parameters/auth_tag_structure.tmpl | 179 ++++++++++++++++++ .../default/en/parameters/authtypes.tmpl | 149 +++++++++++++++ 4 files changed, 473 insertions(+), 3 deletions(-) create mode 100644 koha-tmpl/intranet-tmpl/default/en/parameters/auth_subfields_structure.tmpl create mode 100644 koha-tmpl/intranet-tmpl/default/en/parameters/auth_tag_structure.tmpl create mode 100644 koha-tmpl/intranet-tmpl/default/en/parameters/authtypes.tmpl diff --git a/MARCdetail.pl b/MARCdetail.pl index 01984bbc37..ecb94d0cc1 100755 --- a/MARCdetail.pl +++ b/MARCdetail.pl @@ -66,7 +66,9 @@ my $biblionumber=$query->param('bib'); my $bibid = $query->param('bibid'); $bibid = &MARCfind_MARCbibid_from_oldbiblionumber($dbh,$biblionumber) unless $bibid; $biblionumber = &MARCfind_oldbiblionumber_from_MARCbibid($dbh,$bibid) unless $biblionumber; -my $tagslib = &MARCgettagslib($dbh,1); +my $itemtype = &MARCfind_itemtype($dbh,$bibid); +warn "IT : $itemtype"; +my $tagslib = &MARCgettagslib($dbh,1,$itemtype); my $record =MARCgetbiblio($dbh,$bibid); # open template @@ -91,7 +93,8 @@ for (my $tabloop = 0; $tabloop<=10;$tabloop++) { my @subfields_data; # if tag <10, there's no subfield, use the "@" trick if ($field->tag()<10) { - next if ($tagslib->{$field->tag()}->{'@'}->{tab} ne $tabloop); + next if ($tagslib->{$field->tag()}->{'@'}->{tab} ne $tabloop); + next if ($tagslib->{$field->tag()}->{'@'}->{hidden}); my %subfield_data; $subfield_data{marc_lib}=$tagslib->{$field->tag()}->{'@'}->{lib}; $subfield_data{marc_value}=$field->data(); @@ -104,9 +107,14 @@ for (my $tabloop = 0; $tabloop<=10;$tabloop++) { for my $i (0..$#subf) { $subf[$i][0] = "@" unless $subf[$i][0]; next if ($tagslib->{$field->tag()}->{$subf[$i][0]}->{tab} ne $tabloop); + next if ($tagslib->{$field->tag()}->{$subf[$i][0]}->{hidden}); my %subfield_data; $subfield_data{marc_lib}=$tagslib->{$field->tag()}->{$subf[$i][0]}->{lib}; - $subfield_data{marc_value}=$subf[$i][1]; + if ($tagslib->{$field->tag()}->{$subf[$i][0]}->{isurl}) { + $subfield_data{marc_value}="$subf[$i][1]"; + } else { + $subfield_data{marc_value}=$subf[$i][1]; + } $subfield_data{marc_subfield}=$subf[$i][0]; $subfield_data{marc_tag}=$field->tag(); push(@subfields_data, \%subfield_data); diff --git a/koha-tmpl/intranet-tmpl/default/en/parameters/auth_subfields_structure.tmpl b/koha-tmpl/intranet-tmpl/default/en/parameters/auth_subfields_structure.tmpl new file mode 100644 index 0000000000..3648fac123 --- /dev/null +++ b/koha-tmpl/intranet-tmpl/default/en/parameters/auth_subfields_structure.tmpl @@ -0,0 +1,134 @@ + + +
+ + +

+ + Edit subfields + +

+
+ + "> + + + + + + + + + +
FieldConstraints
+

-

+

" size=40 maxlength=80>

+

" size=40 maxlength=80>

+
+

+

+

+

" size=20 maxlength=80>

+

+

+ +

Note: in the last column, you can choose: +

  • An "authorised value": it refers to a list of authorised values for this subfield. See the corresponding admin table.
  • +
  • A "value builder": values builders are perl programs that help you select the value of the field. They are MARC-flavor dependant and sometimes fill another subfield automatically.
  • +
+

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + Data deleted + + "> + + + + + + +

Authority MARC subfield structure admin for tag (framework )(default framework)

+

This screen shows the subfields associated with the selected tag. You can edit subfields or add a new one by clicking on edit.

+ +
Subfield
 
CONFIRM DELETION
+ + + +
+ "> + +
+
+ + + + + + + + + + + + + + + + + + + + + + + +
SubfieldLibRep?Mand ?Tab ?See also?Auth value?Val build?Delete
YesNoYesNo + "> + /images/edittrash.png" width=32 hspace=0 vspace=0 border=0> + +
+ + /images/fileopen.png" width=32 hspace=0 vspace=0 border=0> + +"> + /images/2uparrow.png" width=32 hspace=0 vspace=0 border=0> + + + /images/1leftarrow.png" title="previous" ALT="previous" BORDER=0 > + + + + /images/1rightarrow.png" title="next" ALT="next" BORDER=0> + + + + +
+ + diff --git a/koha-tmpl/intranet-tmpl/default/en/parameters/auth_tag_structure.tmpl b/koha-tmpl/intranet-tmpl/default/en/parameters/auth_tag_structure.tmpl new file mode 100644 index 0000000000..a460f02d0b --- /dev/null +++ b/koha-tmpl/intranet-tmpl/default/en/parameters/auth_tag_structure.tmpl @@ -0,0 +1,179 @@ + + +
+

Authority marc framework for default framework

+ + + + +

+ + Modify tag + Add tag + +

+
+ + "> +

+

+

+

+

+

(if you select a value here, the indicators will be limited to the authorised value list)

+

+
+ + + + + + + + + + + + + + + + + + + + + + + Data deleted + + + + + + + + + "> + Create authority framework for using + + + + + + + +
+

Select an authority framework

+
+ + "> + + +
+
+
tag
 
CONFIRM DELETION
+ + + + + + + + + + + + + + + + + + + + + +
TagLibRepeatableMandatoryAuthorised
value
SubfieldsEditDelete
YesNoYesNo" class="button">subfields">//images/fileopen.png" width=32 hspace=0 vspace=0 border=0>">//images/edittrash.png" width=32 hspace=0 vspace=0 border=0>
+
+ + "> + + + + ?offset=&searchfield="> + //images/1leftarrow.png" title="previous" ALT="previous" BORDER=0> + + + + ?offset=&searchfield="> + //images/1rightarrow.png" title="next" ALT="next" BORDER=0> + + +
+
+ + + diff --git a/koha-tmpl/intranet-tmpl/default/en/parameters/authtypes.tmpl b/koha-tmpl/intranet-tmpl/default/en/parameters/authtypes.tmpl new file mode 100644 index 0000000000..ad3c1807ff --- /dev/null +++ b/koha-tmpl/intranet-tmpl/default/en/parameters/authtypes.tmpl @@ -0,0 +1,149 @@ + + + +
+ + +

Modify authority type

+ +

Add authority type

+ +
+ + + +

+ +

+ +

+ + +

+

+ "> + Enter here the number of the tag that will be reported in the biblio (subfield by subfield). For example, in UNIMARC, enter 200 to report every 200 subfield in the 70x biblio

+

+

+ +

+
+ + + +

+
+ +

+ +

+ This record is used times. Deletion not possible +

+

+

+
+

+ +

CONFIRM DELETION

+

+ +

+

+ + + + + +

Auth type Admin

+

Define authority types, then authority MARC structure in the same way you define itemtypes & biblio MARC tag structure. Authority values are managed through plugins

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
CodeDescriptionTag reported EditDelete
 Default framework MARC structure  
" class="button parameters" >MARC structure?op=add_form&authtypecode=">/images/fileopen.png" width=32 hspace=0 vspace=0 border=0>?op=delete_confirm&authtypecode=">/images/edittrash.png" width=32 hspace=0 vspace=0 border=0>
+
+ + + //images/1leftarrow.png" title="previous" ALT="previous" BORDER=0> + //images/1rightarrow.png" title="next" ALT="next" BORDER=0> +
+
+ + -- 2.39.5