Ejemplo n.º 1
0
 /**
  * Create a menu for Accounts
  * @param array Menu options to remove
  * @param X2Model Model object passed to the view
  * @param array Additional menu parameters
  */
 public function insertMenu($selectOptions = array(), $model = null, $menuParams = null)
 {
     $Accounts = Modules::displayName();
     $Account = Modules::displayName(false);
     $modelId = isset($model) ? $model->id : 0;
     $modelName = isset($model) ? $model->name : "";
     /**
      * To show all options:
      * $menuOptions = array(
      *     'all', 'create', 'report', 'import', 'export', 'view', 'edit', 'share',
      *     'delete', 'email', 'attach', 'quotes', 'quick', 'print',
      * );
      */
     $menuItems = array(array('name' => 'all', 'label' => Yii::t('accounts', 'All {module}', array('{module}' => $Accounts)), 'url' => array('index')), array('name' => 'create', 'label' => Yii::t('accounts', 'Create {module}', array('{module}' => $Account)), 'url' => array('create')), array('name' => 'report', 'label' => Yii::t('accounts', '{module} Report', array('{module}' => $Accounts)), 'url' => array('accountsReport')), array('name' => 'import', 'label' => Yii::t('accounts', "Import {module}", array('{module}' => $Accounts)), 'url' => array('admin/importModels', 'model' => 'Accounts')), array('name' => 'export', 'label' => Yii::t('accounts', 'Export {module}', array('{module}' => $Accounts)), 'url' => array('admin/exportModels', 'model' => 'Accounts')), RecordViewLayoutManager::getViewActionMenuListItem($modelId), array('name' => 'edit', 'label' => Yii::t('accounts', 'Edit {module}', array('{module}' => $Account)), 'url' => array('update', 'id' => $modelId)), array('name' => 'share', 'label' => Yii::t('accounts', 'Share {module}', array('{module}' => $Account)), 'url' => array('shareAccount', 'id' => $modelId)), array('name' => 'delete', 'label' => Yii::t('accounts', 'Delete {module}', array('{module}' => $Account)), 'url' => '#', 'linkOptions' => array('submit' => array('delete', 'id' => $modelId), 'confirm' => 'Are you sure you want to delete this item?')), array('name' => 'email', 'label' => Yii::t('app', 'Send Email'), 'url' => '#', 'linkOptions' => array('onclick' => 'toggleEmailForm(); return false;')), ModelFileUploader::menuLink(), array('name' => 'quotes', 'label' => Yii::t('quotes', 'Quotes/Invoices'), 'url' => 'javascript:void(0)', 'linkOptions' => array('onclick' => 'x2.inlineQuotes.toggle(); return false;')), array('name' => 'quick', 'label' => Yii::t('app', 'Quick Create'), 'url' => array('/site/createRecords', 'ret' => 'accounts'), 'linkOptions' => array('id' => 'x2-create-multiple-records-button', 'class' => 'x2-hint', 'title' => Yii::t('app', 'Create a {contact}, {account}, and {opportunity}.', array('{account}' => $Account, '{contact}' => Modules::displayName(false, "Contacts"), '{opportunity}' => Modules::displayName(false, "Opportunities"))))), array('name' => 'print', 'label' => Yii::t('app', 'Print Record'), 'url' => '#', 'linkOptions' => array('onClick' => "window.open('" . Yii::app()->createUrl('/site/printRecord', array('modelClass' => 'Accounts', 'id' => $modelId, 'pageTitle' => Yii::t('app', 'Account') . ': ' . $modelName)) . "');")), RecordViewLayoutManager::getEditLayoutActionMenuListItem());
     $this->prepareMenu($menuItems, $selectOptions);
     $this->actionMenu = $this->formatMenu($menuItems, $menuParams);
 }
