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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt (-60 / +59 lines)
Lines 486-538 Link Here
486
            [% IF op == 'list' %]
486
            [% IF op == 'list' %]
487
                <h1>Lists</h1>
487
                <h1>Lists</h1>
488
                <div id="tabs" class="toptabs">
488
                <div id="tabs" class="toptabs">
489
                    <ul>
489
                    <ul class="nav nav-tabs" role="tablist">
490
                        <li id="privateshelves_tab" class="active">
490
                        <li id="privateshelves_tab" role="presentation" class="active">
491
                            <a href="#tab_content">Your lists</a>
491
                            <a href="#shelves_list" aria-controls="shelves_list" role="tab" data-toggle="tab" data-public="0">Your lists</a>
492
                        </li>
492
                        </li>
493
                        <li id="publicshelves_tab" class="active">
493
                        <li id="publicshelves_tab" role="presentation">
494
                            <a href="#tab_content">Public lists</a>
494
                            <a href="#shelves_list" aria-controls="shelves_list" role="tab" data-toggle="tab" data-public="1">Public lists</a>
495
                        </li>
495
                        </li>
496
                    </ul>
496
                    </ul>
497
497
498
                    <div id="tab_content">
498
                    <div class="tab-content">
499
                        <table id="listresultst">
499
                        <div role="tabpanel" class="tab-pane active" id="shelves_list">
500
                            <thead>
500
                            <table id="listresultst">
501
                                <tr>
501
                                <thead>
502
                                    <th class="NoVisible">Type</th>
502
                                    <tr>
503
                                    <th>List name</th>
503
                                        <th class="NoVisible">Type</th>
504
                                    <th>Contents</th>
504
                                        <th>List name</th>
505
                                    <th>Type</th>
505
                                        <th>Contents</th>
506
                                    <th>Owner</th>
506
                                        <th>Type</th>
507
                                    <th>Sort by</th>
507
                                        <th>Owner</th>
508
                                    <th>Creation date</th>
508
                                        <th>Sort by</th>
509
                                    <th>Modification date</th>
509
                                        <th>Creation date</th>
510
                                    <th class="noExport">Actions</th>
510
                                        <th>Modification date</th>
511
                                </tr>
511
                                        <th class="noExport">Actions</th>
512
                                <tr class="filters_row">
512
                                    </tr>
513
                                    <th></th>
513
                                    <tr class="filters_row">
514
                                    <th><input class="filter text_filter" id="searchshelfname_filter" placeholder="List name"></th>
514
                                        <th></th>
515
                                    <th></th>
515
                                        <th><input class="filter text_filter" id="searchshelfname_filter" placeholder="List name"></th>
516
                                    <th></th>
516
                                        <th></th>
517
                                    <th><input class="filter text_filter" id="searchowner_filter" placeholder="Owner"></th>
517
                                        <th></th>
518
                                    <th>
518
                                        <th><input class="filter text_filter" id="searchowner_filter" placeholder="Owner"></th>
519
                                        <select class="filter text_filter" id="searchsortby_filter">
519
                                        <th>
520
                                            <option value=""></option>
520
                                            <select class="filter text_filter" id="searchsortby_filter">
521
                                            <option value="title">Title</option>
521
                                                <option value=""></option>
522
                                            <option value="author">Author</option>
522
                                                <option value="title">Title</option>
523
                                            <option value="copyrightdate">Copyrightdate</option>
523
                                                <option value="author">Author</option>
524
                                            <option value="itemcallnumber">Call number</option>
524
                                                <option value="copyrightdate">Copyrightdate</option>
525
                                            <option value="dateadded">Date added</option>
525
                                                <option value="itemcallnumber">Call number</option>
526
                                        </select>
526
                                                <option value="dateadded">Date added</option>
527
                                    </th>
527
                                            </select>
528
                                    <th></th>
528
                                        </th>
529
                                    <th></th>
529
                                        <th></th>
530
                                    <th></th>
530
                                        <th></th>
531
                                </tr>
531
                                        <th></th>
532
                            </thead>
532
                                    </tr>
533
                            <tbody></tbody>
533
                                </thead>
534
                        </table> <!-- /#listresultst -->
534
                                <tbody></tbody>
535
                    </div> <!-- #/tab_content -->
535
                            </table> <!-- /#listresultst -->
536
                        </div> <!-- /#shelves_list -->
537
                    </div> <!-- #/.tab-content -->
536
                </div> <!-- /#tabs -->
538
                </div> <!-- /#tabs -->
537
            [% END # /IF op == 'list' %]
539
            [% END # /IF op == 'list' %]
538
540
Lines 686-708 Link Here
686
688
687
                dtListResults.fnAddFilters("filter", 750);
689
                dtListResults.fnAddFilters("filter", 750);
688
690
689
                var tabs = $("#tabs").tabs({
691
                /* Select correct tab based on URL parameter */
690
                    [% IF public %]
692
                if( public == 0 ){
691
                        active: 1,
693
                    $('#privateshelves_tab').tab('show');
692
                    [% ELSE %]
694
                } else {
693
                        active: 0,
695
                    $("#publicshelves_tab").tab("show");
694
                    [% END %]
696
                }
695
                    activate: function(e, ui) {
697
696
                        var active = tabs.tabs("option", "active" );
698
                $('a[data-toggle="tab"]')
697
                        if ( active == 0 ) {
699
                .on("click", function(){
698
                            public = 0;
700
                    public = $(this).data("public");
699
                            dtListResults.fnDraw();
701
                })
700
                        } else if ( active == 1 ) {
702
                .on('shown.bs.tab', function (e) {
701
                            public = 1;
703
                    dtListResults.fnDraw();
702
                            dtListResults.fnDraw();
703
                        }
704
                    }
705
                });
704
                });
705
706
                $("body").on("click", ".deleteshelf", function(){
706
                $("body").on("click", ".deleteshelf", function(){
707
                    return confirmDelete(MSG_CONFIRM_DELETE_LIST);
707
                    return confirmDelete(MSG_CONFIRM_DELETE_LIST);
708
                });
708
                });
709
- 

Return to bug 30309