4 [% INCLUDE 'doc-head-open.inc' %]
5 <title>Koha › Administration › [% IF ( op_new ) %]OAI sets configuration › Add a new OAI set[% ELSE %]OAI sets configuration[% END %]</title>
6 [% INCLUDE 'doc-head-close.inc' %]
9 <body id="admin_oai_sets" class="admin">
10 [% INCLUDE 'header.inc' %]
11 [% INCLUDE 'prefs-admin-search.inc' %]
13 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a> › [% IF ( op_new ) %]<a href="/cgi-bin/koha/admin/oai_sets.pl">OAI sets configuration</a> › Add a new OAI set[% ELSIF ( op_mod ) %]<a href="/cgi-bin/koha/admin/oai_sets.pl">OAI sets configuration</a> › Edit OAI set '[% spec | html %]'[% ELSE %] OAI sets configuration[% END %]</div>
15 <div class="main container-fluid">
17 <div class="col-sm-10 col-sm-push-2">
20 [% IF ( op_new || op_mod ) %]
21 <form method="post" action="/cgi-bin/koha/admin/oai_sets.pl" class="validated">
23 <h2>Add a new OAI set</h2>
24 <input type="hidden" name="op" value="savenew" />
25 [% ELSIF ( op_mod ) %]
26 <h2>Edit OAI set '[% spec | html %]'</h2>
27 <input type="hidden" name="op" value="savemod" />
28 <input type="hidden" name="id" value="[% id | html %]" />
30 <fieldset id="oaidetails" class="rows">
33 <label for="spec" class="required">setSpec: </label>
34 <input type="text" id="spec" name="spec" value="[% spec | html %]" required="required" class="required" />
35 <span class="required">Required</span>
38 <label for="name" class="required">setName: </label>
39 <input type="text" id="name" name="name" value="[% name | html %]" required="required" class="required" />
40 <span class="required">Required</span>
42 [% FOREACH desc IN descriptions %]
44 <label>setDescription: </label>
45 <textarea style="vertical-align:middle" rows="2" cols="30" name="description">[% desc.description | html %]</textarea>
46 <a class="remove_description" href="#"><i class="fa fa-fw fa-trash"></i> Remove</a>
49 <li id="adddescription"><span class="label"> </span><a href="#" class="add_description"><i class="fa fa-fw fa-plus"></i> Add description</a></li>
53 <fieldset class="action">
54 <input type="submit" value="Save" /> <a class="cancel" href="/cgi-bin/koha/admin/oai_sets.pl">Cancel</a>
59 <div id="toolbar" class="btn-toolbar">
60 <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>
70 <th>setDescriptions</th>
75 [% FOREACH set IN sets_loop %]
77 <td>[% set.spec | html %]</td>
78 <td>[% set.name | html %]</td>
80 [% IF set.descriptions %]
82 [% FOREACH desc IN set.descriptions %]
83 <li>[% desc.description | html %]</li>
87 <em>No descriptions</em>
91 <div class="btn-group dropup">
92 <a class="btn btn-default btn-xs dropdown-toggle" id="oaisetsactions[% set.id | html %]" role="button" data-toggle="dropdown" href="#">
93 Actions <b class="caret"></b></a>
94 <ul class="dropdown-menu pull-right" role="menu" aria-labelledby="oaisetsactions[% set.id | html %]">
95 <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>
96 <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>
97 <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>
106 <div class="dialog message"><p>There are no sets defined.</p></div>
111 </div> <!-- /.col-sm-10.col-sm-push-2 -->
113 <div class="col-sm-2 col-sm-pull-10">
115 [% INCLUDE 'admin-menu.inc' %]
117 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
118 </div> <!-- /.row -->
120 [% MACRO jsinclude BLOCK %]
121 [% Asset.js("js/admin-menu.js") | $raw %]
123 function newDescField() {
124 $("#adddescription").before(
125 '<li><label>' + _("setDescription: ") + '</label>' +
126 '<textarea style="vertical-align:middle" rows="2" cols="30" name="description"></textarea>' +
127 '<a class="remove_description" href="#"><i class="fa fa-fw fa-trash"></i>' + _(" Remove") + '</a>' +
132 function delDescField(minusButton) {
133 var li = minusButton.parent('li');
137 function confirmDelete() {
138 return confirm(_("Are you sure you want to delete this OAI set?"));
141 $(document).ready(function() {
142 $(".delete_oai_set").on("click",function(){
143 return confirmDelete();
146 $("body").on("click", ".remove_description", function(e){
148 delDescField($(this));
151 $(".add_description").on("click", function(e){
159 [% INCLUDE 'intranet-bottom.inc' %]