Only display header when not in compact mode

fixes #6508