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

(-)a/admin/columns_settings.yml (+20 lines)
Lines 347-352 modules: Link Here
347
              cannot_be_modified: 1
347
              cannot_be_modified: 1
348
348
349
  catalogue:
349
  catalogue:
350
    lists:
351
      searchresults:
352
        columns:
353
            -
354
              columnname: checkbox
355
              cannot_be_toggled: 1
356
              cannot_be_modified: 1
357
            -
358
              columnname: item_type
359
            -
360
              columnname: title
361
              cannot_be_toggled: 1
362
              cannot_be_modified: 1
363
            -
364
              columnname: author
365
            -
366
              columnname: date_added
367
            -
368
              columnname: call_number
369
350
    detail:
370
    detail:
351
      holdings_table:
371
      holdings_table:
352
        columns:
372
        columns:
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt (-106 / +116 lines)
Lines 2-7 Link Here
2
[% USE Asset %]
2
[% USE Asset %]
3
[% USE Koha %]
3
[% USE Koha %]
4
[% USE KohaDates %]
4
[% USE KohaDates %]
5
[% USE TablesSettings %]
5
[% USE AuthorisedValues %]
6
[% USE AuthorisedValues %]
6
[% USE Branches %]
7
[% USE Branches %]
7
[% SET footerjs = 1 %]
8
[% SET footerjs = 1 %]
Lines 280-394 Link Here
280
                                </div>
281
                                </div>
281
                            </div>
282
                            </div>
282
                        [% END %]
283
                        [% END %]
283
284
                        <div class="page-section">
284
                        <table id="searchresults" class="dataTable">
285
                            <table id="searchresults" class="dataTable">
285
                            <thead>
286
                                <thead>
286
                                <tr>
287
                                    <tr>
287
                                    [% IF ( itemsloop ) %]
288
                                        [% IF ( itemsloop ) %]
288
                                        <th class="checkall">&nbsp;</th>
289
                                            <th class="checkall" data-colname="checkbox">&nbsp;</th>
289
                                    [% END %]
290
                                        [% END %]
290
                                    [% UNLESS ( item_level_itypes ) %]
291
                                        [% UNLESS ( item_level_itypes ) %]
291
                                        <th>Item type</th>
292
                                            <th data-colname="item_type">Item type</th>
292
                                    [% END %]
293
                                        [% END %]
293
                                    [% IF sortfield == 'title' %]
294
                                        [% IF sortfield == 'title' %]
294
                                        <th class="sorting_[% direction | html %]">
295
                                            <th class="sorting_[% direction | html %]" data-colname="title">
295
                                    [% ELSE %]
296
                                        <th class="sorting">
297
                                    [% END %]
298
                                        <a href="/cgi-bin/koha/virtualshelves/shelves.pl?op=view&amp;shelfnumber=[% shelf.shelfnumber | uri %]&amp;sortfield=title&amp;direction=[% IF sortfield != 'title' %]asc[% ELSE %][% new_direction | uri %][% END %]">Title</a>
299
                                    </th>
300
                                    [% IF sortfield == 'author' %]
301
                                        <th class="sorting_[% direction | html %]">
302
                                    [% ELSE %]
303
                                        <th class="sorting">
304
                                    [% END %]
305
                                        <a href="/cgi-bin/koha/virtualshelves/shelves.pl?op=view&amp;shelfnumber=[% shelf.shelfnumber | uri %]&amp;sortfield=author&amp;direction=[% IF sortfield != 'author' %]asc[% ELSE %][% new_direction | uri %][% END %]">Author</a>
306
                                    </th>
307
                                    [% IF sortfield == 'dateadded' %]
308
                                        <th class="sorting_[% direction | html %]">
309
                                    [% ELSE %]
310
                                        <th class="sorting">
311
                                    [% END %]
312
                                        <a href="/cgi-bin/koha/virtualshelves/shelves.pl?op=view&amp;shelfnumber=[% shelf.shelfnumber | uri %]&amp;sortfield=dateadded&amp;direction=[% IF sortfield != 'dateadded' %]asc[% ELSE %][% new_direction | uri %][% END %]">Date added</a>
313
                                    </th>
314
                                    [% IF sortfield == 'itemcallnumber' %]
315
                                        <th class="sorting_[% direction | html %]">
316
                                    [% ELSE %]
317
                                        <th class="sorting">
318
                                    [% END %]
