move filelist table rendering to a macro, so it can easily be reused