From the picture and the text this aircraft was parked at the gate. During a hard landing the nose gear may collapse but not while being parked. And while parked there are protections to prevent retraction. However, these can be overridden by maintenance.