<?php
/**
 * @package DJ-Catalog2
 * @copyright Copyright (C) DJ-Extensions.com, All rights reserved.
 * @license http://www.gnu.org/licenses GNU/GPL
 * @author url: http://dj-extensions.com
 * @author email contact@dj-extensions.com
 *
 */
 

defined('_JEXEC') or die;

Joomla\CMS\HTML\HTMLHelper::_('behavior.core');
//Joomla\CMS\HTML\HTMLHelper::_('formbehavior.chosen', 'select');
$attachments = DJCatalog2HelperAttachment::getFiles($this->item);

?>
<form action="<?php echo JRoute::_('index.php?option=com_djcatalog2'); ?>" method="post" name="adminForm" id="adminForm" class="form-horizontal">
	<fieldset>
		<div class="control-group">
			<div class="control-label">
				<?php echo JText::_('COM_DJCATALOG2_FIELD_DATE_TIME_LABEL'); ?>
			</div>
			<div class="controls">
				<?php echo Joomla\CMS\HTML\HTMLHelper::_('date', $this->item->sent_time);?>
			</div>
		</div>
		<div class="control-group">
			<div class="control-label">
				<?php echo JText::_('COM_DJCATALOG2_FIELD_SUBJECT_LABEL'); ?>
			</div>
			<div class="controls">
				<?php echo $this->item->subject;?>
			</div>
		</div>
		<div class="control-group">
			<div class="control-label">
				<?php echo JText::_('COM_DJCATALOG2_FIELD_MESSAGE_LABEL'); ?>
			</div>
			<div class="controls">
				<iframe src="<?php echo JRoute::_('index.php?option=com_djcatalog2&task=message.renderMsg&id=' . $this->item->id); ?>" style="width: 100%; min-height: 300px;"></iframe>
			</div>
		</div>
		
		<?php /*if ($attachments) {?>
		<h4><?php echo JText::_('COM_DJCATALOG2_ATTACHMENTS_HEADING'); ?></h4>
		<ul class="inline">
			<?php foreach ($attachments as $file) {?>
			<li>
				<a target="_blank" class="btn btn-primary btn-mini" href="<?php echo DJCatalog2HelperSiteRoute::buildRoute('getAttachmentDownload', array($this->item->id, $file['name'])); ?>"><?php echo $this->escape($file['name']); ?></a>
			</li>
			<?php } ?>
		</ul>
		<?php }*/ ?>
		
		<input type="hidden" name="task" value="" />
		<input type="hidden" name="reply_id" value="<?php echo $this->item->id; ?>" />
		<?php echo Joomla\CMS\HTML\HTMLHelper::_('form.token'); ?>
	</fieldset>
</form>
