def folderitem(self, obj, item, index):
        """Augment folder listing item
        """
        url = item.get("url")
        title = item.get("Title")

        item["replace"]["Title"] = get_link(url, value=title)
        item["getType"] = _(obj.getType()[0])
        item["getDownFrom"] = self.localize_date(obj.getDownFrom())
        item["getDownTo"] = self.localize_date(obj.getDownTo())
        item["getMaintainer"] = obj.getMaintainer()

        status = obj.getCurrentState()
        statustext = obj.getCurrentStateI18n()
        statusimg = ""

        if status == mstatus.CLOSED:
            statusimg = "instrumentmaintenance_closed.png"
            item["state_class"] = "state-inactive"
        elif status == mstatus.CANCELLED:
            statusimg = "instrumentmaintenance_cancelled.png"
            item["state_class"] = "state-cancelled"
        elif status == mstatus.INQUEUE:
            statusimg = "instrumentmaintenance_inqueue.png"
            item["state_class"] = "state-open"
        elif status == mstatus.OVERDUE:
            statusimg = "instrumentmaintenance_overdue.png"
            item["state_class"] = "state-open"
        elif status == mstatus.PENDING:
            statusimg = "instrumentmaintenance_pending.png"
            item["state_class"] = "state-pending"

        item["replace"]["getCurrentState"] = get_image(
            statusimg, title=statustext)
        return item
def folderitem ( self , obj , item , index ) : url = item . get ( "url" ) title = item . get ( "Title" ) item [ "replace" ] [ "Title" ] = get_link ( url , value = title ) item [ "getType" ] = _ ( obj . getType ( ) [ 0 ] ) item [ "getDownFrom" ] = self . localize_date ( obj . getDownFrom ( ) ) item [ "getDownTo" ] = self . localize_date ( obj . getDownTo ( ) ) item [ "getMaintainer" ] = obj . getMaintainer ( ) status = obj . getCurrentState ( ) statustext = obj . getCurrentStateI18n ( ) statusimg = "" if status == mstatus . CLOSED : statusimg = "instrumentmaintenance_closed.png" item [ "state_class" ] = "state-inactive" elif status == mstatus . CANCELLED : statusimg = "instrumentmaintenance_cancelled.png" item [ "state_class" ] = "state-cancelled" elif status == mstatus . INQUEUE : statusimg = "instrumentmaintenance_inqueue.png" item [ "state_class" ] = "state-open" elif status == mstatus . OVERDUE : statusimg = "instrumentmaintenance_overdue.png" item [ "state_class" ] = "state-open" elif status == mstatus . PENDING : statusimg = "instrumentmaintenance_pending.png" item [ "state_class" ] = "state-pending" item [ "replace" ] [ "getCurrentState" ] = get_image ( statusimg , title = statustext ) return item
Augment folder listing item