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 [% WRAPPER 'header.inc' %]
15 [% INCLUDE 'prefs-admin-search.inc' %]
18 [% WRAPPER 'sub-header.inc' %]
19 <nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumb">
22 <a href="/cgi-bin/koha/mainpage.pl">Home</a>
25 <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a>
30 <a href="/cgi-bin/koha/admin/oai_sets.pl">OAI sets configuration</a>
33 <a href="#" aria-current="page">
38 [% ELSIF ( op_mod ) %]
40 <a href="/cgi-bin/koha/admin/oai_sets.pl">OAI sets configuration</a>
43 <a href="#" aria-current="page">
44 Edit OAI set '[% spec | html %]'
50 <a href="#" aria-current="page">
51 OAI sets configuration
59 <div class="main container-fluid">
61 <div class="col-sm-10 col-sm-push-2">
64 [% IF ( op_new || op_mod ) %]
65 <form method="post" action="/cgi-bin/koha/admin/oai_sets.pl" class="validated">
67 <h1>Add a new OAI set</h1>
68 <input type="hidden" name="op" value="savenew" />
69 [% ELSIF ( op_mod ) %]
70 <h1>Edit OAI set '[% spec | html %]'</h1>
71 <input type="hidden" name="op" value="savemod" />
72 <input type="hidden" name="id" value="[% id | html %]" />
74 <fieldset id="oaidetails" class="rows">
77 <label for="spec" class="required">setSpec: </label>
78 <input type="text" id="spec" name="spec" value="[% spec | html %]" required="required" class="required" />
79 <span class="required">Required</span>
82 <label for="name" class="required">setName: </label>
83 <input type="text" id="name" name="name" value="[% name | html %]" required="required" class="required" />
84 <span class="required">Required</span>
86 [% FOREACH desc IN descriptions %]
88 <label>setDescription: </label>
89 <textarea style="vertical-align:middle" rows="2" cols="30" name="description">[% desc.description | html %]</textarea>
90 <a class="remove_description" href="#"><i class="fa fa-fw fa-trash"></i> Remove</a>
93 <li id="adddescription"><span class="label"> </span><a href="#" class="add_description"><i class="fa fa-fw fa-plus"></i> Add description</a></li>
97 <fieldset class="action">
98 <input type="submit" value="Save" /> <a class="cancel" href="/cgi-bin/koha/admin/oai_sets.pl">Cancel</a>
103 <div id="toolbar" class="btn-toolbar">
104 <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>
114 <th>setDescriptions</th>
119 [% FOREACH set IN sets_loop %]
121 <td>[% set.spec | html %]</td>
122 <td>[% set.name | html %]</td>
124 [% IF set.descriptions %]
126 [% FOREACH desc IN set.descriptions %]
127 <li>[% desc.description | html %]</li>
131 <em>No descriptions</em>
135 <div class="btn-group dropup">
136 <a class="btn btn-default btn-xs dropdown-toggle" id="oaisetsactions[% set.id | html %]" role="button" data-toggle="dropdown" href="#">
137 Actions <b class="caret"></b></a>
138 <ul class="dropdown-menu pull-right" role="menu" aria-labelledby="oaisetsactions[% set.id | html %]">
139 <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>
140 <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>
141 <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>
150 <div class="dialog message"><p>There are no sets defined.</p></div>
155 </div> <!-- /.col-sm-10.col-sm-push-2 -->
157 <div class="col-sm-2 col-sm-pull-10">
159 [% INCLUDE 'admin-menu.inc' %]
161 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
162 </div> <!-- /.row -->
164 [% MACRO jsinclude BLOCK %]
165 [% Asset.js("js/admin-menu.js") | $raw %]
167 function newDescField() {
168 $("#adddescription").before(
169 '<li><label>' + _("setDescription: ") + '</label>' +
170 '<textarea style="vertical-align:middle" rows="2" cols="30" name="description"></textarea>' +
171 '<a class="remove_description" href="#"><i class="fa fa-fw fa-trash"></i>' + _(" Remove") + '</a>' +
176 function delDescField(minusButton) {
177 var li = minusButton.parent('li');
181 function confirmDelete() {
182 return confirm(_("Are you sure you want to delete this OAI set?"));
185 $(document).ready(function() {
186 $(".delete_oai_set").on("click",function(){
187 return confirmDelete();
190 $("body").on("click", ".remove_description", function(e){
192 delDescField($(this));
195 $(".add_description").on("click", function(e){
203 [% INCLUDE 'intranet-bottom.inc' %]