319
                                        <a href="/cgi-bin/koha/virtualshelves/shelves.pl?op=view&amp;shelfnumber=[% shelf.shelfnumber | uri %]&amp;sortfield=itemcallnumber&amp;direction=[% IF sortfield != 'itemcallnumber' %]asc[% ELSE %][% new_direction | uri %][% END %]">Call number</a>
320
                                    </th>
321
                                </tr>
322
                            </thead>
323
                            [% FOREACH itemsloo IN itemsloop %]
324
                                <tr>
325
                                    [% IF itemsloop %]
326
                                        <td>
327
                                            <input type="checkbox" class="selection" value="[% itemsloo.biblionumber | html %]" name="biblionumber" />
328
                                        </td>
329
                                    [% END %]
330
                                    [% UNLESS ( item_level_itypes ) %]
331
                                        <td>
332
                                            [% UNLESS ( noItemTypeImages || !itemsloo.imageurl ) %]
333
                                                <img src="[% itemsloo.imageurl | html %]" alt="[% itemsloo.description | html %]" title="[% itemsloo.description | html %]" />
334
                                            [% END %]
335
                                            <span class="itypetext">[% itemsloo.description | html %]</span>
336
                                        </td>
337
                                    [% END %]
338
                                    <td>
339
                                        [% IF ( itemsloo.XSLTBloc ) %]
340
                                            [% itemsloo.XSLTBloc | $raw %]
341
                                        [% ELSE %]
296
                                        [% ELSE %]
342
                                            [% INCLUDE 'biblio-title.inc' biblio=itemsloo link = 1 %]
297
                                            <th class="sorting" data-colname="title">
343
                                            </a>
344
                                        [% END %]
298
                                        [% END %]
345
                                        <p class="hold">
299
                                            <a href="/cgi-bin/koha/virtualshelves/shelves.pl?op=view&amp;shelfnumber=[% shelf.shelfnumber | uri %]&amp;sortfield=title&amp;direction=[% IF sortfield != 'title' %]asc[% ELSE %][% new_direction | uri %][% END %]">Title</a>
346
                                            [% IF ( itemsloo.notforloan ) %]
300
                                        </th>
347
                                                <span class="noholdstext">No holds allowed</span>
301
                                        [% IF sortfield == 'author' %]
348
                                            [% ELSE %]
302
                                            <th class="sorting_[% direction | html %]" data-colname="author">
349
                                                [% IF ( itemsloo.ITEM_RESULTS.count ) %]
303
                                        [% ELSE %]
350
                                                    <a id="reserve_[% itemsloo.biblionumber | html %]" href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% itemsloo.biblionumber | html %]">Holds</a>
304
                                            <th class="sorting" data-colname="author">
351
                                                    [% IF ( holdfor ) %]
305
                                        [% END %]
352
                                                        <span class="holdforlink">| <a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% itemsloo.biblionumber | uri %]&amp;findborrower=[% holdfor_patron.cardnumber | uri %]">Place hold for [% INCLUDE 'patron-title.inc' patron => holdfor_patron no_title => 1 %]</a></span>
306
                                            <a href="/cgi-bin/koha/virtualshelves/shelves.pl?op=view&amp;shelfnumber=[% shelf.shelfnumber | uri %]&amp;sortfield=author&amp;direction=[% IF sortfield != 'author' %]asc[% ELSE %][% new_direction | uri %][% END %]">Author</a>
353
                                                    [% END %]
307
                                        </th>
354
                                                [% ELSE %]
308
                                        [% IF sortfield == 'dateadded' %]
355
                                                    <span class="noholdstext">No holds allowed</span>
309
                                            <th class="sorting_[% direction | html %]" data-colname="date_added">
310
                                        [% ELSE %]
311
                                            <th class="sorting" data-colname="date_added">
312
                                        [% END %]
313
                                            <a href="/cgi-bin/koha/virtualshelves/shelves.pl?op=view&amp;shelfnumber=[% shelf.shelfnumber | uri %]&amp;sortfield=dateadded&amp;direction=[% IF sortfield != 'dateadded' %]asc[% ELSE %][% new_direction | uri %][% END %]">Date added</a>
314
                                        </th>
315
                                        [% IF sortfield == 'itemcallnumber' %]
316
                                            <th class="sorting_[% direction | html %]" data-colname="call_number">
317
                                        [% ELSE %]
318
                                            <th class="sorting" data-colname="call_number">
319
                                        [% END %]