Ejemplo n.º 2
0
 /**
  * Create a menu for Quotes
  * @param array Menu options to remove
  * @param X2Model Model object passed to the view
  * @param array Additional menu parameters
  */
 public function insertMenu($selectOptions = array(), $model = null, $menuParams = null)
 {
     $Quotes = Modules::displayName();
     $Quote = Modules::displayName(false);
     $modelId = isset($model) ? $model->id : 0;
     /**
      * To show all options:
      * $menuOptions = array(
      *     'index', 'invoices', 'create', 'view', 'email', 'edit', 'editLock', 'editStrictLock',
      *     'delete', 'attach', 'print', 'import', 'export', 'convert', 'duplicate'
      * );
      */
     $menuItems = array(array('name' => 'index', 'label' => Yii::t('quotes', '{module} List', array('{module}' => $Quotes)), 'url' => array('index')), array('name' => 'invoices', 'label' => Yii::t('quotes', 'Invoice List'), 'url' => array('indexInvoice')), array('name' => 'create', 'label' => Yii::t('quotes', 'Create'), 'url' => array('create')), RecordViewLayoutManager::getViewActionMenuListItem($modelId), array('name' => 'email', 'label' => Yii::t('app', 'Email {type}', array('{type}' => isset($model) && $model->type == 'invoice' ? 'Invoice' : $Quote)), 'url' => '#', 'linkOptions' => array('onclick' => 'toggleEmailForm(); return false;')), array('name' => 'editStrictLock', 'label' => Yii::t('quotes', 'Update'), 'url' => '#', 'linkOptions' => array('onClick' => 'dialogStrictLock();')), array('name' => 'editLock', 'label' => Yii::t('quotes', 'Update'), 'url' => '#', 'linkOptions' => array('onClick' => 'dialogLock();')), array('name' => 'edit', 'label' => Yii::t('quotes', 'Update'), 'url' => array('update', 'id' => $modelId)), array('name' => 'delete', 'label' => Yii::t('quotes', 'Delete'), 'url' => '#', 'linkOptions' => array('submit' => array('delete', 'id' => $modelId), 'confirm' => 'Are you sure you want to delete this item?')), ModelFileUploader::menuLink(), array('name' => 'print', 'label' => isset($model) && $model->type == 'invoice' ? Yii::t('quotes', 'Print Invoice') : Yii::t('quotes', 'Print {quote}', array('{quote}' => $Quote)), 'url' => '#', 'linkOptions' => array('onClick' => "window.open('" . Yii::app()->createUrl('/quotes/quotes/print', array('id' => $modelId)) . "')")), array('name' => 'import', 'label' => Yii::t('quotes', 'Import {module}', array('{module}' => $Quotes)), 'url' => array('admin/importModels', 'model' => 'Quote')), array('name' => 'export', 'label' => Yii::t('quotes', 'Export {module}', array('{module}' => $Quotes)), 'url' => array('admin/exportModels', 'model' => 'Quote')), array('name' => 'convert', 'label' => Yii::t('quotes', 'Convert To Invoice'), 'url' => array('convertToInvoice', 'id' => $modelId)), array('name' => 'duplicate', 'label' => Yii::t('quotes', 'Duplicate'), 'url' => array('create', 'duplicate' => $modelId)), RecordViewLayoutManager::getEditLayoutActionMenuListItem());
     $this->prepareMenu($menuItems, $selectOptions);
     $this->actionMenu = $this->formatMenu($menuItems, $menuParams);
 }
