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

(-)a/0001-Bug-11410-ensure-cataloging-search-finds-results-for.patch (+49 lines)
Line 0 Link Here
1
From 2a4e193c242372f488892591a72752dfd4ffb138 Mon Sep 17 00:00:00 2001
2
From: Kyle M Hall <kyle@bywatersolutions.com>
3
Date: Tue, 17 Dec 2013 16:04:10 -0500
4
Subject: [PATCH 1/2] Bug 11410: ensure cataloging search finds results for
5
 searches with ampersands
6
7
When QueryParser is off, the cataloging search is passing the incorrect
8
variable to SimpleSearch.  I'm sure this is causing other issues, but
9
the one I have identified is that any searches with an "&" in them
10
return no results.  This patch corrects the bug.
11
12
Test Plan:
13
1) Catalog a new record titled "Cats & Dogs"
14
2) Rebuild your zebra index so this record is indexed
15
3) Browse to cataloguing/addbooks.pl
16
4) Search for "Cats & Dogs"
17
5) Notice you get no results
18
6) Apply this patch
19
7) Repeat the search
20
8) Notice your result now shows up!
21
22
Signed-off-by: Heather Braum <hbraum@nekls.org>
23
Signed-off-by: Suzanne Fayle <sfayle@roseman.edu>
24
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
25
This works as described, passes all tests and QA script.
26
Note: Because $query = $builtquery when the QueryParser is used,
27
this problem is only visible when UseQueryParser is set to "Don't try".
28
29
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
30
---
31
 cataloguing/addbooks.pl |    2 +-
32
 1 file changed, 1 insertion(+), 1 deletion(-)
33
34
diff --git a/cataloguing/addbooks.pl b/cataloguing/addbooks.pl
35
index b22a646..35cfa2c 100755
36
--- a/cataloguing/addbooks.pl
37
+++ b/cataloguing/addbooks.pl
38
@@ -82,7 +82,7 @@ if ($query) {
39
     }
40
 
41
     # find results
42
-    my ( $error, $marcresults, $total_hits ) = SimpleSearch($query, $results_per_page * ($page - 1), $results_per_page);
43
+    my ( $error, $marcresults, $total_hits ) = SimpleSearch($builtquery, $results_per_page * ($page - 1), $results_per_page);
44
 
