4 [% INCLUDE 'doc-head-open.inc' %]
7 Add a new OAI set › [% END %]
8 OAI sets configuration › Administration › Koha
10 [% INCLUDE 'doc-head-close.inc' %]
13 <body id="admin_oai_sets" class="admin">
14 [% INCLUDE 'header.inc' %]
15 [% INCLUDE 'prefs-admin-search.inc' %]
17 <nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumb">
20 <a href="/cgi-bin/koha/mainpage.pl">Home</a>
23 <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a>
28 <a href="/cgi-bin/koha/admin/oai_sets.pl">OAI sets configuration</a>
31 <a href="#" aria-current="page">
36 [% ELSIF ( op_mod ) %]
38 <a href="/cgi-bin/koha/admin/oai_sets.pl">OAI sets configuration</a>
41 <a href="#" aria-current="page">
42 Edit OAI set '[% spec | html %]'
48 <a href="#" aria-current="page">
49 OAI sets configuration
56 <div class="main container-fluid">
58 <div class="col-sm-10 col-sm-push-2">
61 [% IF ( op_new || op_mod ) %]
62 <form method="post" action="/cgi-bin/koha/admin/oai_sets.pl" class="validated">
64 <h1>Add a new OAI set</h1>
65 <input type="hidden" name="op" value="savenew" />
66 [% ELSIF ( op_mod ) %]
67 <h1>Edit OAI set '[% spec | html %]'</h1>
68 <input type="hidden" name="op" value="savemod" />
69 <input type="hidden" name="id" value="[% id | html %]" />
71 <fieldset id="oaidetails" class="rows">
74 <label for="spec" class="required">setSpec: </label>
75 <input type="text" id="spec" name="spec" value="[% spec | html %]" required="required" class="required" />
76 <span class="required">Required</span>
79 <label for="name" class="required">setName: </label>
80 <input type="text" id="name" name="name" value="[% name | html %]" required="required" class="required" />
81 <span class="required">Required</span>
83 [% FOREACH desc IN descriptions %]
85 <label>setDescription: </label>
86 <textarea style="vertical-align:middle" rows="2" cols="30" name="description">[% desc.description | html %]</textarea>
87 <a class="remove_description" href="#"><i class="fa fa-fw fa-trash"></i> Remove</a>
90 <li id="adddescription"><span class="label"> </span><a href="#" class="add_description"><i class="fa fa-fw fa-plus"></i> Add description</a></li>
94 <fieldset class="action">
95 <input type="submit" value="Save" /> <a class="cancel" href="/cgi-bin/koha/admin/oai_sets.pl">Cancel</a>
100 <div id="toolbar" class="btn-toolbar">
101 <a class="btn btn-default" id="newoaiset" href="/cgi-bin/koha/admin/oai_sets.pl?op=new"><i class="fa fa-plus"></i> New set</a>
111 <th>setDescriptions</th>
116 [% FOREACH set IN sets_loop %]
118 <td>[% set.spec | html %]</td>
119 <td>[% set.name | html %]</td>
121 [% IF set.descriptions %]
123 [% FOREACH desc IN set.descriptions %]
124 <li>[% desc.description | html %]</li>
128 <em>No descriptions</em>
132 <div class="btn-group dropup">
133 <a class="btn btn-default btn-xs dropdown-toggle" id="oaisetsactions[% set.id | html %]" role="button" data-toggle="dropdown" href="#">
134 Actions <b class="caret"></b></a>
135 <ul class="dropdown-menu pull-right" role="menu" aria-labelledby="oaisetsactions[% set.id | html %]">
136 <li><a href="/cgi-bin/koha/admin/oai_sets.pl?op=mod&id=[% set.id | uri %]"><i class="fa fa-fw fa-pencil"></i> Edit</a></li>
137 <li><a class="delete_oai_set" href="/cgi-bin/koha/admin/oai_sets.pl?op=del&id=[% set.id | html %]"><i class="fa fa-fw fa-trash"></i> Delete</a></li>
138 <li><a href="/cgi-bin/koha/admin/oai_set_mappings.pl?id=[% set.id | uri %]"><i class="fa fa-fw fa-info"></i> Define mappings</a></li>
147 <div class="dialog message"><p>There are no sets defined.</p></div>
152 </div> <!-- /.col-sm-10.col-sm-push-2 -->
154 <div class="col-sm-2 col-sm-pull-10">
156 [% INCLUDE 'admin-menu.inc' %]
158 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
159 </div> <!-- /.row -->
161 [% MACRO jsinclude BLOCK %]
162 [% Asset.js("js/admin-menu.js") | $raw %]
164 function newDescField() {
165 $("#adddescription").before(
166 '<li><label>' + _("setDescription: ") + '</label>' +
167 '<textarea style="vertical-align:middle" rows="2" cols="30" name="description"></textarea>' +
168 '<a class="remove_description" href="#"><i class="fa fa-fw fa-trash"></i>' + _(" Remove") + '</a>' +
173 function delDescField(minusButton) {
174 var li = minusButton.parent('li');
178 function confirmDelete() {
179 return confirm(_("Are you sure you want to delete this OAI set?"));
182 $(document).ready(function() {
183 $(".delete_oai_set").on("click",function(){
184 return confirmDelete();
187 $("body").on("click", ".remove_description", function(e){
189 delDescField($(this));
192 $(".add_description").on("click", function(e){
200 [% INCLUDE 'intranet-bottom.inc' %]