<?php
/**
 * @version		1.2 feedback $
 * @package		feedback
 * @copyright	Copyright © 2010 Mertonium. All rights reserved.
 * @license		GNU/GPL
 * @author		Mertonium
 * @author mail	john@mertonium.com
 * @website		http://mertonium.com
 *
 *
 * @MVC architecture generated by MVC generator tool at http://www.alphaplug.com
 */

// no direct access
defined('_JEXEC') or die('Restricted access');

jimport( 'joomla.application.component.view' );

class feedbackViewFeedbackentry extends Jview
{
	function display($tpl = null) {
		$params = JComponentHelper::getParams('com_feedback');	
		$model = JRequest::getVar('model');
		$array = JRequest::getVar('cid',  0, '', 'array');
		$feedbackentry_id = (int)$array[0];
		
		$feedbackentry = $model->getFeedbackentry($feedbackentry_id);		
		$isNew = (is_null($feedbackentry));
	 
		$text = $isNew ? JText::_( 'New' ) : JText::_( 'View' );
		JToolBarHelper::title(   JText::_( 'Feedback Entry' ).': <small>[ ' . $text.' ]</small>' );
		//JToolBarHelper::save();
		if ($isNew)  {
			JToolBarHelper::cancel();
		} else {
			// for existing items the button is renamed `close`
			JToolBarHelper::cancel( 'cancel', 'Close' );
		}
			
		$this->assignRef('params', $params);
		$this->assignRef('feedbackentry',$feedbackentry);	
		
		//show view
		parent::display($tpl);
	}
}