Remove static button in docs sidebar if none

a minor improvement to the api docs sidebar. At present, a 'static' 'button' (in fact, just a piece of text, but it looks like a button) is printed next to the namespace whether there are any or not. If there are none, clicking on it appears to have no effect, which may look like a bug. This small change suppresses the button if there are no 'statics'.