hidding hidden & isurl constraints into MARC subfield structure
This commit is contained in:
parent
f2d64b92e1
commit
1caccbf1ca
4 changed files with 473 additions and 3 deletions
|
@ -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}="<a href=\"$subf[$i][1]\">$subf[$i][1]</a>";
|
||||
} 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);
|
||||
|
|
|
@ -0,0 +1,134 @@
|
|||
<!-- TMPL_INCLUDE NAME="parameters-top.inc" -->
|
||||
|
||||
<div id="mainbloc">
|
||||
<!-- TMPL_IF name="add_form" -->
|
||||
<!---------------------------------------------------------------------------->
|
||||
<H1>
|
||||
<!-- TMPL_IF NAME="use-heading-flags-p" -->
|
||||
<!-- TMPL_IF NAME="heading-edit-subfields-p" -->Edit subfields<!-- /TMPL_IF -->
|
||||
<!-- TMPL_ELSE --><!-- TMPL_VAR name="action" --><!-- /TMPL_IF -->
|
||||
</H1>
|
||||
<form action='<!-- TMPL_VAR name="script_name" -->' name=Aform method=post>
|
||||
<input type=hidden name=op value='add_validate'>
|
||||
<input type="hidden" name="authtypecode" value="<!-- TMPL_VAR name="authtypecode" -->">
|
||||
<table>
|
||||
<tr><th>Field</th>
|
||||
<th colspan=2>Constraints</th>
|
||||
</tr>
|
||||
<!-- TMPL_LOOP name="loop" -->
|
||||
<tr bgcolor='<!-- TMPL_VAR name="bgcolor" -->'>
|
||||
<td>
|
||||
<p><!-- TMPL_VAR name="tagfield" --> - <!-- TMPL_VAR name="tagsubfield" --></p>
|
||||
<p><input type=text name="liblibrarian" value="<!-- TMPL_VAR name="liblibrarian" -->" size=40 maxlength=80></p>
|
||||
<p><input type=text name="libopac" value="<!-- TMPL_VAR name="libopac" -->" size=40 maxlength=80></p>
|
||||
</td>
|
||||
<td>
|
||||
<p><label>Appears in tab:</label> <!-- TMPL_VAR name="tab" --></p>
|
||||
<p><label>Repeatable:</label> <!-- TMPL_VAR name="repeatable" --></p>
|
||||
<p><label>Mandatory:</label><!-- TMPL_VAR name="mandatory" --></p>
|
||||
<p><label>See also:</label> <input type="text" name="seealso" value="<!-- TMPL_VAR name="seealso" -->" size=20 maxlength=80></p>
|
||||
<p><label>Auth value:</label> <!-- TMPL_VAR name="authorised_value" --></p>
|
||||
<p><label>plugin:</label> <!-- TMPL_VAR name="value_builder" --></td>
|
||||
<!-- /TMPL_LOOP -->
|
||||
</table>
|
||||
<INPUT type=submit value='OK' class="button parameters">
|
||||
<p>Note: in the last column, you can choose:
|
||||
<ul><li>An "authorised value": it refers to a list of authorised values for this subfield. See the corresponding admin table.</li>
|
||||
<li>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.</li>
|
||||
</ul>
|
||||
</p>
|
||||
</form>
|
||||
<!-- /TMPL_IF -->
|
||||
|
||||
<!-- TMPL_IF name="delete_confirm" -->
|
||||
<!---------------------------------------------------------------------------->
|
||||
<table>
|
||||
<tr>
|
||||
<td background="<!-- TMPL_VAR NAME='themelang' -->/images/background-mem.gif"><b>Subfield</b></td>
|
||||
<td background="<!-- TMPL_VAR NAME='themelang' -->/images/background-mem.gif"><b><!-- TMPL_VAR name="tagsubfield" --></b></td>
|
||||
</tr>
|
||||
<tr><td> </td><td><!-- TMPL_VAR name="liblibrarian" --></td></tr>
|
||||
<form action='<!-- TMPL_VAR name="delete_link" -->' method=post>
|
||||
<input type=hidden name=op value=delete_confirmed>
|
||||
<input type=hidden name=searchfield value='<!-- TMPL_VAR name="searchfield" -->'>
|
||||
<input type=hidden name=tagfield value='<!-- TMPL_VAR name="tagfield" -->'>
|
||||
<input type=hidden name=tagsubfield value='<!-- TMPL_VAR name="tagsubfield" -->'>
|
||||
<tr>
|
||||
<td colspan=2 align=center>CONFIRM DELETION</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<INPUT type=submit value='YES'>
|
||||
</form>
|
||||
</td>
|
||||
<td>
|
||||
<form action='<!-- TMPL_VAR name="script_name" -->' method=post>
|
||||
<input type="hidden" name="tagfield" value="<!-- TMPL_VAR name="tagfield" -->">
|
||||
<input type=submit value=NO>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
<!-- /TMPL_IF -->
|
||||
|
||||
<!-- TMPL_IF name="delete_confirmed" -->
|
||||
<!---------------------------------------------------------------------------->
|
||||
Data deleted
|
||||
<form action='<!-- TMPL_VAR name="script_name" -->' method=post>
|
||||
<input type="hidden" name="tagfield" value="<!-- TMPL_VAR name="tagfield" -->">
|
||||
<input type=submit value=OK>
|
||||
</form>
|
||||
<!-- /TMPL_IF -->
|
||||
|
||||
<!---------------------------------------------------------------------------->
|
||||
<!-- TMPL_IF name="else" -->
|
||||
<h1>Authority MARC subfield structure admin for tag <!-- TMPL_VAR name="tagfield" --> <!-- TMPL_IF name="authtypecode" -->(framework <!--TMPL_VAR name="authtypecode" -->)<!-- TMPL_ELSE -->(default framework)<!-- /TMPL_IF --></h1>
|
||||
<p>This screen shows the subfields associated with the selected tag. You can edit subfields or add a new one by clicking on edit. </p>
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<th>Subfield</th>
|
||||
<th>Lib</th>
|
||||
<th>Rep<span style="font-size:8;color:red" title="subfield may be repeated (1=yes, 0=no)">?</span></th>
|
||||
<th>Mand <span style="font-size:8;color:red" title="subfield is mandatory (1=yes, 0=no)">?</span></th>
|
||||
<th>Tab <span style="font-size:8;color:red" title="subfield is shown in which tab (0-9 or item)">?</span></th>
|
||||
<th>See also<span style="font-size:8;color:red" title="if subfields entered here, searches on this field will also be done on seealso subfields (syntax 200a,300e)">?</span></th>
|
||||
<th>Auth value<span style="font-size:8;color:red" title="values authorised for this subfield">?</span></th>
|
||||
<th>Val build<span style="font-size:8;color:red" title="Value builder">?</span></th>
|
||||
<th>Delete</th>
|
||||
<!-- TMPL_LOOP name="loop" -->
|
||||
<tr bgcolor='<!-- TMPL_VAR name="bgcolor" -->'>
|
||||
<td><!-- TMPL_VAR name="tagsubfield" --></td>
|
||||
<td><!-- TMPL_VAR name="liblibrarian" --></td>
|
||||
<td><!-- TMPL_IF name="repeatable" -->Yes<!-- TMPL_ELSE -->No<!-- /TMPL_IF --></td>
|
||||
<td><!-- TMPL_IF name="mandatory" -->Yes<!-- TMPL_ELSE -->No<!-- /TMPL_IF --></td>
|
||||
<td><!-- TMPL_VAR name="tab" --></td>
|
||||
<td><!-- TMPL_VAR name="seealso" --></td>
|
||||
<td><!-- TMPL_VAR name="authorised_value" --></td>
|
||||
<td><!-- TMPL_VAR name="value_builder" --></td>
|
||||
<td>
|
||||
<a href="<!-- TMPL_VAR name="delete" -->">
|
||||
<img src="<!-- TMPL_VAR NAME='interface' -->/<!-- TMPL_VAR name="theme" -->/images/edittrash.png" width=32 hspace=0 vspace=0 border=0>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
<!-- /TMPL_LOOP -->
|
||||
</table>
|
||||
<!-- TMPL_VAR name="edit" -->
|
||||
<img src="<!-- TMPL_VAR NAME='interface' -->/<!-- TMPL_VAR name="theme" -->/images/fileopen.png" width=32 hspace=0 vspace=0 border=0>
|
||||
</a>
|
||||
<a href="marctagstructure.pl?searchfield=<!-- TMPL_VAR name="tagfield" -->">
|
||||
<img src="<!-- TMPL_VAR NAME='interface' -->/<!-- TMPL_VAR name="theme" -->/images/2uparrow.png" width=32 hspace=0 vspace=0 border=0>
|
||||
</a>
|
||||
<!-- TMPL_IF name="previous" -->
|
||||
<input type=image src="<!-- TMPL_VAR NAME='interface' -->/<!-- TMPL_VAR name="theme" -->/images/1leftarrow.png" title="previous" ALT="previous" BORDER=0 >
|
||||
</a><!-- /TMPL_IF -->
|
||||
<!-- TMPL_IF name="next" -->
|
||||
<!-- TMPL_VAR name="next" -->
|
||||
<input type=image src="<!-- TMPL_VAR NAME='interface' -->/<!-- TMPL_VAR name="theme" -->/images/1rightarrow.png" title="next" ALT="next" BORDER=0>
|
||||
</a>
|
||||
<!-- /TMPL_IF -->
|
||||
<!-- /TMPL_IF -->
|
||||
|
||||
</div>
|
||||
|
||||
<!-- TMPL_INCLUDE NAME="parameters-bottom.inc" -->
|
|
@ -0,0 +1,179 @@
|
|||
<!-- TMPL_INCLUDE NAME="parameters-top.inc" -->
|
||||
|
||||
<div id="mainbloc">
|
||||
<h1 class="parameters">Authority marc framework for <!-- TMPL_IF name="authtypecode" --><!-- TMPL_VAR name="authtypecode" --><!-- TMPL_ELSE -->default framework<!-- /TMPL_IF --></h1>
|
||||
<script>
|
||||
function _(s) { return s } // dummy function for gettext
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
function isNotNull(f,noalert) {
|
||||
if (f.value.length ==0) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
function toUC(f) {
|
||||
var x=f.value.toUpperCase();
|
||||
f.value=x;
|
||||
return true;
|
||||
}
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
function isNum(v,maybenull) {
|
||||
var n = new Number(v.value);
|
||||
if (isNaN(n)) {
|
||||
return false;
|
||||
}
|
||||
if (maybenull==0 && v.value=='') {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
function isDate(f) {
|
||||
var t = Date.parse(f.value);
|
||||
if (isNaN(t)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
function Check(f) {
|
||||
var ok=1;
|
||||
var _alertString="";
|
||||
var alertString2;
|
||||
if (f.tagfield.value.length==0) {
|
||||
_alertString += "\n- " + _("tag number missing");
|
||||
}
|
||||
if (_alertString.length==0) {
|
||||
document.Aform.submit();
|
||||
} else {
|
||||
alertString2 = _("Form not submitted because of the following problem(s)");
|
||||
alertString2 += "\n------------------------------------------------------------------------------------\n";
|
||||
alertString2 += _alertString;
|
||||
alert(alertString2);
|
||||
}
|
||||
}
|
||||
</SCRIPT>
|
||||
|
||||
<!-- TMPL_IF name="add_form" -->
|
||||
<!---------------------------------------------------------------------------->
|
||||
<h1 class="parameters">
|
||||
<!-- TMPL_IF NAME="use-heading-flags-p" -->
|
||||
<!-- TMPL_IF NAME="heading-modify-tag-p" -->Modify tag<!-- /TMPL_IF -->
|
||||
<!-- TMPL_IF NAME="heading-add-tag-p" -->Add tag<!-- /TMPL_IF -->
|
||||
<!-- TMPL_ELSE --><!-- TMPL_VAR name="action" --><!-- /TMPL_IF -->
|
||||
</h1>
|
||||
<form action='<!-- TMPL_VAR name="script_name" -->' name="Aform" method="post">
|
||||
<input type=hidden name=op value='add_validate'>
|
||||
<input type="hidden" name="authtypecode" value="<!-- TMPL_VAR name="authtypecode" -->">
|
||||
<p><label>Tag<label><!-- TMPL_VAR name="searchfield" --></p>
|
||||
<p><label>Text for librarians</label><input type="text" name="liblibrarian" value='<!-- TMPL_VAR name="liblibrarian" escape=HTML -->' size=80 maxlength=100></p>
|
||||
<p><label>Text for opac</label><input type="text" name="libopac" value='<!-- TMPL_VAR name="libopac" escape=HTML -->' size=80 maxlength=100></p>
|
||||
<p><label>Repeatable</label><!-- TMPL_VAR name="repeatable" --></p>
|
||||
<p><label>Mandatory</label><!-- TMPL_VAR name="mandatory" --></p>
|
||||
<p><label>Authorised value</label><!-- TMPL_VAR name="authorised_value" --> (if you select a value here, the indicators will be limited to the authorised value list)</p>
|
||||
<p><label> </label><input type="button" value='OK' class="button" onClick='Check(this.form)'></p>
|
||||
</form>
|
||||
<!-- /TMPL_IF -->
|
||||
|
||||
|
||||
<!-- TMPL_IF name="delete_confirm" -->
|
||||
<!---------------------------------------------------------------------------->
|
||||
<table>
|
||||
<tr>
|
||||
<td>tag</td>
|
||||
<td><!-- TMPL_VAR name="searchfield" --></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td><td><!-- TMPL_VAR name="liblibrarian" --></td>
|
||||
</tr>
|
||||
<form action='<!-- TMPL_VAR name="script_name" -->' method=post>
|
||||
<input type=hidden name=op value=delete_confirmed>
|
||||
<input type=hidden name=searchfield value='<!-- TMPL_VAR name="searchfield" -->'>
|
||||
<tr><td colspan=2 align=center>CONFIRM DELETION</td></tr>
|
||||
<tr><td><INPUT type=submit value='YES'></form></td><td><form action='<!-- TMPL_VAR name="script_name" -->' method=post><input type=submit value=NO></form></td></tr>
|
||||
<!-- /TMPL_IF -->
|
||||
|
||||
<!-- TMPL_IF name="delete_confirmed" -->
|
||||
<!---------------------------------------------------------------------------->
|
||||
Data deleted
|
||||
<form action='<!-- TMPL_VAR name="script_name" -->' method=post>
|
||||
<input type=submit value=OK>
|
||||
</form>
|
||||
<!-- /TMPL_IF -->
|
||||
<!-- TMPL_IF name="authtype_create" -->
|
||||
<!---------------------------------------------------------------------------->
|
||||
<form action='<!-- TMPL_VAR name="script_name" -->' method=post>
|
||||
<input type="hidden" name="op" value="authtype_create_confirm">
|
||||
<input type="hidden" name="authtypecode" value="<!-- TMPL_VAR name="authtypecode" -->">
|
||||
Create authority framework for <!-- TMPL_VAR name="authtypecode" --> using
|
||||
<select name="existingauthtypecode">
|
||||
<option value="">Default</option>
|
||||
<!-- TMPL_LOOP name="existingauthtypeloop" -->
|
||||
<option value="<!-- TMPL_VAR name="value" -->"><!-- TMPL_VAR name="authtypetext" --></option>
|
||||
<!-- /TMPL_LOOP -->
|
||||
</select>
|
||||
<input type=submit value="OK" class="button">
|
||||
</form>
|
||||
<!-- /TMPL_IF -->
|
||||
|
||||
<!---------------------------------------------------------------------------->
|
||||
<!-- TMPL_IF name="else" -->
|
||||
<div id="bloc25">
|
||||
<h2 class="parameters">Select an authority framework</h2>
|
||||
<form action='<!-- TMPL_VAR name="script_name" -->' method=post>
|
||||
<select name="authtypecode">
|
||||
<option value="">Default</option>
|
||||
<!-- TMPL_LOOP name="authtypeloop" -->
|
||||
<option value="<!-- TMPL_VAR name="value" -->" <!-- TMPL_IF name="selected" -->selected<!-- /TMPL_IF -->>
|
||||
<!-- TMPL_VAR name="authtypetext" -->
|
||||
</option>
|
||||
<!-- /TMPL_LOOP -->
|
||||
</select>
|
||||
<input type=text name=searchfield value="<!-- TMPL_VAR name="searchfield" -->">
|
||||
<input type="submit" value="OK" class="button">
|
||||
</form>
|
||||
</div>
|
||||
<div id="bloc100">
|
||||
<table>
|
||||
<tr>
|
||||
<th>Tag</th>
|
||||
<th>Lib</th>
|
||||
<th>Repeatable</th>
|
||||
<th>Mandatory</th>
|
||||
<th>Authorised<br />value</th>
|
||||
<th>Subfields</th>
|
||||
<th>Edit</th>
|
||||
<th>Delete</th>
|
||||
<!-- TMPL_LOOP name="loop" -->
|
||||
<tr valign=top bgcolor='<!-- TMPL_VAR name="bgcolor" -->'>
|
||||
<td><b><!-- TMPL_VAR name="tagfield" --></b></td>
|
||||
<td><!-- TMPL_VAR name="liblibrarian" --></td>
|
||||
<td><!-- TMPL_IF name="repeatable" -->Yes<!-- TMPL_ELSE -->No<!-- /TMPL_IF --></td>
|
||||
<td><!-- TMPL_IF name="mandatory" -->Yes<!-- TMPL_ELSE -->No<!-- /TMPL_IF --></td>
|
||||
<td><!-- TMPL_VAR name="authorised_value" --></td>
|
||||
<td><a href="<!-- TMPL_VAR name="subfield_link" -->" class="button">subfields</a></td>
|
||||
<td><a href="<!-- TMPL_VAR name="edit" -->"><img src="<!-- TMPL_VAR name="interface" -->/<!-- TMPL_VAR name="theme" -->/images/fileopen.png" width=32 hspace=0 vspace=0 border=0></a></td>
|
||||
<td><a href="<!-- TMPL_VAR name="delete" -->"><img src="<!-- TMPL_VAR name="interface" -->/<!-- TMPL_VAR name="theme" -->/images/edittrash.png" width=32 hspace=0 vspace=0 border=0></a></td>
|
||||
</tr>
|
||||
<!-- /TMPL_LOOP -->
|
||||
</table>
|
||||
<form action='<!-- TMPL_VAR name="script_name" -->' method=post>
|
||||
<input type=hidden name=op value=add_form>
|
||||
<input type="hidden" name="authtypecode" value="<!-- TMPL_VAR name="authtypecode" -->">
|
||||
<input type=hidden name=op value=add_form>
|
||||
<input type=submit class="button" value="Add Tag" title="Add Tag" alt="Add Tag" >
|
||||
<!-- TMPL_IF name="isprevpage" -->
|
||||
<a href="<!-- TMPL_VAR name="script_name" -->?offset=<!-- TMPL_VAR name="prevpage" -->&searchfield=<!-- TMPL_VAR name="searchfield" -->">
|
||||
<input type=image src="<!-- TMPL_VAR name="interface" -->/<!-- TMPL_VAR name="theme" -->/images/1leftarrow.png" title="previous" ALT="previous" BORDER=0>
|
||||
</a>
|
||||
<!-- /TMPL_IF -->
|
||||
<!-- TMPL_IF name="nextpage" -->
|
||||
<a href="<!-- TMPL_VAR name="script_name" -->?offset=<!-- TMPL_VAR name="nextpage" -->&searchfield=<!-- TMPL_VAR name="searchfield" -->">
|
||||
<input type=image src="<!-- TMPL_VAR name="interface" -->/<!-- TMPL_VAR name="theme" -->/images/1rightarrow.png" title="next" ALT="next" BORDER=0>
|
||||
</a>
|
||||
<!-- /TMPL_IF -->
|
||||
</form>
|
||||
</div>
|
||||
<!-- /TMPL_IF -->
|
||||
</div>
|
||||
<!-- TMPL_INCLUDE NAME="parameters-bottom.inc" -->
|
149
koha-tmpl/intranet-tmpl/default/en/parameters/authtypes.tmpl
Normal file
149
koha-tmpl/intranet-tmpl/default/en/parameters/authtypes.tmpl
Normal file
|
@ -0,0 +1,149 @@
|
|||
<!-- TMPL_INCLUDE NAME="parameters-top.inc" -->
|
||||
|
||||
<script>
|
||||
function _(s) { return s } // dummy function for gettext
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
function isNotNull(f,noalert) {
|
||||
if (f.value.length ==0) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
function toUC(f) {
|
||||
var x=f.value.toUpperCase();
|
||||
f.value=x;
|
||||
return true;
|
||||
}
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
function isNum(v,maybenull) {
|
||||
var n = new Number(v.value);
|
||||
if (isNaN(n)) {
|
||||
return false;
|
||||
}
|
||||
if (maybenull==0 && v.value=='') {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
function isDate(f) {
|
||||
var t = Date.parse(f.value);
|
||||
if (isNaN(t)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
function Check(f) {
|
||||
var ok=1;
|
||||
var _alertString="";
|
||||
var alertString2;
|
||||
if (f.authtypecode.value.length==0) {
|
||||
_alertString += "\n- " + _("Authority type : code missing");
|
||||
}
|
||||
if (!(isNotNull(window.document.Aform.authtypetext,1))) {
|
||||
_alertString += "\n- " + _("Description missing");
|
||||
}
|
||||
if (_alertString.length==0) {
|
||||
document.Aform.submit();
|
||||
} else {
|
||||
alertString2 = _("Form not submitted because of the following problem(s)");
|
||||
alertString2 += "\n------------------------------------------------------------------------------------\n";
|
||||
alertString2 += _alertString;
|
||||
alert(alertString2);
|
||||
}
|
||||
}
|
||||
</SCRIPT>
|
||||
<div id="mainbloc">
|
||||
<!-- TMPL_IF name="add_form" -->
|
||||
<!-- TMPL_IF name="authtypecode" -->
|
||||
<h1>Modify authority type</h1>
|
||||
<!-- TMPL_ELSE -->
|
||||
<h1>Add authority type</h1>
|
||||
<!-- /TMPL_IF -->
|
||||
<form action='<!-- TMPL_VAR name="script_name" -->' name=Aform method=post>
|
||||
<input type=hidden name=op value='add_validate'>
|
||||
<input type=hidden name=checked value=0>
|
||||
<!-- TMPL_IF name="authtypecode" -->
|
||||
<p><label class="label100">Authority type<label><input type=hidden name=authtypecode value=<!-- TMPL_VAR name="authtypecode" -->><!-- TMPL_VAR name="authtypecode" --></p>
|
||||
<!-- TMPL_ELSE -->
|
||||
<p><label class="label100">Authority type<label><input type=text name=authtypecode size=10 maxlength=10 onBlur="toUC(this)"></p>
|
||||
<!-- /TMPL_IF -->
|
||||
<p>
|
||||
<label class="label100">Description</label>
|
||||
<input type=text name="authtypetext" size=40 maxlength=80 value='<!-- TMPL_VAR name="authtypetext" escape=HTML -->'>
|
||||
</p>
|
||||
<p><label class="label100">Report tag</label>
|
||||
<input type="text" name="auth_tag_to_report" size=5 maxlength=3 value="<!-- TMPL_VAR name="auth_tag_to_report">">
|
||||
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</p>
|
||||
</p>
|
||||
<p>
|
||||
<INPUT type=button value='OK'class="button parameters" onClick='Check(this.form)'>
|
||||
</p>
|
||||
</form>
|
||||
<!-- /TMPL_IF -->
|
||||
|
||||
<!-- TMPL_IF name="delete_confirm" -->
|
||||
<p><label>Authority type</label><!-- TMPL_VAR name="authtypecode" --></p>
|
||||
<form action='<!-- TMPL_VAR name="script_name" -->' method=post>
|
||||
<input type=hidden name=op value=delete_confirmed><input type=hidden name=authtypecode value='<!-- TMPL_VAR name="authtypecode" -->'>
|
||||
<p><label>Description</label><!-- TMPL_VAR name="authtypetext" --></p>
|
||||
<!-- TMPL_IF name="total" -->
|
||||
<p>
|
||||
<b>This record is used <!-- TMPL_VAR name="total" --> times. Deletion not possible</b>
|
||||
</p>
|
||||
<p>
|
||||
</form>
|
||||
<form action='<!-- TMPL_VAR name="script_name" -->' method=post><input type=submit value="OK" class="button parameters"></form>
|
||||
</p>
|
||||
<!-- TMPL_ELSE -->
|
||||
<p>CONFIRM DELETION</p>
|
||||
<p>
|
||||
<input type=submit value='YES' class="button parameters"></form>
|
||||
<form action='<!-- TMPL_VAR name="script_name" -->' method=post><input type=submit value=NO class="button parameters"></form>
|
||||
</p>
|
||||
<!-- /TMPL_IF -->
|
||||
|
||||
<!-- /TMPL_IF -->
|
||||
|
||||
<!-- TMPL_IF name="else" -->
|
||||
<h1>Auth type Admin</h1>
|
||||
<p>Define authority types, then authority MARC structure in the same way you define itemtypes & biblio MARC tag structure. Authority values are managed through plugins</p>
|
||||
<table>
|
||||
<tr>
|
||||
<th class="parameters">Code</th>
|
||||
<th class="parameters">Description</th>
|
||||
<th class="parameters">Tag reported</th>
|
||||
<th class="parameters"> </th>
|
||||
<th class="parameters">Edit</th>
|
||||
<th class="parameters">Delete</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td>Default framework</td>
|
||||
<td> </td>
|
||||
<td><a href="auth_tag_structure.pl" class="button parameters">MARC structure</td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
|
||||
<!-- TMPL_LOOP name="loop" -->
|
||||
<tr>
|
||||
<td><!-- TMPL_VAR name="authtypecode" --></td>
|
||||
<td><!-- TMPL_VAR name="authtypetext" --></td>
|
||||
<td><!-- TMPL_VAR name="auth_tag_to_report" --></td>
|
||||
<td><a href="auth_tag_structure.pl?authtypecode=<!-- TMPL_VAR name="authtypecode" -->" class="button parameters" >MARC structure</a></td>
|
||||
<td><a href="<!-- TMPL_VAR name="script_name" -->?op=add_form&authtypecode=<!-- TMPL_VAR name="authtypecode" escape="HTML" -->"><img src="<!-- TMPL_VAR NAME='interface' -->/<!-- TMPL_VAR name="theme" -->/images/fileopen.png" width=32 hspace=0 vspace=0 border=0></a></td>
|
||||
<td><a href="<!-- TMPL_VAR name="script_name" -->?op=delete_confirm&authtypecode=<!-- TMPL_VAR name="authtypecode" escape="HTML" -->"><img src="<!-- TMPL_VAR NAME='interface' -->/<!-- TMPL_VAR name="theme" -->/images/edittrash.png" width=32 hspace=0 vspace=0 border=0></a></td>
|
||||
</tr>
|
||||
<!-- /TMPL_LOOP -->
|
||||
</table>
|
||||
<form action='<!-- TMPL_VAR name="script_name" -->' method=post>
|
||||
<input type="hidden" name="op" value="add_form">
|
||||
<input type="submit" class="button" value="Add authority type" title="Add authority type" alt="Add authority type" >
|
||||
<td width=33%><!-- TMPL_IF name="previous" --><a href="<!-- TMPL_VAR name=previous -->"><input type=image src="<!-- TMPL_VAR name="interface" -->/<!-- TMPL_VAR name="theme" -->/images/1leftarrow.png" title="previous" ALT="previous" BORDER=0></a><!-- /TMPL_IF --></td>
|
||||
<td width=33%><!-- TMPL_IF name="next" --><a href="<!-- TMPL_VAR name=next -->"><input type=image src="<!-- TMPL_VAR name="interface" -->/<!-- TMPL_VAR name="theme" -->/images/1rightarrow.png" title="next" ALT="next" BORDER=0></a><!-- /TMPL_IF --></td>
|
||||
</form>
|
||||
</div>
|
||||
<!-- /TMPL_IF -->
|
||||
<!-- TMPL_INCLUDE NAME="parameters-bottom.inc" -->
|
Loading…
Reference in a new issue