Ejemplo n.º 3
0
 /**
  * Create a menu for Leads
  * @param array Menu options to remove
  * @param X2Model Model object passed to the view
  * @param array Additional menu parameters
  */
 public function insertMenu($selectOptions = array(), $model = null, $menuParams = null)
 {
     $Leads = Modules::displayName();
     $Lead = Modules::displayName(false);
     $modelId = isset($model) ? $model->id : 0;
     /**
      * To show all options:
      * $menuOptions = array(
      *     'index', 'create', 'view', 'edit', 'delete', 'attach', 'quotes',
      *     'convert', 'print', 'import', 'export',
      * );
      */
     $menuItems = array(array('name' => 'index', 'label' => Yii::t('x2Leads', '{leads} List', array('{leads}' => $Leads)), 'url' => array('index')), array('name' => 'create', 'label' => Yii::t('x2Leads', 'Create {lead}', array('{lead}' => $Lead)), 'url' => array('create')), RecordViewLayoutManager::getViewActionMenuListItem($modelId), array('name' => 'edit', 'label' => Yii::t('x2Leads', 'Edit {lead}', array('{lead}' => $Lead)), 'url' => array('update', 'id' => $modelId)), array('name' => 'delete', 'label' => Yii::t('x2Leads', 'Delete {lead}', array('{lead}' => $Lead)), 'url' => '#', 'linkOptions' => array('submit' => array('delete', 'id' => $modelId), 'confirm' => 'Are you sure you want to delete this item?')), ModelFileUploader::menuLink(), array('name' => 'quotes', 'label' => Yii::t('quotes', 'Quotes/Invoices'), 'url' => 'javascript:void(0)', 'linkOptions' => array('onclick' => 'x2.inlineQuotes.toggle(); return false;')), array('name' => 'convertToContact', 'label' => Yii::t('x2Leads', 'Convert to {contact}', array('{contact}' => Modules::displayName(false, "Contacts"))), 'url' => '#', 'linkOptions' => array('id' => 'convert-lead-to-contact-button')), array('name' => 'convert', 'label' => Yii::t('x2Leads', 'Convert to {opportunity}', array('{opportunity}' => Modules::displayName(false, "Opportunities"))), 'url' => '#', 'linkOptions' => array('id' => 'convert-lead-button')), array('name' => 'print', 'label' => Yii::t('app', 'Print Record'), 'url' => '#', 'linkOptions' => array('onClick' => "window.open('" . Yii::app()->createUrl('/site/printRecord', array('modelClass' => 'X2Leads', 'id' => $modelId, 'pageTitle' => Yii::t('app', 'Leads') . ': ' . (isset($model) ? $model->name : ""))) . "');")), array('name' => 'import', 'label' => Yii::t('x2Leads', 'Import {leads}', array('{leads}' => $Leads)), 'url' => array('admin/importModels', 'model' => 'X2Leads'), 'visible' => Yii::app()->params->isAdmin), array('name' => 'export', 'label' => Yii::t('x2Leads', 'Export {leads}', array('{leads}' => $Leads)), 'url' => array('admin/exportModels', 'model' => 'X2Leads'), 'visible' => Yii::app()->params->isAdmin), RecordViewLayoutManager::getEditLayoutActionMenuListItem());
     $this->prepareMenu($menuItems, $selectOptions);
     $this->actionMenu = $this->formatMenu($menuItems, $menuParams);
 }
