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

(-)a/C4/VirtualShelves/Page.pm (-4 / +20 lines)
Lines 237-243 sub shelfpage { Link Here
237
            # explicitly fetch this shelf
237
            # explicitly fetch this shelf
238
            my ($shelfnumber2,$shelfname,$owner,$category,$sorton) = GetShelf($shelfnumber);
238
            my ($shelfnumber2,$shelfname,$owner,$category,$sorton) = GetShelf($shelfnumber);
239
239
240
            $template->param( 'AllowOnShelfHolds' => C4::Context->preference('AllowOnShelfHolds') );
240
            $template->param(
241
                'AllowOnShelfHolds'     => C4::Context->preference('AllowOnShelfHolds'),
242
                'DisplayMultiPlaceHold' => C4::Context->preference('DisplayMultiPlaceHold'),
243
            );
241
            if (C4::Context->preference('TagsEnabled')) {
244
            if (C4::Context->preference('TagsEnabled')) {
242
                $template->param(TagsEnabled => 1);
245
                $template->param(TagsEnabled => 1);
243
                    foreach (qw(TagsShowOnList TagsInputOnList)) {
246
                    foreach (qw(TagsShowOnList TagsInputOnList)) {
Lines 259-267 sub shelfpage { Link Here
259
                for my $this_item (@$items) {
262
                for my $this_item (@$items) {
260
                    my $biblionumber = $this_item->{'biblionumber'};
263
                    my $biblionumber = $this_item->{'biblionumber'};
261
                    my $record = GetMarcBiblio($biblionumber);
264
                    my $record = GetMarcBiblio($biblionumber);
262
                    $this_item->{XSLTBloc} =
265
                    if (C4::Context->preference("OPACXSLTResultsDisplay") && $type eq 'opac') {
263
                        XSLTParse4Display($biblionumber, $record, "OPACXSLTResultsDisplay")
266
                        $this_item->{XSLTBloc} = XSLTParse4Display($biblionumber, $record, "OPACXSLTResultsDisplay");
264
                            if C4::Context->preference("OPACXSLTResultsDisplay") && $type eq 'opac';
267
                    } elsif (C4::Context->preference("XSLTResultsDisplay") && $type eq 'intranet') {
268
                        $this_item->{XSLTBloc} = XSLTParse4Display($biblionumber, $record, "XSLTResultsDisplay");
269
                    }
265
270
266
                    # the virtualshelfcontents table does not store these columns nor are they retrieved from the items
271
                    # the virtualshelfcontents table does not store these columns nor are they retrieved from the items
267
                    # and itemtypes tables, so I'm commenting them out for now to quiet the log -crn
272
                    # and itemtypes tables, so I'm commenting them out for now to quiet the log -crn
Lines 291-296 sub shelfpage { Link Here
291
                    }
296
                    }
292
297
293
                }
298
                }
299
                if($type eq 'intranet'){
300
                    # Build drop-down list for 'Add To:' menu...
301
                    my ($totalref, $pubshelves, $barshelves)=
302
                    C4::VirtualShelves::GetSomeShelfNames($loggedinuser,'COMBO',1);
303
                    $template->param(
304
                        addbarshelves     => $totalref->{bartotal},
305
                        addbarshelvesloop => $barshelves,
306
                        addpubshelves     => $totalref->{pubtotal},
307
                        addpubshelvesloop => $pubshelves,
308
                    );
309
                }
294
                push @paramsloop, { display => 'privateshelves' } if $category == 1;
310
                push @paramsloop, { display => 'privateshelves' } if $category == 1;
295
                $showadd = 1;
311
                $showadd = 1;
296
                my $i = 0;
312
                my $i = 0;
(-)a/koha-tmpl/intranet-tmpl/prog/en/css/addbiblio.css (-6 lines)
Lines 135-146 a.tagnum { Link Here
135
.yui-gf .yui-u {
135
.yui-gf .yui-u {
136
	width: 79.2%;
136
	width: 79.2%;
137
}
137
}
138
/* Class to be added to toolbar when it starts being fixed at the top of the screen*/
139
.floating {
140
	-webkit-box-shadow: 0px 3px 2px 0px rgba(0, 0, 0, .5);
141
	box-shadow: 0px 3px 2px 0px rgba(0, 0, 0, .5);
142
    margin-top: 0;
143
}
144
138
145
tr.active td {
139
tr.active td {
146
    background-color: #FFFFCC;
140
    background-color: #FFFFCC;
(-)a/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css (+11 lines)
Lines 2413-2418 video { Link Here
2413
    background-position:-3px -166px;
2413
    background-position:-3px -166px;
2414
}
2414
}
2415
2415
2416
.icon-merge {
2417
    background-position:-48px -166px;
2418
}
2419
2416
#toolbar .btn,
2420
#toolbar .btn,
2417
#toolbar .dropdown-menu {
2421
#toolbar .dropdown-menu {
2418
    font-size: 13px;
2422
    font-size: 13px;
Lines 2547-2553 a.disabled { Link Here
2547
.modal-header .closebtn{margin-top:2px;}
2551
.modal-header .closebtn{margin-top:2px;}
2548
.closebtn{float:right;font-size:20px;font-weight:bold;line-height:20px;color:#000000;text-shadow:0 1px 0 #ffffff;opacity:0.2;filter:alpha(opacity=20);}.closebtn:hover{color:#000000;text-decoration:none;cursor:pointer;opacity:0.4;filter:alpha(opacity=40);}
2552
.closebtn{float:right;font-size:20px;font-weight:bold;line-height:20px;color:#000000;text-shadow:0 1px 0 #ffffff;opacity:0.2;filter:alpha(opacity=20);}.closebtn:hover{color:#000000;text-decoration:none;cursor:pointer;opacity:0.4;filter:alpha(opacity=40);}
2549
button.closebtn{padding:0;cursor:pointer;background:transparent;border:0;-webkit-appearance:none;}
2553
button.closebtn{padding:0;cursor:pointer;background:transparent;border:0;-webkit-appearance:none;}
2554
2550
.btn-group label,
2555
.btn-group label,
2551
.btn-group select {
2556
.btn-group select {
2552
    font-size: 13px;
2557
    font-size: 13px;
2558
}
2559
2560
/* Class to be added to toolbar when it starts being fixed at the top of the screen*/
2561
.floating {
2562
    -webkit-box-shadow: 0px 3px 2px 0px rgba(0, 0, 0, .5);
2563
    box-shadow: 0px 3px 2px 0px rgba(0, 0, 0, .5);
2553
}
2564
}
(-)a/koha-tmpl/intranet-tmpl/prog/en/js/basket.js (-15 / +15 lines)
Lines 153-169 function SelectAll(){ Link Here
153
    }
153
    }
154
}
154
}
155
155
156
function addMultiple(){
156
function addMultiple(biblist){
157
    var c_value = "";
157
    var c_value = "";
158
    if(document.bookbag_form.biblionumber.length > 0) {
158
    if(biblist.length > 0) {
159
        for (var i=0; i < document.bookbag_form.biblionumber.length; i++) {
159
        for (var i=0; i < biblist.length; i++) {
160
            if (document.bookbag_form.biblionumber[i].checked) {
160
            if (biblist[i].checked) {
161
                c_value = c_value + document.bookbag_form.biblionumber[i].value + "/";
161
                c_value = c_value + biblist[i].value + "/";
162
            }
162
            }
163
        }
163
        }
164
        addSelRecords(c_value);
164
        addSelRecords(c_value);
165
    } else {
165
    } else {
166
        c_value = c_value + document.bookbag_form.biblionumber.value + "/";
166
        c_value = c_value + biblist.value + "/";
167
        addSelRecords(c_value);
167
        addSelRecords(c_value);
168
    }
168
    }
169
}
169
}
Lines 403-421 function addSelToShelf() { Link Here
403
403
404
///  vShelfAdd()  builds url string for multiple-biblio adds.
404
///  vShelfAdd()  builds url string for multiple-biblio adds.
405
405
406
function vShelfAdd() {
406
function vShelfAdd(biblist) {
407
        bibs= new Array;
407
        bibs = new Array();
408
        if(document.bookbag_form.biblionumber.length > 0) {
408
        if(biblist.length > 0) {
409
                for (var i=0; i < document.bookbag_form.biblionumber.length; i++) {
409
                for (var i=0; i < biblist.length; i++) {
410
                        if (document.bookbag_form.biblionumber[i].checked) {
410
                        if (biblist[i].checked) {
411
                                bibs.push("biblionumber=" +  document.bookbag_form.biblionumber[i].value);
411
                                bibs.push("biblionumber=" +  biblist[i].value);
412
                        }
412
                        }
413
                }
413
                }
414
	    if (bibs.length == 0) { showListsUpdate(MSG_NO_RECORD_SELECTED); }
414
        if (bibs.length == 0) { showListsUpdate(MSG_NO_RECORD_SELECTED); }
415
            return bibs.join("&");
415
            return bibs.join("&");
416
        } else {
416
        } else {
417
            if (document.bookbag_form.biblionumber.checked) {
417
            if (biblist.checked) {
418
                return "biblionumber=" + document.bookbag_form.biblionumber.value;
418
                return "biblionumber=" + biblist.value;
419
            }
419
            }
420
        }
420
        }
421
}
421
}
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt (-7 / +9 lines)
Lines 30-54 function Dopop(link) { Link Here
30
        newin=window.open(link,'popup','width=500,height=500,toolbar=false,scrollbars=yes,resizeable=yes');
30
        newin=window.open(link,'popup','width=500,height=500,toolbar=false,scrollbars=yes,resizeable=yes');
31
}
31
}
32
function cartList(){
32
function cartList(){
33
    var checkboxes = $("#searchresults").find(":checkbox");
34
    var vshelf = vShelfAdd(checkboxes);
33
    if($("#addto").find("option:selected").attr("value") == "addtolist"){
35
    if($("#addto").find("option:selected").attr("value") == "addtolist"){
34
        var shelfnumber = $("#addto").find("option:selected").attr("id").replace("s","");
36
        var shelfnumber = $("#addto").find("option:selected").attr("id").replace("s","");
35
        if (vShelfAdd()) {
37
        if (vshelf) {
36
             Dopop('/cgi-bin/koha/virtualshelves/addbybiblionumber.pl?shelfnumber='+shelfnumber+'&confirm=1&' + vShelfAdd());
38
             Dopop('/cgi-bin/koha/virtualshelves/addbybiblionumber.pl?shelfnumber='+shelfnumber+'&confirm=1&' + vshelf);
37
        }
39
        }
38
        return false;
40
        return false;
39
    } else if($("#addto").find("option:selected").attr("value") == "newlist"){
41
    } else if($("#addto").find("option:selected").attr("value") == "newlist"){
40
        if (vShelfAdd()) {
42
        if (vshelf) {
41
            Dopop('/cgi-bin/koha/virtualshelves/addbybiblionumber.pl?newshelf=1&' + vShelfAdd());
43
            Dopop('/cgi-bin/koha/virtualshelves/addbybiblionumber.pl?newshelf=1&' + vshelf);
42
        }
44
        }
43
        return false;
45
        return false;
44
    } else if($("#addto").find("option:selected").attr("value") == "morelists"){
46
    } else if($("#addto").find("option:selected").attr("value") == "morelists"){
45
        if (vShelfAdd()) {
47
        if (vshelf) {
46
            Dopop('/cgi-bin/koha/virtualshelves/addbybiblionumber.pl?' + vShelfAdd());
48
            Dopop('/cgi-bin/koha/virtualshelves/addbybiblionumber.pl?' + vshelf);
47
        }
49
        }
48
        return false;
50
        return false;
49
    }
51
    }
50
    if($("#addto").find("option:selected").attr("value") == "addtocart"){
52
    if($("#addto").find("option:selected").attr("value") == "addtocart"){
51
        addMultiple();
53
        addMultiple(checkboxes);
52
        return false;
54
        return false;
53
    }
55
    }
54
}
56
}
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt (-48 / +176 lines)
Lines 1-16 Link Here
1
[% INCLUDE 'doc-head-open.inc' %]
1
[% INCLUDE 'doc-head-open.inc' %]
2
<title>Koha &rsaquo; [% IF ( viewshelf ) %]Lists &rsaquo; Contents of [% shelfname | html %][% ELSE %]Lists[% END %][% IF ( shelves ) %] &rsaquo; Create new list[% END %][% IF ( edit ) %] &rsaquo; Edit list [% shelfname | html %][% END %]</title>
2
<title>Koha &rsaquo; [% IF ( viewshelf ) %]Lists &rsaquo; Contents of [% shelfname | html %][% ELSE %]Lists[% END %][% IF ( shelves ) %] &rsaquo; Create new list[% END %][% IF ( edit ) %] &rsaquo; Edit list [% shelfname | html %][% END %]</title>
3
[% INCLUDE 'doc-head-close.inc' %]
3
[% INCLUDE 'doc-head-close.inc' %]
4
<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.checkboxes.min.js"></script>
4
[% IF ( viewshelf ) %]
5
    <script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.checkboxes.min.js"></script>
6
    <script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.fixFloat.js"></script>
7
[% END %]
5
<script type="text/javascript">
8
<script type="text/javascript">
6
//<![CDATA[ 
9
//<![CDATA[ 
7
10
8
var MSG_NO_ITEM_SELECTED = _("Nothing is selected.");
11
var MSG_NO_ITEM_SELECTED = _("Nothing is selected.");
9
var MSG_REMOVE_FROM_LIST = _("Are you sure you want to remove these records from the shelf?");
12
var MSG_REMOVE_FROM_LIST = _("Are you sure you want to remove these records from the shelf?");
10
var MSG_CONFIRM_DELETE_LIST = _("Are you sure you want to remove this list?");
13
var MSG_CONFIRM_DELETE_LIST = _("Are you sure you want to remove this list?");
11
14
[% IF ( viewshelf ) %]
12
$(document).ready(function(){
15
$(document).ready(function(){
13
	$("#addbarcode").focus();
16
    [% IF ( itemsloop ) %]$('#searchheader').fixFloat();[% END %]
14
    $("span.clearall").html("<a id=\"CheckNone\" href=\"/cgi-bin/koha/shelves.pl\">"+_("Clear all")+"<\/a>");
17
    $("span.clearall").html("<a id=\"CheckNone\" href=\"/cgi-bin/koha/shelves.pl\">"+_("Clear all")+"<\/a>");
15
    $("span.checkall").html("<a id=\"CheckAll\" href=\"/cgi-bin/koha/shelves.pl\">"+_("Select all")+"<\/a>");
18
    $("span.checkall").html("<a id=\"CheckAll\" href=\"/cgi-bin/koha/shelves.pl\">"+_("Select all")+"<\/a>");
16
    $("#CheckAll").click(function(){
19
    $("#CheckAll").click(function(){
Lines 21-28 $(document).ready(function(){ Link Here
21
        $(".checkboxed").unCheckCheckboxes();
24
        $(".checkboxed").unCheckCheckboxes();
22
        return false;
25
        return false;
23
    });
26
    });
24
    $("#placehold").show();
27
    $(".placehold").on("click",function(e){
28
        placeHold();
29
        e.preventDefault();
30
    });
31
    $(".addtocart").show();
32
    var param1 = "| <label for=\"addto\">"+_("Add to:")+"<\/label><select name=\"addto\" id=\"addto\"><option value=\"\"><\/option>";
33
    [% IF ( intranetbookbag ) %]
34
         param1 += "<option value=\"addtocart\">"+_("Cart")+"<\/option>";
35
    [% END %]
36
    [% IF ( virtualshelves ) %]
37
        [% IF ( addbarshelves ) %]
38
            param1 += "<optgroup label=\""+_("Your lists:")+"\">";
39
            [% FOREACH addbarshelvesloo IN addbarshelvesloop %]
40
                [% IF ( shelfnumber != addbarshelvesloo.shelfnumber ) %]
41
                    param1 += "<option id=\"s[% addbarshelvesloo.shelfnumber %]\" value=\"addtolist\">[% addbarshelvesloo.shelfname |html %]<\/option>";
42
                [% END %]
43
            [% END %]
44
            param1 += "<\/optgroup>";
45
        [% END %]
46
        [% IF ( addpubshelves ) %]
47
            param1 += "<optgroup label=\""+_("Public lists:")+"\">";
48
            [% FOREACH addpubshelvesloo IN addpubshelvesloop %]
49
                [% IF ( shelfnumber != addpubshelvesloo.shelfnumber ) %]
50
                    param1 += "<option id=\"s[% addpubshelvesloo.shelfnumber %]\" value=\"addtolist\">[% addpubshelvesloo.shelfname |html %]<\/option>";
51
                [% END %]
52
            [% END %]
53
            param1 += "<\/optgroup>";
54
        [% END %]
55
        [% IF ( ( addbarshelvesloop && addbarshelvesloop.size > 9 ) || (addpubshelvesloop && addpubshelvesloop.size > 9 )) %]
56
            param1 += "<option value=\"morelists\">[ "+_("More lists")+" ]<\/option>";
57
        [% END %]
58
        param1 +="<option value=\"newlist\">"+_("[ New list ]")+"<\/option>"
59
    [% END %]
60
    param1 += "<\/select> <button id=\"cartsubmit\" type=\"submit\" class=\"btn btn-mini\">"+_("Save")+"</button>";
61
    $("span.addto").html(param1);
62
    $("#cartsubmit").on("click",function(e){
63
        cartList();
64
        e.preventDefault();
65
    });
66
    $("#addto").change(function(){
67
        cartList();
68
    });
69
    $(".addto").find("input:submit").click(function(e){
70
        e.preventDefault();
71
        cartList();
72
    });
73
    $("#selection_ops").show();
74
    $(".merge-items").on("click",function(e){
75
        e.preventDefault();
76
        MergeItems();
77
    });
78
    $("#listform").on("submit",function(e){
79
80
    });
81
    $(".list-remove").on("click",function(e){
82
        if($(".selection").filter(":checked").length > 0){
83
            return confirm(MSG_REMOVE_FROM_LIST);
84
        } else {
85
            alert(MSG_NO_ITEM_SELECTED);
86
            e.preventDefault();
87
        }
88
    });
25
});
89
});
90
[% END %]
26
91
27
	function confirmDelete(message){
92
	function confirmDelete(message){
28
		if (window.confirm(message)) {
93
		if (window.confirm(message)) {
Lines 75-81 $(document).ready(function(){ Link Here
75
        }
140
        }
76
        return true;
141
        return true;
77
    }
142
    }
78
    
143
79
function placeHold () {
144
function placeHold () {
80
    var checkedItems = $(".selection:checked");
145
    var checkedItems = $(".selection:checked");
81
    if ($(checkedItems).size() == 0) {
146
    if ($(checkedItems).size() == 0) {
Lines 98-104 function placeHold () { Link Here
98
		var alertString2;
163
		var alertString2;
99
164
100
	    if($("#shelfname").val() == ""){
165
	    if($("#shelfname").val() == ""){
101
			_alertString += _("- You must enter a List Name") + "\n";
166
            _alertString += "- "+_("You must enter a List Name") + "\n";
102
		}
167
		}
103
168
104
		if (_alertString.length==0) {
169
		if (_alertString.length==0) {
Lines 110-115 function placeHold () { Link Here
110
			alert(alertString2);
175
			alert(alertString2);
111
		}
176
		}
112
	}
177
	}
178
    function cartList(){
179
        var checkboxes = $("#searchresults").find(":checkbox");
180
        var vshelf = vShelfAdd(checkboxes);
181
        if($("#addto").find("option:selected").attr("value") == "addtolist"){
182
            var shelfnumber = $("#addto").find("option:selected").attr("id").replace("s","");
183
            if (vshelf) {
184
                 openWindow('/cgi-bin/koha/virtualshelves/addbybiblionumber.pl?shelfnumber='+shelfnumber+'&confirm=1&' + vshelf,'popup',500,500);
185
            }
186
            return false;
187
        } else if($("#addto").find("option:selected").attr("value") == "newlist"){
188
            if (vshelf) {
189
                openWindow('/cgi-bin/koha/virtualshelves/addbybiblionumber.pl?newshelf=1&' + vshelf,'popup',500,500);
190
            }
191
            return false;
192
        } else if($("#addto").find("option:selected").attr("value") == "morelists"){
193
            if (vshelf) {
194
                openWindow('/cgi-bin/koha/virtualshelves/addbybiblionumber.pl?' + vshelf,'popup',500,500);
195
            }
196
            return false;
197
        }
198
        if($("#addto").find("option:selected").attr("value") == "addtocart"){
199
            addMultiple(checkboxes);
200
            return false;
201
        }
202
    }
113
//]]>
203
//]]>
114
</script>
204
</script>
115
</head>
205
</head>
Lines 147-153 function placeHold () { Link Here
147
237
148
[% IF ( viewshelf ) %]&rsaquo; Contents of <i>[% shelfname | html %]</i>[% END %][% IF ( shelves ) %] &rsaquo; Create new list[% END %][% IF ( edit ) %] &rsaquo; Edit list <i>[% shelfname | html %]</i>[% END %]</div>
238
[% IF ( viewshelf ) %]&rsaquo; Contents of <i>[% shelfname | html %]</i>[% END %][% IF ( shelves ) %] &rsaquo; Create new list[% END %][% IF ( edit ) %] &rsaquo; Edit list <i>[% shelfname | html %]</i>[% END %]</div>
149
239
150
<div id="doc" class="yui-t7">
240
<div id="doc2" class="yui-t7">
151
 <div id="bd">
241
 <div id="bd">
152
  <div id="yui-main">
242
  <div id="yui-main">
153
   <div class="yui-g">[% INCLUDE 'virtualshelves-toolbar.inc' %]
243
   <div class="yui-g">[% INCLUDE 'virtualshelves-toolbar.inc' %]
Lines 193-248 function placeHold () { Link Here
193
   <div class="yui-g">
283
   <div class="yui-g">
194
    [% IF ( itemsloop ) %]
284
    [% IF ( itemsloop ) %]
195
285
196
	<form action="/cgi-bin/koha/virtualshelves/shelves.pl" method="post" class="checkboxed">
286
    <h3>Contents of <i>[% shelfname | html %]</i></h3>
287
    <div class="pages">[% pagination_bar %]</div>
288
    <form action="/cgi-bin/koha/virtualshelves/shelves.pl" id="listform" method="post" class="checkboxed">
197
        <input type="hidden" name="viewshelf" value="[% shelfnumber %]" />
289
        <input type="hidden" name="viewshelf" value="[% shelfnumber %]" />
198
        <input type="hidden" name="modifyshelfcontents" value="1" />
290
        <input type="hidden" name="modifyshelfcontents" value="1" />
199
 <fieldset>
200
  <legend>Contents of <i>[% shelfname | html %]</i></legend>
201
   
202
 [% IF ( itemsloop ) %]
203
     <p><span class="checkall"></span> |
204
     <span class="clearall"></span></p>
205
 [% END %]
206
	
207
 [% IF direction == 'asc' %]
208
     [% SET new_direction = 'desc' %]
209
 [% ELSE %]
210
     [% SET direction = 'desc' %]
211
     [% SET new_direction = 'asc' %]
212
 [% END %]
213
291
214
 <div class="pages">[% pagination_bar %]</div>
292
[% IF direction == 'asc' %]
215
    <table>
293
    [% SET new_direction = 'desc' %]
294
[% ELSE %]
295
    [% SET direction = 'desc' %]
296
    [% SET new_direction = 'asc' %]
297
[% END %]
298
299
<div id="searchheader">
300
    [% IF ( itemsloop ) %]
301
        <div id="selection_ops"><span class="checkall"></span> |
302
        <span class="clearall"></span>
303
304
        <span class="addto">| </span>
305
        &nbsp;
306
        [% IF ( CAN_user_reserveforothers && DisplayMultiPlaceHold ) %]
307
            <div class="btn-group"><button class="btn btn-mini placehold"><i class="icon-hold"></i> Place hold</button></div>
308
        [% END %]
309
        [% IF ( allowremovingitems ) %]
310
            <div class="btn-group"><button type="submit" class="btn btn-mini list-remove"><i class="icon-remove-sign"></i> Remove selected</button></div>
311
        [% END %]
312
        [% IF ( CAN_user_editcatalogue_edit_catalogue ) %]<div class="btn-group"><button type="submit" class="btn btn-mini merge-items"><i class="icon-merge"></i> Merge selected</button></div>[% END %]
313
        </div>
314
    [% END %]
315
</div>
316
317
    <table id="searchresults">
216
            <tr>
318
            <tr>
217
                [% IF ( itemsloop ) %]<th class="checkall">&nbsp;</th>[% END %]
319
                [% IF ( itemsloop ) %]<th class="checkall">&nbsp;</th>[% END %]
218
320
219
                [% UNLESS ( item_level_itypes ) %]<th>Item type</th>[% END %]
321
                [% UNLESS ( item_level_itypes ) %]<th>Item type</th>[% END %]
220
                <th>
322
                <th>
221
                    <a href="/cgi-bin/koha/virtualshelves/shelves.pl?viewshelf=[% shelfnumber %]&sort=title&direction=[% IF sort != 'title' %]asc[% ELSE %][% new_direction %][% END %]">Title</a>
323
                    <a href="/cgi-bin/koha/virtualshelves/shelves.pl?viewshelf=[% shelfnumber %]&amp;sort=title&amp;direction=[% IF sort != 'title' %]asc[% ELSE %][% new_direction %][% END %]">Title</a>
222
                    [% IF sort == 'title' %]
324
                    [% IF sort == 'title' %]
223
                        <img src="/intranet-tmpl/prog/img/[% direction %].gif" />
325
                        <img src="/intranet-tmpl/prog/img/[% direction %].gif" alt="[% direction %] sort" />
224
                    [% ELSE %]
326
                    [% ELSE %]
225
                        <img src="/intranet-tmpl/prog/img/ascdesc.gif" />
327
                        <img src="/intranet-tmpl/prog/img/ascdesc.gif" alt="" />
226
                    [% END %]
328
                    [% END %]
227
                </th>
329
                </th>
228
                <th>
330
                <th>
229
                    <a href="/cgi-bin/koha/virtualshelves/shelves.pl?viewshelf=[% shelfnumber %]&sort=author&direction=[% IF sort != 'author' %]asc[% ELSE %][% new_direction %][% END %]">Author</a>
331
                    <a href="/cgi-bin/koha/virtualshelves/shelves.pl?viewshelf=[% shelfnumber %]&amp;sort=author&amp;direction=[% IF sort != 'author' %]asc[% ELSE %][% new_direction %][% END %]">Author</a>
230
                   [% IF sort == 'author' %]
332
                   [% IF sort == 'author' %]
231
                        <img src="/intranet-tmpl/prog/img/[% direction %].gif" />
333
                        <img src="/intranet-tmpl/prog/img/[% direction %].gif" alt="[% direction %] sort" />
232
                   [% ELSE %]
334
                   [% ELSE %]
233
                       <img src="/intranet-tmpl/prog/img/ascdesc.gif" />
335
                       <img src="/intranet-tmpl/prog/img/ascdesc.gif" alt="" />
234
                   [% END %]
336
                   [% END %]
235
                 </th>
337
                 </th>
236
                <th>Date added</th>
338
                <th>Date added</th>
237
                <th>
339
                <th>
238
                    <a href="/cgi-bin/koha/virtualshelves/shelves.pl?viewshelf=[% shelfnumber %]&sort=itemcallnumber&direction=[% IF sort != 'itemcallnumber' %]asc[% ELSE %][% new_direction %][% END %]">Call number</a>
340
                    <a href="/cgi-bin/koha/virtualshelves/shelves.pl?viewshelf=[% shelfnumber %]&amp;sort=itemcallnumber&amp;direction=[% IF sort != 'itemcallnumber' %]asc[% ELSE %][% new_direction %][% END %]">Call number</a>
239
                   [% IF sort == 'itemcallnumber' %]
341
                   [% IF sort == 'itemcallnumber' %]
240
                        <img src="/intranet-tmpl/prog/img/[% direction %].gif" />
342
                        <img src="/intranet-tmpl/prog/img/[% direction %].gif" alt="[% direction %] sort" />
241
                   [% ELSE %]
343
                   [% ELSE %]
242
                       <img src="/intranet-tmpl/prog/img/ascdesc.gif" />
344
                       <img src="/intranet-tmpl/prog/img/ascdesc.gif" alt="" />
243
                   [% END %]
345
                   [% END %]
244
                 </th>
346
                 </th>
245
                <th>&nbsp;</th>
246
            </tr>
347
            </tr>
247
		[% FOREACH itemsloo IN itemsloop %]
348
		[% FOREACH itemsloo IN itemsloop %]
248
			[% UNLESS ( loop.odd ) %]
349
			[% UNLESS ( loop.odd ) %]
Lines 264-294 function placeHold () { Link Here
264
                [% UNLESS ( noItemTypeImages || !itemsloo.imageurl ) %]<img src="[% itemsloo.imageurl %]" alt="[% itemsloo.description %]" title="[% itemsloo.description %]" />[% END %][% itemsloo.description %]
365
                [% UNLESS ( noItemTypeImages || !itemsloo.imageurl ) %]<img src="[% itemsloo.imageurl %]" alt="[% itemsloo.description %]" title="[% itemsloo.description %]" />[% END %][% itemsloo.description %]
265
			</td>[% END %]
366
			</td>[% END %]
266
			<td>
367
			<td>
267
			[% INCLUDE 'biblio-default-view.inc' biblionumber = itemsloo.biblionumber %]
368
                [% IF ( itemsloo.XSLTBloc ) %]
268
			[% itemsloo.title |html %][% FOREACH subtitl IN itemsloo.subtitle %] [% subtitl.subfield %][% END %]</a>
369
                    [% itemsloo.XSLTBloc %]
370
                [% ELSE %]
371
                    [% INCLUDE 'biblio-default-view.inc' biblionumber = itemsloo.biblionumber %]
372
                    [% itemsloo.title |html %][% FOREACH subtitl IN itemsloo.subtitle %] [% subtitl.subfield %][% END %]</a>
373
                [% END %]
374
                    <p class="hold">
375
                        [% IF ( itemsloo.notforloan ) %]
376
                            <span class="noholdstext">No holds allowed</span>
377
                        [% ELSE %]
378
                            [% IF ( itemsloo.ITEM_RESULTS.size ) %]
379
                                <a id="reserve_[% itemsloo.biblionumber %]" href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% itemsloo.biblionumber %]">Holds</a>
380
                                [% IF ( holdfor ) %] <span class="holdforlink">| <a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% itemsloo.biblionumber %]&amp;findborrower=[% holdfor_cardnumber %]">Place hold for [% holdfor_firstname %] [% holdfor_surname %] ([% holdfor_cardnumber %])</a></span>[% END %]
381
                            [% ELSE %]
382
                                <span class="noholdstext">No holds allowed</span>
383
                            [% END %]
384
                        [% END %]
385
                        [% IF ( CAN_user_editcatalogue_edit_catalogue ) %]
386
                            | <a href="/cgi-bin/koha/cataloguing/addbiblio.pl?biblionumber=[% itemsloo.biblionumber %]">Edit record</a>
387
                        [% END %]
388
                        [% IF ( CAN_user_editcatalogue_edit_items ) %]
389
                            | <a href="/cgi-bin/koha/cataloguing/additem.pl?biblionumber=[% itemsloo.biblionumber %]">Edit items</a>
390
                        [% END %]
391
                    </p>
269
			</td>
392
			</td>
270
			<td>[% itemsloo.author %]</td>
393
			<td>[% itemsloo.author %]</td>
271
			<td>[% itemsloo.dateadded %]</td>
394
			<td>[% itemsloo.dateadded %]</td>
272
			<td>
395
			<td>
273
                [% FOREACH result IN itemsloo.ITEM_RESULTS %][% result.itemcallnumber %][% UNLESS loop.last %], [% END %][% END %]
396
                <ul>
397
                [% FOREACH result IN itemsloo.ITEM_RESULTS %]
398
                    <li>[% result.holdingbranch %] [% IF ( result.location_intranet ) %] ([% result.location_intranet %]) [% END %]
399
                        [% IF ( result.itemcallnumber ) %]
400
                            [<a href="/cgi-bin/koha/catalogue/search.pl?idx=callnum&amp;q=[% result.itemcallnumber |url %]">[% result.itemcallnumber %]</a>]
401
                        [% END %]
402
                    </li>
403
                [% END %]
404
                </ul>
274
            </td>
405
            </td>
275
            <td>
276
			[% UNLESS ( itemsloo.notforloan ) %]
277
			<a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% itemsloo.biblionumber %]">Holds</a>
278
			[% END %]
279
			</td>
280
			</tr>
406
			</tr>
281
		[% END %]<!-- /itemsloop -->
407
		[% END %]<!-- /itemsloop -->
282
    </table><fieldset class="action">
408
    </table>
409
    <div class="pages">[% pagination_bar %]</div>
410
    <fieldset class="action">
283
        [% IF ( itemsloop ) %]
411
        [% IF ( itemsloop ) %]
284
            <input type="button" id="placehold" style="display:none" onclick="placeHold(); return false;" value="Place holds" />
412
            [% IF ( CAN_user_reserveforothers && DisplayMultiPlaceHold ) %]<input type="button" class="placehold" value="Place hold" />[% END %]
285
            [% IF ( allowremovingitems ) %]<input type="submit" value="Remove selected records" onclick="return confirm(MSG_REMOVE_FROM_LIST);" />[% END %]
413
            [% IF ( allowremovingitems ) %]<input type="submit" value="Remove selected records" class="
286
            <input type="submit" value="Merge selected records" onclick="return MergeItems();" />
414
            list-remove" />[% END %]
415
            [% IF ( CAN_user_editcatalogue_edit_catalogue ) %]<input type="submit" value="Merge selected records" class="merge-items" />[% END %]
287
        [% END %]
416
        [% END %]
288
 </fieldset>
417
 </fieldset>
289
 </fieldset>
290
 
291
</form>
418
</form>
419
292
	[% END %]
420
	[% END %]
293
   </div>
421
   </div>
294
[% END %]<!-- /viewshelf -->
422
[% END %]<!-- /viewshelf -->

Return to bug 9757