* In the pre-JS state, only choose a default display type when the type
is known to have data.
* If no default type is chosen for the main tab link, because no data
was available to the template, set the default from the first added
content type determined to be available via JS.
* Move added content JS to separate template file for easier override.
Signed-off-by: Bill Erickson <berick@esilibrary.com> Signed-off-by: Mike Rylander <mrylander@gmail.com>