Owen Leonard
63a51acc83
The 'delete_confirm' op leads to a confirmation page, so it's GET. The patch also consolidates JS for handling deletions, using the same class for both the delete button in the toolbar and in the table of lists. Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
44 lines
2.9 KiB
HTML
44 lines
2.9 KiB
HTML
<div id="toolbar" class="btn-toolbar">
|
|
<div class="btn-group"><a id="newshelf" class="btn btn-default" href="/cgi-bin/koha/virtualshelves/shelves.pl?op=add_form&referer=[% op | html %]"><i class="fa fa-plus"></i> New list</a></div>
|
|
|
|
[% IF ( can_add_biblios ) %]
|
|
<div class="btn-group">
|
|
<button type="button" class="btn btn-default" data-toggle="modal" data-target="#addToList">
|
|
<i class="fa fa-plus"></i> Add items
|
|
</button>
|
|
</div>
|
|
[% END %]
|
|
|
|
[% IF shelf AND op == 'view' %]
|
|
[% IF can_manage_shelf %]
|
|
<div class="btn-group">
|
|
<button class="btn btn-default dropdown-toggle" data-toggle="dropdown"><i class="fa-solid fa-pencil" aria-hidden="true"></i> Edit <span class="caret"></span></button>
|
|
<ul class="dropdown-menu">
|
|
<li><a href="/cgi-bin/koha/virtualshelves/shelves.pl?op=edit_form&shelfnumber=[% shelf.shelfnumber | uri %]&referer=[% op | uri %]">Edit list</a></li>
|
|
<li>
|
|
<form id="deleteshelf_toolbar_form" action="shelves.pl" method="post">
|
|
[% INCLUDE 'csrf-token.inc' %]
|
|
<input type="hidden" name="op" value="cud-delete" />
|
|
<input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" />
|
|
<button type="submit" class="btn btn-default delete-list">Delete list</button>
|
|
</form>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
[% END %]
|
|
|
|
<div class="btn-group">
|
|
<button class="btn btn-default dropdown-toggle" data-toggle="dropdown"><i class="fa fa-download"></i> Download list <span class="caret"></span></button>
|
|
<ul class="dropdown-menu">
|
|
<li><a href="/cgi-bin/koha/virtualshelves/downloadshelf.pl?format=iso2709&shelfid=[% shelf.shelfnumber | uri %]">iso2709</a></li>
|
|
<li><a href="/cgi-bin/koha/virtualshelves/downloadshelf.pl?format=ris&shelfid=[% shelf.shelfnumber | uri %]">RIS</a></li>
|
|
<li><a href="/cgi-bin/koha/virtualshelves/downloadshelf.pl?format=bibtex&shelfid=[% shelf.shelfnumber | uri %]">BibTex</a></li>
|
|
[% FOREACH csv_profile IN csv_profiles %]
|
|
<li><a href="/cgi-bin/koha/virtualshelves/downloadshelf.pl?format=[% csv_profile.export_format_id | uri %]&shelfid=[% shelf.shelfnumber | uri %]">CSV - [% csv_profile.profile | html %]</a></li>
|
|
[% END %]
|
|
</ul>
|
|
</div>
|
|
<div class="btn-group"><a class="btn btn-default" href="#" id="sendlist"><i class="fa-solid fa-envelope"></i> Send list</a></div>
|
|
<div class="btn-group"><a class="btn btn-default" id="printlist" target="_blank" href="/cgi-bin/koha/virtualshelves/shelves.pl?op=view&shelfnumber=[% shelf.shelfnumber | html %]&print=1"><i class="fa fa-print"></i> Print list</a></div>
|
|
[% END %]
|
|
</div>
|