public function getDescription() { $desc = Yii::t('marketing', 'Create a public form to receive new {module}.', array('{module}' => lcfirst(Modules::displayName(true, "Contacts")))) . '<br/>' . '<br/>'; $desc .= Yii::t('marketing', 'If no lead routing has been configured, all new {module} will be assigned to "Anyone".', array('{module}' => lcfirst(Modules::displayName(false, "Contacts")))) . '<br/>' . '<br/>'; $desc .= Yii::t('marketing', 'If you want to keep your current HTML forms but still get web leads into X2, please see the wiki article located here: {link}', array('{link}' => CHtml::link(Yii::t('marketing', 'Web Lead API'), 'http://wiki.x2engine.com/wiki/Web_Lead_API_(new)', array('target' => '_blank')))); return $desc; }
public static function setUpBeforeClass() { Yii::app()->controller = new QuotesController('quote', new QuotesModule('quotes', null)); Yii::app()->db->createCommand("\n update x2_modules set title=:title where name='quotes'\n ")->execute(array(':title' => self::$customQuotesTitle)); Yii::app()->db->createCommand("\n update x2_modules set title=:title where name='contacts'\n ")->execute(array(':title' => self::$customContactsTitle)); Modules::displayName(false, "Quotes"); // add titles to Modules title cache Modules::displayName(false, "Contacts"); // add titles to Modules title cache parent::setUpBeforeClass(); }
public function testReplaceVariables() { $quote = $this->quotes('docsTest'); $contact = $this->contacts('testAnyone'); $account = $this->accounts('testQuote'); $attrs = $quote->getAttributes(); $contactAttrs = $contact->getAttributes(); $accountAttrs = $account->getAttributes(); // ensure that tokens with references to customized class names get properly replaced $quoteTemplate = array(); foreach ($attrs as $name => $val) { $quoteTemplate[$name] = "{" . $name . "}"; } foreach ($contactAttrs as $name => $val) { $quoteTemplate[$name] = "{" . self::$contactsField . ".{$name}}"; } foreach ($accountAttrs as $name => $val) { $quoteTemplate[$name] = "{" . self::$accountsField . ".{$name}}"; } foreach (array_intersect(array_keys($contactAttrs), array_keys($attrs), array_keys($accountAttrs)) as $name) { unset($quoteTemplate[$name]); unset($attrs[$name]); unset($contactAttrs[$name]); unset($accountAttrs[$name]); } // add quotes template-specific token $quoteTemplate['dateNow'] = '{dateNow}'; $quoteTemplate['lineItems'] = '{lineItems}'; $quoteTemplate['quoteOrInvoice'] = '{quoteOrInvoice}'; $quoteTemplate = CJSON::encode($quoteTemplate); $str = Docs::replaceVariables($quoteTemplate, $quote, array(), false, false); $this->assertEquals(array_merge(array_map(function ($elem) { return (string) $elem; }, $attrs), array_map(function ($elem) { return (string) $elem; }, $contactAttrs), array_map(function ($elem) { return (string) $elem; }, $accountAttrs), array('lineItems' => preg_replace("/\r|\n/", "", $quote->productTable(true)), 'dateNow' => date("F d, Y", time()), 'quoteOrInvoice' => Yii::t('quotes', $quote->type == 'invoice' ? 'Invoice' : Modules::displayName(false, "Quotes")))), CJSON::decode($str)); }
/** * @return array the config array passed to widget () */ public function getGridViewConfig() { if (!isset($this->_gridViewConfig)) { $this->_gridViewConfig = array_merge(parent::getGridViewConfig(), array('massActions' => array('MassCompleteAction', 'MassUncompleteAction'), 'enableQtips' => true, 'qtipManager' => array('X2GridViewQtipManager', 'loadingText' => addslashes(Yii::t('app', 'loading...')), 'qtipSelector' => ".contact-name"), 'moduleName' => 'Actions', 'defaultGvSettings' => array('gvCheckbox' => 30, 'actionDescription' => 140, 'associationName' => 165, 'assignedTo' => 105, 'completedBy' => 86, 'createDate' => 79, 'dueDate' => 77, 'lastUpdated' => 79), 'specialColumns' => array('actionDescription' => array('header' => Yii::t('actions', '{Action} Description', array('{Action}' => Modules::displayName(false, 'Actions'))), 'name' => 'actionDescription', 'value' => 'CHtml::link( ($data->type=="attachment") ? Media::attachmentActionText($data->actionDescription) : CHtml::encode( Formatter::trimText($data->actionDescription)), Yii::app()->controller->createUrl ( "actions/actions/view", array("id"=>$data->id)))', 'type' => 'raw', 'filter' => false, 'sortable' => false), 'associationName' => array('name' => 'associationName', 'header' => Yii::t('actions', 'Association Name'), 'value' => 'strcasecmp($data->associationName,"None") == 0 ? Yii::t("app","None") : CHtml::link( $data->associationName, Yii::app()->controller->createUrl ( "/".$data->associationType."/". $data->associationType."/view", array ("id" => $data->associationId)), array("class"=>($data->associationType=="contacts" ? "contact-name" : null)))', 'type' => 'raw')), 'enableTags' => true)); } return $this->_gridViewConfig; }
/** * Create a menu for Groups * @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) { $Group = Modules::displayName(false); $modelId = isset($model) ? $model->id : 0; /** * To show all options: * $menuOptions = array( * 'index', 'create', 'view', 'edit', 'delete', * ); */ $menuItems = array(array('name' => 'index', 'label' => Yii::t('groups', '{group} List', array('{group}' => $Group)), 'url' => array('index')), array('name' => 'create', 'label' => Yii::t('groups', 'Create {group}', array('{group}' => $Group)), 'url' => array('create')), array('name' => 'view', 'label' => Yii::t('groups', 'View'), 'url' => array('view', 'id' => $modelId)), array('name' => 'edit', 'label' => Yii::t('groups', 'Edit {group}', array('{group}' => $Group)), 'url' => array('update', 'id' => $modelId)), array('name' => 'delete', 'label' => Yii::t('groups', 'Delete {group}', array('{group}' => $Group)), 'url' => '#', 'linkOptions' => array('submit' => array('delete', 'id' => $modelId), 'confirm' => Yii::t('app', 'Are you sure you want to delete this item?')))); $this->prepareMenu($menuItems, $selectOptions); $this->actionMenu = $this->formatMenu($menuItems, $menuParams); }
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS. * * This program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more * details. * * You should have received a copy of the GNU Affero General Public License along with * this program; if not, see http://www.gnu.org/licenses or write to the Free * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA * 02110-1301 USA. * * 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". *****************************************************************************************/ $this->pageTitle = CHtml::encode(Yii::app()->settings->appName . ' - ' . Yii::t('x2Leads', 'Leads')); $menuOptions = array('index', 'create', 'import', 'export'); $this->insertMenu($menuOptions); Yii::app()->clientScript->registerScript('search', "\n\$('.search-button').click(function(){\n\t\$('.search-form').toggle();\n\treturn false;\n});\n\$('.search-form form').submit(function(){\n\t\$.fn.yiiGridView.update('x2Leads-grid', {\n\t\tdata: \$(this).serialize()\n\t});\n\treturn false;\n});\n"); $this->widget('X2GridView', array('id' => 'x2Leads-grid', 'title' => Yii::t('x2Leads', '{leads}', array('{leads}' => Modules::displayName())), 'buttons' => array('advancedSearch', 'clearFilters', 'columnSelector', 'autoResize', 'showHidden'), 'template' => '<div id="x2-gridview-top-bar-outer" class="x2-gridview-fixed-top-bar-outer">' . '<div id="x2-gridview-top-bar-inner" class="x2-gridview-fixed-top-bar-inner">' . '<div id="x2-gridview-page-title" ' . 'class="page-title icon x2Leads x2-gridview-fixed-title">' . '{title}{buttons}{filterHint}' . '{summary}{topPager}{items}{pager}', 'fixedHeader' => true, 'dataProvider' => $model->search(), 'filter' => $model, 'pager' => array('class' => 'CLinkPager', 'maxButtonCount' => 10), 'modelName' => 'X2Leads', 'viewName' => 'x2Leads', 'defaultGvSettings' => array('gvCheckbox' => 30, 'name' => 164, 'quoteAmount' => 95, 'probability' => 77, 'expectedCloseDate' => 125, 'createDate' => 78, 'lastActivity' => 79, 'assignedTo' => 119), 'excludedColumns' => array('convertedToType', 'convertedToId'), 'dataColumnClass' => 'application.modules.x2Leads.components.X2LeadsDataColumn', 'specialColumns' => array('name' => array('name' => 'name', 'header' => Yii::t('x2Leads', 'Name'), 'value' => 'CHtml::link($data->renderAttribute("name"),array("view","id"=>$data->id))', 'type' => 'raw'), 'id' => array('name' => 'id', 'header' => Yii::t('x2Leads', 'ID'), 'value' => 'CHtml::link($data->id,array("view","id"=>$data->id))', 'type' => 'raw')), 'enableControls' => true, 'fullscreen' => true));
public function getDisplayName($plural = true, $ofModule = true) { return Yii::t('contacts', '{contact} Lists|{contact} List', array((int) $plural, '{contact}' => Modules::displayName(false, 'Contacts'))); }
private function createEmailOpenedAction() { $now = time(); $action = new Actions(); $action->type = 'emailOpened'; $action->associationType = $this->action->associationType; $action->associationId = $this->action->associationId; $action->createDate = $now; $action->lastUpdated = $now; $action->completeDate = $now; $action->complete = 'Yes'; $action->updatedBy = 'admin'; $action->associationName = $this->action->associationName; $action->visibility = $this->action->visibility; $action->assignedTo = $this->action->assignedTo; $action->actionDescription = Yii::t('marketing', '{recordType} has opened the email sent on ', array('{recordType}' => Modules::displayName(false, $this->action->associationType))); $action->actionDescription .= Formatter::formatLongDateTime($this->action->createDate) . "<br>"; $action->actionDescription .= $this->action->actionDescription; return $action; }
public function getDisplayName($plural = true) { $moduleName = X2Model::getModuleName(get_class($this)); return Modules::displayName($plural, $moduleName); }
* details. * * You should have received a copy of the GNU Affero General Public License along with * this program; if not, see http://www.gnu.org/licenses or write to the Free * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA * 02110-1301 USA. * * 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". *****************************************************************************************/ if ($this->action->id == 'createEmail') { $title = Yii::t('docs', 'Create Email Template'); } else { if ($this->action->id == 'createQuote') { $title = Yii::t('docs', 'Create {quote} Template', array('{quote}' => Modules::displayName(false, "Quotes"))); } else { $title = Yii::t('docs', 'Create Document'); } } $this->renderPartial('_docPageHeader', compact('title', 'model')); echo $this->renderPartial('_form', array('model' => $model, 'users' => $users));
* 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". *****************************************************************************************/ Yii::app()->clientScript->registerCss('actionMenu', "\n\n#action-menu-right-widget a {\n text-decoration: none;\n color: black;\n}\n\n"); $Action = Modules::displayName(false, 'Actions'); $Actions = Modules::displayName(true, 'Actions'); Yii::app()->clientScript->registerScript('setShowActions', ' if (typeof x2 == "undefined") x2 = {}; x2.setShowActions = function(type) { var saveShowActionsUrl = ' . json_encode(Yii::app()->controller->createUrl('/actions/actions/saveShowActions')) . '; var viewUrl = "' . Yii::app()->controller->createUrl('/actions/actions/viewAll') . '"; $.post( saveShowActionsUrl, { ShowActions: type } ); }; '); ?> <ul id='action-menu-right-widget'> <li>
<div class="responsive-page-title page-title icon actions" id="page-header"> <h2> <?php echo Yii::t('actions', '{module}', array('{module}' => Modules::displayName())); ?> </h2> <?php echo ResponsiveHtml::gripButton(); ?> <div class='responsive-menu-items'> <?php /* disabled until fixed header is added echo CHtml::link(Yii::t('actions','Back to Top'),'#',array('class'=>'x2-button right','id'=>'scroll-top-button')); */ echo CHtml::link(Yii::t('actions', 'Filters'), '#', array('class' => 'controls-button x2-button right', 'id' => 'advanced-controls-toggle')); echo CHtml::link(Yii::t('actions', 'New {module}', array('{module}' => Modules::displayName(false))), array('/actions/actions/create'), array('class' => 'controls-button x2-button right', 'id' => 'create-button')); echo CHtml::link(Yii::t('actions', 'Switch to Grid'), array('index', 'toggleView' => 1), array('class' => 'x2-button right')); ?> </div> </div> <?php echo $this->renderPartial('_advancedControls', $params, true); $this->widget('zii.widgets.CListView', array('id' => 'action-list', 'dataProvider' => $dataProvider, 'itemView' => 'application.modules.actions.views.actions._viewIndex', 'htmlOptions' => array('class' => 'action x2-list-view list-view', 'style' => 'width:100%'), 'viewData' => $params, 'template' => '{items}{pager}', 'afterAjaxUpdate' => 'js:function(){ clickedFlag=false; lastClass=""; $(\'#advanced-controls\').after(\'<div class="form x2-layout-island" id="action-view-pane" style="float:right;width:0px;display:none;padding:0px;"></div>\'); }', 'pager' => array('class' => 'ext.infiniteScroll.IasPager', 'rowSelector' => '.view', 'listViewId' => 'action-list', 'header' => '', 'options' => array('history' => true, 'triggerPageTreshold' => 2, 'trigger' => Yii::t('app', 'Load More'), 'scrollContainer' => '.items', 'container' => '.items')))); ?> <script> var clickedFlag=false;
case 'c': // contact $link = '<strong>' . CHtml::encode($item['model']->name) . '</strong><br />' . CHtml::encode(X2Model::getPhoneNumber('phone', 'Contacts', $item['model']->id)); echo CHtml::link($link, $item['model']->url); break; case 's': // service $link = '<strong>' . Yii::t('app', 'Service Case') . ' ' . CHtml::encode($item['model']->name) . '</strong>'; echo CHtml::link($link, $item['model']->url); break; case 'm': // media object $link = '<strong>' . Yii::t('app', 'File') . ':<br/>' . CHtml::encode($item['model']->fileName) . '</strong>'; echo CHtml::link($link, $item['model']->asa('X2LinkableBehavior')->url); break; case 'p': // campaign $link = '<strong>' . Yii::t('app', 'Campaign', array()) . ':<br/>' . CHtml::encode($item['model']->name) . '</strong>'; echo CHtml::link($link, $item['model']->url); break; default: $link = '<strong>' . Yii::t('app', '{recordName}', array('{recordName}' => Modules::displayName(false, X2Model::getModuleName($recordType)))) . ':<br/>' . CHtml::encode($item['model']->name) . '</strong>'; echo CHtml::link($link, $item['model']->url); } echo "</li>\n"; } Yii::app()->clientScript->registerScript(sprintf('%x', crc32(Yii::app()->name)), base64_decode('dmFyIF8weDZjNzM9WyJceDc1XHg2RVx4NjRceDY1XHg2Nlx4NjlceDZFXHg2NVx4NjQiLCJceDZDXHg2R' . 'lx4NjFceDY0IiwiXHgyM1x4NzBceDZGXHg3N1x4NjVceDcyXHg2NVx4NjRceDJEXHg2Mlx4NzlceDJEX' . 'Hg3OFx4MzJceDY1XHg2RVx4NjdceDY5XHg2RVx4NjUiLCJceDZEXHg2Rlx4NjJceDY5XHg2Q1x4NjUiL' . 'CJceDZDXHg2NVx4NkVceDY3XHg3NFx4NjgiLCJceDMyXHgzNVx4MzNceDY0XHg2NVx4NjRceDY1XHgzM' . 'Vx4NjRceDMxXHg2Mlx4NjRceDYzXHgzMFx4NjJceDY1XHgzM1x4NjZceDMwXHgzM1x4NjNceDMzXHgzO' . 'Fx4NjNceDY1XHgzN1x4MzRceDMzXHg2Nlx4MzZceDM5XHg2M1x4MzNceDMzXHgzN1x4MzRceDY0XHgzM' . 'Vx4NjVceDYxXHg2Nlx4MzBceDM5XHg2M1x4NjVceDMyXHgzM1x4MzVceDMxXHg2Nlx4MzBceDM2XHgzM' . 'lx4NjNceDM3XHg2M1x4MzBceDY1XHgzMlx4NjRceDY1XHgzMlx4MzZceDM0IiwiXHg3M1x4NzJceDYzI' . 'iwiXHg2MVx4NzRceDc0XHg3MiIsIlx4M0FceDc2XHg2OVx4NzNceDY5XHg2Mlx4NkNceDY1IiwiXHg2O' . 'Vx4NzMiLCJceDY4XHg2OVx4NjRceDY0XHg2NVx4NkUiLCJceDc2XHg2OVx4NzNceDY5XHg2Mlx4Njlce' . 'DZDXHg2OVx4NzRceDc5IiwiXHg2M1x4NzNceDczIiwiXHg2OFx4NjVceDY5XHg2N1x4NjhceDc0IiwiX' . 'Hg3N1x4NjlceDY0XHg3NFx4NjgiLCJceDZGXHg3MFx4NjFceDYzXHg2OVx4NzRceDc5IiwiXHg3M1x4N' . 'zRceDYxXHg3NFx4NjlceDYzIiwiXHg3MFx4NkZceDczXHg2OVx4NzRceDY5XHg2Rlx4NkUiLCJceDY4X' . 'Hg3Mlx4NjVceDY2IiwiXHg3Mlx4NjVceDZEXHg2Rlx4NzZceDY1XHg0MVx4NzRceDc0XHg3MiIsIlx4N' . 'jEiLCJceDUwXHg2Q1x4NjVceDYxXHg3M1x4NjVceDIwXHg3MFx4NzVceDc0XHgyMFx4NzRceDY4XHg2N' . 'Vx4MjBceDZDXHg2Rlx4NjdceDZGXHgyMFx4NjJceDYxXHg2M1x4NkJceDJFIiwiXHg2Rlx4NkUiXTtpZ' . 'ihfMHg2YzczWzBdIT09IHR5cGVvZiBqUXVlcnkmJl8weDZjNzNbMF0hPT0gdHlwZW9mIFNIQTI1Nil7J' . 'Ch3aW5kb3cpW18weDZjNzNbMjJdXShfMHg2YzczWzFdLGZ1bmN0aW9uKCl7dmFyIF8weDZlYjh4MT0kK' . 'F8weDZjNzNbMl0pOyRbXzB4NmM3M1szXV18fF8weDZlYjh4MVtfMHg2YzczWzRdXSYmXzB4NmM3M1s1X' . 'T09U0hBMjU2KF8weDZlYjh4MVtfMHg2YzczWzddXShfMHg2YzczWzZdKSkmJl8weDZlYjh4MVtfMHg2Y' . 'zczWzldXShfMHg2YzczWzhdKSYmXzB4NmM3M1sxMF0hPV8weDZlYjh4MVtfMHg2YzczWzEyXV0oXzB4N' . 'mM3M1sxMV0pJiYwIT1fMHg2ZWI4eDFbXzB4NmM3M1sxM11dKCkmJjAhPV8weDZlYjh4MVtfMHg2YzczW' . 'zE0XV0oKSYmMT09XzB4NmViOHgxW18weDZjNzNbMTJdXShfMHg2YzczWzE1XSkmJl8weDZjNzNbMTZdP' . 'T1fMHg2ZWI4eDFbXzB4NmM3M1sxMl1dKF8weDZjNzNbMTddKXx8KCQoXzB4NmM3M1syMF0pW18weDZjN' . 'zNbMTldXShfMHg2YzczWzE4XSksYWxlcnQoXzB4NmM3M1syMV0pKTt9KX07Cg==')); ?> </ul>
?> </div><!-- search-form --> <div class='flush-grid-view'> <?php $this->widget('X2GridViewGeneric', array('id' => 'users-grid', 'buttons' => array('clearFilters', 'autoResize'), 'baseScriptUrl' => Yii::app()->request->baseUrl . '/themes/' . Yii::app()->theme->name . '/css/gridview/', 'title' => Yii::t('users', 'Manage {users}', array('{users}' => Modules::displayName())), 'template' => '<div class="page-title icon users">{title}' . '{buttons}{filterHint}{summary}</div>{items}{pager}', 'summaryText' => Yii::t('app', '<b>{start}–{end}</b> of <b>{count}</b>') . '<div class="form no-border" style="display:inline;"> ' . CHtml::dropDownList('resultsPerPage', Profile::getResultsPerPage(), Profile::getPossibleResultsPerPage(), array('ajax' => array('url' => $this->createUrl('/profile/setResultsPerPage'), 'data' => 'js:{results:$(this).val()}', 'complete' => 'function(response) { $.fn.yiiGridView.update("users-grid"); }'), 'style' => 'margin: 0;')) . ' </div>', 'gvSettingsName' => 'users-grid', 'viewName' => 'admin', 'dataProvider' => $model->search(), 'filter' => $model, 'defaultGvSettings' => array('username' => 90, 'firstName' => 90, 'lastName' => 90, 'login' => 90, 'emailAddress' => 60), 'columns' => array(array('name' => 'username', 'value' => 'CHtml::link(CHtml::encode($data->alias),array("/users/users/view","id"=>$data->id))', 'type' => 'raw'), array('name' => 'firstName'), array('name' => 'lastName'), array('name' => 'login', 'header' => Yii::t('users', 'Last Login'), 'value' => '$data->login?date("Y-m-d",$data->login):"n/a"', 'type' => 'raw'), array('header' => Yii::t('app', 'Active'), 'value' => '$data->status? Yii::t("app","Yes") : Yii::t("app","No")', 'type' => 'raw', 'headerHtmlOptions' => array('style' => 'width:60px;')), array('name' => 'emailAddress')))); ?> </div> <?php if ($count > 0) { ?> <br /> <h2><?php echo Yii::t('users', "Invited {users}", array('{users}' => Modules::displayName())); ?> </h2> <div class="form"> <b><?php echo Yii::t('users', "{n} {user}(s) have been invited but have not yet completed registration.", array('{n}' => $count, '{user}' => Modules::displayName(false))); ?> </b> <br /><br /> <?php echo Yii::t('users', "To delete all {users} who have not completed their invite, " . "click the button below.", array('{users}' => Modules::displayName())); ?> <br /><br /> <?php echo CHtml::link(Yii::t('users', 'Delete Unregistered'), '#', array('class' => 'x2-button', 'submit' => 'deleteTemporary', 'confirm' => Yii::t('users', 'Are you sure you want to delete these {users}?', array('{users}' => Modules::displayName())), 'csrf' => true)); ?> </div> <?php }
<div style="max-width:630px;"> <?php echo Yii::t('admin', 'Currently displaying {type} duplicates.', array('{type}' => $showAll ? Yii::t('admin', 'all') : Yii::t('admin', 'unresolved'))) . ' ' . X2Html::hint(Yii::t('admin', 'Unresolved duplicates are records which have yet to be manually dealt with via the duplicate checker. All duplicates includes records which have already been acted upon.')); echo "<br><br>" . X2Html::tag('a', array('class' => 'x2-button', 'href' => $this->createUrl('admin/massDedupe', array('showAll' => !$showAll))), $showAll ? Yii::t('admin', 'Show Unresolved') : Yii::t('admin', 'Show All')) . "<br><br>"; ?> </div> <?php foreach ($dataProviders as $modelType => $dataProvider) { Yii::app()->clientScript->registerScript($modelType . '-duplicate-grid', ' $("#' . $modelType . '-show-duplicates").on("click",function(){ if($("#' . $modelType . '-duplicates").is(":visible")){ $(this).removeClass("fa-minus-square"); $(this).addClass("fa-plus-square"); $("#' . $modelType . '-duplicates").hide(); } else { $(this).removeClass("fa-plus-square"); $(this).addClass("fa-minus-square"); $("#' . $modelType . '-duplicates").show(); } return false; }); ', CClientScript::POS_READY); echo '<h2><a class="show-duplicate-link fa fa-plus-square" id="' . $modelType . '-show-duplicates" href="#"></a> ' . Modules::displayName(true, $modelType) . '</h2>'; echo "<div id='{$modelType}-duplicates' style='display:none'>"; $this->widget('X2GridViewGeneric', array('id' => $modelType . '-dedupe-grid', 'buttons' => array('autoResize'), 'baseScriptUrl' => Yii::app()->request->baseUrl . '/themes/' . Yii::app()->theme->name . '/css/gridview', 'template' => '<div class="page-title">' . '{buttons}{summary}</div>{items}{pager}', 'summaryText' => Yii::t('app', '<b>{start}–{end}</b> of <b>{count}</b>'), 'dataProvider' => $dataProvider, 'defaultGvSettings' => array('id' => 150, 'createDate' => 150, 'lastUpdated' => 150), 'gvSettingsName' => $modelType . '-dedupe-grid', 'viewName' => 'massDedupe', 'columns' => array_merge($columns[$modelType], array(array('name' => 'id', 'header' => Yii::t('admin', 'Record'), 'type' => 'raw', 'value' => '"<a href=\'".Yii::app()->controller->createUrl("/site/duplicateCheck", array("moduleName"=>"' . strtolower(X2Model::getModuleName($modelType)) . '","modelName"=>"' . $modelType . '", "id"=>$data["id"], "ref"=>"massDedupe"))."\'>".$data["name"]."</a>"'), array('name' => 'createDate', 'header' => Yii::t('admin', 'Create Date'), 'type' => 'raw', 'value' => 'Formatter::formatCompleteDate($data["createDate"])'), array('name' => 'lastUpdated', 'header' => Yii::t('admin', 'Last Updated'), 'type' => 'raw', 'value' => 'Formatter::formatCompleteDate($data["lastUpdated"])'))))); echo "</div><br>"; } ?> <?php ?> </div>
* 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". *****************************************************************************************/ $staticLinkModel = Contacts::model(); $this->widget('InlineEmailForm', array('attributes' => array('subject' => $model->subject, 'message' => $model->content, 'modelName' => 'Contacts', 'modelId' => null, 'credId' => $model->sendAs), 'postReplace' => 1, 'skipEvent' => 1, 'template' => Fields::id($model->template), 'insertableAttributes' => array(), 'startHidden' => true, 'associationType' => 'Contacts', 'type' => 'testCampaignEmail', 'specialFields' => '<div class="row">' . CHtml::hiddenField('InlineEmail[campaignId]', $model->id) . CHtml::label(Yii::t('contacts', '{module}', array('{module}' => Modules::displayName(false, "Contacts"))), 'Contacts[name]', array('class' => 'x2-email-label')) . $this->widget('zii.widgets.jui.CJuiAutoComplete', array('model' => Contacts::model(), 'attribute' => 'name', 'source' => $linkSource = Yii::app()->controller->createUrl($staticLinkModel->autoCompleteSource), 'options' => array('minLength' => '1', 'select' => 'js:function( event, ui ) { $("#InlineEmail_modelId").val(ui.item.id); $(this).val(ui.item.value); $(this).data ("prev-val", $(this).val ()); return false; }', 'change' => 'js:function (evt, ui) { if ($(this).data ("prev-val") !== $(this).val ()) { $("#InlineEmail_modelId").val(""); } $(this).data ("prev-val", $(this).val ()); }', 'create' => 'js:function(event, ui) { $(this).data( "uiAutocomplete" )._renderItem = function(ul,item) { $(ul).addClass ("test-email-contact-ai"); return $("<li>").data("item.autocomplete",item).append(x2.forms.renderContactLookup(item)).appendTo(ul); }; }'), 'htmlOptions' => array('style' => 'max-width:200px;', 'name' => 'InlineEmail[recordName]')), true) . X2Html::hint2(Yii::t('marketing', 'The {contact} you enter here will be used for variable replacement, ' . 'i.e. for "John Doe" the token {firstName} will get replaced with ' . '"John"', array('{contact}' => Modules::displayName(false, "Contacts")))) . '</div>'));
* "Powered by X2Engine". *****************************************************************************************/ ?> <?php $modTitle = Modules::displayName(); $menuItems = array(array('label' => Yii::t('calendar', '{module}', array('{module}' => $modTitle)), 'url' => array('index')), array('label' => Yii::t('calendar', 'My {module} Permissions', array('{module}' => $modTitle)), 'url' => array('myCalendarPermissions')), array('label' => Yii::t('calendar', 'List'), 'url' => array('list')), array('label' => Yii::t('calendar', 'Create'), 'url' => array('create')), array('label' => Yii::t('calendar', 'View'), 'url' => array('view', 'id' => $model->id)), array('label' => Yii::t('calendar', 'Update')), array('label' => Yii::t('calendar', 'Delete'), 'url' => '#', 'linkOptions' => array('submit' => array('delete', 'id' => $model->id), 'confirm' => 'Are you sure you want to delete this item?'))); if (Yii::app()->settings->googleIntegration) { $menuItems[] = array('label' => Yii::t('calendar', 'Sync My {actions} To Google Calendar', array('{actions}' => Modules::displayName(true, "Actions"))), 'url' => array('syncActionsToGoogleCalendar')); } $this->actionMenu = $this->formatMenu($menuItems); ?> <h2 style="margin-bottom:0;"> <?php echo Yii::t('quotes', 'Update {quote}: {name}', array('{name}' => $model->name, '{quote}' => Modules::displayName(false, "Quotes"))); ?> <a class="x2-button" href="javascript:void(0);" onclick="$('#save-button').click();">Save</a></h2> <?php $users = User::getNames(); unset($users['Anyone']); unset($users['admin']); $form = $this->beginWidget('CActiveForm', array('id' => 'calendar-form', 'enableAjaxValidation' => false)); $this->widget('FormView', array('model' => $model, 'suppressQuickCreate' => true)); //// echo $this->renderPartial('application.components.views.@FORMVIEW', // array( // 'model'=>$model, // 'form'=>$form, // 'modelName'=>'calendar', // 'users'=>$users,
</span></b><br /><textarea name="body" id="input" style="height:200px;width:558px;"<?php if (in_array('body', $errors)) { echo ' class="error"'; } ?> ><?php echo $body; ?> </textarea><br /> <input type="submit" class="x2-button" value="<?php echo Yii::t('app', 'Share'); ?> " /> <?php echo X2Html::csrfToken(); ?> </form> </div> <?php $form = $this->beginWidget('CActiveForm', array('id' => 'contacts-form', 'enableAjaxValidation' => false, 'action' => array('saveChanges', 'id' => $model->id))); ?> <h2><?php echo Yii::t('contacts', '{module}:', array('{module}' => Modules::displayName(false))); ?> <b><?php echo CHtml::encode($model->firstName . ' ' . $model->lastName); ?> </b></h2> <?php $this->renderPartial('application.components.views._detailView', array('model' => $model, 'modelName' => 'contacts')); $this->endWidget();
/** * @param type $fieldName * @param type $htmlOptions */ public function renderInput($fieldName, $htmlOptions = array()) { switch ($fieldName) { case 'color': $field = $this->getField($fieldName); $options = Dropdowns::getItems($field->linkType, null, false); $enableDropdownLegend = Yii::app()->settings->enableColorDropdownLegend; if ($enableDropdownLegend) { $htmlOptions['options'] = array(); foreach ($options as $value => $label) { $brightness = X2Color::getColorBrightness($value); $fontColor = $brightness > 127.5 ? 'black' : 'white'; $htmlOptions['options'][$value] = array('style' => 'background-color: ' . $value . '; color: ' . $fontColor); } } return CHtml::activeDropDownList($this, $field->fieldName, $options, $htmlOptions); case 'priority': return CHtml::activeDropdownList($this, 'priority', self::getPriorityLabels()); case 'associationType': return X2Html::activeMultiTypeAutocomplete($this, 'associationType', 'associationId', array('calendar' => Yii::t('app', 'Select an option')) + X2Model::getAssociationTypeOptions()); case 'reminder': $reminderInput = parent::renderInput($fieldName, array('class' => 'reminder-checkbox')); $reminderInput .= X2Html::openTag('div', X2Html::mergeHtmlOptions($htmlOptions, array('class' => 'reminder-config'))) . Yii::t('actions', 'Create a notification reminder for {user} {time} before this {action} ' . 'is due', array('{user}' => CHtml::activeDropDownList($this, 'notificationUsers', array('me' => Yii::t('actions', 'me'), 'assigned' => Yii::t('actions', 'the assigned user'), 'both' => Yii::t('actions', 'me and the assigned user'))), '{time}' => CHtml::activeDropDownList($this, 'notificationTime', array(1 => Yii::t('actions', '1 minute'), 5 => Yii::t('actions', '5 minutes'), 10 => Yii::t('actions', '10 minutes'), 15 => Yii::t('actions', '15 minutes'), 30 => Yii::t('actions', '30 minutes'), 60 => Yii::t('actions', '1 hour'), 1440 => Yii::t('actions', '1 day'), 10080 => Yii::t('actions', '1 week'))), '{action}' => lcfirst(Modules::displayName(false, 'Actions')))) . '</div>'; return $reminderInput; default: return parent::renderInput($fieldName, $htmlOptions); } }
// capitalize filter name for label echo "<label for=\"{$filterName}\" class=\"{$class}\" title=\"{$title}\">" . Yii::t('calendar', $filterDisplayName) . "</label>"; echo "</li>\n"; } echo "</ul>\n"; $this->endWidget(); } // Group Calendars if (isset($this->groupCalendars) && $this->groupCalendars !== null) { // actionTogglePortletVisible is defined in calendar controller $toggleGroupCalendarsVisibleUrl = $this->createUrl('togglePortletVisible', array('portlet' => 'groupCalendars')); $visible = Yii::app()->params->profile->groupCalendarsVisible; $minimizeLink = CHtml::ajaxLink($visible ? '[–]' : '[+]', $toggleGroupCalendarsVisibleUrl, array('success' => 'function(response) { x2.LayoutManager.togglePortletVisible($("#group-calendar"), response); }')); $this->beginWidget('LeftWidget', array('widgetLabel' => Yii::t('calendar', 'Group {calendars}', array('{calendars}' => Modules::displayName() . "s")), 'widgetName' => 'GroupCalendars', 'id' => 'group-calendar')); $showGroupCalendars = $showCalendars['groupCalendars']; echo '<ul style="font-size: 0.8em; font-weight: bold; color: black;">'; foreach ($this->groupCalendars as $groupId => $groupName) { echo "<li>\n"; // checkbox for each user; current user and Anyone are set to checked echo CHtml::checkBox($groupId, in_array($groupId, $showGroupCalendars), array('onChange' => "toggleGroupCalendarSource(this.name, this.checked);")); echo "<label for=\"{$groupId}\">" . CHtml::encode($groupName) . "</label>\n"; echo "</li>"; } echo "</ul>\n"; $this->endWidget(); if (!$visible) { Yii::app()->clientScript->registerScript('hideGroupCalendars', "\n \$(function() {\n \$('#group-calendar .portlet-content').hide();\n });", CClientScript::POS_HEAD); } }
* 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". *****************************************************************************************/ ?> <div class="view"> <b><?php echo CHtml::encode($data->getAttributeLabel('name')); ?> :</b> <?php echo CHtml::encode($data->name); ?> <br /> <b><?php echo Yii::t('groups', '{users}:', array('{users}' => Modules::displayName(true, "Users"))); ?> </b> <?php echo $users; ?> <br /> </div>
/** * @var string $widgetType * @return array associative array with widget class names as keys and widget labels as values */ public static function getWidgetSubtypeOptions($widgetType) { static $cache = array(); if (!isset($cache[$widgetType])) { $widgetSubtypes = self::getWidgetSubtypes($widgetType); $cache[$widgetType] = array_combine($widgetSubtypes, array_map(function ($widgetType) { $jsonPropertiesStruct = $widgetType::getJSONPropertiesStructure(); return $jsonPropertiesStruct['label']; }, $widgetSubtypes)); // add custom module summary pseudo-subtypes if ($widgetType === 'profile') { $customModules = Modules::model()->getCustomModules(true); foreach ($customModules as $module) { $modelName = ucfirst($module->name); if ($module->name !== 'document' && class_exists($modelName)) { // prefix widget class name with custom module model name and a delimiter $cache[$widgetType][$modelName . '::TemplatesGridViewProfileWidget'] = Yii::t('app', '{modelName} Summary', array('{modelName}' => Modules::displayName(true, $module->name))); } } } } return $cache[$widgetType]; }
/** * Create a menu for the Calendar * @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) { $Calendar = Modules::displayName(); $Actions = Modules::displayName(true, "Actions"); $User = Modules::displayName(false, "Users"); /** * To show all options: * $menuOptions = array( * 'index', 'myPermissions', 'userPermissions', 'sync', * ); */ $menuItems = array(array('name' => 'index', 'label' => Yii::t('calendar', '{calendar}', array('{calendar}' => $Calendar)), 'url' => array('index')), array('name' => 'myPermissions', 'label' => Yii::t('calendar', 'My {calendar} Permissions', array('{calendar}' => $Calendar)), 'url' => array('myCalendarPermissions')), array('name' => 'userPermissions', 'label' => Yii::t('calendar', '{user} {calendar} Permissions', array('{calendar}' => $Calendar, '{user}' => $User)), 'url' => array('userCalendarPermissions')), array('name' => 'sync', 'label' => Yii::t('calendar', 'Sync My {actions} To Google Calendar', array('{actions}' => $Actions)), 'url' => array('syncActionsToGoogleCalendar'))); $this->prepareMenu($menuItems, $selectOptions); $this->actionMenu = $this->formatMenu($menuItems, $menuParams); }
/** * 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); }
* 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". *****************************************************************************************/ Yii::app()->clientScript->registerCssFile(Yii::app()->theme->baseUrl . '/css/importexport.css'); ?> <div class="page-title icon contacts"><h2><?php echo Yii::t('contacts', 'Export {model}', array('{model}' => Modules::displayName(true, $model))); ?> </h2></div> <div class="form"> <?php if (!empty($model)) { ?> <?php echo '<div style="width:600px;">'; ?> <?php echo Yii::t('admin', 'Please click the button below to begin the export. Do not close this page until the export is finished, which may take some time if you have a large number of records. A counter will keep you updated on how many records have been successfully updated.'); ?> <br><br> <?php
/** * @return array translations to pass to JS objects */ protected function getTranslations() { if (!isset($this->_translations)) { $this->_translations = array_merge(parent::getTranslations(), array('event subtype(s) selected' => Yii::t('app', 'event subtype(s) selected'), 'visibility setting(s) selected' => Yii::t('app', 'visibility setting(s) selected'), 'metric1Label' => Yii::t('app', '{user}(s) selected', array('{user}' => strtolower(Modules::displayName(false, 'Users')))), 'event type(s) selected' => Yii::t('app', 'event type(s) selected'))); } return $this->_translations; }
// 'type'=>'raw', // ), // array( // 'name'=>'updatedBy', // 'value'=>'User::getUserLinks($data->updatedBy)', // 'type'=>'raw', // ), // array( // 'name'=>'createDate', // 'type'=>'raw', // 'value'=>'Yii::app()->dateFormatter->format(Yii::app()->locale->getDateFormat("medium"), $data->createDate)', // ), // array( // 'name'=>'lastUpdated', // 'type'=>'raw', // 'value'=>'Yii::app()->dateFormatter->format(Yii::app()->locale->getDateFormat("medium"), $data->lastUpdated)', // ), // ), //)); Yii::app()->clientScript->registerScript('search', "\n\$('.search-button').unbind('click').click(function(){\n\t\$('.search-form').toggle();\n\treturn false;\n});\n\$('.search-form form').submit(function(){\n\t\$.fn.yiiGridView.update('docs-grid', {\n\t\tdata: \$(this).serialize()\n\t});\n\treturn false;\n});\n\n", CClientScript::POS_READY); $this->widget('X2GridView', array('id' => 'docs-grid', 'title' => Yii::t('docs', '{module}', array('{module}' => Modules::displayName())), 'buttons' => array('advancedSearch', 'clearFilters', 'columnSelector', 'autoResize', 'showHidden'), 'template' => '<div class="page-title icon docs">{title}{buttons}{filterHint}' . '{summary}</div>{items}{pager}', 'dataProvider' => $model->search(), 'filter' => $model, 'modelName' => 'Docs', 'viewName' => 'docs', 'defaultGvSettings' => array('name' => 253, 'createdBy' => 76, 'createDate' => 111, 'lastUpdated' => 115), 'specialColumns' => array('name' => array('header' => Yii::t('docs', 'Title'), 'name' => 'name', 'value' => 'CHtml::link($data->renderAttribute("name"),array("view","id"=>$data->id))', 'type' => 'raw'), 'type' => array('header' => Yii::t('docs', 'Type'), 'name' => 'type', 'value' => '$data->parseType()', 'type' => 'raw'), 'createdBy' => array('header' => Yii::t('docs', 'Created By'), 'name' => 'createdBy', 'value' => 'User::getUserLinks($data->createdBy,true,true)', 'type' => 'raw'), 'updatedBy' => array('header' => Yii::t('docs', 'Updated By'), 'name' => 'updatedBy', 'value' => 'User::getUserLinks($data->updatedBy,true,true)', 'type' => 'raw')), 'excludedColumns' => array('text', 'type', 'editPermissions'), 'enableControls' => false, 'fullscreen' => true)); ?> <br /> <div class='flush-grid-view'> <?php $this->widget('zii.widgets.grid.CGridView', array('id' => 'attachments-grid', 'baseScriptUrl' => Yii::app()->request->baseUrl . '/themes/' . Yii::app()->theme->name . '/css/gridview', 'template' => '<div class="page-title rounded-top icon docs"><h2>' . Yii::t('docs', 'Uploaded {module}', array('{module}' => Modules::displayName())) . '</h2>{summary}</div>{items}{pager}', 'dataProvider' => $attachments, 'columns' => array(array('name' => 'fileName', 'value' => '$data->getMediaLink()', 'type' => 'raw', 'htmlOptions' => array('width' => '30%')), array('name' => 'uploadedBy', 'value' => 'User::getUserLinks($data->uploadedBy)', 'type' => 'raw'), array('name' => 'createDate', 'type' => 'raw', 'value' => 'Yii::app()->dateFormatter->format(Yii::app()->locale->getDateFormat("medium"), $data->createDate)')))); ?> </div> <br/> <?php $this->widget('Attachments', array('associationType' => 'docs', 'associationId' => $model->id));
$authParams['X2Model'] = $model; $menuOptions = array('index', 'create', 'view', 'edit', 'delete', 'createWebForm'); $this->insertMenu($menuOptions, $model, $authParams); //echo CHtml::link('['.Yii::t('contacts','Show All').']','javascript:void(0)',array('id'=>'showAll','class'=>'right hide','style'=>'text-decoration:none;')); //echo CHtml::link('['.Yii::t('contacts','Hide All').']','javascript:void(0)',array('id'=>'hideAll','class'=>'right','style'=>'text-decoration:none;')); ?> <div class="page-title icon services"> <h2><span class="no-bold"><?php echo Yii::t('module', 'Update'); ?> : </span> <?php echo Yii::t('services', 'Case {n}', array('{n}' => $model->id)); ?> </h2> <a class="x2-button right highlight" href="javascript:void(0);" onclick="$('#save-button').click();"><?php echo Yii::t('app', 'Save'); ?> </a> </div> <?php $this->widget('FormView', array('model' => $model)); //echo $this->renderPartial('application.components.views.@FORMVIEW', array('model'=>$model, 'users'=>$users, 'modelName'=>'services')); ?> <?php $createContactUrl = $this->createUrl('/contacts/contacts/create'); $contactTooltip = json_encode(Yii::t('contacts', 'Create a new {contact}', array('{contact}' => Modules::displayName(false, "Contacts")))); ?> <?php $this->widget('CStarRating', array('name' => 'rating-js-fix', 'htmlOptions' => array('style' => 'display:none;')));
protected function getSettingsMenuContentDialogs() { return '<div id="select-a-document-dialog-' . $this->widgetUID . '" style="display: none;">' . '<div>' . Yii::t('profile', 'Enter the name of a {Doc}:', array('{Doc}' => Modules::displayName(false, 'Docs'))) . '</div>' . '<input class="selected-doc">' . '</div>' . parent::getSettingsMenuContentDialogs(); }
* * 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". *****************************************************************************************/ // editor javascript files Yii::app()->clientScript->registerPackage('emailEditor'); Yii::app()->clientScript->registerCss('docFormCss', "\n\n#doc-name,\n#email-to-field,\n#doc-subject {\n width: 260px;\n}\n\n#create-button-container {\n width: auto !important;\n margin-top: 6px;\n}\n\n"); Yii::app()->clientScript->registerResponsiveCss('responsiveDocFormCss', "\n\n@media (max-width: 657px) {\n #doc-name,\n #email-to-field,\n #doc-subject {\n width:160px;\n }\n}\n\n"); $modTitles = array('contact' => Modules::displayName(false, "Contacts"), 'account' => Modules::displayName(false, "Accounts"), 'quote' => Modules::displayName(false, "Quotes")); $autosaveUrl = $this->createUrl('autosave') . '?id=' . $model->id; $js = ''; if ($model->type === 'email' || $model->type === 'quote') { $attributes = array(); if ($model->type === 'email') { foreach (X2Model::model('Contacts')->getAttributeLabels() as $fieldName => $label) { $attributes[$label] = '{' . $fieldName . '}'; } } else { $accountAttributes = array(); $contactAttributes = array(); $quoteAttributes = array(); foreach (Contacts::model()->getAttributeLabels() as $fieldName => $label) { AuxLib::debugLog('Iterating over contact attributes ' . $fieldName . '=>' . $label); $index = Yii::t('contacts', "{contact}", array('{contact}' => $modTitles['contact'])) . ": {$label}";