(a) Any party aggrieved by the judgment on the trial of a habeas corpus may appeal to the appropriate appellate court.
(b) The district attorney or other prosecuting officer or attorney may take an appeal on behalf of the state to the appropriate appellate court when, on habeas corpus, any person held in custody under a charge or conviction for crime or for extradition as a fugitive from justice from any other state is discharged from custody or when any person held in custody under an indictment by the grand jury charging him with a capital offense is admitted to bail. In all such cases the judgment must be stayed pending the appeal.
(c) Pending the appeal, the person restrained shall be admitted to bail, with sufficient sureties, conditioned that he will appear before such court or officer as may be prescribed by the judge and abide the judgment entered, provided such person is charged with an offense that is bailable under the laws of this state and is not a prisoner serving his sentence and the judgment appealed from is not a judgment denying his application for bail.