320
                                            <a href="/cgi-bin/koha/virtualshelves/shelves.pl?op=view&amp;shelfnumber=[% shelf.shelfnumber | uri %]&amp;sortfield=itemcallnumber&amp;direction=[% IF sortfield != 'itemcallnumber' %]asc[% ELSE %][% new_direction | uri %][% END %]">Call number</a>
321
                                        </th>
322
                                    </tr>
323
                                </thead>
324
                                <tbody>
325
                                [% FOREACH itemsloo IN itemsloop %]
326
                                    <tr>
327
                                        [% IF itemsloop %]
328
                                            <td data-colname="checkbox">
329
                                                <input type="checkbox" class="selection" value="[% itemsloo.biblionumber | html %]" name="biblionumber" />
330
                                            </td>
331
                                        [% END %]
332
                                        [% UNLESS ( item_level_itypes ) %]
333
                                            <td data-colname="item_type">
334
                                                [% UNLESS ( noItemTypeImages || !itemsloo.imageurl ) %]
335
                                                    <img src="[% itemsloo.imageurl | html %]" alt="[% itemsloo.description | html %]" title="[% itemsloo.description | html %]" />
356
                                                [% END %]
336
                                                [% END %]
337
                                                <span class="itypetext">[% itemsloo.description | html %]</span>
338
                                            </td>
339
                                        [% END %]
340
                                        <td data-colname="title">
341
                                            [% IF ( itemsloo.XSLTBloc ) %]
342
                                                [% itemsloo.XSLTBloc | $raw %]
343
                                            [% ELSE %]
344
                                                [% INCLUDE 'biblio-title.inc' biblio=itemsloo link = 1 %]
345
                                                </a>
357
                                            [% END %]
346
                                            [% END %]
358
                                            [% IF ( CAN_user_editcatalogue_edit_catalogue ) %]
347
                                            <p class="hold">
359
                                                | <a href="/cgi-bin/koha/cataloguing/addbiblio.pl?biblionumber=[% itemsloo.biblionumber | uri %]">Edit record</a>
348
                                                [% IF ( itemsloo.notforloan ) %]
360
                                            [% END %]
349
                                                    <span class="noholdstext">No holds allowed</span>
361
                                            [% IF ( CAN_user_editcatalogue_edit_items ) %]
350
                                                [% ELSE %]
362
                                                | <a href="/cgi-bin/koha/cataloguing/additem.pl?biblionumber=[% itemsloo.biblionumber | uri %]">Edit items</a>
351
                                                    [% IF ( itemsloo.ITEM_RESULTS.count ) %]
363
                                            [% END %]
352
                                                        <a id="reserve_[% itemsloo.biblionumber | html %]" href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% itemsloo.biblionumber | html %]">Holds</a>
364
                                        </p>
353
                                                        [% IF ( holdfor ) %]
365
                                    </td>
354
                                                            <span class="holdforlink">| <a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% itemsloo.biblionumber | uri %]&amp;findborrower=[% holdfor_patron.cardnumber | uri %]">Place hold for [% INCLUDE 'patron-title.inc' patron => holdfor_patron no_title => 1 %]</a></span>
366
                                    <td>
355
                                                        [% END %]
367
                                        [% itemsloo.author | html %]
356
                                                    [% ELSE %]
368
                                    </td>
357
                                                        <span class="noholdstext">No holds allowed</span>
369
                                    <td>
370
                                        [% itemsloo.dateadded | $KohaDates%]
371
                                    </td>
372
                                    <td>
373
                                        <ul>
374
                                            [% FOREACH item IN itemsloo.ITEM_RESULTS %]
375
                                                <li>
376
                                                    [% Branches.GetName(item.holdingbranch) | html %]
377
                                                    [% IF ( item.location ) %]
378
                                                        <span class="shelvingloc">
