1 [% INCLUDE 'doc-head-open.inc' %]
2 <title>Koha › Serials › Manage new fields for subscriptions
3 [% IF op == "list" %] › List of fields
4 [% ELSIF op == "add_form" %]
5 [% IF field %] › Modify field
6 [% ELSE %] › Add field
10 [% INCLUDE 'doc-head-close.inc' %]
11 <link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" />
12 <script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.dataTables.min.js"></script>
13 [% INCLUDE 'datatables-strings.inc' %]
14 <script type="text/javascript" src="[% themelang %]/js/datatables.js"></script>
15 <script type="text/javascript">
17 $(document).ready(function(){
19 $("#fieldst").dataTable($.extend(true, {}, dataTablesDefaults, {
21 'sDom': 't<"bottom pager"ilpf>',
22 'sPaginationType': 'four_button',
23 'aLengthMenu': [[10, 20, 50, 100, -1], [10, 20, 50, 100, "All"]],
25 'aaSorting': [[ 0, "asc" ]],
28 $(".confirmdelete").click(function(){
29 return confirm(_("Are you sure you want to delete this field?"));
32 $("#add_field").on('submit', function(){
33 if ( $("#marcfield").val().length > 0
34 && $("select[name='authorised_value_category']" ).val().length > 0 ) {
35 alert("You cannot select an authorised value category and a marcfield");
45 <body id="ser_add_fields" class="ser">
46 [% INCLUDE 'header.inc' %]
47 [% INCLUDE 'serials-search.inc' %]
49 <div id="breadcrumbs">
50 <a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/serials/serials-home.pl">Serials</a> › Manage new fields for subscriptions
53 <div id="doc3" class="yui-t2">
58 <div id="toolbar" class="btn-toolbar">
59 <a class="btn btn-small" id="newfields" href="/cgi-bin/koha/serials/add_fields.pl?op=add_form"><i class="icon-plus"></i> New fields</a>
64 [% FOR message IN messages %]
65 [% IF message.code == 'insert' %]
66 [% IF message.number > 0 %]
67 <div class="dialog message">The field has been inserted</div>
69 <div class="dialog alert">The field has not been inserted (name still exist?)</div>
71 [% ELSIF message.code == 'update' %]
72 [% IF message.number > 0 %]
73 <div class="dialog message">The field has been updated</div>
75 <div class="dialog alert">The field has not been updated (name still exist?)</div>
77 [% ELSIF message.code == 'delete' %]
78 [% IF message.number > 0 %]
79 <div class="dialog message">The field has been deleted</div>
81 <div class="dialog alert">The field has not been deleted</div>
88 <h3>Additional fields for subscriptions</h3>
94 <th>Authorised value category</th>
101 [% FOR field IN fields %]
103 <td>[% field.name %]</td>
104 <td>[% field.authorised_value_category %]</td>
105 <td>[% field.marcfield %]</td>
107 [% IF field.searchable %]Yes[% ELSE %]No[% END %]
110 <a href="/cgi-bin/koha/serials/add_fields.pl?op=add_form&field_id=[% field.id %]" title="Edit this field">Edit</a>
111 <a class="confirmdelete" href="/cgi-bin/koha/serials/add_fields.pl?op=delete&field_id=[% field.id %]" title="Delete this field">Delete</a>
118 There is no field defined.
120 [% ELSIF op == 'add_form' %]
122 <h3>Modify field</h3>
126 <form action="/cgi-bin/koha/serials/add_fields.pl" name="add_form" id="add_field" method="post">
127 <fieldset class="rows">
130 <label for="name" class="required">Name: </label>
131 <input type="text" name="name" id="name" value="[% field.name | html %]" />
134 <label for="av">Authorised value category: </label>
135 <select name="authorised_value_category">
136 <option value="">None</option>
137 [% FOR category IN categories %]
138 [% IF field.authorised_value_category == category %]
139 <option value="[% category %]" selected="selected">[% category %]</option>
141 <option value="[% category %]">[% category %]</option>
147 <label for="marcfield">Marc field: </label>
148 <input type="text" name="marcfield" id="marcfield" value="[% field.marcfield| html %]" />
151 <label for="searchable">Searchable: </label>
152 [% IF field.searchable %]
153 <input type="checkbox" name="searchable" id="searchable" checked="checked" />
155 <input type="checkbox" name="searchable" id="searchable" />
160 <fieldset class="action">
162 <input type="hidden" name="field_id" value="[% field.id %]" />
164 <input type="hidden" name="op" value="add" />
165 <input type="submit" value="Save" />
166 <a href="/cgi-bin/koha/serials/add_fields.pl" class="cancel">Cancel</a>
175 [% INCLUDE 'serials-menu.inc' %]
178 [% INCLUDE 'intranet-bottom.inc' %]