Ejemplo n.º 4
0
 /**
  * Create a menu for Opportunities
  * @param array Menu options to remove
  * @param X2Model Model object passed to the view
  * @param array Additional menu parameters
  */
 public function insertMenu($selectOptions = array(), $model = null, $menuParams = null)
 {
     $Opportunities = Modules::displayName();
     $Opportunity = Modules::displayName(false);
     $modelId = isset($model) ? $model->id : 0;
     /**
      * To show all options:
      * $menuOptions = array(
      *     'index', 'create', 'view', 'edit', 'share', 'delete', 'attach', 'import', 'export', 'quick',
      * );
      */
     $menuItems = array(array('name' => 'index', 'label' => Yii::t('opportunities', '{opportunities} List', array('{opportunities}' => $Opportunities)), 'url' => array('index')), array('name' => 'create', 'label' => Yii::t('opportunities', 'Create {opportunity}', array('{opportunity}' => $Opportunity)), 'url' => array('create')), RecordViewLayoutManager::getViewActionMenuListItem($modelId), array('name' => 'edit', 'label' => Yii::t('opportunities', 'Edit {opportunity}', array('{opportunity}' => $Opportunity)), 'url' => array('update', 'id' => $modelId)), array('name' => 'share', 'label' => Yii::t('accounts', 'Share {opportunity}', array('{opportunity}' => $Opportunity)), 'url' => array('shareOpportunity', 'id' => $modelId)), array('name' => 'delete', 'label' => Yii::t('opportunities', 'Delete'), 'url' => '#', 'linkOptions' => array('submit' => array('delete', 'id' => $modelId), 'confirm' => 'Are you sure you want to delete this item?')), ModelFileUploader::menuLink(), array('name' => 'quotes', 'label' => Yii::t('quotes', 'Quotes/Invoices'), 'url' => 'javascript:void(0)', 'linkOptions' => array('onclick' => 'x2.inlineQuotes.toggle(); return false;')), array('name' => 'import', 'label' => Yii::t('opportunities', 'Import {opportunities}', array('{opportunities}' => $Opportunities)), 'url' => array('admin/importModels', 'model' => 'Opportunity')), array('name' => 'export', 'label' => Yii::t('opportunities', 'Export {opportunities}', array('{opportunities}' => $Opportunities)), 'url' => array('admin/exportModels', 'model' => 'Opportunity')), array('name' => 'quick', 'label' => Yii::t('app', 'Quick Create'), 'url' => array('/site/createRecords', 'ret' => 'opportunities'), 'linkOptions' => array('id' => 'x2-create-multiple-records-button', 'class' => 'x2-hint', 'title' => Yii::t('app', 'Create a {contact}, {account}, and {opportunity}.', array('{opportunity}' => $Opportunity, '{contact}' => Modules::displayName(false, "Contacts"), '{account}' => Modules::displayName(false, "Accounts"))))), RecordViewLayoutManager::getEditLayoutActionMenuListItem());
     $this->prepareMenu($menuItems, $selectOptions);
     $this->actionMenu = $this->formatMenu($menuItems, $menuParams);
 }
Ejemplo n.º 5
0
 /**
  * Create a menu for Services
  * @param array Menu options to remove
  * @param X2Model Model object passed to the view
  * @param array Additional menu parameters
  */
 public function insertMenu($selectOptions = array(), $model = null, $menuParams = null)
 {
     $Services = Modules::displayName();
     $Service = Modules::displayName(false);
     $modelId = isset($model) ? $model->id : 0;
     /**
      * To show all options:
      * $menuOptions = array(
      *     'index', 'create', 'view', 'edit', 'delete', 'email', 'attach', 'quotes',
      *     'createWebForm', 'print', 'import', 'export',
      * );
      */
     $menuItems = array(array('name' => 'index', 'label' => Yii::t('services', 'All Cases'), 'url' => array('index')), array('name' => 'create', 'label' => Yii::t('services', 'Create Case'), 'url' => array('create')), RecordViewLayoutManager::getViewActionMenuListItem($modelId), array('name' => 'edit', 'label' => Yii::t('services', 'Edit Case'), 'url' => array('update', 'id' => $modelId)), array('name' => 'delete', 'label' => Yii::t('services', 'Delete Case'), 'url' => '#', 'linkOptions' => array('submit' => array('delete', 'id' => $modelId), 'confirm' => 'Are you sure you want to delete this item?')), array('name' => 'email', 'label' => Yii::t('app', 'Send Email'), 'url' => '#', 'linkOptions' => array('onclick' => 'toggleEmailForm(); return false;')), ModelFileUploader::menuLink(), array('name' => 'quotes', 'label' => Yii::t('quotes', '{quotes}/Invoices', array('{quotes}' => Modules::displayName(true, "Quotes"))), 'url' => 'javascript:void(0)', 'linkOptions' => array('onclick' => 'x2.inlineQuotes.toggle(); return false;')), array('name' => 'createWebForm', 'label' => Yii::t('services', 'Create Web Form'), 'url' => array('createWebForm')), array('name' => 'print', 'label' => Yii::t('app', 'Print Record'), 'url' => '#', 'linkOptions' => array('onClick' => "window.open('" . Yii::app()->createUrl('/site/printRecord', array('modelClass' => 'Services', 'id' => $modelId, 'pageTitle' => Yii::t('app', '{service} Case', array('{service}' => $Service)) . ': ' . (isset($model) ? $model->name : ""))) . "');")), array('name' => 'import', 'label' => Yii::t('services', 'Import {services}', array('{services}' => $Services)), 'url' => array('admin/importModels', 'model' => 'Services')), array('name' => 'export', 'label' => Yii::t('services', 'Export {services}', array('{services}' => $Services)), 'url' => array('admin/exportModels', 'model' => 'Services')), RecordViewLayoutManager::getEditLayoutActionMenuListItem());
     $this->prepareMenu($menuItems, $selectOptions);
     $this->actionMenu = $this->formatMenu($menuItems, $menuParams);
 }
