View | Details | Raw Unified | Return to bug 17218
Collapse All | Expand All

(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/virtualshelves-toolbar.inc (-2 / +41 lines)
Lines 1-8 Link Here
1
[% INCLUDE 'blocking_errors.inc' %]
1
[% INCLUDE 'blocking_errors.inc' %]
2
<script type="text/javascript">
3
//<![CDATA[
2
4
3
<div id="toolbar" class="btn-toolbar">
5
$(document).ready(function(){
4
    <div class="btn-group"><a id="newshelf" class="btn btn-default btn-sm" href="/cgi-bin/koha/virtualshelves/shelves.pl?op=add_form&amp;referer=[% op %]"><i class="fa fa-plus"></i> New list</a></div>
6
    [% IF loggedinuser == 0 %]
7
        $("#newshelf").click(function(e){
8
            e.preventDefault();
9
            alert(_("Lists cannot be created with the database administrator account."));
10
        });
11
    [% END %]
12
});
13
14
[% IF op == 'view' %]
15
    function sendList(){
16
        open(CGIBIN+'virtualshelves/sendshelf.pl?shelfid=[% shelf.shelfnumber %]','win_form','scrollbars=no,resizable=no,height=300,width=450,top=50,left=100');
17
     }
18
19
     $(document).ready(function() {
20
        $("#sendlist").click(function(){
21
            sendList();
22
            return false;
23
        });
24
        $("#deleteshelf").click(function(e){
25
            if(confirm(_("Are you sure you want to delete this list?"))){
26
                return true;
27
            } else {
28
                e.preventDefault();
29
            }
30
        });
31
     });
32
[% END %]
5
33
34
//]]>
35
</script>
36
37
<div id="toolbar" class="btn-toolbar">
38
    <div class="btn-group">
39
        [% IF loggedinuser == 0 %]
40
            <a id="newshelf" class="btn btn-default btn-sm" href="/cgi-bin/koha/virtualshelves/shelves.pl?op=add_form&amp;referer=[% op %]" disabled="disabled"><i class="fa fa-plus"></i> New list</a>
41
        [% ELSE %]
42
            <a id="newshelf" class="btn btn-default btn-sm" href="/cgi-bin/koha/virtualshelves/shelves.pl?op=add_form&amp;referer=[% op %]"><i class="fa fa-plus"></i> New list</a>
43
        [% END %]
44
    </div>
6
    [% IF shelf AND op == 'view' %]
45
    [% IF shelf AND op == 'view' %]
7
        [% IF can_manage_shelf %]
46
        [% IF can_manage_shelf %]
8
        <div class="btn-group">
47
        <div class="btn-group">
(-)a/virtualshelves/shelves.pl (-1 / +1 lines)
Lines 351-356 $template->param( Link Here
351
    category => $category,
351
    category => $category,
352
    print    => scalar $query->param('print') || 0,
352
    print    => scalar $query->param('print') || 0,
353
    csv_profiles => [ Koha::CsvProfiles->search({ type => 'marc', used_for => 'export_records' }) ],
353
    csv_profiles => [ Koha::CsvProfiles->search({ type => 'marc', used_for => 'export_records' }) ],
354
    loggedinuser => $loggedinuser,
354
);
355
);
355
356
356
output_html_with_http_headers $query, $cookie, $template->output;
357
output_html_with_http_headers $query, $cookie, $template->output;
357
- 

Return to bug 17218