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 [% WRAPPER breadcrumbs %]
20 [% WRAPPER breadcrumb_item %]
21 <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a>
24 [% IF ( op_new || op_mod ) %]
25 [% WRAPPER breadcrumb_item %]
26 <a href="/cgi-bin/koha/admin/oai_sets.pl">OAI sets configuration</a>
31 [% WRAPPER breadcrumb_item bc_active= 1 %]
32 <span>Add a new OAI set</span>
35 [% ELSIF ( op_mod ) %]
36 [% WRAPPER breadcrumb_item bc_active= 1 %]
37 <span>Edit OAI set '[% spec | html %]'</span>
41 [% WRAPPER breadcrumb_item bc_active= 1 %]
42 <span>OAI sets configuration</span>
45 [% END #/ WRAPPER breadcrumbs %]
46 [% END #/ WRAPPER sub-header.inc %]
48 <div class="main container-fluid">
50 <div class="col-sm-10 col-sm-push-2">
53 [% IF ( op_new || op_mod ) %]
54 <form method="post" action="/cgi-bin/koha/admin/oai_sets.pl" class="validated">
56 <h1>Add a new OAI set</h1>
57 <input type="hidden" name="op" value="savenew" />
58 [% ELSIF ( op_mod ) %]
59 <h1>Edit OAI set '[% spec | html %]'</h1>
60 <input type="hidden" name="op" value="savemod" />
61 <input type="hidden" name="id" value="[% id | html %]" />
63 <fieldset id="oaidetails" class="rows">
66 <label for="spec" class="required">setSpec: </label>
67 [% IF ( spec == "" ) %]
68 <input type="text" id="spec" class="focus" name="spec" value="[% spec | html %]" required="required" class="required" />
70 <input type="text" id="spec" name="spec" value="[% spec | html %]" required="required" class="required" />
72 <span class="required">Required</span>
75 <label for="name" class="required">setName: </label>
76 <input type="text" id="name" name="name" value="[% name | html %]" required="required" class="required" />
77 <span class="required">Required</span>
79 [% FOREACH desc IN descriptions %]
81 <label>setDescription: </label>
82 <textarea style="vertical-align:middle" rows="2" cols="30" name="description">[% desc.description | html %]</textarea>
83 <a class="remove_description" href="#"><i class="fa fa-fw fa-trash-can"></i> Remove</a>
86 <li id="adddescription"><span class="label"> </span><a href="#" class="add_description"><i class="fa fa-fw fa-plus"></i> Add description</a></li>
90 <fieldset class="action">
91 <input type="submit" class="btn btn-primary" value="Save" /> <a class="cancel" href="/cgi-bin/koha/admin/oai_sets.pl">Cancel</a>
96 <div id="toolbar" class="btn-toolbar">
97 <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>
102 <div class="page-section">
108 <th>setDescriptions</th>
113 [% FOREACH set IN sets_loop %]
115 <td>[% set.spec | html %]</td>
116 <td>[% set.name | html %]</td>
118 [% IF set.descriptions %]
120 [% FOREACH desc IN set.descriptions %]
121 <li>[% desc.description | html %]</li>
125 <em>No descriptions</em>
129 <div class="btn-group dropup">
130 <a class="btn btn-default btn-xs dropdown-toggle" id="oaisetsactions[% set.id | html %]" role="button" data-toggle="dropdown" href="#">
131 Actions <b class="caret"></b></a>
132 <ul class="dropdown-menu pull-right" role="menu" aria-labelledby="oaisetsactions[% set.id | html %]">
133 <li><a href="/cgi-bin/koha/admin/oai_sets.pl?op=mod&id=[% set.id | uri %]"><i class="fa fa-fw fa-pencil-alt"></i> Edit</a></li>
134 <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-can"></i> Delete</a></li>
135 <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>
143 </div> <!-- /.page-section -->
145 <div class="dialog message"><p>There are no sets defined.</p></div>
150 </div> <!-- /.col-sm-10.col-sm-push-2 -->
152 <div class="col-sm-2 col-sm-pull-10">
154 [% INCLUDE 'admin-menu.inc' %]
156 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
157 </div> <!-- /.row -->
159 [% MACRO jsinclude BLOCK %]
160 [% Asset.js("js/admin-menu.js") | $raw %]
162 function newDescField() {
163 $("#adddescription").before(
164 '<li><label>' + _("setDescription: ") + '</label>' +
165 '<textarea style="vertical-align:middle" rows="2" cols="30" name="description"></textarea>' +
166 '<a class="remove_description" href="#"><i class="fa fa-fw fa-trash-can"></i>' + _(" Remove") + '</a>' +
171 function delDescField(minusButton) {
172 var li = minusButton.parent('li');
176 function confirmDelete() {
177 return confirm(_("Are you sure you want to delete this OAI set?"));
180 $(document).ready(function() {
181 $(".delete_oai_set").on("click",function(){
182 return confirmDelete();
185 $("body").on("click", ".remove_description", function(e){
187 delDescField($(this));
190 $(".add_description").on("click", function(e){
198 [% INCLUDE 'intranet-bottom.inc' %]