45
     if ( defined $error ) {
46
         $template->param( error => $error );
47
-- 
48
1.7.9.5
49
(-)a/0002-Bug-6820-hide-receive-option-if-there-is-nothing-to-.patch (+231 lines)
Line 0 Link Here
1
From cf9c1816a0c17329da1df96354f2340509d382fa Mon Sep 17 00:00:00 2001
2
From: Samuel <scrosby000@gmail.com>
3
Date: Mon, 6 Jan 2014 15:25:37 +1100
4
Subject: [PATCH 2/2] Bug 6820 - hide receive option if there is nothing to
5
 receive
6
7
The "receive shipment" button appears even if there are no orders to receive.
8
This patch hides the button if there are no orders.
9
10
To test the patch:
11
1. Go to "aquisitions"
12
2. Create a vendor
13
3. As the newly created vendor has no orders, there will now be no "receive shipment" button
14
4. Create a basket
15
5. Go back to the vendor search
16
6. The button should now appear for that vendor
17
18
I've also tested it with a mix of vendors with and without baskets in the same search.
19
---
20
 .../prog/en/modules/acqui/booksellers.tt           |    2 +
21
 .../prog/en/modules/acqui/booksellers.tt~          |  184 ++++++++++++++++++++
22
 2 files changed, 186 insertions(+)
23
 create mode 100644 koha-tmpl/intranet-tmpl/prog/en/modules/acqui/booksellers.tt~
24
25
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/booksellers.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/booksellers.tt
26
index 3fa12e2..470fd74 100644
27
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/booksellers.tt
28
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/booksellers.tt
29
@@ -88,7 +88,9 @@ $(document).ready(function() {
30
                             (inactive)
31
                         [% END %]
32
                     [% END %]
33
+                        [% IF ( supplier.loop_basket.size ) %]
34
                     <a class="btn btn-small" href="/cgi-bin/koha/acqui/parcels.pl?booksellerid=[% supplier.booksellerid %]"><i class="icon-inbox"></i> Receive shipment</a>
35
+                        [% END %]
36
                 </span>
37
                 <div class="baskets">
38
                     [% IF ( supplier.loop_basket.size ) %]
39
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/booksellers.tt~ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/booksellers.tt~
40
new file mode 100644
41
index 0000000..944a4d5
42
--- /dev/null
43
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/booksellers.tt~
44
@@ -0,0 +1,184 @@
45
+[% USE KohaDates %]
46
+[% INCLUDE 'doc-head-open.inc' %]
47
+<title>Koha &rsaquo; Search for vendor [% supplier %]</title>
48
+[% INCLUDE 'doc-head-close.inc' %]
49
+<style type="text/css">
50
+#vendors td{
51
+	vertical-align: top;
52
+}
53
+</style>
54
+<link rel="stylesheet" href="[% themelang %]/css/datatables.css" />
55
+[% INCLUDE 'datatables.inc' %]
56
+<script type="text/javascript">
57
+//<![CDATA[
58
+$(document).ready(function() {
59
+    $("table.baskets").dataTable($.extend(true, {}, dataTablesDefaults, {
60
+        'sDom': 't',
61
+        'bPaginate': false,
62
+        'bFilter': false,
63
+        'bInfo': false,
64
+        "aaSorting": [[ 1, "asc" ]],
65
+        "aoColumns": [
66
+            null,null,null,null,null,null,{ "sType": "title-string" },null,{ "sType": "title-string" },null
67
+        ],
68
+        'aoColumnDefs': [
69
+            { 'aTargets': [-1], 'bSortable': false }
70
+        ]
71
+    }));
72
+    $("#supplierlist").change(function() {
73
+        var id = $(this).find("option:selected").val();
74
+        window.location.href = "#" + id;
75
+    });
76
+    $(".modal").on("show", function(){
77
+        var basket = $(this).data("basketno");
78
+        var legend = _("Add order to basket") + " " + basket;
79
+        $(this).find("legend").html(legend);
80
+    });
81
+});
82
+//]]>
83
+</script>
84
+
85
+</head>
86
+<body id="acq_booksellers" class="acq">
87
+[% INCLUDE 'header.inc' %]
88
+[% INCLUDE 'acquisitions-search.inc' %]
89
+
90
+<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions</a> &rsaquo; Search for vendor <em>[% supplier %]</em> </div>
91
+
92
+<div id="doc3" class="yui-t2">
93
+   
94
+    <div id="bd">
95
+    <div id="yui-main">
96
+    <div class="yui-b">
97
+    
98
+[% INCLUDE 'acquisitions-toolbar.inc' %]
99
+[% UNLESS ( count == 1 ) %]
100
+<h1>You searched on <b>vendor [% supplier %],</b> [% count %] results found</h1>
101
+[% END %]
102
+[% IF ( loop_suppliers.size ) %]
103
+    [% UNLESS (count == 1) %]
104
+        <p>Choose a vendor in the list to jump directly to the right place.
105
+        <select id="supplierlist">
106
+            [% FOREACH supplier1 IN loop_suppliers %]
107
+                <option value="[% supplier1.booksellerid %]">[% supplier1.name %]</option>
108
+            [% END %]
109
+        </select>
110
+        </p>
111
+    [% END %]
112
+    [% IF ( allbaskets ) %]
113
+        <p><a href="/cgi-bin/koha/acqui/booksellers.pl?supplier=[% supplier %]&amp;booksellerid=[% booksellerid %]">Show active baskets only</a></p>
114
+    [% ELSE %]
115
+        <p><a href="/cgi-bin/koha/acqui/booksellers.pl?supplier=[% supplier %]&amp;booksellerid=[% booksellerid %]&amp;allbaskets=1">Show all baskets</a></p>
116
+    [% END %]
117
+    <div id="acqui_order_supplierlist">
118
+        [% FOREACH supplier IN loop_suppliers %]
119
+            <div class="supplier">
120
+                <span class="suppliername">
121
+                    [% IF (supplier.name) %]
122
+                        <a name="[% supplier.booksellerid %]" href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% supplier.booksellerid %]">[% supplier.name %]</a>
123
+                    [% ELSE %]
124
+                        <a name="[% supplier.booksellerid %]" href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% supplier.booksellerid %]">NO NAME</a>
125
+                    [% END %]
126
+                </span>
127
+                <span class="action">
128
+                    [% IF ( CAN_user_acquisition_order_manage ) %]
129
+                        [% IF ( supplier.active ) %]
130
+                            <a class="btn btn-small" href="/cgi-bin/koha/acqui/basketheader.pl?booksellerid=[% supplier.booksellerid %]&amp;op=add_form"><i class="icon-plus"></i> New basket</a>
131
+                        [% ELSE %]
132
+                            (inactive)
133
+                        [% END %]
134
+                    [% END %]
135
+                        [% IF ( supplier.loop_basket.size ) %]
136
+                    <a class="btn btn-small" href="/cgi-bin/koha/acqui/parcels.pl?booksellerid=[% supplier.booksellerid %]"><i class="icon-inbox"></i> Receive shipment</a>
137
+                         [% END %]
138
+                </span>
139
+                <div class="baskets">
140
+                    [% IF ( supplier.loop_basket.size ) %]
141
+                        <table class="baskets">
142
+                            <thead>
143
+                                <tr>
144
+                                    <th>No.</th>
145
+                                    <th>Name</th>
146
+                                    <th>Item count</th>
147
+                                    <th>Biblio count</th>
148
+                                    <th>Items expected</th>
149
+                                    <th>Created by</th>
150
+                                    <th>Date</th>
151
+                                    <th>Basket group</th>
152
+                                    <th>Closed</th>
153
+                                    <th>&nbsp;</th>
154
+                                </tr>
155
+                            </thead>
156
+                            <tbody>
157
+                                [% FOREACH basket IN supplier.loop_basket %]
158
+                                    [% IF ( basket.uncertainprices ) %]
159
+                                        <tr class="problem">
160
+                                    [% ELSE %]
161
+                                        <tr>
162
+                                    [% END %]
163
+                                        <td>[% basket.basketno %]</td>
164
+                                        <td>[% basket.basketname %]</td>
165
+                                        <td>[% basket.total_items %]</td>
166
+                                        <td>[% basket.total_biblios %]</td>
167
+                                        <td>[% basket.expected_items %]</td>
168
+                                        <td>
169
+                                            [% basket.authorisedby_firstname %]
170
+                                            [% basket.authorisedby_surname %]
171
+                                        </td>
172
+                                        <td><span title="[% basket.creationdate %]">[% basket.creationdate | $KohaDates %]</span></td>
173
+                                        <td>
174
+                                          [% IF basket.basketgroup %]
175
+                                            [% basketgroup = basket.basketgroup %]
176
+                                            [% IF basketgroup.closed %]
177
+                                              [% basketgroup.name %] (closed)
178
+                                            [% ELSE %]
179
+                                              <a href="/cgi-bin/koha/acqui/basketgroup.pl?op=add&booksellerid=[% basket.booksellerid %]&basketgroupid=[% basketgroup.id %]">[% basketgroup.name %]</a>
180
+                                            [% END %]
181
+                                          [% END %]
182
+                                        </td>
183
+                                        <td>
184
+                                            [% IF ( basket.closedate ) %]
185
+                                                <span title="[% basket.closedate %]">[% basket.closedate | $KohaDates %]</span>
186
+                                            [% ELSE %]
187
+                                                <span title="9999-99-99"></span>
188
+                                            [% END %]
189
+                                        </td>
190
+                                        <td>
191
+                                            <a href="/cgi-bin/koha/acqui/basket.pl?basketno=[% basket.basketno %]">View</a>
192
+
193
+                                            [% UNLESS ( basket.closedate ) %]
194
+                                               | <a id="addtoBasketLabel[% basket.basketno %]" href="#addtoBasket[% basket.basketno %]" role="button" data-toggle="modal">Add to basket</a>
195
+                                                <!-- Modal -->
196
+                                                <div id="addtoBasket[% basket.basketno %]" class="modal hide" tabindex="-1" role="dialog" aria-labelledby="addtoBasketLabel[% basket.basketno %]" aria-hidden="true" data-basketno="[% basket.basketname %]">
197
+                                                    <div class="modal-body">
198
+                                                        [% INCLUDE 'acquisitions-add-to-basket.inc' booksellerid=supplier.booksellerid basketno=basket.basketno %]
199
+                                                    </div>
200
+                                                    <div class="modal-footer">
201
+                                                        <a href="#" class="cancel" data-dismiss="modal" aria-hidden="true">Cancel</a>
202
+                                                    </div>
203
+                                                </div>
204
+                                            [% END %]
205
+                                        </td>
206
+                                    </tr>
207
+                                [% END %][%# FOREACH basket IN supplier.loop_basket %]
208
+                            </tbody>
209
+                        </table>
210
+
211
+                    [% ELSE %]
212
+                        <p>No pending baskets</p>
213
+                    [% END %][%# IF ( supplier.loop_basket.size ) %]
214
+                </div>
215
+            </div>
216
+        [% END %][%# FOREACH supplier IN loop_suppliers %]
217
+    </div>
218
+[% END %][%# IF ( loop_suppliers.size ) %]
219
+</div>
220
+</div>
221
+<div class="yui-b">
222
+[% IF ( booksellerid ) %]
223
+[% INCLUDE 'vendor-menu.inc' %]
224
+[% END %]
225
+[% INCLUDE 'acquisitions-menu.inc' %]
226
+</div>
227
+</div>
228
+[% INCLUDE 'intranet-bottom.inc' %]
229
-- 
230
1.7.9.5
231
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt (-18 / +20 lines)
Lines 279-284 function placeHold () { Link Here
279
[% END %]
279
[% END %]
280
[% END %] 
280
[% END %] 
281
281
282
[% IF ( allowaddingitem ) %]
283
<div class="yui-g">
284
<form action="/cgi-bin/koha/virtualshelves/shelves.pl" method="post">
285
 <fieldset class="brief">
286
    <legend>Add an item to <i>[% shelfname | html %]</i></legend>
287
        <ol>
288
            <li>
289
                <label for="addbarcode">Barcode:</label>
290
                <input name="addbarcode" type="text" id="addbarcode" size="14" />
291
                <input type="hidden" name="viewshelf" value="[% shelfnumber %]" />
292
                <input type="hidden" name="modifyshelfcontents" value="1" />
293
                <input type="submit" value="Add" />
294
            </li>
295
        </ol>
296
 </fieldset>
297
</form>
298
</div>
299
[% END %]<!-- /allowaddingitem -->
300
282
[% IF ( viewshelf ) %]
301
[% IF ( viewshelf ) %]
283
   <div class="yui-g">
302
   <div class="yui-g">
284
    [% IF ( itemsloop ) %]
303
    [% IF ( itemsloop ) %]
Lines 413-436 function placeHold () { Link Here
413
   </div>
432
   </div>
414
[% END %]<!-- /viewshelf -->
433
[% END %]<!-- /viewshelf -->
415
434
416
[% IF ( allowaddingitem ) %]
435
417
<div class="yui-g">
418
<form action="/cgi-bin/koha/virtualshelves/shelves.pl" method="post">
419
 <fieldset class="brief">
420
    <legend>Add an item to <i>[% shelfname | html %]</i></legend>
421
        <ol>
422
            <li>
423
                <label for="addbarcode">Barcode:</label>
424
                <input name="addbarcode" type="text" id="addbarcode" size="14" />
425
                <input type="hidden" name="viewshelf" value="[% shelfnumber %]" />
426
                <input type="hidden" name="modifyshelfcontents" value="1" />
427
                <input type="submit" value="Add" />
428
            </li>
429
        </ol>
430
 </fieldset>
431
</form>
432
</div>
433
[% END %]<!-- /allowaddingitem -->
434
436
435
[% IF ( debug ) %]
437
[% IF ( debug ) %]
436
  [% IF ( edit ) %]<div>Edit is on ([% shelfname | html %])</div>[% END %]
438
  [% IF ( edit ) %]<div>Edit is on ([% shelfname | html %])</div>[% END %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt~ (-1 / +643 lines)
Line 0 Link Here
0
- 
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>
3
[% INCLUDE 'doc-head-close.inc' %]
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 %]
8
<script type="text/javascript">
9
//<![CDATA[ 
10
11
var MSG_NO_ITEM_SELECTED = _("Nothing is selected.");
12
var MSG_REMOVE_FROM_LIST = _("Are you sure you want to remove these records from the shelf?");
13
var MSG_CONFIRM_DELETE_LIST = _("Are you sure you want to remove this list?");
14
[% IF ( viewshelf ) %]
15
$(document).ready(function(){
16
    [% IF ( itemsloop ) %]$('#searchheader').fixFloat();[% END %]
17
    $("span.clearall").html("<a id=\"CheckNone\" href=\"/cgi-bin/koha/shelves.pl\">"+_("Clear all")+"<\/a>");
18
    $("span.checkall").html("<a id=\"CheckAll\" href=\"/cgi-bin/koha/shelves.pl\">"+_("Select all")+"<\/a>");
19
    $("#CheckAll").click(function(){
20
        $(".checkboxed").checkCheckboxes();
21
        return false;
22
    });
23
    $("#CheckNone").click(function(){
24
        $(".checkboxed").unCheckCheckboxes();
25
        return false;
26
    });
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
    });
89
});
90
[% END %]
91
92
	function confirmDelete(message){
93
		if (window.confirm(message)) {
94
		    location.href="/cgi-bin/koha/virtualshelves/shelves.pl?[% IF ( showprivateshelves ) %]display=privateshelves&[% END %]shelves=1&DEL-[% shelfnumber %]=1&shelfoff=[% shelfoff %]";
95
		} else { 
96
			return false;
97
		}
98
	}
99
100
    /**
101
     * This function checks if the adequate number of records are checked for merging
102
     */
103
    function MergeItems() {
104
	var checkboxes = $("input:checkbox:checked");
105
        var nbCheckbox = checkboxes.length;
106
	if (nbCheckbox != 2) {
107
	    alert(_("Two records must be selected for merging."));
108
	} else {
109
	    location.href='/cgi-bin/koha/cataloguing/merge.pl?biblionumber=' + checkboxes[0].value + '&amp;biblionumber=' + checkboxes[1].value;
110
	}
111
	return false;
112
    }
113
114
    /**
115
     * This function checks all checkboxes if all are empty,
116
     * or unchecks all if any already checked.
117
     */
118
    function CheckAll(){
119
        var checkboxes = document.getElementsByTagName('input');
120
        var nbCheckbox = checkboxes.length;
121
        var check = areAllChecked();
122
        for(var i=0;i<nbCheckbox;i++){
123
            if(checkboxes[i].getAttribute('type') == "checkbox" ){
124
                checkboxes[i].checked = (check) ? 0 : 1;
125
            }
126
        }
127
    }
128
    /**
129
     * This function returns true if ALL checkboxes are checked
130
     */
131
    function areAllChecked(){
132
        var checkboxes = document.getElementsByTagName('input');
133
        var nbCheckbox = checkboxes.length;
134
        for(var i=0;i<nbCheckbox;i++){
135
            if(checkboxes[i].getAttribute('type') == "checkbox" ){
136
                if(checkboxes[i].checked == 0){
137
                    return false;
138
                }
139
            }
140
        }
141
        return true;
142
    }
143
144
function placeHold () {
145
    var checkedItems = $(".selection:checked");
146
    if ($(checkedItems).size() == 0) {
147
        alert(MSG_NO_ITEM_SELECTED);
148
        return false;
149
    }
150
    var bibs = "";
151
    $(checkedItems).each(function() {
152
        bibs += $(this).val() + "/";
153
    });
154
    $("#hold_form_biblios").val(bibs);
155
    $("#hold_form").submit();
156
    return false;
157
}
158
    /**
159
     * This function checks to make sure a list title is assigned
160
     */
161
      function Check(f) {
162
		var _alertString="";
163
		var alertString2;
164
165
	    if($("#shelfname").val() == ""){
166
            _alertString += "- "+_("You must enter a List Name") + "\n";
167
		}
168
169
		if (_alertString.length==0) {
170
            f.submit();
171
		} else {
172
			alertString2 = _("Form not submitted because of the following problem(s)");
173
			alertString2 += "\n------------------------------------------------------------------------------------\n\n";
174
			alertString2 += _alertString;
175
			alert(alertString2);
176
		}
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
    }
203
//]]>
204
</script>
205
</head>
206
<body id="lists_shelves" class="lists">
207
[% INCLUDE 'header.inc' %]
208
[% INCLUDE 'cat-search.inc' %]
209
210
[% BLOCK list_permissions %]
211
    <li>
212
        <label for="permissions">Permissions: </label>
213
        <select name="allow_add" id="allow_add">
214
            [% IF allow_add %]<option value="0">Do not allow</option>[% ELSE %]<option value="0" selected="selected">Do not allow</option>[% END %]
215
            [% IF allow_add %]<option value="1" selected="selected">Allow</option>[% ELSE %]<option value="1">Allow</option>[% END %]
216
        </select>
217
        &nbsp;<span>anyone else to add entries.</span>
218
    </li>
219
    <li>
220
        <label>&nbsp;</label>
221
        <select name="allow_delete_own" id="allow_delete_own">
222
            [% IF allow_delete_own %]<option value="0">Do not allow</option>[% ELSE %]<option value="0" selected="selected">Do not allow</option>[% END %]
223
            [% IF allow_delete_own %]<option value="1" selected="selected">Allow</option>[% ELSE %]<option value="1">Allow</option>[% END %]
224
        </select>
225
        &nbsp;<span>anyone to remove his own contributed entries.</span>
226
    </li>
227
    <li>
228
        <label>&nbsp;</label>
229
        <select name="allow_delete_other" id="allow_delete_other">
230
            [% IF allow_delete_other %]<option value="0">Do not allow</option>[% ELSE %]<option value="0" selected="selected">Do not allow</option>[% END %]
231
            [% IF allow_delete_other %]<option value="1" selected="selected">Allow</option>[% ELSE %]<option value="1">Allow</option>[% END %]
232
        </select>
233
        &nbsp;<span>anyone to remove other contributed entries.</span>
234
    </li>
235
[% END %]
236
<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/virtualshelves/shelves.pl">Lists</a> [% IF ( category1 ) %] &rsaquo; [% IF ( viewshelf || edit ) %] <a href="/cgi-bin/koha/virtualshelves/shelves.pl?display=privateshelves">Your lists</a> [% ELSE %] Your lists [% END %] [% ELSIF ( category2 ) %] &rsaquo; [% IF ( viewshelf ) %] <a href="/cgi-bin/koha/virtualshelves/shelves.pl?display=publicshelves">Public lists</a> [% ELSE %] Public lists [% END %] [% ELSIF ( showprivateshelves ) %] &rsaquo; [% IF ( viewshelf || edit ) %] <a href="/cgi-bin/koha/virtualshelves/shelves.pl?display=privateshelves">Your lists</a> [% ELSE %] Your lists [% END %] [% ELSIF ( showpublicshelves ) %] &rsaquo; [% IF ( viewshelf || edit ) %] <a href="/cgi-bin/koha/virtualshelves/shelves.pl?display=publicshelves">Public lists</a> [% ELSE %] Public lists [% END %] [% END %]
237
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>
239
240
<div id="doc2" class="yui-t7">
241
 <div id="bd">
242
  <div id="yui-main">
243
   <div class="yui-g">[% INCLUDE 'virtualshelves-toolbar.inc' %]
244
   </div>
245
[% IF ( paramsloop ) %]
246
[% FOREACH paramsloo IN paramsloop %]
247
<div class="yui-ge">
248
    <div class="yui-u first">
249
        [% IF ( paramsloo.already ) %]<div class="dialog alert">A List named [% paramsloo.already %] already exists!</div>[% END %]
250
		[% IF ( paramsloo.status ) %]<div class="dialog alert">[% paramsloo.string %]</div>[% END %]
251
		[% IF ( paramsloo.nobarcode ) %]<div class="dialog alert">ERROR: No barcode given.</div>[% END %] 
252
		[% IF ( paramsloo.noshelfnumber ) %]<div class="dialog alert">ERROR: No shelfnumber given.</div>[% END %] 
253
		[% IF ( paramsloo.need_confirm ) %]
254
		<div class="dialog alert">The list <i>[% paramsloo.need_confirm %]</i> is not empty.
255
			<br />It has <b>[% paramsloo.count %]</b> entries.
256
			<br />Use the "Confirm" button below to confirm deletion.
257
		</div>
258
		[% END %]
259
		[% IF ( paramsloo.nopermission ) %]
260
		<div class="dialog alert">ERROR: You do not have adequate permission for that action on list [% paramsloo.nopermission %].</div>
261
		[% END %]
262
		[% IF ( paramsloo.failgetitem ) %]
263
		<div class="dialog alert">ERROR: No item found with barcode [% paramsloo.failgetitem %].</div>
264
		[% END %] 
265
		[% IF ( paramsloo.duplicatebiblio ) %]
266
		<div class="dialog alert">A record matching barcode <b>[% paramsloo.duplicatebiblio %]</b> has already been added.</div>
267
		[% END %]
268
                [% IF ( paramsloo.nothingdeleted) %]
269
                      <div class="dialog message">Warning: You could not delete any selected items from this shelf.</div>
270
                [% END %]
271
                [% IF ( paramsloo.somedeleted) %]
272
                      <div class="dialog message">Warning: You could not delete all selected items from this shelf.</div>
273
                [% END %]
274
                [% IF ( paramsloo.modifyfailure) %]
275
                      <div class="dialog message">ERROR: List could not be modified.</div>
276
                [% END %]
277
	</div>
278
</div>
279
[% END %]
280
[% END %] 
281
282
[% IF ( viewshelf ) %]
283
   <div class="yui-g">
284
    [% IF ( itemsloop ) %]
285
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">
289
        <input type="hidden" name="viewshelf" value="[% shelfnumber %]" />
290
        <input type="hidden" name="modifyshelfcontents" value="1" />
291
292
[% IF direction == 'asc' %]
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">
318
            <tr>
319
                [% IF ( itemsloop ) %]<th class="checkall">&nbsp;</th>[% END %]
320
321
                [% UNLESS ( item_level_itypes ) %]<th>Item type</th>[% END %]
322
                <th>
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>
324
                    [% IF sort == 'title' %]
325
                        <img src="[% interface %]/[% theme %]/img/[% direction %].gif" alt="[% direction %] sort" />
326
                    [% ELSE %]
327
                        <img src="[% interface %]/[% theme %]/img/ascdesc.gif" alt="" />
328
                    [% END %]
329
                </th>
330
                <th>
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>
332
                   [% IF sort == 'author' %]
333
                        <img src="[% interface %]/[% theme %]/img/[% direction %].gif" alt="[% direction %] sort" />
334
                   [% ELSE %]
335
                       <img src="[% interface %]/[% theme %]/img/ascdesc.gif" alt="" />
336
                   [% END %]
337
                 </th>
338
                <th>Date added</th>
339
                <th>
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>
341
                   [% IF sort == 'itemcallnumber' %]
342
                        <img src="[% interface %]/[% theme %]/img/[% direction %].gif" alt="[% direction %] sort" />
343
                   [% ELSE %]
344
                       <img src="[% interface %]/[% theme %]/img/ascdesc.gif" alt="" />
345
                   [% END %]
346
                 </th>
347
            </tr>
348
		[% FOREACH itemsloo IN itemsloop %]
349
			[% UNLESS ( loop.odd ) %]
350
			<tr class="highlight">
351
			[% ELSE %]
352
			<tr>
353
			[% END %]
354
			[% IF ( itemsloop ) %]
355
			<td>
356
				[% IF ( itemsloo.confirm ) %]
357
				<input type="hidden"   name="CONFIRM-[% itemsloo.confirm %]" />
358
				<input type="checkbox" class="selection" value="[% itemsloo.biblionumber %]" name="REM-[% itemsloo.biblionumber %]" checked />
359
				[% ELSE %]
360
				<input type="checkbox" class="selection" value="[% itemsloo.biblionumber %]" name="REM-[% itemsloo.biblionumber %]" />
361
				[% END %]
362
			</td>
363
			[% END %]
364
			[% UNLESS ( item_level_itypes ) %]<td>
365
                [% UNLESS ( noItemTypeImages || !itemsloo.imageurl ) %]<img src="[% itemsloo.imageurl %]" alt="[% itemsloo.description %]" title="[% itemsloo.description %]" />[% END %][% itemsloo.description %]
366
			</td>[% END %]
367
			<td>
368
                [% IF ( itemsloo.XSLTBloc ) %]
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>
392
			</td>
393
			<td>[% itemsloo.author %]</td>
394
			<td>[% itemsloo.dateadded %]</td>
395
			<td>
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>
405
            </td>
406
			</tr>
407
		[% END %]<!-- /itemsloop -->
408
    </table>
409
    <div class="pages">[% pagination_bar %]</div>
410
</form>
411
412
	[% END %]
413
   </div>
414
[% END %]<!-- /viewshelf -->
415
416
[% IF ( allowaddingitem ) %]
417
<div class="yui-g">
418
<form action="/cgi-bin/koha/virtualshelves/shelves.pl" method="post">
419
 <fieldset class="brief">
420
    <legend>Add an item to <i>[% shelfname | html %]</i></legend>
421
        <ol>
422
            <li>
423
                <label for="addbarcode">Barcode:</label>
424
                <input name="addbarcode" type="text" id="addbarcode" size="14" />
425
                <input type="hidden" name="viewshelf" value="[% shelfnumber %]" />
426
                <input type="hidden" name="modifyshelfcontents" value="1" />
427
                <input type="submit" value="Add" />
428
            </li>
429
        </ol>
430
 </fieldset>
431
</form>
432
</div>
433
[% END %]<!-- /allowaddingitem -->
434
435
[% IF ( debug ) %]
436
  [% IF ( edit ) %]<div>Edit is on ([% shelfname | html %])</div>[% END %]
437
  [% IF ( seflag ) %]<div>seflag is on ([% seflag %])</div>[% END %]
438
[% END %]
439
440
[% IF ( seflag ) %]
441
<div class="yui-ge">
442
    <div class="yui-u first">
443
    <form method="post" action="/cgi-bin/koha/virtualshelves/shelves.pl">
444
        <fieldset class="rows">
445
446
    [% IF ( shelves ) %]
447
        <input type="hidden" name="shelves" value="1" />
448
        <legend>Create a new list</legend>
449
        <ol>
450
        <li><label class="required" for="addshelf">List name:</label><input id="addshelf" type="text" name="addshelf" size="25" /></li>
451
        <li><span class="label">Owner: </span><input type="hidden" name="owner" id="owner" value="[% loggedinuser %]" />[% loggedinusername %]</li>
452
        <li><label for="sortfield" >Sort this list by: </label>
453
        <select name="sortfield" id="sortfield">
454
            <option value="title">Title</option>
455
            <option value="author">Author</option>
456
            <option value="copyrightdate">Copyrightdate</option>
457
            <option value="itemcallnumber">Call number</option>
458
        </select></li>
459
        <li><label for="category">Category: </label>
460
            <select name="category" id="category">
461
                  <option value="1">Private</option>
462
                  <option value="2">Public</option>
463
                     </select></li>
464
            [% INCLUDE list_permissions %]
465
        </ol>
466
    [% END %]
467
468
    [% IF ( edit ) %]
469
		<input type="hidden" name="op" value="modifsave" />
470
        [% IF ( showprivateshelves ) %]<input type="hidden" name="display" value="privateshelves" />[% END %]
471
		<input type="hidden" name="shelfnumber" value="[% shelfnumber %]" />
472
        <legend>Edit list <i>[% shelfname | html %]</i></legend>
473
		<ol>
474
		<li><label for="shelfname">Name: </label><input type="text" id="shelfname" name="shelfname" size="25" value="[% shelfname |html %]" /></li>
475
		<li><label for="owner">Owner: </label><input type="hidden" id="owner" name="owner" value="[% IF ( owner ) %][% ownername %][% ELSE %][% loggedinusername %][% END %]" />[% IF ( owner ) %][% ownername %][% ELSE %][% loggedinusername %][% END %]</li>
476
		<li><label for="sortfield" >Sort this list by: </label>
477
		<select name="sortfield">
478
        [% IF ( sortfield == "title" ) %]<option value="title" selected="selected">Title</option>[% ELSE %]<option value="title">Title</option>[% END %]
479
        [% IF ( sortfield == "author" ) %]<option value="author" selected="selected">Author</option>[% ELSE %]<option value="author">Author</option>[% END %]
480
        [% IF ( sortfield == "copyrightdate" ) %]<option value="copyrightdate" selected="selected">Copyrightdate</option>[% ELSE %]<option value="copyrightdate">Copyrightdate</option>[% END %]
481
        [% IF ( sortfield == "itemcallnumber" ) %]<option value="itemcallnumber" selected="selected">Call number</option>[% ELSE %]<option value="itemcallnumber">Call number</option>[% END %]
482
		</select></li>
483
		<li><label for="category">Category: </label>
484
			<select id="category" name="category">
485
			[% IF ( category1 ) %]
486
				<option value="1" selected="selected">Private</option>
487
			[% ELSE %]
488
				<option value="1">Private</option>
489
			[% END %]
490
			[% IF ( category2 ) %]
491
				<option value="2" selected="selected">Public</option>
492
			[% ELSE %]
493
				<option value="2">Public</option>
494
			[% END %]
495
                       </select></li>
496
            [% INCLUDE list_permissions %]
497
            </ol>
498
	[% END %]
499
500
		</fieldset>
501
		<fieldset class="action"><input type="submit" onclick="Check(this.form); return false;" value="Save" class="submit" />
502
        [% IF ( showprivateshelves ) %]<a href="/cgi-bin/koha/virtualshelves/shelves.pl?display=privateshelves" class="cancel">Cancel</a>[% ELSE %]<a href="/cgi-bin/koha/virtualshelves/shelves.pl" class="cancel">Cancel</a>[% END %]
503
    </fieldset>
504
    </form>
505
    </div>
506
    <div class="yui-u">
507
        <div class="help"><ul>
508
            <li>A <b>Private</b> list is managed by you and can be seen only by you.</li>
509
            <li> A <b>Public</b> list can be seen by everybody, but managed only by you.</li>
510
            <br/>
511
            <li>The owner of a list is always allowed to add entries, but needs permission to remove.</li>
512
        </ul>
513
        </div>
514
    </div>
515
</div>
516
[% END %]<!-- /seflag -->
517
518
[% UNLESS ( vseflag ) %]
519
        <h2>Lists</h2>
520
        <div class="statictabs">
521
        <ul>
522
        [% IF ( showprivateshelves ) %]
523
            <li id="privateshelves_tab" class="active"><a href="/cgi-bin/koha/virtualshelves/shelves.pl?display=privateshelves">Your lists</a></li>
524
        [% ELSE %]
525
            <li id="privateshelves_tab" class=""><a href="/cgi-bin/koha/virtualshelves/shelves.pl?display=privateshelves">Your lists</a></li>
526
        [% END %]
527
        [% IF ( showpublicshelves ) %]
528
            <li id="publicshelves_tab" class="active"><a href="/cgi-bin/koha/virtualshelves/shelves.pl?display=publicshelves">Public lists</a></li>
529
        [% ELSE %]
530
            <li id="publicshelves_tab" class=""><a href="/cgi-bin/koha/virtualshelves/shelves.pl?display=publicshelves">Public lists</a></li>
531
        [% END %]
532
        </ul>
533
        [% IF ( showprivateshelves ) %]
534
        <div id="privateshelves" class="tabs-container" style="display:block;">
535
		[% ELSE %]
536
        <div id="privateshelves" class="tabs-container" style="display:none;">
537
		[% END %]
538
            [% IF ( shelveslooppriv ) %]
539
			<div class="pages">[% pagination_bar %]</div>
540
        		<table>
541
        		<tr><th>List Name</th><th>Contents</th><th>Sort by</th><th>Type</th><th>Options</th></tr>
542
                [% FOREACH shelveslooppri IN shelveslooppriv %]
543
                    [% IF ( shelveslooppri.toggle ) %]<tr class="highlight">[% ELSE %]<tr>[% END %]
544
        <td><a href="shelves.pl?[% IF ( shelveslooppri.showprivateshelves ) %]display=privateshelves&amp;[% END %]viewshelf=[% shelveslooppri.shelf %]&amp;shelfoff=[% shelfoff %]">[% shelveslooppri.shelfname |html %]</a></td>
545
        <td>[% shelveslooppri.count %] item(s)</td>
546
        <td>[% IF ( shelveslooppri.sortfield == "author" ) %]Author[% ELSIF ( shelveslooppri.sortfield == "copyrightdate" ) %]Year[% ELSIF (shelveslooppri.sortfield == "itemcallnumber") %]Call number[% ELSE %]Title[% END %]</td>
547
        <td>[% IF ( shelveslooppri.viewcategory1 ) %]Private[% END %]
548
			[% IF ( shelveslooppri.viewcategory2 ) %]Public[% END %]
549
		</td>
550
        <td>
551
            [% IF ( shelveslooppri.mine ) %]
552
				<form action="merge.pl" method="get">
553
					<input type="hidden" name="shelf" value="[% shelveslooppri.shelf %]" />
554
				</form>
555
				<form action="shelves.pl" method="get">
556
					<input type="hidden" name="shelfnumber" value="[% shelveslooppri.shelf %]" />
557
					<input type="hidden" name="op" value="modif" />
558
                    <input type="hidden" name="display" value="privateshelves" />
559
					<input type="submit" class="editshelf" value="Edit" />
560
				</form>
561
				<form action="shelves.pl" method="post">
562
				    <input type="hidden" name="shelfoff" value="[% shelfoff %]" />
563
					<input type="hidden" name="shelves" value="1" />
564
                    <input type="hidden" name="display" value="privateshelves" />
565
					<input type="hidden" name="DEL-[% shelveslooppri.shelf %]" value="1" />
566
					[% IF ( shelveslooppri.confirm ) %]
567
					<input type="hidden" name="CONFIRM-[% shelveslooppri.confirm %]" value="1" />
568
					<input type="submit" class="approve" value="Confirm" />
569
					[% ELSE %]
570
                    <input type="submit" class="deleteshelf" onclick="return confirmDelete(MSG_CONFIRM_DELETE_LIST);" value="Delete" />
571
					[% END %]
572
				</form>
573
			[% ELSE %]
574
				None
575
			[% END %]
576
		</td>
577
		</tr>
578
                [% END %]
579
        </table>
580
            [% ELSE %]
581
            <p>No private lists.</p>
582
            [% END %]<!-- /shelveslooppriv -->
583
		</div><!-- /privateshelves -->
584
585
        [% IF ( showpublicshelves ) %]
586
        <div id="publicshelves" class="tabs-container" style="display:block;">
587
		[% ELSE %]
588
        <div id="publicshelves" class="tabs-container" style="display:none;">
589
		[% END %]
590
        [% IF ( shelvesloop ) %]
591
		<div class="pages">[% pagination_bar %]</div>
592
        <table>
593
        <tr><th>List Name</th><th>Created by</th><th>Contents</th><th>Sort By</th><th>Type</th><th>Options</th></tr>
594
            [% FOREACH shelvesloo IN shelvesloop %]
595
                [% IF ( shelvesloo.toggle ) %]<tr class="highlight">[% ELSE %]<tr>[% END %]
596
		<td><a href="shelves.pl?viewshelf=[% shelvesloo.shelf %]">[% shelvesloo.shelfname |html %]</a></td>
597
        <td><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% shelvesloo.owner %]">[% shelvesloo.ownername %]</td>
598
		<td>[% shelvesloo.count %] item(s)</td>
599
        <td>[% IF ( shelvesloo.sortfield == "author" ) %]Author[% ELSIF ( shelvesloo.sortfield == "copyrightdate" ) %]Year[% ELSIF (shelvesloo.sortfield == "itemcallnumber") %]Call number[% ELSE %]Title[% END %]</td>
600
        <td>[% IF ( shelvesloo.viewcategory1 ) %]Private[% END %]
601
			[% IF ( shelvesloo.viewcategory2 ) %]Public[% END %]
602
		</td>
603
        <td>
604
            [% IF ( shelvesloo.manageshelf ) %]
605
				<form action="shelves.pl" method="get">
606
					<input type="hidden" name="shelfnumber" value="[% shelvesloo.shelf %]" />
607
					<input type="hidden" name="op" value="modif" />
608
					<input type="submit" class="editshelf" value="Edit" />
609
				</form>
610
				<form action="shelves.pl" method="post">
611
				        <input type="hidden" name="shelfoff" value="[% shelfoff %]" />
612
					<input type="hidden" name="shelves" value="1" />
613
					<input type="hidden" name="DEL-[% shelvesloo.shelf %]" value="1" />
614
					[% IF ( shelvesloo.confirm ) %]
615
					<input type="hidden" name="CONFIRM-[% shelvesloo.confirm %]" value="1" />
616
					<input type="submit" class="approve" value="Confirm" />
617
					[% ELSE %]
618
                    <input type="submit" class="deleteshelf" onclick="return confirmDelete(MSG_CONFIRM_DELETE_LIST);" value="Delete" />
619
					[% END %]
620
				</form>
621
			[% ELSE %]
622
				None
623
			[% END %]
624
		</td>
625
		</tr>
626
            [% END %]
627
        </table>
628
        [% ELSE %]
629
            [% IF ( showpublicshelves ) %]<p>No public lists.</p>[% END %]
630
        [% END %]<!-- /shelvesloop -->
631
        </div><!-- /publicshelves -->
632
		</div>
633
[% END %]
634
635
<form id="hold_form" method="get" action="/cgi-bin/koha/reserve/request.pl">
636
    <!-- Value will be set here by placeHold() -->
637
    <input id="hold_form_biblios" type="hidden" name="biblionumbers" value="" />
638
    <input type="hidden" name="multi_hold" value="1"/>
639
</form>
640
641
</div>
642
</div>
643
[% INCLUDE 'intranet-bottom.inc' %]

Return to bug 11325