Hiding the checkin column in Koha circulation 2


Today’s guest post is from John Andrews at the Washoe Library System.


In previous version of Koha, we used the script from the Koha wiki to remove the “return” column to the right of the “Renew” column on the Checkout page. After the upgrade, we attempted to update this script by replacing the “issuest” id with the “issues-table” id, which initially looked like it should have worked, however this had no effect. After some digging, it looked like there was an additional column (“Export”) that may have been the column seen when the script called for the ‘last-child’. So, tried it with nth-child instead, which worked to eliminate the column from the header row, but not from the table body.

Hide checkin column

In the end ditching the Javascript and adding this CSS to IntranetUserCSS solved the problem!

#issues-table thead th:nth-child(10), #issues-table tbody td:nth-child(10) {
display: none;
}

Simple and elegant, with many thanks to Kyle for recognizing that the script was unnecessary and that this could be accomplished just with CSS; the CSS-only option is simple and elegant and works like a charm!


Leave a comment

Your email address will not be published. Required fields are marked *

Are you human? * Time limit is exhausted. Please reload CAPTCHA.

2 thoughts on “Hiding the checkin column in Koha circulation

  • Christopher Brannon

    Kyle,

    I did some tinkering with our old code and the code you sent me regarding jquery on ajaxed items and came up with this:

    //Hide check-in column in patron account screens
    $(‘#issues-table’).on( ‘ajaxSend.dt’, function () {
    $(“#issues-table th:last-child”).hide();
    $(“#issues-table #exemptfine”).parent().hide();
    $(“#RenewCheckinChecked”).html(“ Renew checked items”);
    });

    $(‘#issues-table’).on( ‘init.dt’, function () {
    $(“#issues-table”).find(“tbody tr:gt(0) td:last-child”).hide();
    });
    //end Hide check-in

    The first function takes care of the header and other elements we change or remove before the table loads. If I put it all under init, you see the original elements before the table is loaded. With the ajaxSend event, this allows me to clean up elements that exist before the table loads. The result is nice and clean.