Ejemplo n.º 6
0
 * 
 * You can contact X2Engine, Inc. P.O. Box 66752, Scotts Valley,
 * California 95067, USA. or at email address contact@x2engine.com.
 * 
 * The interactive user interfaces in modified source and object code versions
 * of this program must display Appropriate Legal Notices, as required under
 * Section 5 of the GNU Affero General Public License version 3.
 * 
 * In accordance with Section 7(b) of the GNU Affero General Public License version 3,
 * these Appropriate Legal Notices must retain the display of the "Powered by
 * X2Engine" logo. If the display of the logo is not reasonably feasible for
 * technical reasons, the Appropriate Legal Notices must display the words
 * "Powered by X2Engine".
 *****************************************************************************************/
include "protected/modules/bugReports/bugReportsConfig.php";
$this->actionMenu = $this->formatMenu(array(array('label' => Yii::t('module', '{X} List', array('{X}' => Modules::itemDisplayName())), 'url' => array('index')), array('label' => Yii::t('module', 'Create {X}', array('{X}' => Modules::itemDisplayName())), 'url' => array('create')), array('label' => Yii::t('module', 'View {X}', array('{X}' => Modules::itemDisplayName()))), array('label' => Yii::t('module', 'Update {X}', array('{X}' => Modules::itemDisplayName())), 'url' => array('update', 'id' => $model->id)), array('label' => Yii::t('module', 'Delete {X}', array('{X}' => Modules::itemDisplayName())), 'url' => '#', 'linkOptions' => array('submit' => array('delete', 'id' => $model->id), 'confirm' => Yii::t('app', 'Are you sure you want to delete this item?'))), ModelFileUploader::menuLink()));
?>
<div class="page-title">
    <h2>
    <?php 
echo Yii::t('module', 'View {X}', array('{X}' => Modules::itemDisplayName()));
?>
: <?php 
echo $model->name;
?>
    </h2>
    <?php 
