Outsourced tab rendering into separate template

I have two small suggestions:

First: Outsourcing the rendering of the tabs into a separate template since you are using it twice and we are even using it in three different places.

Second: Not render the "href" attribute if the tab is not selected. If the "href" attribute gets rendered empty, then the browser reloads the page on click. If the "href" attribute does not get rendered at all, then the browser does not reload the page. An a-tag without "href" attribute is even valid HTML5.