Only class published certificates as expired or expiring

Currently, draft certificates show up in the 'My Certificates' page as 'expired' or 'expiring'. Whilst this is true, it means users will always see warnings on their page, even though it may only be a draft certificate which is expired.
Use 2 (not 3) spaces for indentation.<br>Line is too long. [90/80]<br>Prefer single-quoted strings when you don't need string interpolation or special symbols.