echo X2Html::emailFormButton();
echo X2Html::inlineEditButtons();
?>
</div>
Ejemplo n.º 7
0
 /**
  * Create a menu for Contacts
  * @param array Menu options to remove
  * @param X2Model Model object passed to the view
  * @param array Additional menu parameters
  */
 public function insertMenu($selectOptions = array(), $model = null, $menuParams = null)
 {
     $Contacts = Modules::displayName();
     $Contact = Modules::displayName(false);
     $modelId = isset($model) ? $model->id : 0;
     $menuItems = array(array('name' => 'all', 'label' => Yii::t('contacts', 'All {module}', array('{module}' => $Contacts)), 'url' => array('index')), array('name' => 'lists', 'label' => Yii::t('contacts', 'Lists'), 'url' => array('lists')), array('name' => 'create', 'label' => Yii::t('contacts', 'Create {module}', array('{module}' => $Contact)), 'url' => array('create')), RecordViewLayoutManager::getViewActionMenuListItem($modelId), array('name' => 'edit', 'label' => Yii::t('contacts', 'Edit {module}', array('{module}' => $Contact)), 'url' => array('update', 'id' => $modelId)), array('name' => 'save', 'label' => Yii::t('contacts', 'Save {module}', array('{module}' => $Contact)), 'url' => '#', 'linkOptions' => array('onclick' => "\$('#save-button').click();return false;")), array('name' => 'share', 'label' => Yii::t('contacts', 'Share {module}', array('{module}' => $Contact)), 'url' => array('shareContact', 'id' => $modelId)), array('name' => 'delete', 'label' => Yii::t('contacts', 'Delete {module}', array('{module}' => $Contact)), 'url' => '#', 'linkOptions' => array('submit' => array('delete', 'id' => $modelId), 'confirm' => 'Are you sure you want to delete this item?')), array('name' => 'email', 'label' => Yii::t('app', 'Send Email'), 'url' => '#', 'linkOptions' => array('onclick' => 'toggleEmailForm(); return false;')), ModelFileUploader::menuLink(), array('name' => 'quotes', 'label' => Yii::t('quotes', 'Quotes/Invoices'), 'url' => 'javascript:void(0)', 'linkOptions' => array('onclick' => 'x2.inlineQuotes.toggle(); return false;')), array('name' => 'subscribe', 'label' => Yii::t('quotes', 'Subscribe'), 'url' => '#', 'linkOptions' => array('class' => 'x2-subscribe-button', 'onclick' => 'return subscribe($(this));', 'title' => Yii::t('contacts', 'Receive email updates every time information for {name} changes', array('{name}' => isset($model->firstName, $model->lastName) ? CHtml::encode($model->firstName . ' ' . $model->lastName) : "")))), array('name' => 'unsubscribe', 'label' => Yii::t('quotes', 'Unsubscribe'), 'url' => '#', 'linkOptions' => array('class' => 'x2-subscribe-button', 'onclick' => 'return subscribe($(this));', 'title' => Yii::t('contacts', 'Receive email updates every time information for {name} changes', array('{name}' => isset($model->firstName, $model->lastName) ? CHtml::encode($model->firstName . ' ' . $model->lastName) : "")))), array('name' => 'createList', 'label' => Yii::t('contacts', 'Create List'), 'url' => array('createList')), array('name' => 'viewList', 'label' => Yii::t('contacts', 'View List'), 'url' => array('list', 'id' => $modelId)), array('name' => 'editList', 'label' => Yii::t('contacts', 'Edit List'), 'url' => array('updateList', 'id' => $modelId)), array('name' => 'deleteList', 'label' => Yii::t('contacts', 'Delete List'), 'url' => '#', 'linkOptions' => array('submit' => array('deleteList', 'id' => $modelId), 'confirm' => 'Are you sure you want to delete this item?')), array('name' => 'import', 'label' => Yii::t('contacts', 'Import {module}', array('{module}' => $Contacts)), 'url' => array('admin/importModels', 'model' => 'Contacts')), array('name' => 'export', 'label' => Yii::t('contacts', 'Export {module}', array('{module}' => $Contacts)), 'url' => array('admin/exportModels', 'model' => 'Contacts')), array('name' => 'quick', 'label' => Yii::t('app', 'Quick Create'), 'url' => array('/site/createRecords', 'ret' => 'contacts'), 'linkOptions' => array('id' => 'x2-create-multiple-records-button', 'class' => 'x2-hint', 'title' => Yii::t('app', 'Create a {contact}, {account}, and {opportunity}.', array('{contact}' => $Contact, '{account}' => Modules::displayName(false, "Accounts"), '{opportunity}' => Modules::displayName(false, "Opportunities"))))), array('name' => 'print', 'label' => Yii::t('app', 'Print Record'), 'url' => '#', 'linkOptions' => array('onClick' => "window.open('" . Yii::app()->createUrl('/site/printRecord', array('modelClass' => 'Contacts', 'id' => $modelId, 'pageTitle' => Yii::t('app', 'Contact') . ': ' . (isset($model) ? $model->name : ""))) . "');")), array('name' => 'addRecordAlias', 'label' => Yii::t('contacts', 'Add Social Profile'), 'url' => '#', 'linkOptions' => array('id' => 'record-aliases-action-menu-link')), RecordViewLayoutManager::getEditLayoutActionMenuListItem());
     $this->prepareMenu($menuItems, $selectOptions);
     $this->actionMenu = $this->formatMenu($menuItems, $menuParams);
 }