379
                                                            [% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.location', authorised_value => item.location ) | html %]
380
                                                        </span>
381
                                                    [% END %]
382
                                                    [% IF ( item.itemcallnumber ) %]
383
                                                        [<a href="/cgi-bin/koha/catalogue/search.pl?idx=callnum&amp;q=%22[% item.itemcallnumber | uri %]%22">[% item.itemcallnumber | html %]</a>]
384
                                                    [% END %]
358
                                                    [% END %]
385
                                                </li>
359
                                                [% END %]
386
                                            [% END # /FOREACH item %]
360
                                                [% IF ( CAN_user_editcatalogue_edit_catalogue ) %]
387
                                        </ul>
361
                                                    | <a href="/cgi-bin/koha/cataloguing/addbiblio.pl?biblionumber=[% itemsloo.biblionumber | uri %]">Edit record</a>
388
                                    </td>
362
                                                [% END %]
389
                                </tr>
363
                                                [% IF ( CAN_user_editcatalogue_edit_items ) %]
390
                            [% END #/FOREACH itemsloo %]
364
                                                    | <a href="/cgi-bin/koha/cataloguing/additem.pl?biblionumber=[% itemsloo.biblionumber | uri %]">Edit items</a>
391
                        </table> <!-- /#searchresults -->
365
                                                [% END %]
366
                                            </p>
367
                                        </td>
368
                                        <td data-colname="author">
369
                                            [% itemsloo.author | html %]
370
                                        </td>
371
                                        <td data-colname="date_added">
372
                                            [% itemsloo.dateadded | $KohaDates%]
373
                                        </td>
374
                                        <td data-colname="call_number">
375
                                            <ul>
376
                                                [% FOREACH item IN itemsloo.ITEM_RESULTS %]
377
                                                    <li>
378
                                                        [% Branches.GetName(item.holdingbranch) | html %]
379
                                                        [% IF ( item.location ) %]
380
                                                            <span class="shelvingloc">
381
                                                                [% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.location', authorised_value => item.location ) | html %]
382
                                                            </span>
383
                                                        [% END %]
384
                                                        [% IF ( item.itemcallnumber ) %]
385
                                                            [<a href="/cgi-bin/koha/catalogue/search.pl?idx=callnum&amp;q=%22[% item.itemcallnumber | uri %]%22">[% item.itemcallnumber | html %]</a>]
386
                                                        [% END %]
387
                                                    </li>
388
                                                [% END # /FOREACH item %]
389
                                            </ul>
390
                                        </td>
391
                                    </tr>
392
                                [% END #/FOREACH itemsloo %]
393
                                </tbody>
394
                            </table> <!-- /#searchresults -->
395
                        </div><!-- /.page-section -->
392
                        <div class="pages">[% pagination_bar | $raw %]</div>
396
                        <div class="pages">[% pagination_bar | $raw %]</div>
393
                    </form>
397
                    </form>
394
                [% END # /IF itemsloop %]
398
                [% END # /IF itemsloop %]
Lines 593-598 Link Here
593
597
594
[% MACRO jsinclude BLOCK %]
598
[% MACRO jsinclude BLOCK %]
595
    [% INCLUDE 'datatables.inc' %]
599
    [% INCLUDE 'datatables.inc' %]
600
    [% INCLUDE 'columns_settings.inc' %]
596
    [% Asset.js("lib/jquery/plugins/jquery.dataTables.columnFilter.js") | $raw %]
601
    [% Asset.js("lib/jquery/plugins/jquery.dataTables.columnFilter.js") | $raw %]
597
    [% IF print %]
602
    [% IF print %]
598
        <script>
603
        <script>
Lines 617-623 Link Here
617
        [% IF op == 'list' %]
622
        [% IF op == 'list' %]
618
            $(document).ready(function(){
623
            $(document).ready(function(){
619
                var public = [% public | html %];
624
                var public = [% public | html %];
620
621
                var dtListResults = $("#listresultst").dataTable($.extend(true, {}, dataTablesDefaults, {
625
                var dtListResults = $("#listresultst").dataTable($.extend(true, {}, dataTablesDefaults, {
622
                "aaSorting": [[ 5, "asc" ]],
626
                "aaSorting": [[ 5, "asc" ]],
623
                    'bServerSide': true,
627
                    'bServerSide': true,
Lines 717-722 Link Here
717
        [% IF shelf AND op == 'view' %]
721
        [% IF shelf AND op == 'view' %]
718
            var Sticky;
722
            var Sticky;
719
            $(document).ready(function(){
723
            $(document).ready(function(){
724
                var column_settings = [% TablesSettings.GetTableSettings( 'catalogue', 'lists', 'searchresults', 'json' ) | $raw %];
725
                KohaTable("searchresults", {
726
                    'bPaginate': false,
727
                    'bAutoWidth': false,
728
                    "bKohaColumnsUseNames": true,
729
                    "sDom": 'C<"top pager"ilpfB><"#filter_c">tr<"bottom pager"ip>',
730
                }, column_settings );
720
                Sticky = $("#searchheader");
731
                Sticky = $("#searchheader");
721
                Sticky.hcSticky({
732
                Sticky.hcSticky({
722
                    stickTo: "#listform",
733
                    stickTo: "#listform",
723
- 

Return to bug 30031