extend generic plugin templates to respect _framed option

The generic plugin template always loads the full UI. This adds conditions to make it respect the _framed option (some plugins load things in iframes).

I know the new template files look a little messy, perhaps it would be better to create a second generic template for _framed?