<table class="form-table happyforms-message-data-table happyforms-poll-data-table striped">
	<tbody>
		<?php
		if ( 1 == $poll['other_option'] ) {
			$poll['options'][] = array(
				'id' => 'other',
				'label' => $poll['other_option_label']
			);
		}

		$total_votes = $polls_controller->get_poll_total_votes( $poll_post, $poll );
		$winner_vote = $polls_controller->get_poll_winner_vote( $poll_post, $poll );
		?>
		<?php foreach( $poll['options'] as $option ) : ?>
			<?php
			$winner = '';
			$option_votes = $polls_controller->get_poll_option_votes( $poll_post, $option );
			$option_percentage = $polls_controller->get_poll_option_votes_percentage( $option_votes, $total_votes );

			if ( $winner_vote === $option['id'] ) {
				$winner = '- ' . __( 'Winner', 'happyforms' );
			}
			?>
			<tr>
				<th scope="row"><?php echo $option['label']; ?></th>
				<td><?php echo $option_percentage; ?>% (<?php echo $option_votes; ?> <?php echo happyforms_get_poll_votes_label( $option_votes ); ?>) <?php echo $winner; ?></td>
			</tr>
		<?php endforeach; ?>
	</tbody>
</table>

<?php
$deleted_votes = $polls_controller->get_poll_deleted_votes( $poll_post );

if ( $deleted_votes ) {
	?>
	<h3 class="wp-heading-inline">Deleted options</h3>
	<table class="form-table happyforms-message-data-table happyforms-poll-data-table striped">
		<tbody>
	<?php
	foreach ( $deleted_votes as $vote ) {
		$option = $vote['option'];
		?>
		<tr>
			<th scope="row"><?php echo $option['label']; ?></th>
			<td><?php echo $vote['votes']; ?> <?php echo happyforms_get_poll_votes_label( $vote['votes'] ); ?> (<?php _e( 'deleted', 'happyforms' ); ?> <?php echo human_time_diff( $vote['deleted'] ); ?> <?php _e( 'ago', 'happyforms' ); ?>)</td>
		<?php
	}
	?>
	</tbody>
	</table>
	<?php
}
?>