moving the js logic for the `btn-link` class into the templates as per our discussion