Koha/koha-tt/intranet-tmpl/prog/en/modules/admin/biblio_framework.tt
2011-03-21 20:02:15 +13:00

149 lines
5.5 KiB
Text

[% INCLUDE 'doc-head-open.inc' %]
<title>Koha &rsaquo; Administration &rsaquo; MARC Frameworks
[% IF ( add_form ) %]
&rsaquo; [% IF ( frameworkcode ) %]Modify framework text[% ELSE %]Add framework[% END %]
[% ELSIF ( delete_confirm ) %]
&rsaquo; Delete Framework for [% frameworktext %] ([% frameworkcode %])?
[% END %]
</title>
[% INCLUDE 'doc-head-close.inc' %]
<script type="text/javascript">
//<![CDATA[
function isNotNull(f,noalert) {
if (f.value.length ==0) {
return false;
}
return true;
}
function toUC(f) {
f.value = f.value.toUpperCase();
return true;
}
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
function Check(f) {
var ok=1;
var _alertString="";
var alertString2;
if (f.frameworkcode.value.length==0) {
_alertString += "\n- " + _("Framework code missing");
}
if (!(isNotNull(window.document.Aform.frameworktext))) {
_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);
return false;
}
return true;
}
$(document).ready(function() {
new YAHOO.widget.Button("newframework");
});
//]]>
</script>
</head>
<body>
[% INCLUDE 'header.inc' %]
[% INCLUDE 'cat-search.inc' %]
<div id="breadcrumbs">
<a href="/cgi-bin/koha/mainpage.pl">Home</a>
&rsaquo; <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a>
&rsaquo; <a href="/cgi-bin/koha/admin/biblio_framework.pl">MARC Frameworks</a>
[% IF ( add_form ) %]
&rsaquo; [% IF ( frameworkcode ) %]Modify framework text[% ELSE %]Add framework[% END %]
[% ELSIF ( delete_confirm ) %]
&rsaquo; Delete Framework for [% frameworktext %] ([% frameworkcode %])?
[% END %]
</div>
<div id="doc3" class="yui-t2">
<div id="bd">
<div id="yui-main">
<div class="yui-b">
[% IF ( else ) %]<div id="toolbar">
<ul class="toolbar">
<li><a id="newframework" href="/cgi-bin/koha/admin/biblio_framework.pl?op=add_form">New Framework</a></li>
</ul></div>[% END %]
[% IF ( add_form ) %]
<h1>[% IF ( frameworkcode ) %]Modify framework text[% ELSE %]Add framework[% END %]</h1>
<form action="[% script_name %]" name="Aform" method="post" onsubmit="return Check(this);">
<input type="hidden" name="op" value="add_validate" />
<fieldset class="rows">
<ol>
[% IF ( frameworkcode ) %]
<li><span class="label">Framework Code</span><input type="hidden" id="frameworkcode" name="frameworkcode" value="[% frameworkcode %]" />[% frameworkcode %]
<input type="hidden" name="modif" value="1" />
</li>
[% ELSE %]
<li><label for="frameworkcode">Framework Code</label><input type="text" id="frameworkcode" name="frameworkcode" size="4" maxlength="4" onblur="toUC(this)" /></li>
[% END %]
<li><label for="description">Description</label>
<input type="text" name="frameworktext" id="description" size="40" maxlength="80" value="[% frameworktext |html %]" /></li></ol></fieldset>
<fieldset class="action"> <input type="submit" value="Submit" class="submit" /></fieldset>
</form>
[% END %]
[% IF ( delete_confirm ) %]
<div class="dialog alert">
<h3>Delete framework for [% frameworktext %] ([% frameworkcode %])?</h3>
[% IF ( total ) %]
<p><strong>This framework is used [% total %] times</strong>.</p>
[% END %]
<form class="inline" action="[% script_name %]" method="post"><input type="hidden" name="op" value="delete_confirmed" /><input type="hidden" name="frameworkcode" value="[% frameworkcode %]" /><input type="submit" class="approve" value="Yes, Delete this Framework!" />
</form>
<form class="inline" action="[% script_name %]" method="get"><input type="submit" class="deny" value="No, Do not Delete!" /></form>
</div>
[% END %]
[% IF ( else ) %]
<h1>MARC Frameworks</h1>
<p>Framework name, then go to MARC biblio to set MARC editor parameters</p>
<table>
<tr>
<th>Code</th>
<th>Description</th>
<th>&nbsp;</th>
<th>Edit</th>
<th>Delete</th>
</tr>
<tr>
<td>&nbsp;</td>
<td>Default framework</td>
<td><a href="marctagstructure.pl?frameworkcode=[% frameworkcode %]">MARC structure</a></td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<!-- note highlight assignment appears backwards because we already have a normal row for Default -->
[% FOREACH loo IN loop %]
[% IF ( loop.odd ) %]<tr class="highlight">
[% ELSE %]<tr>
[% END %]
<td>[% loo.frameworkcode %]</td>
<td>[% loo.frameworktext %]</td>
<td><a href="marctagstructure.pl?frameworkcode=[% loo.frameworkcode %]" >MARC structure</a></td>
<td><a href="[% loo.script_name %]?op=add_form&amp;frameworkcode=[% loo.frameworkcode |html %]">Edit</a></td>
<td><a href="[% loo.script_name %]?op=delete_confirm&amp;frameworkcode=[% loo.frameworkcode |html %]">Delete</a></td>
</tr>
[% END %]
</table>
[% IF ( previous ) %]<a href="[% previous %]">&lt;&lt; Previous</a>[% END %]
[% IF ( next ) %]<a href="[% next %]">Next &gt;&gt;</a>[% END %]
[% END %]
</div>
</div>
<div class="yui-b">
[% INCLUDE 'admin-menu.inc' %]
</div>
</div>
[% INCLUDE 'intranet-bottom.inc' %]