Ejemplo n.º 8
0
 * 
 * In accordance with Section 7(b) of the GNU Affero General Public License version 3,
 * these Appropriate Legal Notices must retain the display of the "Powered by
 * X2Engine" logo. If the display of the logo is not reasonably feasible for
 * technical reasons, the Appropriate Legal Notices must display the words
 * "Powered by X2Engine".
 *****************************************************************************************/
$layoutManager = $this->widget('RecordViewLayoutManager', array('staticLayout' => false));
Yii::app()->clientScript->registerCss('contactRecordViewCss', "\n\n#content {\n    background: none !important;\n    border: none !important;\n}\n");
Yii::app()->clientScript->registerResponsiveCssFile(Yii::app()->theme->baseUrl . '/css/responsiveRecordView.css');
include "protected/modules/templates/templatesConfig.php";
$actionMenuViewItem = RecordViewLayoutManager::getViewActionMenuListItem($model->id);
if (isset($actionMenuViewItem['url'])) {
    unset($actionMenuViewItem['url']);
}
$this->actionMenu = $this->formatMenu(array(array('label' => Yii::t('module', '{X} List', array('{X}' => Modules::itemDisplayName())), 'url' => array('index')), array('label' => Yii::t('module', 'Create {X}', array('{X}' => Modules::itemDisplayName())), 'url' => array('create')), $actionMenuViewItem, array('label' => Yii::t('module', 'Edit {X}', array('{X}' => Modules::itemDisplayName())), 'url' => array('update', 'id' => $model->id)), array('label' => Yii::t('module', 'Delete {X}', array('{X}' => Modules::itemDisplayName())), 'url' => '#', 'linkOptions' => array('submit' => array('delete', 'id' => $model->id), 'confirm' => Yii::t('app', 'Are you sure you want to delete this item?'))), array('label' => Yii::t('app', 'Send Email'), 'url' => '#', 'linkOptions' => array('onclick' => 'toggleEmailForm(); return false;')), ModelFileUploader::menuLink(), array('label' => Yii::t('quotes', 'Quotes/Invoices'), 'url' => 'javascript:void(0)', 'linkOptions' => array('onclick' => 'x2.inlineQuotes.toggle(); return false;')), array('label' => Yii::t('app', 'Print Record'), 'url' => '#', 'linkOptions' => array('onClick' => "window.open('" . Yii::app()->createUrl('/site/printRecord', array('modelClass' => "Templates", 'id' => $model->id, 'pageTitle' => Yii::t('app', '{X}', array('{X}' => Modules::itemDisplayName())) . ': ' . $model->name)) . "');")), RecordViewLayoutManager::getEditLayoutActionMenuListItem()), array('X2Model' => $model));
$modelType = json_encode("Templates");
$modelId = json_encode($model->id);
Yii::app()->clientScript->registerScript('widgetShowData', "\n\$(function() {\n\t\$('body').data('modelType', {$modelType});\n\t\$('body').data('modelId', {$modelId});\n});");
?>
<div class="page-title-placeholder"></div>
<div class="page-title-fixed-outer">
    <div class="page-title-fixed-inner">
        <div class="page-title templates">
            <h2>
                <?php 
echo Yii::t('module', 'View {X}', array('{X}' => Modules::itemDisplayName()));
?>
: <?php 
echo $model->name;
?>