|
Lines 2931-2938
Link Here
|
| 2931 |
[% IF CAN_user_editcatalogue_edit_items %] |
2931 |
[% IF CAN_user_editcatalogue_edit_items %] |
| 2932 |
{ |
2932 |
{ |
| 2933 |
data: function( row, type, val, meta ) { |
2933 |
data: function( row, type, val, meta ) { |
| 2934 |
let result = 'Edit + Delete'; // FIXME Add links |
2934 |
let nodes = ''; |
| 2935 |
return result; |
2935 |
if ( can_edit_items_from[row.holding_library_id] ){ |
|
|
2936 |
[% IF Koha.Preference('LocalCoverImages') OR Koha.Preference('OPACLocalCoverImages') %] |
| 2937 |
nodes += '<div class="btn-group">'; |
| 2938 |
nodes += ' <a class="btn btn-default btn-xs" href="/cgi-bin/koha/cataloguing/additem.pl?op=edititem&biblionumber=%s&itemnumber=%s#edititem"><i class="fa fa-pencil"></i> Edit</a><a class="btn btn-default btn-xs dropdown-toggle" data-toggle="dropdown"><span class="caret"></span></a>'.format(row.biblio_id, row.item_id); |
| 2939 |
nodes += ' <ul class="dropdown-menu pull-right">'; |
| 2940 |
nodes += ' <li><a href="/cgi-bin/koha/tools/upload-cover-image.pl?itemnumber=%s&filetype=image"><i class="fa fa-upload"></i> Upload image</a></li>'.format(row.item_id); |
| 2941 |
nodes += ' </ul>'; |
| 2942 |
nodes += '</div>'; |
| 2943 |
[% ELSE %] |
| 2944 |
nodes += '<a class="btn btn-default btn-xs" href="/cgi-bin/koha/cataloguing/additem.pl?op=edititem&biblionumber=%s&itemnumber=%s#edititem"><i class="fa fa-pencil"></i> Edit</a>'.format(row.biblio_id, row.item_id); |
| 2945 |
[% END %] |
| 2946 |
} |
| 2947 |
[% IF bundlesEnabled %] |
| 2948 |
// FIXME How do we handle that correctly? |
| 2949 |
//nodes += '<button class="btn btn-default btn-xs details-control"><i class="fa fa-folder"></i> Manage bundle (%s|%s)</button>'.format(row.bundled, row.bundled_lost); |
| 2950 |
[% END %] |
| 2951 |
|
| 2952 |
return nodes; |
| 2936 |
}, |
2953 |
}, |
| 2937 |
className: "actions", |
2954 |
className: "actions", |
| 2938 |
searchable: false, |
2955 |
searchable: false, |
| 2939 |
- |
|
|