<?php

/**
 * @version     $Id$
 * @package     JSN_Mobilize
 * @subpackage  AdminComponent
 * @author      JoomlaShine Team <support@joomlashine.com>
 * @copyright   Copyright (C) 2012 JoomlaShine.com. All Rights Reserved.
 * @license     GNU/GPL v2 or later http://www.gnu.org/licenses/gpl-2.0.html
 *
 * Websites: http://www.joomlashine.com
 * Technical Support:  Feedback - http://www.joomlashine.com/contact-us/get-support.html
 */
// No direct access to this file
defined('_JEXEC') or die('Restricted access');

/**
 * Update view.
 *
 * @package     JSN_Mobilize
 * @subpackage  AdminComponent
 * @since       1.0.0
 */
class JSNMobilizeViewUpdate extends JSNUpdateView
{

	/**
	 * Method for display page.
	 *
	 * @param   boolean  $tpl  The name of the template file to parse; automatically searches through the template paths.
	 *
	 * @return  mixed  A string if successful, otherwise a JError object.
	 */
	public function display($tpl = null)
	{
		// Get config parameters
		$config = JSNConfigHelper::get();

		// Set toolbar title
		JToolBarHelper::title(JText::_('JSN_MOBILIZE_PAGE_UPDATE_TITLE'));

		// Load assets
		JSNMobilizeHelper::loadAssets();

		// Get messages
		$msgs = $config->get('disable_all_messages') ? '' : (count($msgs = JSNUtilsMessage::getList('EDIT')) ? JSNUtilsMessage::showMessages($msgs) : '');

		// Assign variables for rendering
		$this->assignRef('msgs', $msgs);

		// Display the template
		parent::display($tpl);
	}

}
