    <?php if(!$this->isExternal()): ?>
    <div class="back">
         <a href="<?php echo $this->getBackUrl() ?>" class="left">&laquo;<?php echo $this->__(' Back to My Support Tickets') ?></a>
    </div>
    <?php endif; ?>
    
    <?php if( $this->getCollection() && $this->getCollection()->count() ): ?>
        <?php foreach ($this->getCollection() as $_hd): ?>
            <div class="message-box">
                <div class="message-header inner-head">
                    <h5><?php echo $_hd->getAuthorName()?> <span class="separator">|</span> <?php echo $this->dateFormat($_hd->getCreatedTime()) ?></h5>
                    <?php if ($this->getCanQuote()): ?>
                    <p class="do-quote">
                        <a href="#reply" onclick="insQuot(this)">
                            <?php echo $this->__('Quote')?>
                            <textarea class="no-display"><?php echo $this->getQuoteContent($_hd);?></textarea>
                        </a>
                    </p>
                    <?php endif; ?>
                </div>
                <div class="message-body">
                    <?php echo $_hd->isDepartmentReply() ? @htmlspecialchars_decode($this->getContent($_hd)) : $this->getContent($_hd) ?>
                </div>
                <?php if($_hd->getFilename()): ?>
                <p class="attachment"><?php echo count($_hd->getFilename()) ==1 ? $this->__('Attachment') : $this->__('Attachments') ?>: 
                    <?php foreach($_hd->getFilename() as $file) : ?>
                    <a href="<?php echo $_hd->getFileUrl($file)?>"><?php echo $file ?></a>&nbsp; 
                    <?php endforeach ?>
                </p>
                <?php endif;?>
            </div>
        <?php endforeach; ?>
    <?php endif;?>
    <div class="message-box">
        <div class="message-header inner-head">
            <h5><?php echo $this->getTicket()->getInitiator()->getName()?> <span class="separator">|</span>  <?php echo $this->dateFormat($this->getTicket()->getCreatedTime()) ?></h5>
        </div>

        <div class="message-body">
            <?php echo $this->getTicket()->getCreatedBy() == 'admin' ? @htmlspecialchars_decode($this->getContent($this->getTicket())) : $this->getContent($this->getTicket()) ?>
        </div>
        <?php if($this->getTicket()->getFilename()):?>
            <p class="attachment">
                <?php echo count($this->getTicket()->getFilename()) ==1 ? $this->__('Attachment') : $this->__('Attachments') ?>: 
                <?php foreach($this->getTicket()->getFilename() as $file) : ?>
                <a href="<?php echo $this->getTicket()->getFileUrl($file)?>"><?php echo $file ?></a>&nbsp; 
                <?php endforeach ?>
            </p>
        <?php endif;?>
    </div>   
