<?php
$attachment = $args['attachment'];
$attachment_url = trailingslashit($args['baseurl']) . $attachment['path'];
$attachment_ordinal = $args['attachment_ordinal'];
?>

<div class="communityally-attachment-entry">
	<div class="communityally-attachment-display">
		<a target="_blank" class="communityally-attachment-file" href="<?php echo esc_attr($attachment_url); ?>"><?php echo esc_attr($attachment['name']); ?></a>
		<input class="communityally-attachment-input" type="hidden" name="file-attachment[<?php echo esc_attr($attachment_ordinal); ?>][name]" value="<?php echo esc_attr($attachment['name']); ?>" />
		<input class="communityally-attachment-input" type="hidden" name="file-attachment[<?php echo esc_attr($attachment_ordinal); ?>][path]" value="<?php echo esc_attr($attachment['path']); ?>" />
	</div>
	<div class="communityally-attachment-delete-button" communityally-attachment-remove-temp="file-<?php echo esc_attr($attachment_ordinal); ?>"></div>
</div>
